10mA constant-current garage door controller

Hello. I have a garage door opener (GDO) that I'd like to interface to inject commands. As far as I can tell the existing circuit has the GDO act as a 10mA constant-current source, and the wall console buttons put a fixed resistance across the wires creating a known voltage for the GTO to look for.

My first version of this circuit was going to use 3 signal relays to do the same as the wall console. It would look something like:

(link to simulation)

I can't see any reason this wouldn't work, but I thought maybe there's a better solution. I next looked at using mosfets to switch across a couple resistors. That got a little complicated on trying to make sure the wall console continued to work without a signal from the mcu, but might work. On the 1-board costs that also started to add up a bit, so I thought the best solution was to just pay the $1.50 and buy a DAC with buffered outputs.

The DACs I've found (eg: MCP4725) seem more than happy to sink the 10mA needed to drag the output to >3V, 2V, 850mV, 0V, so I think this should work while hooked up.

The questions I'm having are around the output pin being too high during hook-up. If the wall console is unplugged the GDO shows ~18v across the open circuit. It seems that's the max it can push. The DAC would be very unhappy to get 18v on it's output (and if the output buffer op-amp is configured as a voltage follower, then I guess at that op-amp input too). While the GDO is sitting at 18v it seems there's no real current behind that. If you short it then you only get 10mA. I'm just not sure how quickly things respond and if I need to protect the DAC here, and if I do need to protect the DAC how do I do that.

The most foolproof way to replace/duplicate a switch is with a relay. A relay is an electrically-controlled and electrically-isolated switch.

The Arduino can't directly drive a relay so you either need a driver circuit, or you can buy relay boards with the driver built-in.

I would use a filtered PWM for this. To boost the PWM output use a PNP transistor (collector to GND, base to Arduino and Emitter to the 10mA). This will also provide the protection needed. This won't be able to pull to less than about 0.5V. This could be solved by another pin and a NPN transistor.

Another option I have considered is limiting the voltage by a Schottky diode to Arduino's Vcc or a 5V1 Zener diode.
With this protection you could use 3 pins with appropriate resistors to generate those voltages. But the Arduino pin has output voltage about 0.2V when sinking 10mA. Will your device recognize this as GND?

I’m a bit confused. If the µC at the left is what you want to add, where sits the circuit to execute the commands? I guess that some omitted circuit reacts on the voltage left on the constant current output.

Then the solution is easy: add an opto coupler for each switch, in parallel to the wall console contacts if possible. Else use your addition with opto couplers instead of relais. Eventually the resistors have to be reduced a bit to compensate for the o.c. voltage drop.

DrDiettrich:
Then the solution is easy: add an opto coupler for each switch, in parallel to the wall console contacts if possible. Else use your addition with opto couplers instead of relays. Eventually the resistors have to be reduced a bit to compensate for the o.c. voltage drop.

Won't work. :astonished: Did you note the resistor values? No optocoupler is going to have an effective "on" resistance that will even be comparable with such low values.

For those resistor values, it must be relays. :cold_sweat:

BJT have no ON "resistance", only a minimal Vce of about 0.3V at 10mA. This voltage drop can be compensated by an accordingly lower resistor.

Smajdalf:
I would use a filtered PWM for this. To boost the PWM output use a PNP transistor (collector to GND, base to Arduino and Emitter to the 10mA). This will also provide the protection needed. This won't be able to pull to less than about 0.5V. This could be solved by another pin and a NPN transistor.

Another option I have considered is limiting the voltage by a Schottky diode to Arduino's Vcc or a 5V1 Zener diode.
With this protection you could use 3 pins with appropriate resistors to generate those voltages. But the Arduino pin has output voltage about 0.2V when sinking 10mA. Will your device recognize this as GND?

You are assuming that the 10mA loop is referenced to some sort of gnd reference that can be shared with the garage door controller.

@kenmacd;
Complete isolation such as a relay is ideal as it would be easy to instigate, provide 100% isolation, and as the usage is not 100's of operations a day would suit the purpose.

Reason I know this?
At my workplace one of our guys has just made an RFID key controller for our industrial roller door.

Tom.... :slight_smile: