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.

ADC confused

Status
Not open for further replies.

UnD3aD

New Member
i want to make a digital thermometer and i'm using pic 12f683. I use Vdd as Vref and 2 small 1,5V bateries and tc1047 as sensor. Now i'm confused how to convert the voltage.
a 10 bites converter means a value from 0 to 1024
so at 0v input i have 0 returned
but when i have 1024? at 3v?
 
UnD3aD said:
i want to make a digital thermometer and i'm using pic 12f683. I use Vdd as Vref and 2 small 1,5V bateries and tc1047 as sensor. Now i'm confused how to convert the voltage.
a 10 bites converter means a value from 0 to 1024
so at 0v input i have 0 returned
but when i have 1024? at 3v?

Try checking my PIC tutorials, the analogue one explains all this!.

But the range of the A2D is from 0 to 1023 (NOT 1024), it's a 10 bit value. It will read 0 with 0V input, and 1023 with an input equal to the Vref voltage - it WON'T be 3V, because the batteries are unlikely to ever read 3V, it will be higher than that with new batteries, and lower than that with old batteries - there will only be a brief period when it will actually equal 3V.

For this reason it's a good idea to use an external reference, and again my analogue tutorials do just that!.
 
there is a time you must respect it before you start your conversion

be careful because

there is a capacitor on the ADC pin must charge to VIN

before you start the conversion

:wink:
 
If you use a thermistor with a pullup resistor to Vdd, it won't matter what Vdd is since both the ADC reference and thermistor voltage are equally affected by Vdd changes.
 
You cod try I2C digital teperature sesors.That use the I2C bus to comunicate whith the PIC.

They have 3.3V ones and 5V ones but if you drive it on +/- 1V the temperature output will be +/- 1°C,So you cod use an output from an regulator to give it a ouput that dosent change on batery status (You can simply add or substract that from the reding to make it acurate agen)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top