Back-EMF design help needed please

Thread Starter

howdoesthatworkguy

Joined Jul 23, 2007
39
Thx everyone so far for other design ideas on some of my other threads. I am getting close to finishing.

Details. 12V Mosfet-Bridge, 2amp max, approx 20Khz.

BEMF, I have noticed a number of IC's for this. But I have also seen a simple circuit that users some type of resistor devider, then feeds directly into the ADC of a PIC. The two resistors are in series directly across the DC motor polls which are both 10K each. Between the resistors a connection is made directly to the ADC.

Question time :)
How does this type of thing work?
With a 10Bit ADC what bit resolution will this get me?
Howdo you work out resolution, I noticed someone asked me in another thead but I did not know?
What is the difference in using two resistors verus an IC that does this ?
Do the resistors need to be extreamly high tolorance?
Have I missed anything?
 

nanovate

Joined May 7, 2007
666
Here is an App Note:
http://ww1.microchip.com/downloads/en/AppNotes/00893a.pdf

It should answer some of these questions. Microchip buffers the signal with PGA (G=1) which makes up for the high impedance of the resistor divider. Using a dedicated IC allows much of the signal conditioning to be moved onto the IC. Higher tolerance resistors are better of course and they should be placed close together so that they are as close to the same temp as possible.

Hope this gets you started.

John
 

beenthere

Joined Apr 20, 2004
15,819
About A to D resolution - the bits give you the size of the maximum binary value that can be expressed. For instance, four bits can express the value of 15 (in decimal). Each additional bit is worth double the value of the next lowest bit. For the four bit example, values go:
Bit 0 - 1
Bit 1 - 2
Bit 3 - 4
Bit 4 - 8

These values sum to 15. Notice that the value 0 is expressed with all bits = 0, for 16 states. 10 bit reso gives you 1024 states.

As for the resistor divider - the resistors each have half the applied voltage across them. See the site's Ebook DC section for an explanation if you like. Nanovate's comments are correct, about resistor layout and tolerance. Practically, though, 5% resistors have very little actual variation from one to the next. Let the need for accuracy guide the choice.

It may seem as if very precise resistors are necessary for full accuracy, as the A to D can give you 1 part in 1000 resolution. Again, speaking from experience, PIC A to D's may not be capable of their stated performance. I've got a data converter from Dataq that uses a PIC with a 10 bit A to D. I also have a very accurate and stable voltage source. When applied to the inputs of the A to D, the output varies by about 3 bits. Conversion accuracy out of a PIC micro is a sometime thing. Look at the price of an A to D converter IC, and then the price of a PIC. You tend to get what you pay for.
 

Thread Starter

howdoesthatworkguy

Joined Jul 23, 2007
39
Thanks for your answers guys. That Doc from Microchip is excellent. Has all the Math needed at the end of it. As for the resistor devider network I had no idea that PIC's ADC's were not so great. I have another section in this forum asking about Sigma Delta ADC's because what I have read so far it seems they are the latest fashion craze, 16 or 24bit devices that over sample and do some type of basic DSP work before the changes only are sent to a Micro. I guess with such high bit resolutions it does not matter yet you can get good results.

If the PIC ADC can be out as much as 3 bits how does that affect the smooth running of a DC motor?

PS, in that Microchip doc, it explains how to work out bit resolution, one thing I was not clear on in Equation 13 is the log2 function. tell me if this looks right using there details,

Microchip design note AN893, Equation 13.
Vgainmax 4.8
VDD 5v
Bit Res 1024
There answer is 9.94bits

(Log * ((4.8 / 5) * 1024 )) / log2
I am not sure if that is how to right it correctly, but I am trying to write it as shown in the design note, please correct me for other people if I am wrong.

My answer though is always wrong, I don't think I got the math sequence right,

4.8 / 5 = .96
.96 * 1024 = 983.04
983.04 / log(2) = 3265.59

My answer is the MUM result. (Stay at school and study Math & English) It should be 9.94bits
 

nanovate

Joined May 7, 2007
666
The bottom 3 bits correspond to a voltage of approximately +/- 0.5* (8*Vref)/1024 Volts. This noise can come from a variety of sources-- thermal, quantization, stray fields and signals .... or it can come from within the converter itself.
For a 5V ADC Vref it is ~20mV so if your signal is close to that level then you may have a hard time "seeing" it. Even if you choose a higher resolution converter you'll still have to deal with the noise-- if your noise still is 20mV then it'll just consume more bits from the bottom. But if you choose a "better" converter then effectively you get more bits.
One limitation that the PIC (and other MCU+ADC) have is that they are mixed signal and it is hard to design sensitive ADC circuitry along side digital (noisy). What equation 13 doesn't include are the noise bits which you subtract from 9.94 to get "effective resolution". (note this is not the rigorous definition of effective resolution)

See http://www.analog.com/library/analogdialogue/archives/39-06/Chapter%209%20Hardware%20Design%20Techniques%20F.pdf
for some good info.

John
 

JoeJester

Joined Apr 26, 2005
4,390
When you look at equation 13, the left side formula isn't the same as the right side formula ... hence your answer was correct using that left side formula.
 
Top