analogRead sensor with isolated grounds

Hello, this is my first topic on the Arduino forums.

I have a plasma cutter that gives me a voltage ranging from 0 to 200 Volts via a postive(+) and negative(-) terminals. I connected them to a voltage divider and fed the output to Arduino analog pin (A0), the Ground of the Plasma cutter and the Ground of the Arduino are connected together.

When i try to run a simple code (Arduino>File>examples>Basics>AnalogReadSerial) to serial print the sensed value, the reading will stop as soon as i turn "on" the plasma cutter, because the Serial port fails and disconnect.

This seems to be a problem of noise (Plasma cutters are very noisy), and since the Arduino and plasma are connected together via ground, the noise is getting to Arduino and then to my Laptop USB port.

Is there a way to analogRead the Plasma voltage with ground separation?!

There's probably a lot of ways to do it. Off the top of my head, I'd suggest a battery-powered Arduino with a wireless datalink to the Arduino connected to the PC. Optocouplers can be used for analog signals but that requires careful design. Optocouplers could be used on SPI data lines going to a dedicated A/D chip. There's probably a neat way to do it with differential opamps too.

What exactly do you need to measure about this 200V signal? Is it AC or do you need to measure DC? What bandwidth do you need to measure? Do you know anything about the spectrum of the noise that must be filtered out? Do the two spectrums overlap?

I want to make a simple Height torch control for the plasma cutter, and the first thing to do is read the Plasma voltage, the noise is killing the communication between Arduino and my laptop, so i'm stuck here.
I don't have an Oscilloscope to visualize the signals just a Multimeter. And my knowledge in electronics is limited.
To help you out, i can formulate my problem as simply reading a potentiometer without connecting its ground to Arduino's ground.

It would be worth just making sure the earths are all separately star connected back to the ground of the plasma power supply, and that the Arduino and laptop are moved as far away as poss from the plasma area.

The analog input range is limited to the arduino's operating voltage, ie: 5 volts. You will need to build a signal processing circuit that can accomplish voltage division (resistors and an op amp) and use a capacitor for low pass to clean the noise.

Have you searched the forum? I remember some on else was trying to do this not too long ago.

You can use the HCPL-7520 linear optoisolator and connect up like this

Avago Technologies HCPL-7520 linear optoisolator datasheet

yendis:
It would be worth just making sure the earths are all separately star connected back to the ground of the plasma power supply, and that the Arduino and laptop are moved as far away as poss from the plasma area.

The laptop need to be relatively close from the plasma to control it, i'm putting it about 5 meters away, and yet the Plasma affects it. The problem is not the radiated EMI but the conducted one over ground because my laptop works flawlessly when the USB cable from Arduino is not connected and the plasma is on, yet when i put the cable in, and try to move the mouse it halts and jitters all around the place until the plasma is off.

I'm not sure about how to perform your solution of "star" connecting earths back to ground, can you please elaborate?

Well, a plasma torch or other welder probably has a ground lead connected to the workpiece. This is a big fat cable, due to the current passing through it. However, the current is so large (tens to hundreds of amps) that even the small resistance of this cable means there's a significant voltage developed along the cable.

