Sunday, November 13, 2022

Challenge Circuit 2 : Potentiometer ( ETEC 568 Makerspaces)

     Starting this second circuit was an exciting task. I was still nervous because I did not feel very comfortable. However, as I mentioned last week, having a growth mindset is critical when exploring unknown things; I could configure the model and connect the pins where indicated. Initially, my Potentiometer would not work simply because I had not pushed the jumper wire fully into the A0 port; later in the challenge, I had to remember to upload after verifying the code and make sure that I placed the semicolon after a given command. After I did that, things ran smoother. 

1. Project Description: 

    The circuit has a potentiometer(variable resistor) and a voltage divider used to measure potential(voltage). It contains a rotating contact(knob) that permits the adjustment of the electrical current that flows in a circuit. In the project, the LED is supposed to flash quickly (0v) and decreases in flashing speed but stays on longer and steadily as you move the knob clockwise to (5v). The higher the current, the longer the LED stays on between flashes. You use the potentiometer to control the voltage, thus controlling the flashing of the LED and the electrical current moving through the circuit.

2. Sketch/Code: 

Above is the circuit code; after I cleaned up the original code assigned, I kept the directions that I felt were important for me to go back to reference if necessary.




3. Circuit and Breadboard (Photos)

Here is a side view of the circuit and breadboard for the circuit 2 assignment. On the microcontroller side, you have the following connected to the breadboard
Jumper Wires:
Red (5v) to (+)port
Black(GND) to (-) port
Green (A0) to e7
Blue e6 to (-) port in between 1 and 2 
yellow (13)port to j20
orange e8 to (+) port in between 9 and 10
Potentiometer: a6, a7, a8
LED: anode (h20) cathode (h21)
Resistor: j20 and (-) port between 19 and 20

        The same circuit as above is shown in the aerial view.
 

4. Electronic Diagram (Schematics)
Both of the schematics above and below represent the same  Potentiometer circuit. 
The circuits above contain symbols representing components used to create the circuit assignment and how they are connected.

The circuit above is a visual representation of the actual layout of my circuit. It includes the components I used to create the circuit and connect the microcontroller board to the breadboard. 
I personally like this visual representation better.



5. How the Potentiometer Works:
In the video above, I explain the components used for the circuit #2 assignment and show how the potentiometer works using the original code provided. Please bear with me; I am still working on learning my technical vocabulary. (Excuse the shaky camera.)



6. The Challenge( Circuit and Code Play):
In the video above, I play with the circuit and code provided to answer the three prompts assigned. As I began with the initial challenge, I was skeptical about successfully completing the three prompts given.


Answer for Question prompt 1: I could not get the potentiometer to work successfully with two digital pins. This may be because the Potentiometer runs on analog.

Answer for Question prompt 2: I successfully got the circuit to compile and execute the code with two analog pins; I was surprised by this. The circuit worked as it should. Again I wondered if it was because the potentiometer runs on analog.

Answer for Question prompt 3: When I changed the analog read to digital read, the potentiometer was not responding. The light stayed on and steady. The Voltage stayed the same (* Note* I misspoke and said volume in the video; I said the volume didn't increase or decrease. My apologies.).
When I changed digitalWrite to analogWrite, the light would not turn on, and the potentiometer could not work. We disrupted the flow. I wondered if it was because nothing was assigned or attached to the analog port when I changed the command to analog code. The potentiometer runs by being connected to the analog port.


7. Reflection:
    As I completed the tasks provided for circuit 2, I wondered if I was successfully completing the tasks provided. I am hoping that I understood the directions clearly enough. Setting up the microcontroller board and breadboard is becoming easier. I still have to work on my code writing and technical vocabulary. As you will see in the Extension challenges, I have become a little more comfortable playing with the code. My apologies for the shaky and uneven videos; I will have to invest in a holder of some type. As I researched online, I found that a potentiometer will not work or respond correctly when assigned a digital-only command (code); it will work with an analog command (code) because it uses analog to measure the voltage allowed to flow.


8. Possible Extensions:
    Potentiometers are all around us, from the knobs on a stove that regulate the current of electricity to allow the coils to heat up at different degrees, or the knobs inside your vehicle, such as the volume knob which controls the volume of the sound being emitted. At first glance, potentiometers might seem insignificant, but they are essential in adjusting the electrical current that flows in a circuit.



Extension Challenge:


 
This was the Potentiometer skit/code I used for the Extension Challenge.


Challenge Question #1.
Can you control 2 lights with the same brightness or same blink rate?

Circuit #2 Potentiometer (Control 2 light with the same brightness to blink at the same rate).



Challenge Question #2.
Can you control 2 lights with one potentiometer but have them controlled so that one light gets dim, the other gets bright, or one light blinks fast while the other blinks low. ( I could not get one LED light to blink fast while the other blinked slowly). I was surprised by my findings, though.

Circuit #2 Challenge Extension code ( control 2 lights with one potentiometer, but have them controlled so that one light gets dim, the other gets bright. Both lights alternate at the same speed)



I really enjoyed this week's circuit assignment; before this class, I had never heard of a potentiometer or how it worked. I have gained new knowledge and am thankful for that.























No comments:

Post a Comment

Final blog reflection: teaching and learning with Web 2.0 tools (ETEC 527)

     This was a fascinating course; there were so many aspects of digital Web 2.0 I did not know about. During this course, I learned about ...