

A DC voltage sensor is a device used to measure the voltage level of a direct current (DC) circuit. It provides an output signal that corresponds to the voltage level, enabling monitoring and control in various electronic applications. These sensors are widely used in battery monitoring systems, power supply testing, renewable energy systems, and other applications where accurate voltage measurement is critical.








Below are the key technical details for a typical DC voltage sensor:
| Parameter | Value |
|---|---|
| Input Voltage Range | 0V to 25V DC |
| Output Voltage Range | 0V to 5V DC (analog signal) |
| Accuracy | ±1% |
| Operating Voltage | 3.3V or 5V DC |
| Operating Current | <10mA |
| Dimensions | 30mm x 20mm x 15mm |
| Operating Temperature | -40°C to 85°C |
The DC voltage sensor typically has a 4-pin interface. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V or 5V DC) |
| 2 | GND | Ground connection |
| 3 | VOUT | Analog output voltage proportional to input voltage |
| 4 | VIN+ | Positive terminal for the DC voltage to be measured |
VCC pin to a 3.3V or 5V DC power source and the GND pin to the ground of your circuit.VIN+ pin. Ensure the input voltage does not exceed the sensor's maximum input range (e.g., 25V).VOUT pin provides an analog voltage proportional to the input voltage. This output can be connected to an analog input pin of a microcontroller (e.g., Arduino) for further processing.Below is an example code to read the voltage from the sensor using an Arduino UNO:
// Define the analog pin connected to the sensor's VOUT pin
const int sensorPin = A0;
// Define the maximum input voltage of the sensor (e.g., 25V)
const float maxInputVoltage = 25.0;
// Define the maximum output voltage of the sensor (e.g., 5V)
const float maxOutputVoltage = 5.0;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
// Read the analog value from the sensor (0-1023 for 10-bit ADC)
int sensorValue = analogRead(sensorPin);
// Convert the analog value to the corresponding input voltage
float inputVoltage = (sensorValue / 1023.0) * maxInputVoltage;
// Print the measured voltage to the Serial Monitor
Serial.print("Measured Voltage: ");
Serial.print(inputVoltage);
Serial.println(" V");
delay(1000); // Wait for 1 second before the next reading
}
No Output Signal:
Inaccurate Voltage Readings:
Output Voltage Exceeds Expected Range:
Arduino Reads Incorrect Values:
Q1: Can this sensor measure AC voltage?
A1: No, this sensor is designed specifically for DC voltage measurement. For AC voltage, use an appropriate AC voltage sensor.
Q2: What happens if the input voltage exceeds 25V?
A2: Exceeding the maximum input voltage can damage the sensor. Use a voltage divider or other protection circuit if higher voltages need to be measured.
Q3: Can I use this sensor with a 3.3V microcontroller?
A3: Yes, the sensor is compatible with 3.3V systems. Ensure the VCC pin is connected to a 3.3V power source.
Q4: How do I improve measurement accuracy?
A4: Calibrate the sensor, use shielded cables to reduce noise, and ensure a stable power supply.
By following this documentation, you can effectively integrate the Sensor Tegangan DC into your projects for accurate and reliable voltage measurement.