Luteijn/Relay

From RevSpace
Jump to navigation Jump to search

Project "Microcontrolled relay board":

Project Luteijn/Relay
Status In progress
Contact Luteijn
Last Update 2018-01-19

My garage-door-opener can be controlled by pulling a particular DC 20V pin on the controller down. This is meant for a (key) switch to control operate the door or turn on the LED lamp. I've wired the pin through two relays. One pulls the pin low enough (using a 100 Ohm resistor to form a voltage divider with a pull-up inside the controller) to activate the lamp, the other shorts it to ground, which will activate the door actuator. The control is rather crude, basically a pulse will stop a moving door, or starts a non-moving door. Direction is reversed from whatever was the last direction., although this is not 100% guaranteed it seems. Normally not an issue as you'd see the direction of the door and can just operate the switch to compensate. Of course, the idea is that the relays can be operated from anywhere, to let people in when unable to open a door by hand. So it's useful to be able to 'see' if the door is open or closed. This is sensed via a reed relay and a magnet stuck to the door. if the door opens, the magnet travels away from the reed relay, changing the voltage over it, which is measurable by the relay-controller.

The relay-controller runs on an ATT45, which talks over (software) serial to a host computer (GLInet router in my case) and from there to the rest of the world. Access control is handled on the host computer, for flexibility and to save space on the ATT45


DONE:

  • control typical 'arduino' 2-relay board with NodeMCU.
  • control typical 'arduino' 2-relay board with ATTiny 45.
  • garage-door opener controller for NodeMCU as PoC - web frontend.
  • garage-door opener controller for ATT45, serial 'front'end.

TODO:

  • invert logic on door open detection reed contact so open circuit when door closed?
  • print a box for mains->USB power brick and connect as separate power supply for coils?
  • add more reed contacts at different voltages to detect e.g. fully opened door, or checkpoints along the way. maybe some kind of ultrasound distance meter to detect how far the door is opened?