Makerspace - Potentiometer Challenge
1. Project:
In this week’s challenge, our goal was to use the potentiometer in our Arduino kit to create blinking speed controller for our LED and then modify our circuit and code to create a dimmer switch for our LED.
My potentiometer looked slightly different from the ones in the tutorials. However, the same principle applied: two poles of the potentiometer connected to high (5V) and low (0V) voltage and the potentiometer acted as a variable resistor (or voltage divider) providing a set voltage between 0 and 5V to the middle pin, depending on the position to which the dial was turned.
2. Code:
The following code can be used to control either the brightness or the blink speed of an LED, depending on the circuit design used with the code.
- When the positive side of the LED is connected to Pin 13, the potentiometer controls the blink speed.
- When the positive side of the LED is connected to the variable output of the potentiometer, the potentiometer controls the brightness of the LED.
3. Circuit Design:
For the following circuit design, the potentiometer functions as a blink speed controller. Turning the knob on the potentiometer will change the blink speed from every 1.023 seconds (slow) to every 0.001 seconds (fast).
For the following circuit design, I added functionality to my circuit. Here, the potentiometer functions also as a dimmer. Turning the knob on the potentiometer will determine how bright the LED shines from 5V (bright) to 0V (off).
4. Electronic Diagram:
The following electronic diagrams were taken from my design journal.
For the following circuit design, the potentiometer functions as a dimmer. Turning the knob on the potentiometer will determine how bright the LED shines from 5V (bright) to 0V (off).
For the following circuit design, the potentiometer functions as a blink speed controller. Turning the knob on the potentiometer will change the blink speed from every 1.023 seconds (slow) to every 0.001 seconds (fast)
Electronic Diagram for Potentiometer as Blink Speed Controller (fast blink to slow blink)
5. Video of Project:
6. Explanation of Project:
Extension Challenges:
1. Can you control 2 lights with the same brightness or same blink rate? YES! The easiest way I found to do this was by placing the LEDs in parallel. (See video above.)
2a. Can you control 2 lights with one potentiometer but have them controlled so that as one light gets dim, the other gets bright? YES! See video below. For alternating dimming, I connected one LED to the positive terminal and the variable pin of the potentiometer and the other LED to the negative terminal and the variable pin of the potentiometer. (See video above).
3 (Bonus Personal Challenge!). Is it possible to create a circuit where the potentiometer controls both the blink speed AND the brightness of a single LED? YES! First I tried just connecting Pin 13 to the high side of the potentiometer. However, this did NOT work! Whenever Pin 13 wrote LOW, the potentiometer output voltage would drop to zero, thus throwing off the analog input signal for used to calculate the blink speed. I overcame this by using the potentiometer output as a voltage divider. I used the difference between the positive terminal (5V) and the potentiometer variable output as my analog signal to the board. THEN, I used the difference between the potentiometer variable output and PIN 13 as my LED voltage. This allowed me to control both my blink speed and brightness of a single LED with a single potentiometer.
Comments
Post a Comment