Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM35 temp sensor project

Status
Not open for further replies.
Since your curious, ill give it a try tonight before fixing it :). Ah, it means Vdd A? Since theres only 1 Vdd that means AVdd = Vdd?

AVdd is the analogue supply voltage. If it's to be the same as Vdd, it's usually a good idea to filter it with a RC (or other) to reduce the clocking noise fed into the ADC reference.
 
I'd suggest amplifying the signal before feeding it into the ADC, and using a VREF >2V.

Yep, but there may not be a need to amplify it. Set the Vref for 2.048v resolution which will then be 2mV or 0.2'C resolution.

Then average 16 readings over a period of one mains cycle, so the few mV noise picked up by the mains is negated, BUT it also adds a +/- varying factor to the ADC volatge so when you average it you can get double the resoltuion with a fair degree of accuracy.

So you add 16 readings over a mains cycle, then divide the total by 8, (giving you double the resolution) so it is now at a resolution of 0.1'C.
 
So you add 16 readings over a mains cycle, then divide the total by 8, (giving you double the resolution) so it is now at a resolution of 0.1'C.

Good point. Oversampling can be used to get a better resolution.

I read somewhere that you only need 4x sampling to get an increase of a bit (of course what you wrote is correct though). So if you have a mains cycle of sampling at 40kHz you can get 14bit resolution (using 10bit ADC)
 
So you add 16 readings over a mains cycle, then divide the total by 8, (giving you double the resolution) so it is now at a resolution of 0.1'C.
I can grasp that theory no problem. Great idea.
But when it comes to the actual program, whats the best way to divide a register by a value?
 
Shift it right for every division by 2. e.g. shift right 3 times to divide by 8
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top