Arduino 4: TKVoltmeter, Potentiometer LED Sweep, Circuit Controller

Here I use the example sketch called “arrays” and blended it with the “potentiometer” example from the basic Arduino library with some simple modifications to serve as a potentiometer LED sweeper, which can also be used to control external circuits instead of the LEDs. Then I show how the same program sketch makes the Arduino a sensitive and adjustable 5 volt DC voltmeter with the LEDs indicating the voltage. If you needed to monitor voltages in a narrow range, like from 1.2 to 1.0 volts, and spread range that over the 12 LEDs, that can be set in the program sketch by varying the variables that control the limits and the mapping. And of course any varying 0-5 volt voltage source like a photocell or a thermistor or external circuit of any kind can be used instead of the potentiometer to control the LEDs, and actions can be triggered at the limit settings or at any intermediate setting, just as the LEDs are. The Serial Monitor feature can be used when the Arduino is plugged into the computer’s USB port to see the actual values being passed around in the program, like the raw voltage reading on that 0-1023 value scale. This little sketch illustrates many features of the Arduino itself and also shows a lot about how to program one. The program sketch may be downloaded from: www.mediafire.com Materials: Osepp Uno Arduino Clone ruggedcircuits.com breakout shield 12 LEDs 1 resistor 220R 1 resistor 10Meg 1 potentiometer 50K 1 LiPo battery 7.4 V connectors, wire

You may also like...