Please bear with me as I am a circuit-design newbie. I'm obviously misunderstanding something basic and will kick myself when you explain it to me.
I have gotten the bug to do some electromechanical computing circuits using relays. I was warned that "that way lies madness" but like a fool I dove right in.
OK, so I designed and fabbed a 16-bit register board, and it works... except when it doesn't. It would work fine except when asked to store a number with a large number of set bits (14+). Mucking around with a voltmeter I realized that the more bits were being set (and the more relays that were energized), the more the voltage across the relays was sagging, until finally it got too low to activate them.
This was weird because I was very careful to design the board so that no relays are in series; they are all in parallel - for each, there is a direct path from +5v through the coil to ground.
I was using a Raspberry Pi and some MCP23017 daughterboards to generate the test signals for the board. My first thought was that the MCPs couldn't source enough current to run the relays, so I added some MIC2981 drivers to ensure there was enough oomph.
But still, it persisted.
OK, back to absolute basics.
I connected my 5v power supply to a little breakout board that I made to distribute power as needed. I've checked it multiple times, it works fine. The 5v lines are 5v, the GNDs are GND, and never the twain will meet.
From this board, power goes to the register board; that power is only used to power the outputs of the board and a couple of master control signals. The design is such that each input signal only powers at most one relay; inputs that have power multiple relays (such as the "set bits" and "clear bits" inputs) actually activate a master relay that then provides the power. So any particular input signal is only going to draw 25-30ma at most.
Also from the board, I ran a line to the +5v rail of a breadboard.
Next, I ran jumpers from the breadboard power rail to the relay inputs so I could control them manually.
OK, this is where it gets really weird and confusing.
The power supply voltage, as measured at the power supply terminals, stays rock-solid at 5v during all my tests.
However, the voltage measured at the input to my breakout board slowly dips as I activate more and more relays. When the board is fully activated, it's down to 4.5v. Yet the point where I am measuring it is just 5 feet of wire away from the power supply. At one end of the two wires, it's 5v. At the other (at the breakout board), it's 4.5v.
I've checked and replaced the wires. They're fine. I can't understand why there'd be such a voltage drop when there is nothing between the two measuring points but two lengths of wire, one for the 5v and one for the GND.
It gets weirder.
Even 4.5v should be enough to run the relays. So I started probing the voltages across the relays. Some were showing around 4.5v, others under 4v! Despite all being in parallel, and all running off the same power source.
I took a look at my breadboard, and realized that for convenience, I'd bridged two of the 5V rails. The relays which were plugged in to the main rail (the one with the incoming power) were showing a higher voltage. The ones on the secondary were showing a lower voltage. As it happened, the incoming power was at the bottom of the rail, and the bridge was at the top, with the signal wires in the middle.
By moving a signal from one rail to the other, I could change the voltage reading across the relay. I could also affect it by changing the position of the bridge wire between the two rails (ie: to before all the signal wires).
This makes no sense to me, because, as stated, all of the relays are in parallel. The signals go through the coils and straight to ground.
So clearly I have made a fundamental mistake, and any pointers you might have that would help me diagnose and correct this mistake would be much appreciated.
I have gotten the bug to do some electromechanical computing circuits using relays. I was warned that "that way lies madness" but like a fool I dove right in.
OK, so I designed and fabbed a 16-bit register board, and it works... except when it doesn't. It would work fine except when asked to store a number with a large number of set bits (14+). Mucking around with a voltmeter I realized that the more bits were being set (and the more relays that were energized), the more the voltage across the relays was sagging, until finally it got too low to activate them.
This was weird because I was very careful to design the board so that no relays are in series; they are all in parallel - for each, there is a direct path from +5v through the coil to ground.
I was using a Raspberry Pi and some MCP23017 daughterboards to generate the test signals for the board. My first thought was that the MCPs couldn't source enough current to run the relays, so I added some MIC2981 drivers to ensure there was enough oomph.
But still, it persisted.
OK, back to absolute basics.
I connected my 5v power supply to a little breakout board that I made to distribute power as needed. I've checked it multiple times, it works fine. The 5v lines are 5v, the GNDs are GND, and never the twain will meet.
From this board, power goes to the register board; that power is only used to power the outputs of the board and a couple of master control signals. The design is such that each input signal only powers at most one relay; inputs that have power multiple relays (such as the "set bits" and "clear bits" inputs) actually activate a master relay that then provides the power. So any particular input signal is only going to draw 25-30ma at most.
Also from the board, I ran a line to the +5v rail of a breadboard.
Next, I ran jumpers from the breadboard power rail to the relay inputs so I could control them manually.
OK, this is where it gets really weird and confusing.
The power supply voltage, as measured at the power supply terminals, stays rock-solid at 5v during all my tests.
However, the voltage measured at the input to my breakout board slowly dips as I activate more and more relays. When the board is fully activated, it's down to 4.5v. Yet the point where I am measuring it is just 5 feet of wire away from the power supply. At one end of the two wires, it's 5v. At the other (at the breakout board), it's 4.5v.
I've checked and replaced the wires. They're fine. I can't understand why there'd be such a voltage drop when there is nothing between the two measuring points but two lengths of wire, one for the 5v and one for the GND.
It gets weirder.
Even 4.5v should be enough to run the relays. So I started probing the voltages across the relays. Some were showing around 4.5v, others under 4v! Despite all being in parallel, and all running off the same power source.
I took a look at my breadboard, and realized that for convenience, I'd bridged two of the 5V rails. The relays which were plugged in to the main rail (the one with the incoming power) were showing a higher voltage. The ones on the secondary were showing a lower voltage. As it happened, the incoming power was at the bottom of the rail, and the bridge was at the top, with the signal wires in the middle.
By moving a signal from one rail to the other, I could change the voltage reading across the relay. I could also affect it by changing the position of the bridge wire between the two rails (ie: to before all the signal wires).
This makes no sense to me, because, as stated, all of the relays are in parallel. The signals go through the coils and straight to ground.
So clearly I have made a fundamental mistake, and any pointers you might have that would help me diagnose and correct this mistake would be much appreciated.