This module is based on the principle of a resistor divider design, enabling the terminal interface input voltage reduced five times, Arduino analog input voltage up to 5V, then the input voltage voltage detection module can not be greater than 5V × 5 = 25V (3.3V if used system, the input voltage can not be greater than 3.3Vx5 = 16.5V). Because Arduino AVR chips used in 10 AD, so the analog resolution of this module is 0.00489V (5V / 1023), so the minimum voltage detection module detects input voltage is 0.00489V × 5 = 0.02445V.
Parameters:
Voltage input range: DC0-25V
Voltage detection range: DC0.02445V-25V
Voltage Analog Resolution: 0.00489V
DC input interface: Terminal cathode connected to VCC, anode to GND
Output interface: “+” then 5 / 3.3V, “-” then GND, “s” take the Arduino AD pins
Reference code:
#include <Wire.h>
int val11;
int val2;
void setup ()
{
pinMode (LED1, OUTPUT);
Serial.begin (9600);
Serial.println (“Emartee.Com”);
Serial.println (“Voltage:”);
Serial.print (“V”);
}
void loop ()
{
float temp;
val11 = analogRead (1);
temp = val11 / 4.092;
val11 = (int) temp; //
val2 = ((val11% 100) / 10);
Serial.println (val2);
delay (1000);
}
نقد و بررسیها
هیچ دیدگاهی برای این محصول نوشته نشده است.