Arduino Voltmeter The standard way of measuring voltage on the arduino is connecting the voltage directly to the arduino analog pins. When you want to measure something greater than VCC + 0.5V, it requires a voltage divider, which causes a loss in resolution. What I have done is implemented a digitpot instead of a fixed voltage divider.
!!CAUTION!! Implement this project at your own risk. It is possible to damage the arduino if coded incorrectly.
As you may have noticed, there isn't any zener diodes present for circuit protection. This is done on purpose as diodes cause the voltage to drift by about a hundred mV. The code that prevents overvoltage is explained in the next section.
At the beginning, the
Here you can see it working on my oscope. The little peak is where the
Here's a picture of a scope reading that illustrates this: After the little peak, the digipot "hangs" for a while.
Figuring out the exact time for the digipot to settle allows optimization of minimal time in this high state:
SSD1306 OLED (Kudos to software I2C compatibility): https://github.com/lexus2k/ssd1306