>When powered @5V, I loose a lot of resolution, thus information. Even more >when such a voltage divider would be designed for power supply up to 24V...
That's right, you're loosing resolution. 5V max. on a divider designed for 24V, you've got a resolution of only about 24 milivolts. So, when measuring only 5V, accuracy can not be better than 0.5%. Have you put this number into relation to the rest of your circuit? For the divider, are you using expensive precision resistors with 0.1% accuracy and do you compensate for temperature errors? Or do you use cheap resistors with 5%? Is there a dedicated 5V reference, or do you simply use one supply to power different devices? Then your reference voltage could introduce errors of several percents. Let's assume you really need the resolution, and have a look at the implementation suggestins... >1. Use several voltage dividers >This implies PIC has inputs protected by internal diodes, so a high voltage >(>5V) would not damage it. If this is not the case, Schotky diodes can be >used. >Then, several voltage dividers are designed, to cover the whole range. One >divider could be used for max 9V, another for 12V, another for 24V. Each >divider output (or middle) is read with an analog input. The more there are, >the more resolution I have, the less pins I have... If you're short on pins, you can use an external analog multiplexer like CD4051 >2. Use a "big" divider and several Op-amps > Why is it important to have high resistor values as voltage divider ? Only to keep current low loading the voltage you're measuring. >The magic here, which I still need to investigate, is whatever the voltage (5, >9, 12, 13, ..., 24), each Op-amp won't output more than 5V. The magic is quite simple: You're powering the Op-amp with 5V. As there is no magic inside the Op-amp, it cannot output more than 5V. You should use so-called rail-to-rail (R2R) op-amps, simple Op-amps will not even output 4V. >So, software should find the best range where values aren't closed to >saturated ones. >Do I completely misunderstand ?? Not at all. Perhaps it's good to use a "bigger" divider to estimate if the "smaller" one can be used, as it might well be that the Op-amp does not reach as near to V+ as expected. >3. Drive a voltage shifter with PIC internal voltage reference output >One analog input per motor is used, compared to previous options. If you're using motors with different voltages, you wouldn't want to make 12 dividers, 4 motors with 3 voltage ranges. You would surely want to put a multiplexer between several motors and the input of your autorangeing-device >Have I absolutely misunderstood this whole thing ?? In general, you understood very well :) Greets, Kiste -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
