negative input voltage to switch relais

hi there
i have 4 times MINUS 12v (plus common ground) and like to drive a 4 relais board. is there a ready to use product in the arduino family or similar products or do i have to use inverter op's?
thanks for any advice

You can't connect negative voltage to the Arduino.

If there's a driver on the relay board, it's going to require a positive voltage too.

You can switch negative voltages on the contact-side of a relay because the contacts are isolated from the relay-coil. A relay coil can operate with current in either direction and/or there are relays with AC relay coils.

i know that i only can input positive voltage to the io ports, therefore is my question, is there a ready to use inverter board around?

If you buy an opto isolated 12volt relay board you can do that.
The Arduino just controls the opto LED that is (can be) isolated from the relay coil supply.
Just pick the right board (post a link first).

An Arduino can also read negative input voltages with a voltage divider connected to 5volt (not ground).
Leo..

Negative, Positive, what's the difference if you're powering relays. It's all in how you connect them. A relay coil is like resistor. You really can't connect it backwards. I really think you should explain what you mean by 4 x - 12 V and "relays". If the relays are not on a PCB then I don't see why you are asking. You still need a transistor to switch them anyway and you can just as easily use PNP transistors and turn them on with a LOW.

i know that i only can input positive voltage to the io ports, therefore is my question, is there a ready to use inverter board around?

What do I/O INPUTS have to do with switching relays, which is done using OUTPUTS ?

An Arduino can also read negative input voltages with a voltage divider connected to 5volt (not ground).

As already mentioned, if you use optocouplers it doesn't matter because the output transistor is isolated from the input led and they are not meant to share a common ground.

Hi,

i have 4 times MINUS 12v (plus common ground)

Can you explain the application, why do you need to use -12V?
Before we go off at tangents, please tell us, or supply a circuit diagram or a picture of what your project is.

Thanks... Tom.... :slight_smile:

It is possible to use a level shifter to control them but I don't
understand why the 12V supplies need to have the + terminal connected
to ground.
Is there a reason you could not use the negative leads of the supplies
as the ground lead?
Dwight

Post a schematic and explain the source of the -12V supplies and why that even matters if you are switching relays.

here is the drawing.
thanks for your efforts, even the emotional ones :slight_smile:

Screen Shot 03-10-15 at 01.30 PM.JPG

thanks for your efforts, even the emotional ones :slight_smile:

You must be reading BETWEEN the lines because I just looked through all the replies and didn't see any "emotional" comments. Maybe your definition of "emotions" is not the same as ours. (maybe you are too sensitive) I don't know why you made that comment.

I looked at your schematic and , like everyone else here who replied to your post, don't see what your problem is. As already pointed out, (more than once) , the reason opto-isolators are called opto-isolators is that the input is ISOLATED from the output. Hence, if you drive the input with your so called NEGATIVE voltage, it is only NEGATIVE (as you put it) if your wires are backwards .
Do you get it ?

In plain english:

CONNECT THE "-12v " so the "NEGATIVE " Voltage GROUND is the Vcc (of the OPTO INPUT) and the "negative" voltage source is the GROUND (of the OPTO INPUT) with respect to the opto-coupler.

or put differently,

If you wire the input led of the opto-coupler correctly , the output transistor will turn on. I would think it would be obvious that the input and output of an opto coupler CAN NOT SHARE A COMMON GROUND
so the ground for the output side is the arduino ground.

Perhaps you are confused because you don't realize that you cannot use your switched inputs to power the controller. (for obvious reasons)
Your schematic doesn't show the controller power source and it doesn't separate the controller from the relays. If I had to take a guess, I would say you are a student, this is a homework assignment and you are basically asking us to do your homework. Is that the case ? If not, then explain where you got the schematic and why it doesn't tell us anything.

The controller must have it's own power source. The -12V switched inputs merely drive optos which send signals to the controller. You also need a separate power source for the relays. This should also be obvious. Since you haven't given us any information for the relays, they could be anything from PCB micro relays to giant monster relays the size of a washing machine. We also don't know the relay voltage. Leaving out this critical details means we can't tell you how to wire it because we don't know what you are using for power supplies or relays.

Get it ?

If you know how to use a LED, and you know how to use a transistor, I don't see what the problem is.
Maybe you are confusing FRUSTRATION with EMOTION. Emotion is happy/sad , friendly/angry. Frustration is not really an emotion, it's a response to a situation. (like getting a flat tire or not doing well on a test and school etc) (unless of course you are frustrated to the point of tears, ha ha)
We're not there yet, but the night is young...

