|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||
|
|||
|
Re: measuring resistance via ADC
50-1M is a rather large swing to be handling. The next step is to see how much of it you need to be concerned with. Also, you need to be sure your sensor idea will work before you go through the pain of creating this elaborate set up. Using a multimeter, check to see if you can tell the difference between these colours yourself. How much of a difference is there? Then, go to a different lighting environment and try again. Go to yet another and try again. I'm going to guess you may need to rethink things there.
However, lets assume that it will work great. Hooray! I prefer method 2 over method 1 for several reasons. The biggest reason is that you will get a non-linear response. However, this is probably a "choose your own poison" preference, both are reasonably sound. For method one, the static resistor probably ought to have a resistance larger than 150 Ohms. This puts the maximum draw at 25mA - a reasonable current to pull from the battery. However, even this is a rather large waste. Lets figure out how to select a bigger resistor. Assume that we have D bits of good resolution on our ADC, the minimum range of resistances we need to be concerned with is A through B, and we need to be sensitive to resistivity changes of as small as C. The ADC can pick up changes up to 5 / (2**D) V. Given a resistance of R for the fixed resistor: A resistivity change of C will result in a voltage change of 5V * [A*C] / [(A+R)*(A+R+C)] on the low end. If this is less than what the ADC can pick up, you have a snowballs chance of success. Realistically, you want a MUCH larger window of error. Repeat the calculation for the high end by replacing A with B. The highest current draw will be 5V / (A+R) As for method two: You want to use the ADC as a comparator, instead of as an ADC. As you said, charge the capacitor with the PIC and let the photoresistor discharge it to ground. A timer module on the PIC should make this process very easy for you. Remember that PIC output pins can only source 25mA. I'd put a series resistor in there as a safety. As for sensitivity, I have a tutorial to run in 4 minutes. Sorry... Good luck! |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Measuring Muzzle Velocity | Team 614 | Rules/Strategy | 8 | 28-01-2006 14:53 |
| Measuring box size | Max Brin | Technical Discussion | 1 | 26-01-2006 12:16 |
| Measuring Motor Characteristics | DonRotolo | Motors | 1 | 08-01-2006 19:39 |
| Measuring a Pulse Width | MikeDubreuil | Programming | 22 | 21-07-2005 10:22 |
| SHU measuring stick | sanddrag | Rules/Strategy | 13 | 08-01-2003 21:23 |