>That is, if I'm using 24V DC motors, voltage coming to ADC will be too great >and could damage the PIC (or worse, I could get wrong data).
Neither is necessarily true. PIC inputs have diodes, so if you have a resistor large enough to limit the current to about 20mA, no damage should be done. You can, if you want, add external diodes, schottky then, to be sure. One diode with its cathode to Vcc, one with its anode to GND. First I thought to use a resistor ladder and use a low (1.0V or so) Vref, but Vref should be 2.5V or higher to be sure... So, let's take just a bunch of dividers... The most sensitive input will just get a 10kOhm series resistor to limit the current. The 12V input gets 15kOhm:10kOhm, the 24V input gets 38kOhm:10kOhm. All divider inputs are connected together to the motor. All dividers base is GND. Each divider middle is connected to its own analog input. Theoretical there should be no damage as long as the voltage at the input stays below (10kOhm*0.02A=) 200V, but don't test that with your most valuable PIC... Now, read the most sensitive input. If it reads 1020 or more, it is out of range. Take the next one then. If reading is below 500 or so, you can switch back to the more sensitive input. 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.
