I’m trying to control a door with a Raspberry Pi. All I know about the door’s wiring is as follows:
- Crossing the white and green wire of the door causes the door to open (makes sense based on the installation manual)
- Either 12 or 24v DC is supplied on the red and black wires (the installer chose)
- Maximum DC current draw is 1 amp.
And here are the specs about the Pi I’m using:
- Outputs 3.3v at 8ma by default, can be configured from 2mA to 16mA
Being overconfident in my abilities, I made a parts list and bought:
- A 5v DC switching voltage regulator - I had read online that switching regulators produce far less heat than linear voltage regulators.
- This relay. - I accidentally bought a NC one instead of a NO one But otherwise this looked good to me - input voltage within the possible range (input 0.9-1.5v, with a typical input of 1.2v, and could handle a current load of 3.25 Amps between 0 and 60v).
- Some resistors - particularly, one 562 ohm one and one 1000 ohm one. These are to be used to construct a voltage divider to convert the Pi’s 3.3v to the relay’s needed 1.2v.
The circuit is designed so the 12 or 24 volts of DC from the door’s wiring go into the voltage regulator, which outputs 5v. This 5v is then fed into the 5v rail of the Raspberry Pi. The Pi outputs 3.3v to the pin when triggered. This 3.3v is then fed into a voltage divider, reducing it to 1.2v. That 1.2v is fed into the relay, which “connects” the white and green wires.
However, when I put the relay into a test circuit, feeding it the input as configured above and using 3.3v and a GPIO input pin as the load, it would not actuate.
I have a few questions:
- Can I complete this without ordering any new parts?
- Where did I go wrong in my test? Would my design work?
- Is there a better way to power the Pi?
- Can I use an EMR? I like being able to hear the sound to know it’s actuating; however, I couldn’t find any that had a coil input of 3.3v.