The 200V output voltage is referenced to one end of this cable. The other end will have quite large fluctuations in voltage depending on the instantaneous current. So you need to find the end which is more stable and connect to that. This would normally end up with all grounds (yours plus the plasma cutter's own electronics) connected to one single point somewhere in the machine. All grounds radiate away from that point, like a star.

The other problem you get is large currents in cables will induce currents in nearby cables like a transformer. You basically need to transmit your high voltage away from the other cables over a twisted-pair of wires. The twisted pair ensures that any current induced in one wire is exactly the same as the other, so that the voltage you measure at the other end isn't affected by that induced noise. The, where you're in a more benign area, you can divide the voltage down to the Arduino 5V. Small errors in 200V will be very small after they are divided by 40 but the same error applied to 5V will be bigger in relation to the 5V signal.

An extension of the twisted pair technique is to use 4-wire sensing, so that you are looking at the voltage from two points of view, which can be used to cancel the error voltage.

This is a tricky problem, not easily solved, but I believe it is solvable.

54Lightfoot:
The analog input range is limited to the arduino's operating voltage, ie: 5 volts. You will need to build a signal processing circuit that can accomplish voltage division (resistors and an op amp) and use a capacitor for low pass to clean the noise.

Yes, well i put a simple voltage divider that can't go over 5 volts when the plasma is on, i didn't use the op amp since i don't know how to filter with it correctly, but i tried with a 50 hz RC low pass filter (R=470 ohm, C=10uF) and it didn't solve the problem, instead it gave rise to another problem:

Normally when the plasma is off i read 0 volts, but with the RC filter, i didn't read 0 volts, put a value of 20, and this value kept rising and decreasing (goes from 20 to 30 and back to 20), it felt like i'm seeing the charge and discharge cycle of a capacitor, is this normal?! Shouldn't filters eliminate fluctuations in DC voltage? because my filter is making an AC voltage out of a DC one ...

Grumpy_Mike:
Have you searched the forum? I remember some on else was trying to do this not too long ago.

Yes, i even went to your blog and read about noise at some point, i've been fighting against noise for some time now.
I need to ask you whether a simple DC isolating Transformer (1:1) will do the trick?! the transformer will isolate the grounds and yet pass the voltage from the plasma to the voltage divider with less noise i hope?

BillHo:
You can use the HCPL-7520 linear optoisolator and connect up like this

I didn't know that linear optocouplers exist, but the schematic you gave me is quite complicated, and the datasheet talks about currents and motors. Please excuse my lack of knowledge, but can you simplify this a bit for me?

MorganS:
... This would normally end up with all grounds (yours plus the plasma cutter's own electronics) connected to one single point somewhere in the machine. All grounds radiate away from that point, like a star.

The other problem you get is large currents in cables will induce currents in nearby cables like a transformer. You basically need to transmit your high voltage away from the other cables over a twisted-pair of wires. The twisted pair ensures that any current induced in one wire is exactly the same as the other...

An extension of the twisted pair technique is to use 4-wire sensing, so that you are looking at the voltage from two points of view, which can be used to cancel the error voltage.

This is a tricky problem, not easily solved, but I believe it is solvable.

I opened the plasma cutter of type:

I found a metal plate with positive(+) and negative(-) leads, and i simply connected wires to them and passed them to my voltage divider, i can't go further on searching another ground inside if that's what you are asking (the plasma is very complicated and i don't want to break it).

I will try to twist the wires and tell you.

I personally don't think star-grounding will be necessary here. I think you need/want to measure the voltage across the two main electrodes and don't really need to reference anything to any real ground.

A 1:1 transformer is a good idea except a transformer only transforms AC voltage. The DC voltage you want won't make it through the transformer.

Can you show us the schematic of your RC circuit? That behaviour seems incorrect.

Can you run your laptop on battery for the duration of the test? If it's powered from its own battery, then it's not linked to any other ground and it can float to whatever voltage the plasma cutter develops. Of course this makes it 'live' with respect to other conductive objects (like you) but it's not normally dangerous to touch the steel being cut is it?

Hi,
With Plasma Cutters you have to remember that there is more than one circuit, it has a mainpower circuit and an ignition circuit.
This unit is a SMPS type, so the gnd or neg terminal does not have to be referenced to anything except the torch head.
With the unit switched off and unplugged, traced the gnd clamp to see if it is earth of the power supply case.
If it isn't then you will have to use something like BillHo suggested.

Tom..... :slight_smile:

PowerCut-700-IM.pdf (1.07 MB)

Apastrix:
I'm not sure about how to perform your solution of "star" connecting earths back to ground, can you please elaborate?

Simply that any earth connections, such as the Arduino gnd, power supply grounds/returns, all go to a single 'star' point using separate wires. Although this can be very effective (and I use it to good effect on my PWM motor drive project) I suspect you may have ground paths built-in which you cannot connect up in this way, e.g. USB connection back to laptop mains earth. But if that is the case, you can break the USB ground path, and use an opto isolated link that might well eliminate the interference effect.

About your DC shift when using capacitors in a filter, I would suspect voltage spikes are forward biasing PN junctions eg maybe at the Arduino inputs, and this rectifies the spikes into DC.

MorganS:
I personally don't think star-grounding will be necessary here. I think you need/want to measure the voltage across the two main electrodes and don't really need to reference anything to any real ground.

A 1:1 transformer is a good idea except a transformer only transforms AC voltage. The DC voltage you want won't make it through the transformer.

Can you show us the schematic of your RC circuit? That behaviour seems incorrect.

Can you run your laptop on battery for the duration of the test? If it's powered from its own battery, then it's not linked to any other ground and it can float to whatever voltage the plasma cutter develops. Of course this makes it 'live' with respect to other conductive objects (like you) but it's not normally dangerous to touch the steel being cut is it?

Indeed, i tried the transformer as fast as the idea came to me, and all i saw was smoke :stuck_out_tongue:
(fortunately the plasma wasn't damaged).

My RC filter circuit is as simple as it can get:

Input = Arduino 5 volts
Ground = Arduino Ground
Output = Arduino A0 pin

When i use the simple example of reading the sensor, i get a fluctuating values rising and decreasing.

Yes it's normal to touch the steal being cut. I tried the laptop with the battery on and off, nothing changes.

TomGeorge:
Hi,
With Plasma Cutters you have to remember that there is more than one circuit, it has a mainpower circuit and an ignition circuit.
This unit is a SMPS type, so the gnd or neg terminal does not have to be referenced to anything except the torch head.
With the unit switched off and unplugged, traced the gnd clamp to see if it is earth of the power supply case.
If it isn't then you will have to use something like BillHo suggested.

Tom..... :slight_smile:

I don't know about whether it's connected to earth, since i don't have an earth protection at all (No Earth Rod), but what i can tell you is that i traced the gnd clamp inside the plasma box, and i found it connected in a wide metal plate, i unscrew the screw of the cable and attached my wire to it and screw it back.

I didn't understand BillHo schematic, and i know in my region analog optocouplers are not to be found (i already asked around).

yendis:
Simply that any earth connections, such as the Arduino gnd, power supply grounds/returns, all go to a single 'star' point using separate wires. Although this can be very effective (and I use it to good effect on my PWM motor drive project) I suspect you may have ground paths built-in which you cannot connect up in this way, e.g. USB connection back to laptop mains earth. But if that is the case, you can break the USB ground path, and use an opto isolated link that might well eliminate the interference effect.

About your DC shift when using capacitors in a filter, I would suspect voltage spikes are forward biasing PN junctions eg maybe at the Arduino inputs, and this rectifies the spikes into DC.

"all go to a single 'star' point using separate wires."
You mean here the Earth Rod like in this image:

"you can break the USB ground path"
So i power the Arduino from another source, and break the power leads in the usb cable? This seems
to be a very good idea, i will try it and report back.

"and use an opto isolated link"
Where exactly to use this opto?

The phenomena of the filters happens even when i'm feeding Arduino 5 volts as input, i can even see it with a multimeter, it show 4.85 then 4.86 and keeps fluctuating, since the Arduino has more resolution, i can see the numbers go up and down, but never stable, if i make the capacior bigger, the fluctuation get bigger and vice versa, even with a small cap of 1nF there is still fluctuation but really small. To be honest when i saw the phenomena i felt like all the videos and tutorials i saw about passive filters were all lies x)

Apastrix:
"all go to a single 'star' point using separate wires."
You mean here the Earth Rod like in this image:

Well that wasn't quite what I had in mind although the principle is sound. There are two different aspects of electrical grounding in the user environment (home, work etc). One is earthing for safety, and the other is earthing or grounding as a common reference for electrical signals.

Safety earthing is used mainly to protect the use from electric shock, but also to ensure any circuit breakers can operate correctly. Please be aware of this with your equipment.

Signal grounding and the way it is configured can affect how well or badly your circuit works. Other related aspects affecting signal integrity are areas sensitive to electric and magnetic fields, and any shielding or screening that might be effective in reducing interference.

If you simply connect signal grounds at the nearest convenient point, so power currents can flow in signal grounds, then, because a wire has resistance (and inductance) a voltage develops in the ground wire which interferes with the signal. So this is when star connected grounds can help by separating power current from signal circuits. Use of heavy cables can also help.

yendis:
... wire which interferes with the signal. So this is when star connected grounds can help by separating power current from signal circuits. Use of heavy cables can also help.

I tried your solution of breaking the usb ground, but it didn't work, windows said that the device i'm attaching to it is broken and can't recognize it, now i know that you can't connect a usb device without the power leads ^^"

I only have two grounds, when is the plasma negative (-) lead and the other is the Arduino GND, My setup is to simply connect the plasma (-) wire in the binding Post of my breadboard, and connect the Arduino GND to the same post using a jumper wire, also the ground of the voltage divider is connected to the same post, i can't see how i can improve things more than this.

In your previous post, when you talked about breaking the usb ground, you mentioned opto isolation, what did you mean by that?

I was thinking about any ground path that might exist through the USB to the power wall-socket, but if you run your laptop on battery only that will ensure isolation.

Apastrix:
I only have two grounds, when is the plasma negative (-) lead and the other is the Arduino GND, My setup is to simply connect the plasma (-) wire in the binding Post of my breadboard, and connect the Arduino GND to the same post using a jumper wire, also the ground of the voltage divider is connected to the same post, i can't see how i can improve things more than this.

You seem to be assuming the plasma negative lead is ground. That may well be true but are you sure?

I suggest you make a differential-input amplifier using an instrumentation amplifier or (one or more) operational amplifiers. Connect the plasma positive via a voltage divider to the non-inverting input and connect plasma negative via an identical voltage divider to the inverting input. Remove your existing connection of plasma negative to Arduino ground. Connect the output of the differential amplifier to Arduino analogue input via a series resistor of roughly 22kΩ (to provide protection in case the signal goes outside the input signal range of the Arduino). That way you will eliminate the connection from your plasma cutter to the ground of your Arduino and laptop (except though the high impedance of your voltage dividers). I guess you may need some help in the design of the differential amplifier.

yendis:
I was thinking about any ground path that might exist through the USB to the power wall-socket, but if you run your laptop on battery only that will ensure isolation.

Oh so i miss understood you, but anyway, there is only the GND of Arduino that is connected to the GND of the plasma for voltage measuring referencing, and this is the root of my noise problem.

What is the default way of reading a noisy voltage? how can i stop noise from getting to my Arduino and yet be able to read the voltage?!

Archibald:
You seem to be assuming the plasma negative lead is ground. That may well be true but are you sure?

I suggest you make a differential-input amplifier using an instrumentation amplifier or (one or more) operational amplifiers. Connect the plasma positive via a voltage divider to the non-inverting input and connect plasma negative via an identical voltage divider to the inverting input. Remove your existing connection of plasma negative to Arduino ground. Connect the output of the differential amplifier to Arduino analogue input via a series resistor of roughly 22kΩ (to provide protection in case the signal goes outside the input signal range of the Arduino). That way you will eliminate the connection from your plasma cutter to the ground of your Arduino and laptop (except though the high impedance of your voltage dividers). I guess you may need some help in the design of the differential amplifier.

Ok, i will go and read about differential amplifiers, but can you please assist me with a schematic?

Apastrix:
Ok, i will go and read about differential amplifiers, but can you please assist me with a schematic?

You could use the classic operational amplifier subtractor circuit shown here with voltage dividers for the two plasma signals and with a 22kΩ resistor for protecting the Arduino A0 input.


With the four resistor values shown, the subtractor circuit will have unity gain.

There will be a load of 2R ohms on each potential divider so this should be taken into account. However if this load is insignificant you can make the four resistors of the subtractor circuit equal and still get unity gain. I suggest you choose R to be about 100kΩ so the load will probably be insignificant, depending on the resistor values you are using for the potential dividers.

We should consider putting capacitors across the lower resistors of both voltage dividers to filter out noise.

You could use an operational amplifier that works off a single +5 volt supply but it may be worth using dual supplies such as +15V and -15V to give greater allowance for transient voltages (especially as the plasma cutter and Arduino grounds will not be connected). If using an operational amplifier on a single +5V supply, be aware of the rather limited output voltage range.

(Before someone comments: I'm aware the number of resistors could be reduced but I'm trying to keep concepts simple).