Voltage Sensor - Arduino

Опубликовано: 11 Март 2026
на канале: Ovens Garage
8,478
146

Today I walk through how to hook up a voltage sensor and interface it with an Arduino micro-controller. With this small voltage sensor you can measure between 0 and 25 volts with the built in voltage divider circuit. This is an easy and simple device to measure voltage in your projects. Code below. If you have any questions please comment below or e-mail me.

Stay tuned for more videos!

Tyler,
*************************************************************************************
SUBSCRIBE:
https://www.youtube.com/c/TylerOvens?...
*************************************************************************************
SHARE THIS VIDEO LINK:    • Voltage Sensor - Arduino  
*************************************************************************************
BUY THE ITEMS IN THIS VIDEO (AMAZON.COM):

Video Equipment:
GoPro7: https://amzn.to/33FWCAW
GoPro Accessory Kit: https://amzn.to/2Uehig4
GoPro Stabilizer Gimbal: https://amzn.to/2UvX5Bz

Arduino:
Uno Starter Kit: https://amzn.to/2RfuEqq
Voltage Sensor: https://amzn.to/3e5sB2e
Multimeter: https://amzn.to/2wfh6nE
*************************************************************************************
BUY THE ITEMS IN THIS VIDEO (AMAZON.CA):

Video Equipment:
GoPro7: https://amzn.to/2UdHtnk
GoPro Accessory Kit: https://amzn.to/3bl9wXy
GoPro Stabilizer Gimbal: https://amzn.to/3dlBt3r

Arduino:
Uno Starter Kit: https://amzn.to/2Re5MPY
Voltage Sensor: https://amzn.to/34k5FI9
Multimeter: https://amzn.to/2JJrF5z
**************************************************************************************
CONTACT ME:
E-Mail: [email protected]
**************************************************************************************

Code Start */

const int voltageinputPIN = A0; //select analog input pin for voltage sensor
const int baudRate = 9600; //sets baud rate in bits per second for serial monitor
const int sensorreadDelay = 250; //sensor read delay in milliseconds
const int maxanalogValue = 1010; //highest integer given at max input voltage
const int sensormaxVoltage = 25; //highest input voltage of sensor being used

float analogVoltage = 0; //to store voltage value at analog pin

void setup() //setup routine runs once when reset or turned on
{
Serial.begin(baudRate); //initializes serial communication
}

void loop() //loop routine runs over and over again forever
{
analogVoltage = analogRead(voltageinputPIN); //reads analog voltage of incoming sensor
analogVoltage = (analogVoltage/maxanalogValue)*sensormaxVoltage; //conversion equation
Serial.print(analogVoltage); //prints value to serial monitor
Serial.println("V"); //prints label
delay(sensorreadDelay); //delay in milliseconds between read values
}

*/ Code End