Hello everyone!! Welcome to this post on Arduino LED Projects!!
Need a short introduction to what the Arduino is then click on LINK
Check out the breadboard intro right HERE
In this project we’ll build a high voltage indicating system, in which the buzzer goes off when the voltage is above 4V (Arduino supplies from 0-5V).
Demo:
Things Required:
- Arduino UNO
- Breadboard
- Jumper Wires
- Active Buzzer Module
- 10k Potentiometer
- Arduino IDE on computer
Functions used:
- digitalWrite()
- Serial.println()
- analogRead()
- pinMode()
Reference Material:
- So there are basically two Types of buzzers : Active Buzzers and Passive Buzzers. Here I’ve used an Active Buzzer. The basic difference is that an active buzzer as an internal oscillator which generates the tone and it requires a dc voltage. The passive buzzer however, requires an AC input.
- I’ve used this (LINK) video as a reference.

Code:
View on/ Download from Github: (LINK)
int potpin=A2;
int potval;
float volt;
int buzzpin=12;
void setup() {
// put your setup code here, to run once:
pinMode(buzzpin, OUTPUT);
pinMode(potpin, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
potval=analogRead(potpin);
volt=(5.0/1023.0)*potval;
Serial.println(volt);
if(volt>4){
digitalWrite(buzzpin, HIGH);
} else {
digitalWrite(buzzpin, LOW);
}
}
Stay Tuned for upcoming posts on Arduino Projects! We’re on the basic newbie projects right now and slowly, gradually move on to those cool, ultra techy projects!! Want to be the first to know when a new and amazing post comes up?? Then feel free to subscribe!
Happy Learning!!
