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.

A/D question

Status
Not open for further replies.

YAN-1

New Member
Hello everyone. I have a sliding potentiometer with a value of 1 kohm that is used to input a voltage between 0 and 5V to the A/D channel of a 16F877A. But this potentiometer is small in stroke length (it is 5 cm and I need around 10 cm) and it was physically damaged in a certain accident. I found another one that has a 10 cm long stroke but it has a total resistance of 10 kohm. Will that be a problem in terms of acquisition time for the PIC? Will I have to connect a 1-kohm resistor in parallel with the potentiometer? Thanks a lot.
 
How fast are you reading the pot? Nigel would know better but I think the input impedance of a PIC AD is in the 30-40kohm range so even if it's at the far rail it's still fine for a PIC to read. There might be some non-linearity introduced depending on the PIC inputs actual impedance. Basically plug it in and just make sure everything still works the way you want it to, should be okay.
 
hi,
The datasheet says a 10K source resistance is the limit, testing with a 10K should be OK, in an actual program/project I try to keep to 4K7 or less.
 
You can use higher, but it will form a secondary voltage divider with the input pins impedance.
 
Sceadwian said:
You can use higher, but it will form a secondary voltage divider with the input pins impedance.

Its the charge/discharge time of the very small holding capacitor in the PIC's adc that requires to be met.

If the charge source resistance is too high the cap dosnt get fully charged to the source potential, so the reading is low,
if the discharge resistance is too high it dosnt get fully discharged to the source potential and the reading is high.

It is possible to add a low value capacitor to the adc input pin that will act as a source/sink for the cap charge.
 
Yes, it's basically charging the capacitor when you change channels that slows things down, often the give a maximum recommended source impedance of around 2.5K - but if you're only using a single channels?, then you should be able to use a 10K pot with no problems. If you're using more than one channel, and speed isn't an issue, then simply add a delay after any channel change, to give the capacitor time to charge/discharge.
 
Nigel is correct. The big deal, just increase acquisition time as the impedance increases. The delays needed are ridiculously small and most times the code processing time trumps your delay.

I always make divide by 200 voltage dividers with 1 Meg Ohm resistors connect to source with no problems. But then again my Vsource is in the 600v range. Don't ask :)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top