Translate

Sunday, 9 March 2014

Room Management System - Adding a relay to the output

First a quick warning:
PLEASE do NOT attempt to run the 16 relays direct of your Arduino Uno. 16 activated relays draw more current than the Arduino can deliver. 

As promised the explanation on how to add the relay to the output. Parts needed:
1 relay with 5V on the coil and switching 240V 3A
1 Diode 1N414B
1 Transistor BC337
1 Resistor 1K




I had a small breadboard lying around which I used to demonstrate the use of the later in production state needed relays.
First I put the relay on the breadboard the two common pin from the switch facing me. One side of the coil goes to the 5V bus and the other side is connected to the collector (c) of the BC337 transistor. The emitter of the transistor is connected to the GND bus. The base of our transistor connects to a 1K resistor and from there to the respective output pin of the 74HC595 shift register. The shift register in the above drawing is only to demonstrate how to connect to the output. In my example I used Q1 (pin 15) of the shift register with also the LED connected as described in the previous chapter.
To demonstrate the function of the relays, I connected the common switch pin to the 5 V bus and on the NO (normal open) switch pin another LED with it's 330 ohm resistor to ground. Not to forget the 1N414B Diode with the blocking side facing the supply between the coil connectors of the relay.

A small consideration for the praxis later:
If this 240V 3A relays are used, it will be mandatory to use for the power switching later additional solid state relays Meanwhile I found also same size relays with a 5V coil and switching 240 V 10A which would safe the use of additional solid state relays for most of the rooms and limit the addition to a heavy load contactor as master switch.
Going through prizing and service ability I would use ready made relay shields which come optoisolated and with the 240V 10A switching specs, ready made for the same prize you by the parts to build the circuits. Out of experience, if on the unit something goes wrong it's usually 1 of the relays which stop working and having a spare one of this relay shields, the repair is a 10 minute job...

Finally in the next chapter we'll be coding the interesting part of the unit.

No comments:

Post a Comment