Description
The Kimat – Voltage Sensor module is a 4 channel voltage divider network for sensing of voltages from 0V24V (for 5V controllers) via ADC. This simple circuit aims to facilitate quick and hassle-free implementation of direct reading of voltages over the I/O voltage limit of ADC’s by scaling the input voltages with resistors without soldering.
EXAMPLE APPLICATION
Measuring any Voltage, AC or DC, from 0-24V of up to 4 channels is simple. V0~V3 connects to the voltage under test. The voltages must have a common ground with the host ADC so 4 GND pins are provided for that. The following diagram shows the module used with an Arduino/Saleng Uno:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
float adc2volts(unsigned int adc) { float r1 = 20000; float r2 = 4700; return (((float)(adc*5))/1024.0) * (r1+r2) / r2; } void setup() { Serial.begin(9600); } void loop() { Serial.print(adc2volts(analogRead(A0))); Serial.print(", "); Serial.print(adc2volts(analogRead(A1))); Serial.print(", "); Serial.print(adc2volts(analogRead(A2))); Serial.print(", "); Serial.print(adc2volts(analogRead(A3))); Serial.println(); delay(100); } |
The results may be viewed from the Serial Monitor with baud rate set to 9600. Or for a visual representation of those voltages, use the Serial Plotter and have a simple 4-channel oscilloscope-like device.
DOWNLOADS