0
\$\begingroup\$

I'm currently trying to make a system where sending a message to my Raspberry Pi from my phone will send a signal to my apartment's buzzer to open the front door, however I've been having problems choosing an appropriate optocoupler for the job.

The rough schematic that I had planned to use is as follows:

schematic

simulate this circuit – Schematic created using CircuitLab

I'm a total rookie in this field, so you'll have to forgive me if my drawing doesn't make much sense.

The door buzzer that I have is this model, where on the second image the top right metal switch is the one that I'm hoping to force to connect by using the optocoupler connected to the raspberry pi. I tried using this optocoupler, however it seems that while my circuit design seemed okay, there wasn't enough flow through the optocoupler to get the door's buzzer to activate. I tried replacing the buzzer with a simple LED, and while it was activated when I sent the message, it was extremely dim.

As such, I'm convinced that the problem is likely down to the optocoupler not carrying enough voltage/current (not sure which) to activate the buzzer.

I welcome any and all criticism and suggestions, as I'm just doing this project to help learn about some basics of electronics.

Thanks in advance.

\$\endgroup\$
  • \$\begingroup\$ Have you figured out how much current you're putting through the optocoupler's LED? \$\endgroup\$ – Ignacio Vazquez-Abrams Jan 26 '16 at 18:32
  • \$\begingroup\$ I tried using resistors of various capacities, however no matter what I did on the LED side of the optocoupler the LED I put in place of the buzzer's brightness didn't change. I believe the first resistor I tried was 470 ohms, as it's the closest to the 360 ohms that a commentor on my previous post recommended. \$\endgroup\$ – Daniel Crane Jan 26 '16 at 18:39
2
\$\begingroup\$

I don't see any info on the wiring diagram as to what the current is or even whether it's AC or DC. I would suggest using a small 5-10A relay for this application. You may be able to find a pre-made board with a relay + driver transistor, or if not, there are many such circuits out there. For example:

schematic

simulate this circuit – Schematic created using CircuitLab

The relay supply can be any convenient voltage from 5V to 24V. Choose R1 so that the base current is about 1/20 the relay (and indicator LED, if any) current. So for a 5V 72mA relay coil you could use 1K or 1.2K. You can put an LED and series resistor in parallel with the relay coil if you want some visual indication of operation.

Note that if something goes wrong and your buzzer stays energized it might damage the lock solenoid if there is no automatic cutout (hopefully there is).

A simpler, but more expensive, approach is to use a solid-state relay (SSR) that uses a MOSFET output. For, this Panasonic one:

enter image description here

Which will supply both the isolation and the output switching. It would be a good idea to put a TVS rated at perhaps 48V across the 'contact' (pins 4 and 6, leave 5 open). Like the mechanical relay this will work with either AC or DC, and like the mechanical relay you should consider the consequences of failure (your apartment being unexpectedly unlocked or the lock solenoid being damaged).

\$\endgroup\$
0
\$\begingroup\$

Part of building electronic systems is figuring out how to find out what is wrong when things don't work. A good way is to conceptualize the system like you have done and then start to go through it piece by piece and make sure each component is functioning correctly. The opto-isolator hast to be able to switch on. How does it switch? With light. So is the raspi really turning the led inside the opto isolotor on and off? Replace the optoisolator with and LED and see if the raspi and software is working. Once you know that is working go down the line and see if you can get the optoisolator working. Put a volt meter on the output and switch it to ohms mode or diode mode (make sure you get the polarity right, optoisolators usually have a optotransistor which is polarized) Then see if you can get the meter to go from near 0 ohms to near infinite ohms (switching on and off). Then hook it up to the doorbell. If it still doesn't work make life easier by using just the optoisolator and a resistor and switch and see if you can control the doorbell that way. The doorbell also has a 'ground' one side of the switch is probably grounded so it may have a polarity.

\$\endgroup\$
  • \$\begingroup\$ You can get optoisloators that work with AC or DC \$\endgroup\$ – Voltage Spike Jan 26 '16 at 19:01

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.