-
@Robin thank you so much for your response.
I completely agree that using a transitor would be the right way to go. It's also what @allObjects is suggesting (thanks!). If I understand correctly I would connect G to the ground, S to the connector on intercom I want to ground and D to one of GPIO of MDBT42Q. Than I would control it with a code like
analogWrite(TRANSITOR_D, 1)
to close circuit andanalogWrite(TRANSITOR_D, 0)
to brake it again. Is my understanding correct?The only problem I have with this approach that I don't have a transitor at hand :) and if I order one online I will have to put my project to a shelf for a week or two until it's delivered.
I measured the voltage between the circuit I need to short using universal meter. They show 0.6V of difference. And it really looks like unlocking is just triggered by grounding this wire. If I understand correctly this means "pull-down" signal, right?
I reviewed the tutorial with the loop and detecting when it gets grounded. I guess it's slightly different than what I need. The tutorial detects that the voltage has dropped. However in my case I need to cause the voltage to drop and the voltage is supplied by the external source (transformer coil of the intercom). Can you please elaborate on how I could cause a voltage drop on a wire connected to GPIO?
Do you have resistors in the 5K to 10K to 50K range to use as a jumper to test?
I don't. But I do have a universal meter. What should I test for?
Btw, you've probably already noticed I have very little knowledge about microelectronics. I write software for living. This is my toy project to learn something outside my field of expertise.
Thank you again for helping me out.
Any luck with the example tutorial in #2 post?
It appears so, but there are a few gotch'as
Are we truly just grounding, pulling a high voltage through it's internal pull-up to ground, or even connecting two high voltages together? What are the voltages? The MDBT42Q is not tollerant.
While there is an internal resistor, it would be safer to verify.
See p.151
That could be powered by a 9V battery or even 12V or greater. It might be setup with protection circuitry, it might not. I smell smoke if not sure. Do you have resistors in the 5K to 10K to 50K range to use as a jumper to test? If that is successful, then a lesser chance of damaging the GPIO pin when used as an input.
While it is quite possible under the assumption we are just grounding a pin, if one is not ABSOLUTELY sure, I'd play it safe and toggle a 1 cent transitor, which should protect the MDBT42Q and one could then control the resistors/current/grounding of an external circuit. Not enough information for me to make a suggestion.
Review the #2 post example, it seems to be what the project requires.