Q on turning a relay on while turning one off at the same time (PNP transistors)

Hey all,

I'm using a Sainsmart 16 relay module, and relays turn ON when I send LOW voltage signals from my Arduino ports to the control pins on the board.

That said, I'm controlling a 12v water valve that uses TWO signals- one to open the valve, and a separate signal to close the valve... It needs two relays that are always doing the opposite thing. I want to conserve a digital pin on my Arduino and do two things at once using a transistor... where if I want water, the opposite signal is sent to the OFF relay. something like:

If I need my water valve to open, I send a LOW signal to the pin/relay to the water valve OPEN relay, but at the same time, that low signal CLOSES a 5v circuit, that turns my water valve CLOSED relay to HIGH (aka turning my water valve CLOSED relay... OFF. .

It's a really weird circuit and I don't thing an NPN is going to work... Can anyone tell me if a PNP is the right way to go/which one I should purchase?

Thanks!

Z

:o

Show a schematic of what you have now. .

I’ll get cracking on that :o But to maybe put it more simply, if I am say… powering an LED between my Arduino’s 5v and ground, how can incorporate a digital output signal that keeps the LED circuit closed when digitalWrite(3, HIGH) and opens the 5v circuit (turns the LED off) when I send a digitalWrite(3, LOW) signal? It seems to be sort of the reverse of an NPN transistor.

NPN and 2 resistors, all you need:

Okay, this is my first schematic :o but I think it kind of alludes to what I want… I want the transistor to open the circuit when a signal is sent to it so that only one of the two relays activates at once.

Simpler design:

That's a pretty nifty solution. What size resistors/transistors would you recommend?

Zeeko: I'm using a Sainsmart 16 relay module, and relays turn ON when I send LOW voltage signals from my Arduino ports to the control pins on the board.

That said, I'm controlling a 12v water valve that uses TWO signals- one to open the valve, and a separate signal to close the valve... It needs two relays that are always doing the opposite thing. I want to conserve a digital pin on my Arduino and do two things at once using a transistor... where if I want water, the opposite signal is sent to the OFF relay.

Can't you use two relay channels for that. The NO contact of one, and the NC contact of the other one. AFAIK a 16-channel relay board uses 3.8mA drive current per channel, so you can drive up to 5 channels with one Arduino pin. Leo..

Dammit Wawa. Genius level. Now I feel a little silly.

CrossRoads: |500x375

Are you kidding?

The second "R" needs to go in series with the base.

Hi, Can I put a spanner in the works, can the OP post link to the spec of the solenoid. If it is low voltage 12v, you only need to PULSE the solenoid to change state, they are designed for low energy use. Constant drive current may not do the solenoids any good. How much current does the solenoid use? How many solenoids in a valve, one or two?

Can we have the part number and or specs please.

Tom..... :)

Zeeko: Hey all,

I'm using a Sainsmart 16 relay module, and relays turn ON when I send LOW voltage signals from my Arduino ports to the control pins on the board.

That said, I'm controlling a 12v water valve that uses TWO signals- one to open the valve, and a separate signal to close the valve... It needs two relays that are always doing the opposite thing. I want to conserve a digital pin on my Arduino and do two things at once using a transistor...

That may be impossible.

The valve may be designed such that each coil can only be operated intermittently without overheating, not continuously. You need to provide a link or datasheet about the valve.

edit: double post

cr02.PNG

I like putting spanners in the works. Here’s a link to the valve in question:

http://www.aliexpress.com/item/1-2-Mini-electric-valve-3-wires-CR02-DC12V-motorized-ball-valve-SS304-DN15-electric-automatic/1941185157.html

It’s a 3-wire, it sounds like it takes 3-5 seconds for a change in mode (open to close and vice versa) and the valve says MODE: CR-02 on the top. This is a diagram of the CR-02 Wiring:

cr02.PNG

That's a motor operated valve designed for single relay control judging from the image (the link is broken for me though).

You will find it is encouraged to provide full information about hardware up-front, since you get much quicker and more reliable answers to your question that way.

That wiring diagram explains that you use a SPDT switch or relay to control the thing. It seems pretty clear to me.

Hi, Yup, thanks for the link, the "automatically power off" seems to indicate that the valve has limit switches built in, so leaving the open or closed relays ON will not damage the valve assembly.

Thanks.. Tom... :)