What is the easiest way to use a 0 to 5 volts and turn in to 0 to 250 bite not 255
sam_sam_sam
Posts: 2,286
I have to build a testing jig for some air transducer on
a plasma cutting machine
a plasma cutting machine
Comments
If you don't want to deal with adding a voltage reference and voltage divider use Vcc as the reference and adjust it to 5.12V. That gives you 2mV per bit so 5V in would result in a reading of 250 from the adc.
In the future, could you post more specifics about the tools are you using, in order to assist others in helping you? Solutions like these are often based on what microcontroller board and programming software you are using. You mention "Propeller Proto" in your profile but it doesn't have an ADC, so there's no clear-cut pointer to your toolset.
'
I would use the USA standard of 1v-5v, Instead of 0v-5v. Anything less then 1volt would generate an error, And prove the loop has been compromised. It makes the difference of landing on Mars or burning up in Mars's atmosphere for a Rover.
For critical applications I do something similar to that for signals that should be in the 0 to some upper limit range. Have the range of the incoming signal cover about 80% of the adc range, add an offset of about 10% to the analog signal, and have the software check to see that the measurement is in that range.