I came up with this tool when I was trying to use a ADC of a microcontroller to read battery voltage. The microcontroller had an internal voltage reference option of 1.8V, and my battery pack could have been a fully charged 3S li-po pack, which meant 3 * 4.2 = 12.6V. I had enough resistors in my collection that I knew there must've been two values that got an output close to 1.8V so I wrote this tool to help me pick. Remember, you don't need to get an result exactly equal to the reference voltage of the ADC if your microcontroller can do some simple math to calculate the true reading.
This tool is open source, written in javascript, so you can view the source by opening this page in a source viewer.
The resistance units accepts syntax like
- 1
- 2.3
- 7.4K
- 3R
- 4R5
- 6K
- 7K8
- 9M
- 10M1
The ohm (omega) symbol is not allowed, the word "ohm" is not allowed, and spaces are not allowed. Syntax like 4K456.7 is invalid.
Voltage is always specified in volts, in plain decimal format only.
Howdy, I just got to your site via your USB Business card, looks awesome, BTW.
In your description of the resistor values, you state, ‘numbers only’, but there are K’s and M’s after the numbers in your example.
Is this needed for the script?