Instagram story viewer> @sarahnzeshi> Post
a month ago
0
Posted On: October 1st 2026, 12:31 pm
I built a dimmable LED light using two push buttons, an Arduino Uno, a led light, resistors and a buzzer.

One button turns the brightness up, the other turns it down and an active buzzer gives a beep when you hit the minimum or maximum.

The fun part was in the details. Each button has its own 1kΩ pull-up resistor so the input pins never float. Let me expatiate on this:

A digital input pin on the Arduino "listens" without pulling current. If nothing is actively driving it to 5V or GND, it's floating: it isn't reading HIGH or LOW, it's picking up whatever stray electrical noise is around.

That can be your hand near the wire or nearby signals, this will flip digitalRead() randomly between 0 and 1, so your LED would brighten and dim on its own (We dont want that)

A pull-up resistor fixes that. It ties the pin to 5V through a resistor, so when the button is released, the pin reads a clean, stable HIGH.

The resistor is also what keeps pressing the button from being a short circuit (zero resistance circuit).

Now let's continue, the LED sits behind a 220Ω resistor to keep the current safe at around 14mA, and the brightness is controlled with PWM on pin 6. Everything shares one common ground.

It's a simple build, but it covered a lot of fundamentals in one go: pull-up logic, PWM, debouncing, and turning a schematic into a clean breadboard layout. Projects like this remind me that small circuits teach big lessons.

Ps: the Arduino has built-in pull-ups you can enable with INPUT_PULLUP, which would have saved you the two resistors.

More posts

back to up