Arduino 25V Voltage Sensor Module User Manual

The Basics

The Arduino analog input is limited to a 5 VDC input.   If you wish to measure higher voltages,  you will need to resort to another means.  One way is to use a voltage divider.    The one discussed here is found all over Amazon and eBay.

It is fundamentally a 5:1 voltage divider using a 30K and a 7.5K Ohm resistor.

Keep in mind, you are restricted to voltages that are less than 25 volts.   More than that and you will exceed the voltage limit of your Arduino input.

Where to Buy a 25V Voltage Sensor

Its available from the following vendors:

eBay

Amazon

AliExpress

Basic Connection

Arduino 25V Sensor ModuleInputs

  • GND –  This is where you connect the low side of the voltage you are measuring.   Caution! : This is the same electrical point as your Arduino ground.
  • VCC:  The is where you connect the high side of  the voltage you are measuring

Outputs

  • S:  This connects to your Arduino analog input.
  • – (or minus):  This connects to your Arduino ground.
  • +:  This is not connected.  It does absolutely nothing… zilch… nada… jack diddly doo doo.

Schematic

The schematic for this is pretty straight forward.  As previously mentioned, its just a couple of resistors.   In fact, you could build your own in a pinch.

Arduino Voltage Sensor Module Schematic

Tutorial

The Connections

Find yourself a 9 volt battery and connect it,  your voltage sensor module and Arduino as shown below.

Voltage Sensor Module Basic Connection

The Sketch

Enter the following sketch, upload it and go to town.   If you open your Arduino serial monitor you will be able to see the voltage.

/*
DC Voltmeter Using a Voltage Divider
Based on Code Created By
T.K.Hareendran
*/

int analogInput = A1;
float vout = 0.0;
float vin = 0.0;
float R1 = 30000.0; //  
float R2 = 7500.0; // 
int value = 0;
void setup(){
   pinMode(analogInput, INPUT);
   Serial.begin(9600);
   Serial.print("DC VOLTMETER");
}
void loop(){
   // read the value at analog input
   value = analogRead(analogInput);
   vout = (value * 5.0) / 1024.0; // see text
   vin = vout / (R2/(R1+R2)); 
   
Serial.print("INPUT V= ");
Serial.println(vin,2);
delay(500);
}

20 Comments

  1. Nikos February 24, 2019
  2. Engidaw June 2, 2018
  3. Abdul Goffar Al Mubarok January 27, 2018
  4. capnfatz@gmail.com December 31, 2017
  5. Julian December 30, 2017
  6. hajir March 17, 2017
  7. capnfatz@gmail.com January 10, 2017
  8. Fadhelah January 10, 2017
  9. capnfatz@gmail.com January 10, 2017
  10. Kiran January 9, 2017
  11. capnfatz@gmail.com January 7, 2017
  12. Chairat January 7, 2017
  13. capnfatz@gmail.com July 27, 2016
  14. Jamie July 23, 2016
  15. Craig July 19, 2016
  16. capnfatz@gmail.com December 11, 2015
  17. redouane liamini December 10, 2015
  18. Michael Hudson November 30, 2015
  19. capnfatz@gmail.com September 24, 2015
  20. Michael September 23, 2015

Leave a Reply

Your email address will not be published. Required fields are marked *