I'm getting myself a list of parts together for some controllable 240v sockets and nice to see I will need to add the ULN2803, ill be shopping on ebay and would the ULN2803A be the same item but with a circuit board?
Need to keep it as simple as I can as it will be my first time with electronics, ill be building a four socket relay as 4 controllable is enough for me but will be adding float switchs for ato and skimmer switch off if sump fills as it floods my cup and want to avoid that.
Also @Erica-Renee the above diagram is good for me but a little unclear to a beginner like me, I'm not quite understanding the 5v power supply input, also I will need 4 wires connected for a four channel relay from the gpio pins?
thankyou for any help.
The 5v power supply is to power the electronics on the Relays, This keeps from having to power the relay board from the pi gpio 5v pin...
The uln2803a has 18 pins... pin 1-8 are gpio pins .... They connect to the assigned gpio on your pie Pin 18-11 are gpio output to relay giving you a total of 8 relay channels .
Example
pin 1 connects to gpio on pi.... Pin 18 connects to relay 1
pin 2 connects to gpio on pi .... Pin 17 on connects to relay 2
pin 3 connects to gpio on pi .... pin 16 connects to relay 3
pin 4 connects to gpio on pi .. pin 15 connects to relay 4
up to 8 relays
I have nothing connected to pin 10.. only thing common is ground
Pin 9 is Ground and connects to pi ground, power supply ground and relay board ground.
Hope this is helpful...
Disclaimer.. I am not a electronics expert this is just how mine is working with no issues.. I had A Issue with power drain when i connected pin 10... After some internet searching i found somewhere pin 10 is not needed .. You can do this with a Diode resister and npn transistor for each of your relays without the uln chip. if only or or two relays might be best solution.. But you need to calculate diode, resister and transistor values
ALSO
This has way more info then I am capable of.. There are more ways of doing this..
http://www.instructables.com/id/I2C-Relay-Board/
