Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching 24VDC relays from microcontroller

Status
Not open for further replies.
Thanks for all the answers, guys! Just a little reminder: I did not want to discuss the _choice_ of this relay, it's already made and changing would be far more expensive than simply buying the phidgets I need (which for me is the easiest solution).

Obviously the data sheet of the relay isn't very good! The schematic suggestion using the same neutral for the pulse button as for the switched current seems odd to me and at least doesn't make sense if drive voltage is not the same as switched voltage???

Anyway, I am sure about the following:
- These relays take either 48VAC or 24VDC to switch
- The switch is supposed to be an impulse (recommended 200ms, but 50ms-1s are OK), but I'm sure I at some point read that they are designed to handle a constant load (of 24VDC) as well. Anyway, that shouldn't be a problem.
- There are 6 connectors: A1 and A2 for the input (24VDC) and 1-4 for the switched current. At every pulse (rising voltage triggers) on A1-A2, the connections 1-2 and 3-4 are switched on/off. There is never any other connection between 1-4 other than between 1 and 2 and between 3 and 4 when the relay is ON.
- So most places my plan is to have the 24VDC ground on A1 and 3. I send a pulse on A2 to trigger, one 220V wire (for a lamp) is run through 1 and 2 and I can read the ON/OFF status (as a 24VDC signal) on 4.
- I just talked with Schneider Norway and the guy claimed that the "inrush power" of 19VA in the data sheet means the relay might need almost 1A with 24VDC to switch. I say "claimed" because he didn't sound too convincing, but more like he was reading the data sheet and guessing... But he seemed very sure that using 3-4 as 24VDC feedback was OK even if you have 220V on 1-2.

Which seems to ruin the possibility of using ULN2803, since that handles 500mA at most?

Can I measure the current needed somehow? I have a digital multimeter, but am unsure if this will show correct results for such a short pulse. And wouldn't the current needed depend on the load switched?

"Ask questions and you will be only more confused!" :) But I am very thankful for all the help so far, don't get me wrong!
 
From experience I have with this relays they need 50 to 100 mA DC or 250mA AC. You can measure the resistance and calculate the current because the electromagnet inside is like a resistor for DC drive. If you connect to the relay coil via your current meter 12VDC for a few seconds then the relay coil will survive. The current at 24V will be twice as at 12V.
This relays look normal relays to me and you don't need optocouplers.
If you want to see some ideas how to control relays by your PC via your USB or COM Port you can look at my website, since you are a computer expert you can improve on what I did. https://www.moty22.co.uk/usbio.php https://www.moty22.co.uk/serial_io.php
 
So,
I agree. Stupid data sheets.

Anyway, for fun look at...

So, are KnutH's 15522 relays like GE's RR7 or RR9? I dont think so. If they were, you could have positive control, and have feedback to tell you what state the relay was in, but it would take two outputs and one input to/from the controller per relay.
 
The data sheet says remote control is via a push-button switch @ 3mA. I doubt the relays draw nearly an amp.

The wiring you described will not work with a ULN2803 which can only sink current to ground. V+ is connected to the positive side of the relay. The negative side is connected to the ULN2803, which grounds the line when activated. V+ is also connected to the ULN2803 for the kickback diode.

image.jpg
 
Ok, so I measured 77Ohm between A1 and A2, which should give about 300mA for 24VDC. Boldly I then went forward to measure the current while switching, which measured 280-300mA every time, whether there was a load being switched or not. The load was very low, though, only 1 220V LED bulb, but that's mostly what I'll be switching here.

Which might bring me back to ULN2803. I'll try to take all considerations in account and make a decision today or tomorrow. Haven't really counted how many inputs and outputs I need altogether.

Have a nice weekend! This is a forum I'm sure to get back to :)
 
JonSea, I'm not sure I understand about the ULN2803. I can connect A2 to +24VDC and then the ULN2803 between A1 and the ground of 24VDC, right? Or are you saying I can't use ULN2803 at all here?
 
Yes, that's exactly right.

This drawing is from the TI data sheet. It shows several outputs strapped together for larger loads which you won't need to do.

VSUP = +24v, which is connected to the positive side of the relays AND to the COM pin of chip.

The GND side (well, the zero volt side) of the power supply is connected to the ground terminal of the chip.

The ULN2803 is a low-side driver. It provides a path to ground from your load.

image.jpg
 
The chip is wierd. The COM is the common point for all of the anti-Kickback diodes. COM isn't necessary to function, but is required for reliability. If you were riving LEDs, COM could be left unconnected.

There's a 3.3 logic version of this chip too.
 
