Using 0-10V Lighting Control as signal to relay switch

MisterBill2

Joined Jan 23, 2018
18,176
It certainly does seem like something is wired incorrectly, and it must be the transistor. Usually they are EBC, looking at the leads from the front flat surface, with the leads down, and starting at the left. OR it may be that the resistor values are incorrect. So please check them with your ohm meter.
So now you need to determine which transistor lead is which. If you own a digital multimeter with a diode check feature then it will be simple.
 
Last edited:

Wolframore

Joined Jan 21, 2019
2,609
The 2N2222 can take 600-800 mA and can dissipate 500mW... that’s not the issue. You need more base current, change the base resistor to 200 (see what you have on hand between 220-510). Think about it this way, you don’t need to restrict the base current for a switch because want need saturation. The collector current will be restricted by the coil impedance. You want to have enough current to really saturate. The signal is only 30 mA to begin with. You could just connect that directly to the base and it would be just fine.

Or it could be your connections. This transistor is unusual CBE from the front:

this is from OnSemi

2F1A7C6A-A9AE-4579-884C-F04975242EB2.jpeg
another version by Semtech shows the more standard EBC

A57CA9A4-0F4A-4784-9FFD-00D98918D75D.jpeg

post the brand of transistor they gave you.
 
Last edited:

Thread Starter

maropolinas

Joined Dec 23, 2019
22
Ok let me poke around more with it. But should it work if I use a 9V battery as a signal instead of the 10V from my controller device? I want to eliminate the latter as a problem.

The transistor is NTE 2N2222A. I've checked a bunch of times that it's not reversed.
 
Last edited:

BobaMosfet

Joined Jul 1, 2009
2,110
Hello all! This is my first post. Thanks in advance for any help. I'm pretty new to electronics but work as a software programmer, so hopefully my technical mind will help me out on this little project :)

My goal is to take a 10V/32ma signal from a lighting control system to flip a SPDT relay to turn on a 24v peristaltic liquid pump. I was hoping I could do this with a standard 12v automotive relay switch, but either the voltage or current wasn't high enough to flip the relay, or I'm doing something else wrong.

Here is the relay I got. Unfortunately I can't find specs for it on the minimum switching voltage or current. I know 15 volts works from testing, but putting three batteries of 9v, 1.5v and 1.5v in series doesn't trigger the relay, which I find very confusing. Maybe those batteries aren't generating enough current to energize the coil? Maybe I need a low current relay? But those seem to be digital whereas this is an analog application.

In short, what is the simplest approach for a novice to turn on a 24v pump with a 10V/32ma analog signal?
Relays. Relays. Why do people use relays? Because they don't understand what they are. A relay is a magnet, which means it takes excessive current to operate, to hold, and is _slow_.

Use an SCR instead. Solid-state, can be switch with 5V @ 1mA. and will stay latched until power removed from gate, anode, and cathode.
 

Thread Starter

maropolinas

Joined Dec 23, 2019
22
Oh my gosh it works! It's like magic. So cool to be able to control which pump is on through a signal I can program!

