Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Admin on June 03, 2011, 06:42:04 AM

Title: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 06:42:04 AM
I've been given a one day notice (it must be finished today) to make an automated device that can measure the voltage of no less than 8 batteries (more the better). The measurement must happen every 10 minutes for one month straight, without human assistance. Each battery will never go above 0.4V. With an Axon, this is normally easy by just using the ADC and a timer . . . but . . .

What makes this difficult is that the grounds of each battery cannot be connected, ie there is no common ground. I also do not have enough time to order anything, so I can only use stuff already in the lab.

Anyone have any idea how I can measure 8 voltage differences (the voltage of each battery) with these constraints?
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: lall on June 03, 2011, 06:51:30 AM
If there's no common ground, is there common positive line? I probably sound stupid.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 07:00:59 AM
Nothing can be common. Each cell must float in voltage with respect to each other.

(I know, it sounds very odd . . . these are fancy experimental/revolutionary batteries I'm not allowed to talk about.)
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: lengchai on June 03, 2011, 07:03:33 AM
what do you have in terms of electronic switches ?
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 07:08:12 AM
You mean like transistors?
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: garrettg84 on June 03, 2011, 07:44:59 AM
opto-isolated?
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 07:46:37 AM
OK, I see what you mean. Basically I can use a MOSFET to connect/disconnect ground from each battery as it cycles through the measurements, right?

Lets see if I can dig up 8 MOSFETs . . . I have some at home, but not sure about my lab . . .


opto-isolated?
I don't have time to order any, although in theory analog opto-isolators could work.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: garrettg84 on June 03, 2011, 07:53:37 AM
(I know, it sounds very odd . . . these are fancy experimental/revolutionary batteries I'm not allowed to talk about.)

SUPER SECRET SQUIREL STUFF!!!! GO NAVY!

opto-isolated?
I don't have time to order any, although in theory analog opto-isolators could work.

Make your own opto-isolator?
LED to LED/Photo Diode (+ opamp...)
http://en.wikipedia.org/wiki/LED_circuit#LED_as_light_sensor (http://en.wikipedia.org/wiki/LED_circuit#LED_as_light_sensor)
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 08:09:08 AM
Make your own opto-isolator?
LED to LED/Photo Diode (+ opamp...)
http://en.wikipedia.org/wiki/LED_circuit#LED_as_light_sensor (http://en.wikipedia.org/wiki/LED_circuit#LED_as_light_sensor)
The issue with this is that each opto-isolator needs to be powered (the fancy batteries cannot power them). Since each isolator cannot be connected, that means 8 separate power sources. It needs to run for a month, too, so that rules out batteries (I don't have 8 car batteries lol).


To complicate matters, next month I need to make a device that measures voltage *and* current draw from 16 batteries without a common ground. Arg.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: garrettg84 on June 03, 2011, 08:56:25 AM
I'm not sure how you'd measure voltage without a common ground between the ADC and the batteries. There has got to be a voltage drop somewhere to be measured. There is always going to be a (minimal) drain on the batteries from the ADC when connected. If you use mosfets, you'll be back to the common ground issue again likely. You may have to use actual relays to make this work without a common ground. I imagine a relay based half h-bridge for each battery leading to the ground and ADC for this to work.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: lengchai on June 03, 2011, 11:09:06 AM
you can use transmission gates (pmos and nmos in parallel) as your active switch.

then comes the issue of passing that to an ADC. What sort of ADC do you have ?

Of course, if you are bold, you can use switched cap circuits to do this measurement. You can even employ some delta sigma trick to get better resolution of the voltage signal.

basically use the transmission gates (TG) as switches to connect the batteries to a sampling cap. then disconnect the TGs and use an ADC to measure the sampled voltage on the cap.

I would suggest using a parasitic insensitive SC network for this.

Have a look at the following tutorial ...
ftp://ftp.seu.edu.cn/Pub2/EBooks/Books_from_EngnetBase/pdf/8593/chp59.pdf

good luck ...
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Soeren on June 03, 2011, 12:20:07 PM
Hi,

A differential amplifier on each will do it.

Edit: meant an instrumentation amp on each (that's a diff amp too though).
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 01:05:45 PM
Solved!

I put an NPN MOSFET on the ground lines of each battery, allowing me to only connect one ground at a time to the ADC (so that none were ever common).

Incredibly simple circuit, only one single component, with the gait being controlled by the Axon. I only found 4 MOSFETs, so only 4 batteries measured . . . but given the time constraint I couldn't have done better.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: lengchai on June 03, 2011, 02:53:49 PM
an NPN is a bipolar transistor ... a MOSFET is a FET transistor ... I presume you meant a N-channel MOSFET (NFET) ?

Well done ... that was what I thought you could do in the first place ...
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 03, 2011, 03:21:35 PM
oops, yea, I meant N-channel (http://www.st.com/stonline/products/literature/ds/6958.pdf)
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: aruna1 on June 04, 2011, 07:16:14 AM
Sorry for the late reply. i'm glad you solved it

what i would do is use 2 , CD4051 muxes , one for connecting grounds of each battery to your board, and one for connecting positive lines of each battery to your board. so only 4 wires (3 control signal pins [common for both muxes] + 1 ADC) will take care of 8 batteries. and possibly with a high impedance buffer stage  ;D

Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 04, 2011, 07:44:42 AM
thanks aruna1!

I feel stupid now . . . I have like ten 16-channel muxes in a box in my lab and it didn't occur to me to use them -_-*

They want me to make a new version in a month, so I'll swap to that instead.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: aruna1 on June 04, 2011, 07:53:47 AM
 ;D

good good
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Soeren on June 04, 2011, 01:02:11 PM
Hi,

They want me to make a new version in a month, so I'll swap to that instead.
You mentioned measuring current as well, on the next iteration, so that won't work, as they have far too high (and variable) on-resistance.
If you need pro quality, the instrumentation amps is the way to proceed (can be bought ready made or build from 3 op-amps).
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: Admin on June 04, 2011, 02:52:38 PM
You mentioned measuring current as well, on the next iteration, so that won't work, as they have far too high (and variable) on-resistance.
If you need pro quality, the instrumentation amps is the way to proceed (can be bought ready made or build from 3 op-amps).
For this particular setup, resistance isn't a problem. We need some resistance to use as a load when drawing current.
Title: Re: [urgent electronics problem]measuring voltage without common grounds
Post by: aruna1 on June 04, 2011, 08:44:56 PM
Hi,
You mentioned measuring current as well, on the next iteration, so that won't work, as they have far too high (and variable) on-resistance.
If you need pro quality, the instrumentation amps is the way to proceed (can be bought ready made or build from 3 op-amps).


ya but I believe you can still simplify next stage (current+voltage measurement) with additional mux(for connecting current sensing resistor to selected battery via mosfet), and 8 logic level N mosfets, 8 opto isolators (You might use 8 reed switches instead of opto isolators+mosfets)and 8 identical resistors
so all together it will be

3 pins for control - common for all 3 muxes
1 ADC pin -
1 special control signal for third mux - (for inhibit pin) [when enable it will connect resistor across the battery]

maybe a stupid idea  ;D

method