Description
X2 25v Voltage Sensor Module Hobby Electronics
Arduino Raspberry Pi Robot.
Arduino Raspberry Pi Robot.
Â
Product Details
This module is based on principle of resistive voltage divider design, can make the red terminal connector input voltage to 5 times smaller.
This module analog input voltages up to 5 v, the voltage detection module input voltage not greater than 5Vx5=25V (if using 3.3V systems, input voltage not greater than 3.3Vx5=16.5V)
This module AVR chips have 10-bit AD, so this module simulates a resolution of 0.00489V(5V/1023), so the minimum voltage of input voltage detection module is 0.00489Vx5=0.02445V
This module is based on principle of resistive voltage divider design, can make the red terminal connector input voltage to 5 times smaller.
This module analog input voltages up to 5 v, the voltage detection module input voltage not greater than 5Vx5=25V (if using 3.3V systems, input voltage not greater than 3.3Vx5=16.5V)
This module AVR chips have 10-bit AD, so this module simulates a resolution of 0.00489V(5V/1023), so the minimum voltage of input voltage detection module is 0.00489Vx5=0.02445V
Parameters
Voltage input range : DC0-25 V
Voltage detection range : DC0.02445 V-25 V
Voltage analog resolution : 0.00489 V
Output interface : “+ ” connected 5/3.3V, “-” connected GND, “s” connected AD pins
DC input interface : positive with VCC, negative with GND
Voltage input range : DC0-25 V
Voltage detection range : DC0.02445 V-25 V
Voltage analog resolution : 0.00489 V
Output interface : “+ ” connected 5/3.3V, “-” connected GND, “s” connected AD pins
DC input interface : positive with VCC, negative with GND
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);Â
}Â Â