I guess the problem was the transistor, because when I switched it with another one, everything started working. Maybe I burned the first one out somehow? Or maybe its metal head was shorting with a nearby resistor. Who knows. And yes, the signal was grounded (but it wasn't a silly question).

@BobaMosfet thanks for the suggestion of a rectifier. That can be my next project once I come to regret this noisy slow relay whose consequence of failure will be filling a saltwater tank with freshwater :eek:

Thank you everyone for all the help. You've brought out an excitement to build more!
 

Wolframore

Joined Jan 21, 2019
2,609
Ah, metal 2N2222 those are nice and good for 800 mA. I miss those old ones, don't see much of them anymore. I actually like the relay noise, it's positive feedback that things are working properly. If this is not for automotive there are plenty of relays out there that will switch for less current and still work at 12V. Also if you're concerned about using power while it's on, you can get latching relays which will activate and stay in position until a second signal is sent to unlatch it, but the controls are a little more complicated.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,176
Relays. Relays. Why do people use relays? Because they don't understand what they are. A relay is a magnet, which means it takes excessive current to operate, to hold, and is _slow_.

Use an SCR instead. Solid-state, can be switch with 5V @ 1mA. and will stay latched until power removed from gate, anode, and cathode.
People, including lots of engineers, use relays because of the isolation that they can provide. AND there is not much chance of the switched signal driving back into the control lines. And it can be very obvious when they operate, even apparent to the unassisted eyes. In addition they can be useful with a large range of switched signal or power circuits. There are a whole lot of functions where a relay is the best choice.
 

MisterBill2

Joined Jan 23, 2018
18,176
Oh my gosh it works! It's like magic. So cool to be able to control which pump is on through a signal I can program!

I guess the problem was the transistor, because when I switched it with another one, everything started working. Maybe I burned the first one out somehow? Or maybe its metal head was shorting with a nearby resistor. Who knows. And yes, the signal was grounded (but it wasn't a silly question).

@BobaMosfet thanks for the suggestion of a rectifier. That can be my next project once I come to regret this noisy slow relay whose consequence of failure will be filling a saltwater tank with freshwater :eek:

Thank you everyone for all the help. You've brought out an excitement to build more!
The relay is plenty fast enough to control pumps, even the slow pure magnetic relays will change in less than 20 milliseconds. That should be plenty fast enough for controlling pumps. And it is not that difficult to add monitoring circuits to verify that the correct pump is running. We sometimes did that with PLC controls of some industrial machines. close a contact to initiate a movement and then check the time for the limit switch to change, showing that the move had been achieved. And then send a report when things started to slow down. And the relays would last for hundreds of thousands of cycles.
 

mmcginty

Joined Feb 4, 2010
57
Oh my gosh it works! It's like magic. So cool to be able to control which pump is on through a signal I can program!

I guess the problem was the transistor, because when I switched it with another one, everything started working. Maybe I burned the first one out somehow? Or maybe its metal head was shorting with a nearby resistor. Who knows. And yes, the signal was grounded (but it wasn't a silly question).

@BobaMosfet thanks for the suggestion of a rectifier. That can be my next project once I come to regret this noisy slow relay whose consequence of failure will be filling a saltwater tank with freshwater :eek:

Thank you everyone for all the help. You've brought out an excitement to build more!
Maybe I'm missing something but I don't see the need for the transistor circuit at all, you said you can specify the voltage of the activated state at anything between 1-10 volts max load 32 mA, there is a huge range of relays that will work, well within those parameters.

I searched Digikey for SPDT relays with coil voltage 3-10V max coil current 25 mA max contact current 1A, which returned a page full of possibilities, this one seemed like a good fit: https://www.digikey.com/product-detail/en/omron-electronics-inc-emc-div/G5V-1-2-DC9/Z12714-ND/369038 . I can't think of a reason it wouldn't work. (Still needs a diode to protect the control device.)
 

Thread Starter

maropolinas

Joined Dec 23, 2019
22
I searched Digikey for SPDT relays with coil voltage 3-10V max coil current 25 mA max contact current 1A, which returned a page full of possibilities
Hm yeah I saw those but wasn't sure if 32mA would be okay on a relay with a max coil current of 25 mA (it was a question I asked). But if going over the max a bit is okay, then that model is a perfect suggestion.

And it is not that difficult to add monitoring circuits to verify that the correct pump is running
@MisterBill2, Out of curiosity, how can one know if a pump is actually running?

did you swap out the 222 with another 222 or a different type?
No I didn't swap it, I'm still using the 2N2222A.

But in other news, I think I burned out the two transistors I bought so I'm back to where I started. Another trip to the electronics store and hopefully I'm back in business. Although I might get the relay @mmcginty suggested to simplify things (still including the diode). I just don't want to have to wait for shipping :rolleyes:
 

BobaMosfet

Joined Jul 1, 2009
2,110
People, including lots of engineers, use relays because of the isolation that they can provide. AND there is not much chance of the switched signal driving back into the control lines. And it can be very obvious when they operate, even apparent to the unassisted eyes. In addition they can be useful with a large range of switched signal or power circuits. There are a whole lot of functions where a relay is the best choice.
True, but I usually see people having problems with relays that don't understand their inductive nature- which complicates things if you are new to electronics.
 

BobaMosfet

Joined Jul 1, 2009
2,110
Oh my gosh it works! It's like magic. So cool to be able to control which pump is on through a signal I can program!

I guess the problem was the transistor, because when I switched it with another one, everything started working. Maybe I burned the first one out somehow? Or maybe its metal head was shorting with a nearby resistor. Who knows. And yes, the signal was grounded (but it wasn't a silly question).

@BobaMosfet thanks for the suggestion of a rectifier. That can be my next project once I come to regret this noisy slow relay whose consequence of failure will be filling a saltwater tank with freshwater :eek:

Thank you everyone for all the help. You've brought out an excitement to build more!
Not 'rectifier'. SCR = Silicon Controlled Relay. A thyristor.
 

MisterBill2

Joined Jan 23, 2018
18,176
To monitor if the pump is running, or at least if the pump motor is running, you can use a capacitor and diode off the ungrounded terminal of the motor, if they are brush type motors. The commutator noise coupled through the diode and capacitor will produce a small voltage that can be read by an analog input. It may possibly need a stage of amplification, but probably not.
 

Wolframore

Joined Jan 21, 2019
2,609
Would you mind drawing your schematic with the diode in place? I’m wondering if the diode is wired correctly. You should not be burning out transistors at this stage.
 

mmcginty

Joined Feb 4, 2010
57
Hm yeah I saw those but wasn't sure if 32mA would be okay on a relay with a max coil current of 25 mA (it was a question I asked). But if going over the max a bit is okay, then that model is a perfect suggestion.
The coil current spec is what the coil draws/needs, your light controller's max current is the most it is capable of supplying, draw must always be less than supply. It's ok (in fact, it's necessary) to have more amps available than you need, a circuit should never need more amps than it can provide. So you aren't looking to match (as you would with voltage.)

But in other news, I think I burned out the two transistors I bought so I'm back to where I started. Another trip to the electronics store and hopefully I'm back in business. Although I might get the relay @mmcginty suggested to simplify things (still including the diode). I just don't want to have to wait for shipping :rolleyes:
That's the bummer about transistors, especially when you don't fully understand which one is best for a circuit. The can be used to accomplish all kinds of things, but I would never use them where they are not strictly necessary. I think everyone became fixated on using the relay you had, when perhaps the better solution was to find one right for the application.

Yeah waiting on the mail is a bummer, otoh, Digikey is pretty quick to ship, and I've never seen a store that had even a tiny fraction of the selection they have. Whenever I order parts that are pretty cheap, I usually order more than I need, as chances are I will think of something else to do with them before too long goes by.

Oh wow what a trip, there are many more DPDT options, that are cheaper than SPDT -- it often pays to think outside the box when searching Digikey! I was thinking that, if you ever see yourself incorporating an MCU, you should consider using 3V relays instead. But the ones listed for SPDT were expensive and needed too much current. Digikey's site included a DPDT option, so I changed my parameters... this might be a good fit as well: https://www.digikey.com/product-detail/en/panasonic-electric-works/TXS2-3V/255-1988-ND/650132
 
Last edited:

Thread Starter

maropolinas

Joined Dec 23, 2019
22
Would you mind drawing your schematic with the diode in place? I’m wondering if the diode is wired correctly. You should not be burning out transistors at this stage.
This drawing has the diode in place and is what I have actually built. That has the diode in the right spot, correct? I think I burned out the transistor by applying the signal using a 9V battery to the base without a resistor in between...
:oops:

I think everyone became fixated on using the relay you had, when perhaps the better solution was to find one right for the application.
Yes fair point but I'm even grateful for that. Maybe that constraint here means an unnecessary transistor, but for now it's working!

there are many more DPDT options, that are cheaper than SPDT
Oh, you're right! Hm that does open a lot of doors. For now I've got this working so I'm content until my mind starts spinning up an upgrade.

Speaking of which, I'm really worried that I won't know if one of the pumps burns out or if either of the water sources they're drawing from runs out. In either scenario, I'll quickly be filling the tank with the wrong kind of water in a subsequent run.

Any creative/economical suggestions for detecting water flow out of a 1/4" tube that involves no water/metal contact (it's saltwater) and supports a very low flow rate (0.033gpm)? The flow switches I see out there don't support such a low flow rate. Alternatively, I was thinking of putting a standard leak detector at the exit of the tube so the exiting water passes over the detector, but that sounds unreliable. Another way would be to have the water first flow into a small container with a float switch before overflowing into the tank, but again that sounds unreliable.
 
Top