0
\$\begingroup\$

I have a small microcontroller (VoCore, runs Linux, has wifi and GPIOs) and i want to use it to hook into another system (basically a doorbell) to make the state of the doorbell-buzzer available over the network.

The system I want to hook into runs on 8V DC, there is a buzzer in it which normally doesn't get any power, if somebody rings the doorbell it gets 8V. My board runs on 5V with a 3.3V GPIO logic level, so i have a DC-DC converter which transforms the 8V to 5V, that the things i want to connect already share a common ground-level.

I am unsure of how I can hook into / "read" the state of the buzzer-line. It should still work as it does now. I had the following 2 ideas:

  • First I thought that I'll have to use a relay which is connected in parallel to the buzzer and is thereby switched with the buzzer, then simply connect a GPIO from my microcontroller to the output side of the relay and connect it to V+ from the microcontroller via some resistor. Basically like swithing a relay with the microcontroller only that the relay is put in "backwards".
  • When I looked around for parts I saw that logic level converters (e.g. for TTL lines) are often cheaper as relays and would probably have some other advantages because of the lack of moving parts. If I can find one which provides 8V to 3V (or simply uses reference voltage lines), I would assume that it can be used instead of a relay to read the state of the buzzer.

So my question is: Is my second assumption true? Can logic level converters be used like relays for "detecting" voltage on some line? Or am I on the wrong track from the start - how is detecting voltage on some line with different voltage than my microcontroller typically done?

\$\endgroup\$
4
\$\begingroup\$

how is detecting voltage on some line with different voltage than my microcontroller typically done?

Normally people use an opto-coupler; an LED and photodiode in close proximity sealed into one package: -

enter image description here

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ thank you, totally forgot about those (I only occasionally work with electronics in my spare time). I'll definitely go and learn / play around with them. Would logic level converters also work here (even though it would be overkill)? \$\endgroup\$ – NoUsername Apr 25 '15 at 22:25
  • \$\begingroup\$ @NoUsername It is difficult to say without a circuit and knowledge of the variations in the 8V supply - remember logic level converters are non-isolating and this gives me concern in your application. \$\endgroup\$ – Andy aka Apr 26 '15 at 8:39
  • \$\begingroup\$ The OP has stated that he/she is using a DC-DC converter to produce the 5V needed to power their MCU board. It is highly likely that the DC-DC converter is not an isolating type in which case the buzzer/bell system GND will be shared with the MCU board GND. In such case there is not too much reason to use an opto-coupler for isolation. In fact the voltage divider circuit that I have in my answer would be just as effective although if there is concern that the 8V signal is very noisy a capacitor can be added across the R2 resistor of the divider to low pass filter the signal. \$\endgroup\$ – Michael Karas Apr 27 '15 at 1:36
  • \$\begingroup\$ @MichaelKaras you may indeed be correct. \$\endgroup\$ – Andy aka Apr 27 '15 at 7:15
2
\$\begingroup\$

Since the I/O pin input to your microcontroller is pretty high impedance you could simply use a voltage divider as follows to convert the 8V buzzer signal to a 3.3V level suitable for the MCU.

enter image description here

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.