Measuring analog signal voltage - Page 1
Forum section: electronics / beginners

author: Rolypoly
author_rank: Newbie
timestamp: February 14, 2010, 03:14:21 am
content: Short version:How would I record an analog signal voltage to my microcontroller if the two circuits have a different ground voltage?Long version:I have a device (a viscometer) that outputs on 3 pins, a ground and 2 analog signal voltages relative to the ground. I want to use this to automate the recording of the output from the device onto a computer. Running the signal voltage into the A/D converter on my arduino got the wrong readings, I realised this was because the two ground voltages are different, even when the arduino is running off battery. I tried an optocoupler but it turns out that it only outputs digitally and I lose my data.I've tried looking for some sort of circuit that can compensate for the different ground voltages but I'm not hitting the right keywords or something and have come up blank.Any ideas?TIA

author: jahonen
author_rank: Super Contributor
timestamp: February 14, 2010, 07:15:46 am
content: Are you trying to measure the voltage between those two analog outputs? Maybe an instrumentation amplifier (something like AD620, AD8251 or perhapsAD623etc.) is the device you'll need between your MCU ADC and the viscometer? That works if your ground voltage difference is inside instrumentation amplifier supply voltage, i.e. for example if the IA has supply voltage of ±15V, then the inputs can be at any voltage inside that range.Regards,Janne

author: Rolypoly
author_rank: Newbie
timestamp: February 14, 2010, 08:02:11 am
content: Thanks for the response Janne,I want to be able to record the voltage between the devices ground and signal outputs (so I would have two bits of information, a comparison of each output to ground). I am unable to get the arduino to record both and just subtract the difference because the device ground is about -1V compared to arduino ground the A/D reads 0 (it only works from 0-5V relative to arduino ground). Essentially I want to offset the difference.This could be what I'm looking forI haven't used these before so they're a bit of a mysterious black box to me. This from the datasheet look promising:The reference terminal potential defines the zero output voltage and is especially useful when the load does not share a precise ground with the rest of the system. It provides a direct means of injecting a precise offset to the output.Just to be sure though, if I set this to a gain of 1 (by not connecting a resistor between +Rg and -Rg) and made the REF my arduino ground, -Vs = arduino ground, +Vs = arduino +5V, -IN = device ground, +IN = device signal then the voltage between OUTPUT and REF would be the same as the voltage between -IN and +IN?

author: Unknown
author_rank: Unknown
timestamp: February 14, 2010, 08:33:55 am
content: Is there any reason you can not tie both grounds together ?In Engineering the big principle is KISS (Keep It Simple Stupid), over worked solutions can bite you.

author: Rolypoly
author_rank: Newbie
timestamp: February 14, 2010, 09:19:03 am
content: I tried that, wondering if it would blow something up as I did it. I connected both ground outputs together but that didn't seem to effect the readings.

author: jahonen
author_rank: Super Contributor
timestamp: February 14, 2010, 11:11:06 am
content: Quote from: Rolypoly on February 14, 2010, 08:02:11 amYes, that is how it works. Then -IN and +IN should both be in common mode range, which is -Vs to +Vs (or little less if CMRR is to be maintained, see datasheet). If that is not the case (what I suspect from your post), then you'll need a split supply, e.g. +Vs = +5V and -Vs = -5V. Note that -5V for the IA can be quite easily generated from +5V by something like ICL7660 or MAX660. Or even with some roll-your-own charge pump using that Arduino as an oscillator.Regards,Janne

author: Unknown
author_rank: Unknown
timestamp: February 14, 2010, 11:30:22 am
content: Quote from: Rolypoly on February 14, 2010, 09:19:03 amIf you can post some specs ie sensor being used, power supply arrangements we can make suggestions, We all know how it feels to be a newbie, we were all there once, but you are lucky, you have the internet at this needy stage of learning, and alot of us "old timers" are more than happy to help

author: Rolypoly
author_rank: Newbie
timestamp: February 17, 2010, 04:21:42 am
content: Thanks both for helping. I picked up a supply of goodies from the local electronics shop today so I'll be able to have a proper go after work. I picked up an IA and also a comparator which looked promising as well (I love how all these things cost like $1 so it doesn't matter if it doesn't work) and many other goodies including a volts to frequency converter that might do the trick too. Lots of ways to skin a catI have a sneaking suspicion I'm about to learn a whole lot more about split power supplies.The sensor I'm trying to read is not really a sensor in the usual sense. It's the output from a viscometer, which is mains powered and has two dc signal outputs (plus the reference ground) for reading the data off. I think the problem is that since they are two separate circuits and because the ground for the viscometer is lower than ground for my arduino the A/D converter just says 0V because it can't read any lower.