Prop ADC interference
Philldapill
Posts: 1,283
I'm having trouble with an ADC. This is a 12 bit ADC, using a 5V reference that has a 0.1uF and 1000uF bypass capacitors in parallel with the reference. The Vcc on the ADC does not have any other bypass caps except the 1000uF cap with the regulator. I'm reading a VERY steady DC source - a 12V battery that is being discharged through a constant resistance. My problem, is that my value is jumping around a good bit - sometimes up to 20mV between individual samples, for no apparent reason. After an algorithym of averaging 100 samples, the output still jumps a couple mV now and then.
I'd like to get a very stable reading. Could these jumpy readings be caused by the digital logic going on by the propeller? My wiring is just on a protoboard with loos jumper wires "floating" around(not electrically, but physically). Could there be interference? What are some good ways of getting good clean samples?
The chip is a TI ADS7816 - 12-bit, 200kSamples/sec(running at about 1000kS/sec)
I'd like to get a very stable reading. Could these jumpy readings be caused by the digital logic going on by the propeller? My wiring is just on a protoboard with loos jumper wires "floating" around(not electrically, but physically). Could there be interference? What are some good ways of getting good clean samples?
The chip is a TI ADS7816 - 12-bit, 200kSamples/sec(running at about 1000kS/sec)
Comments
Post Edited (Mike Green) : 6/26/2008 4:17:19 AM GMT
I always use a pot initially for testing an ADC. It's makes it much easier to see what is going on.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
8 bit ADC are pretty bullet proof and are the best starting piont IMO.
Ron
I was wondering, do I have to supply a reference voltage higher than voltage being measured, or is 3.3v or 5V fine?
Which adc do you recommend for a very low sample rate, < 100Hz, I would guess?
Low pin count and 3.3v operation, and low power usage would be good goals too.
Thanks,
Doug
@Mike - Are there any particular types of capacitors need for the 0.1uF? I would think a cap like a ceramic would be best. Isn't it true that electrolytic's have a much higher capacitance, but a higher ESR as well? I would assume the inductance is what gets in the way the most, but the resistance seems like it would too...
The other problem I'm having is linearity. I'll scale my pot up and up until the ADC reads the same voltage my meter does(which btw, is very accurate). I'll then drop the voltage source down(not touching the pot) until the ADC reads 0V. The problem lies in betwen. Sometimes, my "smoothed" ADC readings are 50mV off, and stay that way for a good range. Anyway to combat this as well?
i.e. 5V scale is now equal to 15V scale that you are measuring. I'm doing the same with a car battery, except mine is a deep cycle. I'm plotting the charge and discharge curves of it.
I meant a pot supplying 0-5V into the ADC. Forget about the battery for now. It makes things much easier during initial development.
I always use monolithic ceramic capacitors for decoupling.
I just looked at the data sheet for that ADC you are using. It's the wrong device for your application, you simply don't need that sort of performance (200 kHz sampling) and it won't work properly on a proto board with long wires attached to it; it needs a carefully designed PCB. Anyway, they recommend an additional 1-10uF capacitor and a 10R resistor for noisy conditions, in addition to the 100n decoupling capacitor.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 6/26/2008 10:07:55 AM GMT
It is important to keep the leads between the caps and your chip as short as possible. It's best to use surface mount components and custom PCB layouts with a good ground plane to minimize noise.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
try this for filtering, it will clean up your signal.
var
long INPUT,OUTPUT
long fy,fk1,fk2
obj
f :"Float32Full"
PUB MAIN
f.Start
fk1:=0.9950 ''change this to adjust filtering, loop speed affects filtering as well
fk2:=f.FSub(1.0,fk1)
repeat
INPUT:=YourSampleRoutine ''YourSampleRoutine returns integer
INPUT:=f.FFloat(INPUT)
OUTPUT := f.FAdd(f.FMul(INPUT,fk2),f.FMul(fy,fk1))
fy:=OUTPUT
OUTPUT:=f.FRound(OUTPUT)
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle