Struggling to understand bizarre voltage drop on parallel relay circuit.

Thread Starter

MadOverlord

Joined Mar 2, 2020
7
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.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
All relays in parallel mean they could all be activated also, it would seem that you are exceeding the VA rating of the supply you are using and it is 'dragging' the voltage down due to excess load.
Post your schematic.
Max.
 

dl324

Joined Mar 30, 2015
16,845
Welcome to AAC!

Your problem would likely be easier to understand if you included a schematic. I read about half of your post and gave up because you hadn't gotten to the point.
 

Thread Starter

MadOverlord

Joined Mar 2, 2020
7
Schematic: https://easyeda.com/MadOverlord/16-bit-register

Currently I have the diodes on the inputs jumpered out because I realized they should not be needed. But perhaps I am wrong.

I also did not install the leds near each of the bit relays as they replicate the leds on the output at top right of the board.

Again, the totally weird thing is that the power supply (5v,40a, it's plenty big) is reading 5v at the power supply, and 4.5v at the input to the power distribution board when the relays are activated -- and those two points are direct-connected by a single length of wire. This makes no sense to me, logically the two points should read identically. But they don't, and the difference is proportional to the # of relays that are energized.
 

dl324

Joined Mar 30, 2015
16,845
Thanks, but that wasn't very helpful. I tried to open the first schematic and gave up after 10-15 seconds of watching the circle of dots.

Please post images of the schematics on this site. This will prevent us from having to go to other sites and not have broken links if this post is referenced in the future.

he totally weird thing is that the power supply (5v,40a, it's plenty big) is reading 5v at the power supply, and 4.5v at the input to the power distribution board when the relays are activated -- and those two points are direct-connected by a single length of wire. This makes no sense to me, logically the two points should read identically. But they don't, and the difference is proportional to the # of relays that are energized.
The problem with your logic is that you're assuming that wires used for interconnect have no resistance. That's never going to be the case unless you're using superconducting materials.

How much current are each of the relays drawing? What gauge wire are you using?
 

Thread Starter

MadOverlord

Joined Mar 2, 2020
7
Here is a PDF.

The relays draw between 25-30ma each, and the entire circuit is drawing less than an amp when all relays are energized. The power supply is connected to the power breakout board by 22ga wire.
 

Attachments

schmitt trigger

Joined Jul 12, 2010
868
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 bolded a particular phrase. There is only one explanation for that behavior........Ohm's law.
Maybe not in the wire itself, perhaps in the connectors....or a solder joint for the connector.... or a copper trace leading to that solder joint... or........
 

MisterBill2

Joined Jan 23, 2018
18,167
What your project is suffering from is a lot of voltage drops. Each connection drops a little. AND the connection wires are contributing their own voltage drops as well. And if you have some of those cheap China-made clip leads, they are not suitable to carry any current. In addition, the white breadboarding things seldom have good connections and they always age poorly. So that is the basis of your problems. Thos little wires DO have serious voltage drops. That knowledge comes from experience, not from any class that I took.
 

Thread Starter

MadOverlord

Joined Mar 2, 2020
7
Thank you all for the comments and the associated gift of your time.

I've done a little more testing and found that isolating the control relay signals from the data relay signals using diodes seems to stabilize things a bit. I'm no longer seeing the different voltage drops, although of course now I have the drop due to the diodes to account for.

schmitt trigger makes an useful point about all the possible places where things can go slightly wrong, and given that the final project is going to have 20+ boards full of relays, unless I build in some tolerance to these kinds of issues, it'll be a nightmare to debug.

Thus, I would appreciate any advice about how to design the system to be more robust and tolerant of imperfection.

One thing that occurred to me was that since the input signals to a board [that drive a relay] are usually the outputs of another board, and since those outputs are basically the supply voltage routed through a relay's contacts, perhaps each board should be using a voltage regulator to ensure that the outputs as close to 5v as possible?
 

dl324

Joined Mar 30, 2015
16,845
perhaps each board should be using a voltage regulator to ensure that the outputs as close to 5v as possible?
You could do that, but why bother? 5V parts will typically tolerate a 5% variance in supply voltage; some will tolerate 10%. The USB specification allows the 5V supply to be 4.5-5.5V (10% variance).

Any circuit you design should consider tolerances. Most things will have them: resistors, capacitors, diodes, transistors, logic chips, microcontrollers, etc.
 

MisterBill2

Joined Jan 23, 2018
18,167
Relay logic uses a fair amount of current, and so you will need to use adequately sized wire, a high capacity power supply, and make certain that all of your connections are solid.
 

msimpkins

Joined Jun 12, 2019
1
Schematic: https://easyeda.com/MadOverlord/16-bit-register

Currently I have the diodes on the inputs jumpered out because I realized they should not be needed. But perhaps I am wrong.

I also did not install the leds near each of the bit relays as they replicate the leds on the output at top right of the board.

Again, the totally weird thing is that the power supply (5v,40a, it's plenty big) is reading 5v at the power supply, and 4.5v at the input to the power distribution board when the relays are activated -- and those two points are direct-connected by a single length of wire. This makes no sense to me, logically the two points should read identically. But they don't, and the difference is proportional to the # of relays that are energized.
Is your supply a switch mode or linear power supply?
 

MisterBill2

Joined Jan 23, 2018
18,167
If you are still having problems then you are still suffering from voltage drops someplace. There are a number of ways around that , but none of them are trivial. Using large enough wire is a simple one but that still requires good connections, and good connections are always more work. Adding power feeds so that every board actually has real 5 volts is another way to assure that it keeps functioning. That might take a redesign of the boards, depending on the circuit that you use. A really wild change would be to use CMOS logic devices instead of relays, but still do things in the fundamental gates mode.
Be aware that computing in any form quickly went away from relay logic because as the circuits became big enough to deliver useful functions they also got physically big, heavy, and power consuming and HOT.
A compromise could be to get a PLC, Programmable Logic Controller of the variety that programs in relay ladder logic. It works just like relay logic, except that unlike relays you very seldom run out of contacts. And the logic is just as easy to follow as actual relay ladder operation. So that may be an option if you want to extend to really serious sizes of logic arrays. Best part is that the program listings can look exactly like relay circuit drawings.
 

Thread Starter

MadOverlord

Joined Mar 2, 2020
7
Thanks for the advice. The reason for using relays is that this is a specific retro-computing project, in part inspired by one of the oldest operating computers in the world, the Fujitsu FACOM-128B, which I have had the great privilege of seeing in operation. It's built entirely out of telephone relays - the memory is a crossbar switch!
 

MisterBill2

Joined Jan 23, 2018
18,167
Thanks for the advice. The reason for using relays is that this is a specific retro-computing project, in part inspired by one of the oldest operating computers in the world, the Fujitsu FACOM-128B, which I have had the great privilege of seeing in operation. It's built entirely out of telephone relays - the memory is a crossbar switch!
OK, that explains quite a bit.
It may be that some company that makes relays may have a model that is more suited to such an application. It may also be that relays with a higher coil voltage would require less current, reducing the voltage drop problem a bit.
Back in 1968 a classmate and I started a project for a simple adding machine that was based on "CYPACK" modules. That was a technology based on very small magnetic amplifiers. It did not get very far, since the simple 8-bit adder took up most of a 6 foot tall relay rack, and required a large power supply. It was an interesting technology, but it was rapidly replaced by RTL and DTL ICs that used far less power and took up less than 1% as much space.
 

eetech00

Joined Jun 8, 2013
3,858
Thanks for the advice. The reason for using relays is that this is a specific retro-computing project, in part inspired by one of the oldest operating computers in the world, the Fujitsu FACOM-128B, which I have had the great privilege of seeing in operation. It's built entirely out of telephone relays - the memory is a crossbar switch!
Hello,

In my former life, I used to design relay based traffic control systems. These systems used literally hundreds of relays to perform different functions. We never used 5v systems. They were always 12 or 24v (faster and more reliable).

Anyway, when adding additional relays to provide more contacts, we never used a contact to "repeat" a relay. We always wired the relay in parallel with the coil of the primary relay. This eliminates "propagation delay" between the relays that can cause some strange effects when dealing with tens or hundreds of relays. Whenever relays had a latching function, the relay was energized thru a blocking diode to eliminate "sneak paths" and the latch contact was fed via a dropping resistor to reduce the current draw when latched. The power supply voltage was increased slightly to account for any dropping resistors or diodes. Most of the systems used a float charged battery(s) for the power supply and required large inductive "choke" to reduce ripple from the charger (the ripple causes havoc with the relays).

Just sharing some experience..

eT
 

BobTPH

Joined Jun 5, 2013
8,812
Thanks for the advice. The reason for using relays is that this is a specific retro-computing project, in part inspired by one of the oldest operating computers in the world, the Fujitsu FACOM-128B, which I have had the great privilege of seeing in operation. It's built entirely out of telephone relays - the memory is a crossbar switch!
Be sure to have a can of Raid handy to fight bugs in your relay based computer.

Bob
 
Top