I've got a small project that is supposed to be for me to learn how to get a Raspberry Pi 4 to trigger a few motors and other assorted bits of kit. (Automated watering project, along with graphical interactive display) - Still in breadboard test stages as I can't move beyond...
The relay board is one of these;
Optocoupler relay (Amazon)
This particular one has only 5 relays wired up, has 12v DC plugged into the blue terminal blocks at the bottom and has the 5v inputs and ground pins going to the Pi via the GPIO pins.
Power for the attached devices (motors and solenoids) is drawn from an exterior 12v power source, it is the same supply as the one that powers the board... Taking the 12v DC board power out means that the relay board doesn't function at all, the Pi doesn't supply enough via 5v to make the board work.
I've got it working when there are no devices attached to the relays - but when the relays have a device that draws current installed - they seem to trigger each other and mess everything up.
Below is what I had assumed would be an acceptable setup, but I'm sure that a couple of the devices are allowing enough power to flow back around that it is somehow triggering the relays - and I don't understand why it is doing this.
Circuit wiring (simplified)
The relay input is handled by the Pi via an 8bit shift register.
The image above only shows how part of the system is laid out. Without any attached devices - the system works fine and is controlling the relays according to the program specifics (relays toggle on and off as expected)
As soon as the devices are added - it stops functioning as expected and quickly flickers between relays, sometimes it triggers some relays to swap states and other times not - there is no consistency to the madness.
This is my first time building electronic circuits - I've previously just stuck to writing code.
I've missed something simple, but I don't know what.
EDIT:
Power supply is 12v 30A
Main motor load is 6A
Two smaller 12v motors are 2A
Solenoids - I think 1Amp was needed to hold them open (normally closed)
The relay board is one of these;
Optocoupler relay (Amazon)
This particular one has only 5 relays wired up, has 12v DC plugged into the blue terminal blocks at the bottom and has the 5v inputs and ground pins going to the Pi via the GPIO pins.
Power for the attached devices (motors and solenoids) is drawn from an exterior 12v power source, it is the same supply as the one that powers the board... Taking the 12v DC board power out means that the relay board doesn't function at all, the Pi doesn't supply enough via 5v to make the board work.
I've got it working when there are no devices attached to the relays - but when the relays have a device that draws current installed - they seem to trigger each other and mess everything up.
Below is what I had assumed would be an acceptable setup, but I'm sure that a couple of the devices are allowing enough power to flow back around that it is somehow triggering the relays - and I don't understand why it is doing this.
Circuit wiring (simplified)
The relay input is handled by the Pi via an 8bit shift register.
The image above only shows how part of the system is laid out. Without any attached devices - the system works fine and is controlling the relays according to the program specifics (relays toggle on and off as expected)
As soon as the devices are added - it stops functioning as expected and quickly flickers between relays, sometimes it triggers some relays to swap states and other times not - there is no consistency to the madness.
This is my first time building electronic circuits - I've previously just stuck to writing code.
I've missed something simple, but I don't know what.
EDIT:
Power supply is 12v 30A
Main motor load is 6A
Two smaller 12v motors are 2A
Solenoids - I think 1Amp was needed to hold them open (normally closed)
Last edited: