Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Voltage Sensor: Examples, Pinouts, and Specs

Image of Voltage Sensor
Cirkit Designer LogoDesign with Voltage Sensor in Cirkit Designer

Introduction

The Arduino Voltage Sensor is a device designed to measure the electrical potential difference between two points in a circuit. It provides an analog output that can be read by microcontrollers, such as the Arduino UNO, to monitor or control voltage levels in real-time. This sensor is widely used in applications such as battery monitoring, power supply regulation, and energy management systems.

Explore Projects Built with Voltage Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Mega 2560 and Adafruit DS1841 Battery-Powered Sensor Interface
Image of Capacitance meter: A project utilizing Voltage Sensor in a practical application
This circuit is a sensor interface system powered by a 9V battery, featuring an Arduino Mega 2560 microcontroller and an Adafruit DS1841 digital potentiometer. The circuit includes resistors and capacitors for signal conditioning, with the Arduino handling data acquisition and communication via I2C with the DS1841.
Cirkit Designer LogoOpen Project in Cirkit Designer
Pressure Monitoring System with Voltmeter and Power Supply
Image of PT Test: A project utilizing Voltage Sensor in a practical application
This circuit measures the output voltage of a pressure transducer using a voltmeter. The pressure transducer is powered by a power supply, and its output voltage is connected to the voltmeter for measurement.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Voltage Monitoring System with SMS Alerts via SIM800L
Image of GSM800 Voltage  sensor: A project utilizing Voltage Sensor in a practical application
This circuit is designed to monitor voltage levels from two 240V power sources using a pair of voltage sensors connected to an Arduino UNO. The Arduino reads the sensor outputs and, if a voltage higher than 10V is detected, it uses a SIM800L GSM module to send an SMS alert. The system is powered by a Polymer Lithium Ion Battery, and resistors are used for voltage level shifting for the SIM800L communication with the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and ESP8266 Wi-Fi Controlled Sensor Hub with Battery Backup
Image of baby guard: A project utilizing Voltage Sensor in a practical application
This circuit is a sensor monitoring and data transmission system powered by a Li-ion battery and a 12V adapter. It includes various sensors (tilt, optical encoder, force sensing resistors, and air pressure) connected to an ESP32 microcontroller, which reads sensor data and transmits it via a WiFi module (ESP8266-01). The system is designed to provide real-time sensor data over a WiFi network.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Voltage Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Capacitance meter: A project utilizing Voltage Sensor in a practical application
Arduino Mega 2560 and Adafruit DS1841 Battery-Powered Sensor Interface
This circuit is a sensor interface system powered by a 9V battery, featuring an Arduino Mega 2560 microcontroller and an Adafruit DS1841 digital potentiometer. The circuit includes resistors and capacitors for signal conditioning, with the Arduino handling data acquisition and communication via I2C with the DS1841.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PT Test: A project utilizing Voltage Sensor in a practical application
Pressure Monitoring System with Voltmeter and Power Supply
This circuit measures the output voltage of a pressure transducer using a voltmeter. The pressure transducer is powered by a power supply, and its output voltage is connected to the voltmeter for measurement.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GSM800 Voltage  sensor: A project utilizing Voltage Sensor in a practical application
Arduino UNO-Based Voltage Monitoring System with SMS Alerts via SIM800L
This circuit is designed to monitor voltage levels from two 240V power sources using a pair of voltage sensors connected to an Arduino UNO. The Arduino reads the sensor outputs and, if a voltage higher than 10V is detected, it uses a SIM800L GSM module to send an SMS alert. The system is powered by a Polymer Lithium Ion Battery, and resistors are used for voltage level shifting for the SIM800L communication with the Arduino.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of baby guard: A project utilizing Voltage Sensor in a practical application
ESP32 and ESP8266 Wi-Fi Controlled Sensor Hub with Battery Backup
This circuit is a sensor monitoring and data transmission system powered by a Li-ion battery and a 12V adapter. It includes various sensors (tilt, optical encoder, force sensing resistors, and air pressure) connected to an ESP32 microcontroller, which reads sensor data and transmits it via a WiFi module (ESP8266-01). The system is designed to provide real-time sensor data over a WiFi network.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Battery voltage monitoring in renewable energy systems
  • Power supply voltage regulation
  • Overvoltage and undervoltage protection systems
  • Real-time voltage monitoring in IoT devices
  • Educational projects and prototyping with Arduino boards

Technical Specifications

