Go Down

Topic: Analog Input Problem (Read 2 times) previous topic - next topic

dcyro

Hi All,

I really need help on this.

Background:
I have tried to make thermoelectric cooler system wherein I provide pwm outputs and fed to an H-Bridge Circuit that would power a peltier element based on the feedback temperature sensed by my tempretaure sensor (LM35). I followed the system logic accordingly with the same system that can be found in the internet.

Problem:
(1) The readings from my temperature sensor varies from one Analog Input to the other. I have connected the same node, to all the analog Inputs and treated their conversion all the same but they vary in results. It wouldn't be a big problem if they just vary only by a bit. But I noticed that whole 3 of the analog inputs have generally the same value, the others dis agree to these values by +/- 100 mV which in my set-up would be a problem.

(2) The readings from when the system is just reading the temperature inputs vs when the system is reading and producing pwm signals is a lot different. The idle temperature I read is about 22-23 deg C. But when I apply the pwm signal as part of the system, the Temperature it reads becomes 10-15 deg C. I'm not sure if its loading / harmonics affecting the system. Can anyone enlighten me on this one?

(3) The voltage reading from the analog inputs vs the voltage reading from my multimeter also varies. (e.g. multimeter: 0.265 V, in the system: 0.229 V) The values are close if you think of it but with the voltage reading accuracy I need, this is quite a problem.


I'm hoping someone can help me with my problem =(

Thanks!

retrolefty

Quote
I'm hoping someone can help me with my problem


Not sure it's a problem or just board to board variation. Keep in mind that the standard analogRead() with the default reference used relies on whatever specific board voltage your board has. USB voltage and vary from 4.5 to 5.25 and still be in spec. The on-board +5vdc voltage regulator will rarely be exactly 5.000 volts as it too has a standard tolerance. Now there are several things that one can do to improve the situation such as using a different internal or external voltage reference for the ADC. Or perhaps measure the boards actual Vcc and compensate in software for any slight offset. And lastly my favorite is to use an external I2C or SPI ADC module with better resolution and accuracy they the built in AVR ADC.

As far as your multimeter Vs AVR readings, I would tend to go with your multimeter, but really it gets down to what 'standard' should you use in your overall instrumentation check outs and calibrations. A rule of thumb in the calibration business is that your 'standard references' need to be 10X more accurate then that which you are calibrating.
Lefty

MarkT

You haven't said what temperature sensor, how its wired etc - please tell us more, it really helps.

A first guess is that you haven't taken any steps to prevent interference from your high power PWM circuitry being picked up
by the temperature sensing analog circuitry.  Switching large currents is usually the recipe for interference.  Is the H-bridge decoupled?
Is the high current circuitry kept away from the temperature sensor?
[ I won't respond to messages, use the forum please ]

dc42

1. My guess is that you haven't really connected all the analog inputs together securely, but some of them are floating instead. If you read a floating pin, you will generally get a reading close to but not the same as the previous pin you read.

2. You need to separate the ground wires. Dedicate one of the Arduino ground pins to connecting the ground side of the temp sensor (and any other analog inputs you have). Use the other ground pin(s) to connect power to the Arduino (if not using USB power) and the ground side of output devices and your Peltier supply.

3. See Lefty's comment on the accuracy and stability of 5V supply. You might want to use the 3.3V pin as the voltage reference instead.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

dcyro

Hi retrolefty,

Actually I noticed this as well.

Quote
The on-board +5vdc voltage regulator will rarely be exactly 5.000 volts as it too has a standard tolerance.


I do have some questions over this, during idle time, the voltage is around 5.01 V but when I start to drive the h-bridge circuit, the voltage goes to 5.3 V. Is the arduino driving in more voltage from my usb connection?

Another weird thing with multimeter vs arduino readings is during idle time the difference in the readings is around 20 mV but when I drive the h-bridge, the reading is quite a bit different of about 300-500 mV instead of the usual 0.26 V (multimeter) it turns into 0.50+ V (multimeter) which I'm thinking is maybe tied with the voltage in the supply. While this seems a bit logical, the arduino  goes from 0.22 V to 0.15 V which I think is really weird.

I'm sorry I'm a bit of a noob with arduino and I can't really tell why this happens.

Go Up