More About Relays
To further test my 8-device relay I built a little LED flashlight like this:
Then I experimented with connecting the "to relay" contacts to an actual relay. Here is an enlarged view of a relay connector:
I've added text above the 3 terminals: NO = normally open, NC = normally closed. Kind of obvious from symbol on the board. So, if I wired my flashlight to COM and NC then the light is on initially (and only turned off on purpose).
But wired to NO and COM the light is off to start with and and only on when programmed (note the red lines above). Like these Python statements:
GPIO.output(RelaySw1,GPIO.LOW) # turn SW on
and
GPIO.output(RelaySw1,GPIO.HIGH) # turn SW off
Ok, so the LOW and HIGH still seem backwards. But I don't have to worry about the relays being all on at reboot.
No comments:
Post a Comment