![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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.
__________________ World.......behold........YAN is coming | |
| |
| | (permalink) |
| 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.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| 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.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| | (permalink) |
| You can use higher, but it will form a secondary voltage divider with the input pins impedance.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) | |
| Quote:
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.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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 | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Capacitor Charge/Discharge question | ThermalRunaway | General Electronics Chat | 25 | 12th August 2008 05:48 PM |
| Basic Transmission question | CamNuge | General Electronics Chat | 2 | 8th March 2006 11:08 PM |
| High speed data logging question | cubdh23 | Micro Controllers | 3 | 19th August 2004 12:54 PM |
| Data Logging question with high speed!!!! | cubdh23 | General Electronics Chat | 4 | 16th August 2004 07:33 PM |
| PBX question | waqar | Electronic Projects Design/Ideas/Reviews | 0 | 30th March 2003 07:21 PM |