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:
[ Ссылка ]
*************************************************************************************
SHARE THIS VIDEO LINK: [ Ссылка ]
*************************************************************************************
BUY THE ITEMS IN THIS VIDEO (AMAZON.COM):
Video Equipment:
GoPro7: [ Ссылка ]
GoPro Accessory Kit: [ Ссылка ]
GoPro Stabilizer Gimbal: [ Ссылка ]
Arduino:
Uno Starter Kit: [ Ссылка ]
Voltage Sensor: [ Ссылка ]
Multimeter: [ Ссылка ]
*************************************************************************************
BUY THE ITEMS IN THIS VIDEO (AMAZON.CA):
Video Equipment:
GoPro7: [ Ссылка ]
GoPro Accessory Kit: [ Ссылка ]
GoPro Stabilizer Gimbal: [ Ссылка ]
Arduino:
Uno Starter Kit: [ Ссылка ]
Voltage Sensor: [ Ссылка ]
Multimeter: [ Ссылка ]
**************************************************************************************
CONTACT ME:
E-Mail: tylerovens@me.com
**************************************************************************************
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
Ещё видео!