Electronic – Switch seperate 12V circuit with Rasp Pi Zero

opto-isolatorraspberry piswitchestransistors

I'm trying to use a Raspberry Pi Zero to control our apartment unit's buzzer phone (the thing that lets people at the building door in).

There is a momentary push-button that completes a 12VDC circuit, causing the door to be unlocked. I've attached leads so that when I touch them together, it does the same thing as pressing the button.

So far I've tried two approaches to wire this up to a rasp pi.

The first was with a single NPN transistor controlled by one of the +3.3V GPIO pins. Verified the circuit concept by controlling a simple LED circuit with the GPIO high or low.
Then I tried it with the buzzer, hooked the +12V from the buzzer to the collector and the 0V to the emitter. This didn't work, and caused some buzzing in the phone.

Next I tried this Opto-isolator breakout https://www.sparkfun.com/products/9118 in hopes that isolating the two systems would be more straightforward and eliminate the possibility of a ground loop. I also tried this with the LED proof-of-concept circuit. It was noticeably dimmer when going through the opto-isolator vs. not, and it didn't end up working out with the buzzer. I'm thinking it introduces too much resistance.

If you were doing this, what approach would you take? Is there any way I can modify my approaches to make something work?

Best Answer

You mention buzzer phone and that it completes a simple 12VDC circuit, but then also mention causing 'buzzing in the phone'.

Reading between the lines of this I assume that you mean you have an intercom system with a door unlock/release button on the handset and a unit at the door entry ?

The short answer if so is, use a relay it is by far the easiest option.

There are several possible scenarios with an intercom system.

  1. The button on the intercom is a dry contact that switches the door lock power directly.

  2. Same as above but rather than directly powering the lock the push button is an input to an access control system or similar that controls the lock.

  3. The button is actually part of a circuit on the intercom handset, this will then perform some sort of function on the intercom system, depending on the type. Some may then activate a relay on the door station or a similar relay/actuator module somewhere. Some door stations or modules may have powered lock outputs rather than a relay. Typically the intercom may be a bus system with audio/video and potentially data/lock functions on the same wires, some may use several dedicated wires, it varies massively with proprietary yet similar systems used by different manufacturers.

Given you say you caused buzzing by connecting a transistor I suspect that it may be something like 3, where you are affecting your handset's circuit in unexpected ways and if so it may be difficult to determine how to connect a transistor without knowing the circuit design of the handset.