The Arduino Voltage Sensor is a simple yet effective tool for measuring DC voltages. Below are its key technical details:

Parameter Specification
Input Voltage Range 0V to 25V DC
Output Voltage Range 0V to 5V DC (scaled for Arduino ADC)
Measurement Accuracy ±1%
Operating Voltage 3.3V or 5V DC
Maximum Input Current 10mA
Dimensions 30mm x 20mm x 10mm

Pin Configuration and Descriptions

The Voltage Sensor has a simple pinout, as shown in the table below:

Pin Name Description
VCC Power supply input (3.3V or 5V DC, depending on the microcontroller used).
GND Ground connection.
VIN+ Positive voltage input to be measured.
VIN- Negative voltage input (typically connected to ground in single-ended systems).
OUT Analog output voltage proportional to the input voltage.

Usage Instructions

How to Use the Voltage Sensor in a Circuit

  1. Connect the Power Supply:

    • Connect the VCC pin to the 5V or 3.3V output of your Arduino board.
    • Connect the GND pin to the ground of your Arduino board.
  2. Connect the Voltage to Be Measured:

    • Connect the positive terminal of the voltage source to the VIN+ pin.
    • Connect the negative terminal of the voltage source to the VIN- pin (or ground).
  3. Connect the Output to the Arduino:

    • Connect the OUT pin to one of the analog input pins (e.g., A0) on the Arduino.
  4. Write the Code:

    • Use the Arduino IDE to write a program that reads the analog voltage from the sensor and converts it to the actual input voltage using the scaling factor.

Important Considerations and Best Practices

  • Voltage Range: Ensure the input voltage does not exceed the sensor's maximum rating of 25V DC to avoid damage.
  • Scaling Factor: The sensor typically uses a voltage divider circuit with a scaling factor of 5:1. This means the output voltage is 1/5th of the input voltage.
  • Calibration: For precise measurements, calibrate the sensor using a known voltage source and adjust the scaling factor in your code if necessary.
  • Noise Reduction: Use decoupling capacitors or filters if the input voltage is noisy.

Example Code for Arduino UNO

// Arduino Voltage Sensor Example Code
// This code reads the analog output of the voltage sensor and calculates
// the input voltage based on the scaling factor (5:1).

const int sensorPin = A0; // Analog pin connected to the sensor's OUT pin
const float scalingFactor = 5.0; // Voltage divider scaling factor
const float referenceVoltage = 5.0; // Arduino reference voltage (5V for most boards)

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
}

void loop() {
  int sensorValue = analogRead(sensorPin); // Read the analog value (0-1023)
  float sensorVoltage = (sensorValue / 1023.0) * referenceVoltage; 
  // Convert the analog value to voltage
  
  float inputVoltage = sensorVoltage * scalingFactor; 
  // Calculate the actual input voltage
  
  Serial.print("Input Voltage: ");
  Serial.print(inputVoltage);
  Serial.println(" V"); // Print the input voltage to the Serial Monitor
  
  delay(1000); // Wait for 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Cause: Incorrect wiring or loose connections.
    • Solution: Double-check all connections, especially the VIN+ and VIN- pins.
  2. Output Voltage Exceeds 5V:

    • Cause: Input voltage exceeds the sensor's maximum range.
    • Solution: Ensure the input voltage is within the 0-25V range.
  3. Inconsistent or Noisy Readings:

    • Cause: Electrical noise or interference.
    • Solution: Add a decoupling capacitor (e.g., 0.1µF) across the VIN+ and VIN- pins.
  4. Serial Monitor Shows Incorrect Values:

    • Cause: Incorrect scaling factor or reference voltage in the code.
    • Solution: Verify the scaling factor (5:1) and ensure the Arduino's reference voltage matches the code.

FAQs

Q1: Can this sensor measure AC voltage?
A1: No, this sensor is designed for DC voltage measurement only. Measuring AC voltage may damage the sensor.

Q2: Can I use this sensor with a 3.3V Arduino board?
A2: Yes, the sensor is compatible with 3.3V systems, but ensure the output voltage does not exceed the ADC input range of the board.

Q3: How do I extend the voltage measurement range beyond 25V?
A3: You can modify the voltage divider circuit on the sensor to increase the scaling factor, but this requires advanced knowledge of electronics.

Q4: Is the sensor safe for high-current circuits?
A4: The sensor is designed for low-current applications. For high-current circuits, use appropriate isolation techniques, such as optocouplers or transformers.