Last edited:
I've been using ULN2003/ULN2803s for years. They're great for driving small stepper motors, bulbs, etc. in addition to relays. They're a very tidy solution compared to a few transistors, base resistors and kickback diodes.

One trick if you're using these to drive bulbs or LEDs....grounding the COM pin gives you a lamp test function via the kickback diodes. I'm not sure how much current you can handle this way.

These are amazing and useful chips for less than a buck.

Do keep in mind the current from all channels is flow through the ground pin. Make the trace wide!
 
JonSea, I'm not sure I understand about the ULN2803. I can connect A2 to +24VDC and then the ULN2803 between A1 and the ground of 24VDC, right? Or are you saying I can't use ULN2803 at all here?
You can take advantage of the fact that you need only 200ms pulse to operate a relay. If you multiplex the relay drive you can use 2 x 8 outputs to drive 64 relays. You also have to incorporate in your software to drive only one relay at a time. This way you can use only 16 wires between your board and the 64 relays, you also need 24V supply powerful enough for only one relay. Instead of using expensive expansion board you can use cheap 2 of 8 relay boards or 2 x 8 optocoupler boards. You cannot use ULN2803 if you use this method of multiplexing the drives.
You can multiplex your 64 inputs to into 2 x 8 inputs.
 
Last edited:
Here is a circuit that might work for you. It uses 7 output bits and 8 input bits to control and read the status of 64 relays.

The coil and status of each relay is wired to each intersection of the array.

To check status, set the ColAddr bits to select one column, then read the input port. A LOW indicates an closed switch.

To drive a relay, set the ColAddr and RowAddr bits for the target, then drive the Pulse bit high for 200mS.



Edit: corrected E3 connection on column decoder.
 

Attachments

  • Array64 r2.pdf
    56.8 KB · Views: 178
Last edited:
You can take advantage of the fact that you need only 200ms pulse to operate a relay. ..
Actually, he can operate his relays in 50mS, according to the data sheet...
 
Chris,
Did you do an instant design of the 64 relays multiplexer or you had one ready?
Are you a magician? :)

This design was from scratch. The 1 0f 64 array select logic was obvious, so it was just a matter of buffering and level shifting to drive 24volt relays. The choice of mosfet did come from a current project, but it could easily be changed to one of dozens of possible parts.

Adding the integrated readback was pretty easy. But I've thought about that since, and will add a mux chip to reduce the input pins needed to one.
 
When "Disti" specs look terrible.. go to the **broken link removed**. and choose the one with the bigger file size under impulse relays, but look for another document to get the part numbers

Control voltage limits (θ < 50 °C) Operating threshold, dual frequency 50/60 Hz V 0.85…1.1 Uc
Average consumption at 20 °C and at Uc Inrush at 50 Hz VA 19
Operating time
Closing “C” ms 70
Opening “O” ms 70
Minimum impulse time ms 70


The key inrush is 19VA so at 24Vdc (Coil)
this is 800 mA which exceeds absolute max of the ULN transistor parts.

How do you plan to verify the relay state after a power failure?
An impulse relay requires feedback from somewhere.
 
About feedback: I already wrote that the relays are 2 pole relays, which means they switch 2 connections on/off at the same time. So I will use one to switch whatever I want switched and the other for feedback.
 
I once designed 2 computers to remote control via modem abox box with 96 Power Relays (15A & 30A) and have 96 Analog ADC inputs with unlimited budget. I may tell you about it some day. Many lessons learnt with EMI, contact corrosion with low sense currents etc.

It was to replace a box full of Mil Spec push buttons , Power supplies and rotary switch to a DVM for pre-launch of a Black Brandt Sounding Rocket.
 
Yep - low sense currents and corrosion. I knew that one before I started a project. The mysterious "wetting current".

The two I missed was driving a capacitive load (solar cell), The calibration device was very capacitive. The research devices were not. 2) ib when dropped across a PCB trace results in a large voltage.
 
I wrote a routine to scan all 94 relays and wait for sense voltage ( contact closure to gnd) then toggle the next relay in a loop. It sounded like a machine gun that jammed once in a while. Tap the box and it started up again. The simple fix was a tantalum cap across the sense contacts . The contact closure wettting current burnt off the oxide. (Avalanche effect) THe logic sense used a large pullup resistor for TTL at the time.

Also note all relays rated up to 2A are gold plated. and >2A are not gold plated for this reason and required 10% minimum rated current. It is a more common problem in unsealed relays with silver alloy contacts which have better conductance but worse oxidation resistance growth..
 
Status
Not open for further replies.

Latest threads

Back
Top