Author Topic: Measure reversible voltage without PD drop?  (Read 3754 times)

0 Members and 1 Guest are viewing this topic.

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Measure reversible voltage without PD drop?
« on: August 10, 2019, 03:21:30 am »
Hi,

I want to measure a voltage with the ADC of a micro-controller. It's easy, I just use a simple voltage divider to condition the 0-5V back EMF of a brushed DC electric motor, so I can measure and control it's speed.

Okay, so I want to measure this motor's back EMF voltage when it rotates in either direction. I guess I just rectify the original +-5V back EMF signal, but that leaves me with a huge gap in the lower end of the measurement, associated with the forward voltage drop of the rectifiers. I think I'm then measuring in the range of ~1.2-5V, which won't help me at all.

Any clues how I might condition the -5V to 5V back EMF voltage from the motor, so it can be accurately read by an ADC?

All links and suggestions appreciated.

12407622  :-+

« Last Edit: August 10, 2019, 03:38:28 am by 12407622 »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3467
  • Country: us
Re: Measure reversible voltage without PD drop?
« Reply #1 on: August 10, 2019, 03:38:25 am »
You can use an op amp to translate a -V to +V range to 0-5V.

Here's a TI applications note on how to translate a -V to +V signal to 0-5V for use with an ADC:

http://www.ti.com/lit/ug/tidu015/tidu015.pdf
« Last Edit: August 10, 2019, 03:45:50 am by ledtester »
 
The following users thanked this post: 12407622

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #2 on: August 10, 2019, 04:09:43 am »
Thanks ledtester,

Bit of study to do, but I think you've hit the nail squarely on the head.

Muchly appreciated.

12407622  :)
 

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #3 on: August 10, 2019, 08:49:42 am »
Urgh! Looks like I'm not out of the woods just yet.

To measure the speed of my brushed DC motor, I'm to periodically, briefly disconnect it from the PWM driven H-Bridge outputs, then read the voltage generated by the still rotating motor before it slows. That leaves me no ground reference, so op-amps are (I think) out for now.

I suspect I'm back to the full-wave bridge rectifier and voltage divider option, but that still leaves the rectifier's forward voltage drop...the first 1.2V of the 5V total generated (the important bit in my low speed application).

Any clues on what type of diode I might use for the bridge, so that I can get the least forward voltage drop, and the least initially diminished voltage available for measurement with an ADC?

...still open to other options. My knowledge of what might be available is quite limited. Maybe op-amps are still my solution, but I don't quite get how to employ one gainfully? - Oh, I feel a cluck! :palm:

Thanks,
12407622.  :-//
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Measure reversible voltage without PD drop?
« Reply #4 on: August 10, 2019, 09:17:22 am »
Try looking at making the ADC differential. That means the ADC measures the voltage between 2 input pins.

Right now, the ADC is in absolute mode, referenced to the 0V of the circuit.
In differential mode,the ADC is not referenced to 0V, hence allowing measuring between 2 inputs.
Now, the ADC can measure +5V or -5V. The ADC will tell you the voltage but not the polarity.
« Last Edit: August 10, 2019, 09:19:50 am by MosherIV »
 

Offline nugglix

  • Regular Contributor
  • *
  • Posts: 209
  • Country: de
Re: Measure reversible voltage without PD drop?
« Reply #5 on: August 10, 2019, 09:22:06 am »
Videos that might help:







 
The following users thanked this post: 12407622

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3467
  • Country: us
 
The following users thanked this post: 12407622

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #7 on: August 10, 2019, 09:42:08 am »
Thanks nugglix, ledtester and MosherIV,

That's 3 excellent avenues of enquiry, I expect I would never have found Googling about.

Very greatly appreciated.  :clap:

Regards,
12407622
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3467
  • Country: us
Re: Measure reversible voltage without PD drop?
« Reply #8 on: August 10, 2019, 09:53:30 am »
Here's another paper that has some interesting ideas:

"Sensorless speed measurement for brushed DC motors"

https://www.researchgate.net/publication/283201650_Sensorless_speed_measurement_for_brushed_DC_motors

 
The following users thanked this post: 12407622

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #9 on: August 10, 2019, 11:52:23 am »
Try looking at making the ADC differential. That means the ADC measures the voltage between 2 input pins.

Right now, the ADC is in absolute mode, referenced to the 0V of the circuit.
In differential mode,the ADC is not referenced to 0V, hence allowing measuring between 2 inputs.
Now, the ADC can measure +5V or -5V. The ADC will tell you the voltage but not the polarity.

Thanks, MosherIV.

You've said something that's piqued my interest, but I'm not sure I fully understand.