If you don't know how to connect a LED or a transistor (with regard to polarity) , just say so.

Maybe (since we are just repeating ourselves now) , you should explain to us, WHY you posted.
Specifically, why you "think" you have a problem (when in fact you do not).

Hi,
Can you post a picture of the two items in your diagram so we can see the terminals please?

What is your electronics, programming, arduino, hardware experience?

Tom... :slight_smile:

@raschemmel ,thanks for explaining me your world.

for shure the Relais will need their own power source, this is all clear to me. i could easy use a Transistor to invert the -12v to +5v or whatever.

my question was, is there a ready to use device.

any optocoupler board uses normaly any Input from 2-10 Volts POSITIVE and all the boards have a common ground. so if i put my positive common ground from my videomixer device to the four inputs there ist no switching at all.
normal optocouplers can handle a negative voltage up to -4 Volts, but they treat this as GND.

the device is a Video mixer, he gives out -12 Volt switched for each specific Video Output on a 5-pin XLR.

for giving red-light-tally to the cameras i only need a pure contact (relais) on the camera-control units Input.

the controller would be an arduino and controls also a video router via LAN, depending which source is switched on the Inputs of the Controller. (but this is another thing and works already.

finally my thougts where to just ad a "ready for mount" Little board which does the conversion between -12V from the mixer to +5v for the arduino GPI ports, the rest is easy, ad a relais board to the o arduino utputs and all would be done.
thanks anyway for your help!

best
tomtom

4-channel opto isolated relay board

Let's think about this. The opto relay board DOES have only ONE (common) GND.

The jumper shown in the photo is to allow the relay board to run on 5V dc . If you remove the jumper,
then you have to connect a separate supply to the JD pin to power the relays. As you already pointed out, there is only one ground but the board gives an option to drive the optos with the arduino 5V supply and the relays with a separate supply.
As I stated previously, since you have given us so little information, it is not clear why you are posting on an arduino forum for an issue which (on the face of it) is not related to an arduino but rather to General electronics. To be clear, if all you are asking is how to use the -12V switched outputs (which, to be clear, are really only a problem because they share a common ground inside the mixer) to turn on the red lights, and your post has nothing to do with a microcontroller interface (yet , anyway) then you are correct that the above 4-channel relay board will not work for you because it too has common ground for the relay coils. The fact that your mixer outputs are common grounded means you CANNOT use any of the off the shelf boards by themselves. You CAN use ANY of them but you must add an opto coupler between EACH mixer output and each relay board input. You can use one of these 4-ch opto isolator modules or four individual 4N35 opto coupler 6-pin ICs with a current limiting resistor on each input and a pullup resistor on each output. Both the 4-ch opto module and the four individual optos, have TRUE isolation
SEE ATTACHED PHOTO.

The -12V GND from the mixer would connect to the input grnd in the attached photo (right side of photo). The Vcc and GND for the output connect to HVCC & HGND. I think it is obvious that this module has isolation (based on pin names). Hence the outputs (explained here):

Function: use low level to control high level, for example, 3V or 5V voltage control 9V or 12V voltage

HVCC max. 24V, output port OUT1 / OUT2/ OUT3 / OUT4 output max. current equal to HVCC / 5.1K, Max. absorption current 500mA

This module adopt Toshiba TLP281 chip

Input / output instruction:

Input port: IN1 / IN2 / IN3 / IN4, connect microcontroller or Arduino IO port, GND and microcontroller or Arduino development board GND connection; IN1 / IN2 / IN3 / IN4 separately controlled OUT1 / OUT2 / OUT3 / OUT4

Output port: OUT1 / OUT2 / OUT3 / OUT4

Output end: HVCC: connect high voltage positive being controlled, HGND connect high voltage negtive being controlled.

Operation: When IN1 is high level, corresponding OUT1 voltage equal to HVCC, when IN1 is low level, OUT1 voltage equal to HGND.

will drive the relays directly, or , they can be used as inputs to an arduino. In the first case, HVCC = relay voltage. In the latter case HVCC = 5V because the GPIO digital inputs of the arduino are limited to 5V.

If you had a 4-ch relay board , the HVCC would also be 5V since it is designed for arduino outputs.

I don't think the schematic he has given has enough information to
tell him how to dive it.
What is on the inputs to the relay board.
It is a transistor? If so, ( NPN or PNP, maybe a FET? )
Does it activate the relays by pulling the input to -12V or
to what you call ground?
What is the threshold voltage? ( where does it switch from on to off ).
Also, + and - are only where the common grounds are inter connected.
A supply of -12V could be a +12V if the negative line was attached to
ground.
Again, I don't see enough information to tell you where they are or
should be connected.
An optical isolator is a good universal level shifter but other than the
controller side drive, there isn't enough information about your
relay board to tell you how to connect it.
Dwight

The OP is using a video mixer that has 4 common grounded -12V outputs. If they had been independent,
it would not have been a problem but because they share a common ground, they cannot simply be reversed to obtain +12V (because all four would then have their +12 terminal shorted to each other)
Consequently, he has to use the circuits I recommended in my last post to add isolation so he can then use the outputs to either drive relays or send signals to the arduino. The "schematic" (if you want to call it that) he posted is really more of a block diagram. The only known fact is that the video mixer has common grounded switched 12V output pins on the 5-PIN XLR connectors. There is no actual "problem", per se in this post. It is simply a matter of making clear that he cannot proceed until he adds the necessary circuitry to obtain isolation. Once he has done that , the rest is downhill, so to speak.

raschemmel:
The OP is using a video mixer that has 4 common grounded -12V outputs. If they had been independent,
it would not have been a problem but because they share a common ground, they cannot simply be reversed to obtain +12V (because all four would then have their +12 terminal shorted to each other)
Consequently, he has to use the circuits I recommended in my last post to add isolation so he can then use the outputs to either drive relays or send signals to the arduino. The "schematic" (if you want to call it that) he posted is really more of a block diagram. The only known fact is that the video mixer has common grounded switched 12V output pins on the 5-PIN XLR connectors. There is no actual "problem", per se in this post. It is simply a matter of making clear that he cannot proceed until he adds the necessary circuitry to obtain isolation. Once he has done that , the rest is downhill, so to speak.

I don't know what these look like. Does he need to pull towards -12V or
to ground to energize the relay and how much current is involved?
Dwight

The whole problem here is that he steadfastly refuses to provide any actual information. Apparently is actually French-speaking. And yes, we are attempting to comprehensively teach basic electronics here.

Unless and until he provides adequate links to the specification of the equipment in question, and/ or schematic diagrams of each item, it is simply not worth answering. :roll_eyes:

tomtom1000:
any optocoupler board uses normaly any Input from 2-10 Volts POSITIVE and all the boards have a common ground.
so if i put my positive common ground from my videomixer device to the four inputs there ist no switching at all.

So many posts for a simple problem.

Common opto isolated 4-relay boards DON't have a common ground.

Connect the OPTO VCC to ground of the device in question.
Connect the opto channels to the -12volt outputs of the device.
A resistor (2k2-3k3) can be use between device and the four relay inputs to reduce opto current, since these relay boards are normally made for 5volt signals.

Remove the VCC jumper on the relay board for true opto isolation.
Supply the relay board with whatever supply is needed for the relay coils.
Leo..

4-ch opto relay board

I agree that a 4-ch relay board should NOT have a common ground but you can clearly see from the photo of this one that there is only ONE ground and TWO possible relay power sources. With the jumper,
Vcc = 5V for both the optos and the relays. Without the jumper, the optos and the relays have two separate power sources , labeled Vcc and JD respectively , so this one DOES have a common ground.

Does he need to pull towards -12V or
to ground to energize the relay and how much current is involved?

Your guess is as good as mine on the current. He has yet to post any specs for the relays, and in fact we don't even know if he has selected them yet. The video mixer has a -12V supply for the outputs because the polarity really doesn't matter. Those four outputs were designed for one thing only and that's the "CAMERA ON" RED light (mounted on the camera) so when the speaker sees it go on he /she knows to start talking. He wants to use these to drive relays but I don't see why it matters to him that they are -12V since a relay coil could care less about the polarity. The flyback diode would have to be reversed but that's no big deal. I asked him why even posted but have not received an answer. I don't see what his problem is but he won't get any help until he starts cooperating.

Remove the VCC jumper on the relay board for true opto isolation.

I'm afraid I have to differ with you on that Leo . If the board only has one ground terminal you cannot honestly call it isolation if the input and output share the same ground.