So I find a micro-controller with a fully differential ADC. It has AN+ and AN- inputs. I connect these across the the brushed DC motor terminals, via a suitable voltage divider, and the difference between the terminal voltages may be read by a suitably referenced ADC as the motor runs down.

What then happens when I want to measure the motor's terminal voltages difference, when the motor spins the other way, and now the AN- input is at a higher voltage than the AN+ input?

I ask this because I'm basically clueless, and because you've mentioned something about the differential ADC being capable of measuring voltage, but not the polarity (?).

Do you suppose I might alternate the AN+ and AN- input polarities to the differential amplifier without damage, and reliably get sensible conversion magnitude data as a result?

TIA,
12407622  :-\
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17830
  • Country: us
  • DavidH
Re: Measure reversible voltage without PD drop?
« Reply #10 on: August 10, 2019, 02:23:51 pm »
If you have a second ADC channel, then add a second divider in parallel with the first divider which goes to the positive supply voltage or reference instead of ground.  Now one ADC channel reads positive voltage from ground and the second ADC channel measures negative voltage from the positive supply or reference.

 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3467
  • Country: us
Re: Measure reversible voltage without PD drop?
« Reply #11 on: August 10, 2019, 02:28:07 pm »
Differential ADCs can measure negative voltages.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: Measure reversible voltage without PD drop?
« Reply #12 on: August 10, 2019, 02:41:51 pm »
Differential ADCs can measure negative voltages.
Differential ADCs can normally measure negative differences, but many cannot tolerate either leg falling below ground.
 
The following users thanked this post: ledtester

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17830
  • Country: us
  • DavidH
Re: Measure reversible voltage without PD drop?
« Reply #13 on: August 10, 2019, 03:49:12 pm »
Differential ADCs can measure negative voltages.

Differential ADCs can normally measure negative differences, but many cannot tolerate either leg falling below ground.

Some ADCs can measure negative voltages directly while operating only on a positive supply but few if any differential ADCs can operate this way because of input common mode limits.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: Measure reversible voltage without PD drop?
« Reply #14 on: August 10, 2019, 04:02:41 pm »
Some ADCs can measure negative voltages directly while operating only on a positive supply but few if any differential ADCs can operate this way because of input common mode limits.
There are a number of ADCs designed specifically to interface to current shunts, which run from a single rail but allow the ADC  input pins to go slightly below ground. Typically 0.1V, which is enough to allow a well laid out shunt circuit to function properly. Most electrical energy measurement chips have a front end like this.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17830
  • Country: us
  • DavidH
Re: Measure reversible voltage without PD drop?
« Reply #15 on: August 10, 2019, 04:19:43 pm »
Some ADCs can measure negative voltages directly while operating only on a positive supply but few if any differential ADCs can operate this way because of input common mode limits.

There are a number of ADCs designed specifically to interface to current shunts, which run from a single rail but allow the ADC  input pins to go slightly below ground. Typically 0.1V, which is enough to allow a well laid out shunt circuit to function properly. Most electrical energy measurement chips have a front end like this.

The LTC1609 with an input range to -10 volts with only a +5 volt supply is an example of the kind of part I was referring to.

But referencing the input divider to a positive voltage like the positive supply voltage or positive reference voltage allows a negative input voltage to be measured with an ADC which only accepts positive voltages.  A more common way is simply to use an inverting amplifier however this requires an additional operational amplifier.
« Last Edit: August 10, 2019, 04:21:46 pm by David Hess »
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: Measure reversible voltage without PD drop?
« Reply #16 on: August 10, 2019, 04:32:35 pm »
Some ADCs can measure negative voltages directly while operating only on a positive supply but few if any differential ADCs can operate this way because of input common mode limits.

There are a number of ADCs designed specifically to interface to current shunts, which run from a single rail but allow the ADC  input pins to go slightly below ground. Typically 0.1V, which is enough to allow a well laid out shunt circuit to function properly. Most electrical energy measurement chips have a front end like this.

The LTC1609 with an input range to -10 volts with only a +5 volt supply is an example of the kind of part I was referring to.

But referencing the input divider to a positive voltage like the positive supply voltage or positive reference voltage allows a negative input voltage to be measured with an ADC which only accepts positive voltages.  A more common way is simply to use an inverting amplifier however this requires an additional operational amplifier.
It would be interesting to see how they do the input protection in that device. Its only single ended, though. Do you know what causes the common mode limits you referred to? In the sigma delta converters typically used for shunt sensors the CMRR is usually very good. It has to be when you are looking for a small differential signal from the shunt. Most use switched cap discrete time front ends, which can have an extremely good CMRR figure. Some use continuous time front ends, which are not as good, but still have a fairly respectable CMRR.
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Measure reversible voltage without PD drop?
« Reply #17 on: August 10, 2019, 09:23:34 pm »
Quote
So I find a micro-controller with a fully differential ADC. It has AN+ and AN- inputs. I connect these across the the brushed DC motor terminals, via a suitable voltage divider, and the difference between the terminal voltages may be read by a suitably referenced ADC as the motor runs down.

What then happens when I want to measure the motor's terminal voltages difference, when the motor spins the other way, and now the AN- input is at a higher voltage than the AN+ input?

I ask this because I'm basically clueless, and because you've mentioned something about the differential ADC being capable of measuring voltage, but not the polarity (?).

Do you suppose I might alternate the AN+ and AN- input polarities to the differential amplifier without damage, and reliably get sensible conversion magnitude data as a result?
ADCs in differential mode only measure the voltage between the pins  AN+ and AN-
This is what I meant about voltage only but not polarity.

You must always obey the input limits of the ADC device or processor ADC.
The others are correct that you may not be able to put a true negative voltagr to either AN+ or AN-.

If you use a pick a ADC decive/chip that allows seperate ADC Vref and ground point to the device power then you can measure true negative voltage.
The other are correct.
You must still obey the input limits of the device though.

I believe that in differential mode, the ADC does not mind if AN1- is higher voltage than AN+
The ADC should have a non signed mode and a signed (polarity) mode.
Non signed mode will only tell you the voltage difference (that was the mode I was thinking about)
The Signed mode will tell you the polarity of the voltage as well (I forgot this mode - though not all ADCs have this, you will need to check)

Can you measure the speed and direction of a motor by measuring the motor terminal voltage?
Yes. It is not simple as you are finding out.

Why (how) would a motor suddenly change direction if the micro is controlling the speed and direction of the motor
 

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #18 on: August 11, 2019, 12:45:07 am »
Thanks everyone for the super support.

For just now I'm going to go with 2 x full-wave rectifiers (and voltage dividers) for each of the two motors, with low forward voltage drop germanium diodes. My present setup uses an 328P controller, and I can spare the requisite 2 x single-ended ADC channels for now.

If there's a better choice than a commonly available 1N60P (Vf ~0.24v @ 1mA), then please lemmy know.

If that doesn't give me the low rpm control needed for the application, then I'll be back for a much closer look at all the excellent links and suggestions provided. I suspect that I'll have to study op amps a little further, and implement one of these precision op amp rectifier circuits to feed my present ADCs.

Sorry, I'm not too lazy to go through all contributions in full depth, just a bit dotty nowadays, and time is becoming very precious.

Thank you all again, so much.

12407622.  ;D
« Last Edit: August 11, 2019, 01:04:45 am by 12407622 »
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 5008
  • Country: dk
Re: Measure reversible voltage without PD drop?
« Reply #19 on: August 11, 2019, 01:51:04 am »
Thanks everyone for the super support.

For just now I'm going to go with 2 x full-wave rectifiers (and voltage dividers) for each of the two motors, with low forward voltage drop germanium diodes. My present setup uses an 328P controller, and I can spare the requisite 2 x single-ended ADC channels for now.

If there's a better choice than a commonly available 1N60P (Vf ~0.24v @ 1mA), then please lemmy know.

If that doesn't give me the low rpm control needed for the application, then I'll be back for a much closer look at all the excellent links and suggestions provided. I suspect that I'll have to study op amps a little further, and implement one of these precision op amp rectifier circuits to feed my present ADCs.

Sorry, I'm not too lazy to go through all contributions in full depth, just a bit dotty nowadays, and time is becoming very precious.

Thank you all again, so much.

12407622.  ;D

if everything is on the same ground you will short half the diodes. How about two diodes one from each terminal of the motor, when measuring turn on low side fet on the low voltage side


 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17830
  • Country: us
  • DavidH
Re: Measure reversible voltage without PD drop?
« Reply #20 on: August 11, 2019, 03:43:23 am »
It would be interesting to see how they do the input protection in that device. Its only single ended, though. Do you know what causes the common mode limits you referred to?

The first problem is that if a common junction isolated semiconductor process is used, then most or all semiconductor nodes are isolated from the substrate by a junction diode which is why no pin can be pulled negative.  Older ICs sometimes had a separate substrate connection but modern parts tie the substrate to the negative most input which is usually the negative supply pin.  For instance the LM317 has the substrate tied to the adjust pin and the LM337 has the substrate tied to the negative input pin.  This is why these regulators have different pinouts; the center pins connect to the tabs and that is where the substrate connects.

But for an input that goes to an inverting amplifier, the junction at the input after the series resistor is held at ground.  Linear Technology makes some switching regulator controllers which use this method to allow feedback from negative voltages.  I think some ADCs and DACs do this also.

Dielectric isolated semiconductor processes avoid this problem entirely.
 

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #21 on: August 11, 2019, 04:10:08 am »

if everything is on the same ground you will short half the diodes. How about two diodes one from each terminal of the motor, when measuring turn on low side fet on the low voltage side

Hi langwadt,

I drew it out, but can't get my head around the diode shorting you've alerted me to. Yes, I think the ground is common, at least while the H-Bridge is energised. I need to be cautious, both when the motor is driven, and disconnected and freewheeling, it sounds like?

Not sure I can isolate any one leg of the H-Bridge chip I'm using, but low PD drop through 'active' rectification, by switching of an additional 'measurement' network of FETs sounds interesting.

Thanks for the tips,
12407622  :D
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: Measure reversible voltage without PD drop?
« Reply #22 on: August 11, 2019, 06:00:31 am »
I've used these in the past, for HV battery packs - https://datasheets.maximintegrated.com/en/ds/MAX9928-MAX9929.pdf
Ran multiples on isolated supplies, up to 300V. What I like about them, single FS ADC output, with a sign pin for direction. Pretty fast as well. May be useful info
Hello <tap> <tap> .. is this thing on?
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: Measure reversible voltage without PD drop?
« Reply #23 on: August 11, 2019, 10:37:40 am »
It would be interesting to see how they do the input protection in that device. Its only single ended, though. Do you know what causes the common mode limits you referred to?

The first problem is that if a common junction isolated semiconductor process is used, then most or all semiconductor nodes are isolated from the substrate by a junction diode which is why no pin can be pulled negative.  Older ICs sometimes had a separate substrate connection but modern parts tie the substrate to the negative most input which is usually the negative supply pin.  For instance the LM317 has the substrate tied to the adjust pin and the LM337 has the substrate tied to the negative input pin.  This is why these regulators have different pinouts; the center pins connect to the tabs and that is where the substrate connects.

But for an input that goes to an inverting amplifier, the junction at the input after the series resistor is held at ground.  Linear Technology makes some switching regulator controllers which use this method to allow feedback from negative voltages.  I think some ADCs and DACs do this also.

Dielectric isolated semiconductor processes avoid this problem entirely.
Its rare for an ADC to have an actual amplifier at its input, despite them appearing in many block diagrams. Those diagrams only represent the functionality, not the implementation details.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20845
  • Country: gb
  • 0999
Re: Measure reversible voltage without PD drop?
« Reply #24 on: August 11, 2019, 11:24:09 am »
Why not simply use a differential amplifier?


http://www.eetimes.com/document.asp?doc_id=1272328

For a single supply application, the output can be biased, so it's centred around half the power supply voltage, say 2.5V, for a 5V supply. If the input voltage is +1V, then the output will be 2.5+1 = 3.5V and if the input voltage is -1V, then the output will be 2.5+(-1) = 1.5V.


If you need to handle +/-5V, then the circuit will need to have a gain of 0.5 and the op-amp a rail-to rail output.
 

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #25 on: August 14, 2019, 11:06:50 am »
Well, that worked out much easier than had been anticipated:

https://youtu.be/1_PeoERrCLw

12407622  ;D
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3467
  • Country: us
Re: Measure reversible voltage without PD drop?
« Reply #26 on: August 14, 2019, 06:40:50 pm »

Can you post a schematic of what you eventually went with?

Thanks - and congratulations on getting it working!
 

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #27 on: August 15, 2019, 12:55:08 am »

Can you post a schematic of what you eventually went with?

Thanks - and congratulations on getting it working!

Hi ledtester,

Boring old germanium diode bridge wired across the motor terminals, 10K pot from +output of that to gnd, with very tiny greencap (3mm x 8mm x 2mm) and 4V7 clamp zener from wiper output to gnd.

The running motor is disabled for 2ms, each 1/12th of a second, after which period the back EMF from 2 successive measurements is averaged.

Yet to be properly tuned PID does the rest. A small Kp, much larger Ki, and almost none, but some very small Kd.

Sorry, a diagram would be just scribble, as I'm still recovering from an 'accident' with the hard drive I kept all those type of programs on. I hope the description was clear enough for anyone to follow.

Thanks very much for your interest, and fabo suggestions, everyone.  :)

12407622
 

Offline 12407622Topic starter

  • Contributor
  • Posts: 10
  • Country: au
Re: Measure reversible voltage without PD drop?
« Reply #28 on: August 22, 2019, 08:34:23 am »
Hi,

A little larger smoothing capacitor added for better noise immunity, and a stop on collision facility added.

https://youtu.be/doWnCFVbF9Y

Circuit attached:

T.  :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf