Wednesday, November 30, 2022

Week 5: Challenge Build Five: Photo Resistor

     This week I had the absolute pleasure of finding a circuit of my choice and building it. I found a Photo Resistor circuit project in my Starter Kit Guide. I also researched online and found some codes I could use. After typing in and verifying my sketch, I noticed the LED light would not illuminate, so I double-checked the code and realized that there was no LED light command listed for the code. I quickly went ahead and assigned the command for the designated pin 9. The same pin is set in the original schematic.


1. What the Project does:

    This project works like a dimmer light or night light. As you cover or block incoming light from the photo-resistor, the LED will dim. The LED will illuminate when you uncover the photo-resistor and expose it to light. 


2. The Sketch/Code:

Below are two images of my code and the serial monitor. Even though a serial monitor can be used for the collection of Data, I like to use it to test the code and see how it is running. 





3.  The Arduino and Breadboard Connection:


Photo of the ambient lighting 

Photo of the dim light when covering the Photo Resistor.




4. The Electronic Diagrams:

Above is a schematic drawing from my starter kit guide. I removed one of the additional sensors originally located below Pin A0  since I only used one in my project.

This diagram represents the connections to the microcontroller board and breadboard.

5. How The Photo Resistor LED Challenge Works:

 


6. My Thinking:

    I was excited about this challenge. I got the light sensor to work after modifying it a bit. I was confused and needed clarification after I typed in the original code, and the light would not turn on. I double-checked the sketch. That was when I realized there was an error with the original code. I added in the codes for Pin 9. to my amazement, the LED illuminated but did not dim, so I began moving/playing with the components (wires, photo-resistor, resistor, and LED around). I knew enough to position the wiring to complete the circuit. I changed things around twice and could get all the components configured, and the circuit worked as it should.

7. Final Reflection:

I thought it would be easier to configure and run the sketch for this project, but I needed to correct it. It was enjoyable, though. Things get easier each time I play with a different project. I return to those first assignments we completed and grab ideas from there to help me complete the current projects that I am working on. It's not getting easier, but I am becoming more confident and comfortable as I continue exploring. I definitely still need to work on my vocabulary.

8. Real-World Extensions:

As I mentioned in my video, some real-life extensions could be a nightlight, dimmer headlights, and motion sensors. This would be an excellent idea for a light-up porch light or floodlight.

Wednesday, November 23, 2022

Challenge Build Wk 4: LED Dice Roller, ETEC: Maker Spaces -568

     This week's challenge was intimidating at first. We were told what project we would work on, but it would not be available in our Starter Kit Guide. We would have to use our research skills to find a code to help us build an LED dice roller.  I found several different codes and diagrams for dice rollers, but ultimately the diagram for the one I initially chose looked a little off to me. There was not a clear picture posted of the setup. It was a dark photo, and I had difficulty seeing what went where. I had verified the code and knew that code was good to go, but my LEDs would not illuminate. 

1. What the Project Does: 

    In the LED Dice Roller project, six LED lights represent the numbers on a rolled die. Different amounts of lights will remain lit each time the push-button is pushed. Those lights represent the numbers on a die.  For example, each time you press the button, it represents a "toss" of the dice. If three LEDs light up, you have rolled a 3; if five LEDs light up after pushing the button, you have rolled a five, and so forth. 


2. The Code:

The sketch above is the code I used for my LED Dice Roller Project.


3. Picture of the Set Up:

 
Above, the microcontroller board and breadboard are organized in a manner that works best for the project.


4. Electronic Diagram:

This was the first time I would create the schematic on my own with minimal guidance from the Starter Kit Guide ( how to draw the push button) or any online resource. Based on what I have learned so far, I think I drew them correctly, but if not, please let me know, and I will fix them. 


Above is a drawing of the microcontroller board and breadboard with all the components necessary for this project. This time I color-coded the jumper wires for easy reference between the video and drawing.



5. How The Project Works:



6. Thinking Through The Challenge:

    This Week's challenge was challenging. The code was verified, complied and uploaded perfectly when I typed the information into the sketch. I was careful because I usually forget either a curly brace or a semi-colon, and I was worried. The sketch I found online had a diagram/schematics that went with the sketch, but the LEDs would not light up when I uploaded the code. I observed my connections carefully and saw that my layout was not working. My Cathodes were supposed to be inserted in the negative ports to work. I gave it a try, and nothing. I decided to pull everything off the breadboard and put the jumper wires,  resistors, and LEDs using the same information from the original code but placing my materials into similar positions as I had in the Multiple LEDs Project. I then verified the code, and it was compiled. Then I uploaded the sketch, and the light flashed on the microcontroller board. Finally, I pushed the button, and it worked! I tried it several times before conducting my observation and gathering data for my graph.

7. Final Reflection:

    I had a few hiccups as I worked on the project, but I completed the task successfully. I have learned from these projects to have patience and ask for help from peers if needed. Even though challenging, This project was the most fun by far. 

8. In the Real World:

    I would say that in the real world, you would see the randomizer when gambling. Perhaps in slot machines. Street lights? Electronic random wheels, or even the PowerBall?


9. Distribution of Rolls:




I conducted three trials for scientific purposes. I wanted to see how random the number distribution would be for the rolls. Each trial conducted has fifty rolls. The only number I observed that consistently exceeded the others was the number three. When the data from all three tests were compiled, Three was the number rolled most frequently, and the number one was the least frequently rolled.



Above is the graph I created. It is student-friendly and represents the collected data for the distribution of rolls of all three trials combined.






Saturday, November 19, 2022

Challenge Build Week 3 ( Circuit 3: RGB LED and Circuit 4: Multiple LED's) Makerspaces: 568

 This week I had the pleasure of constructing, compiling, and sketching two circuits. The first is Circuit 3: RGB Led and Circuit 4: Multiple LEDs. 

    Starting the third and fourth circuits was an exciting task similar to last week.  As I mentioned last week, having a growth mindset is critical when exploring unknown things; I could configure the models, connect the pins where indicated and type the codes. Initially, my RGB LED would not work simply because I had not aligned the LED accordingly with the correct corresponding section as listed in the Starter kit guide. As I typed in the code, I typed a / because I was going to type in some notes but then decided not to. This caused an error in the compiling. I quickly scanned the code and saw my mistake. While I connected the jumper wires for Circuit 4: Multiple LEDs, I realized that I could move the jumper wires to the opposite side listed in the Starter Kit guide, but I found that I would have to be careful. If I had a wire assigned to a specific jumper wire and switched the wires, It would change the light pattern.


RGB LED

1. RGB LED Project Explained:

If the RGB LED light has been connected from the microcontroller board to the breadboard and the jumper wires and sketch/code have been compiled correctly, you should see the RGB executing the commands. Various unique color combinations in addition to Red, Blue, and Green would be seen.


2. RGB-LED CODE:
Below you will find the code used to create the different color combinations for the RGB LED circuit challenge. The challenge I found was typing in the code. I seem to always either forget or add in minute details. Those tiny errors will cause the program to not compile or be executed.

                                            

                                                                                        



3. RGB Pictures:
  
Above, you will see the RGB LED flashing Red given the RED command.

Above you will see the RGB LED flashing Blue given the blue command.


4. Electronic Diagram:  Like the last couple of weeks, I am including three diagrams, the schematic in the Starter Kit Guide, A Schematic that I found online and have adapted to match my circuit, and a drawing depicting the layout of the circuit including the Microcontroller board, breadboard, jumper wires, resistors, and LED lights.

                                        This is a 2-dimensional drawing of my RGB LED schematic.

Above are two RGB LED schematics. The one on the left is from the Starter Kit Guide, and the one on the right is configured to resemble my model using symbols.

5. How The RGB LED Circuit Works:



6. My Thinking:
    As I worked my way through putting the circuit together, I was unsure how the completed circuit would function. As mentioned earlier, I accidentally typed a / because I was going to type in some notes for myself but decided not to. This caused the code to not compile correctly. I scanned the code and saw the mistake, and deleted the /. After this, the code compiled and was executed correctly. I was able to see all of the different colors that were in the sketch/code. I cleaned the initial code but did not change any of the commands aside from the delay to see if it would show the flashing and changing of the colors.

7. Final Reflection:
    My circuit successfully worked after fixing the compiling error, where I deleted the / symbol after realizing I had typed it in for notes and changed my mind. I had never seen an RGB LED bulb, so seeing one in action was very interesting. 

8. Examples in Real Life:
     I currently have a multiple-device charging port/station; when I place my phone to charge, the LED is red, then it changes to blue and green when fully charged. Other Examples are LCD or Plasma T.V. and video projectors.

Multiple LEDs


1. Multiple LEDs Project Explained:

If the Multi LEDs lights have been connected from the microcontroller board to the breadboard and the jumper wires and sketch/code have been compiled correctly, you should see all the LEDs executing the commands. All eight LEDs should be turned on and running in a blinking one after another sequence pattern (forward and reverse).

2. Multiple LEDs CODE:
I minimized the font in the Sketch/Code above. This is the code that was successfully compiled. I got the Multiple LEDs to turn on and flash in sequence.



Multiple LED Pictures:
Above, the Multiple LEDs are all lit up in the initial sequence. 


        Shown above is a photo of the Multiple LEDs lighting up in reverse.


4. Electronic Diagram:  Like the last couple of weeks, I am including three diagrams, the schematic in the Starter Kit Guide, A Schematic that I found online and have adapted to match my circuit, and a drawing depicting the layout of the circuit including the Microcontroller board, breadboard, jumper wires, resistors, and LED lights.
Above are two RGB LED schematics. The one on the top is from the Starter Kit Guide, and the one on the bottom is configured to resemble my model using symbols.


  This is a 2-dimensional drawing of my RGB LED schematic. I can return to my drawing If I need to recreate the circuit.



5. How The Multiple LEDs Circuit Works:



6. My Thinking:
    As I worked my way through putting the Multiple LED circuit together, I was unsure if the completed circuit would function. There were so many LEDs and wires. I was a bit overwhelmed but just kept on going. I realized that I could move the wires to the opposite sides to align with the resistors; as long as I have the jumper wires pinned in the same port (letter and number), the LEDs would still function the same way. I could better see the LED sequence of lights turning on and then reversing to light up in the opposite direction.

7. Final Reflection:
    My circuit successfully worked. This circuit is a parallel circuit. It had one source of power but many pathways in which electricity could flow. I took one of the LEDs off to prove my theory, and I was correct. The lights before and after the one I took out continued to light up. When I removed the jumper wire, only the ones before the disconnected one would work.

8. Examples in Real Life:
     When I saw the Multiple LEDs, I thought of Christmas lights. Then I thought of a parallel circuit which caused me to explore further. I also thought of KIT's scanner lights (the car from Knight Rider).


Challenge Extension:

Multiple LED Countdown to RGB Multi Color


The Codes: Multiple LEDs Countdown and RGB









Multiple LED to Potentiometer/LED Control

The Codes: Multiple LED Countdown with Potentiometer and LED




I will just say that code play can be pretty exhausting. Even though I had a fun time, getting the code right took a lot of trial and error for both attempts. I connected the Potentiometer along with the RGB, and the code did compile, but the only thing that occurred was that the RGB light stayed on red. I ultimately decided to scrap the Potentiometer for the time being and see If it would work with just the count down and jumper wires set up. It did! That took me so much longer than I anticipated. I will have to draw those diagrams and copy my codes for future reference. I hope you enjoy watching, and please let me know if you have any advice. Thanks!


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.























Sunday, November 6, 2022

Challenge Build One : ETEC 568 (Makerspaces)


 1.    The project: The Blinking LED

     This week I was introduced to the Arduino UNO R3 along with the Arduino program and a simple extension of that program. I utilized the Vilros Ultimate Starter Kit Guide, which came with my Arduino Microcontroller board, and the resources provided in class to help me complete this week's Maker Challenges. My task was to build circuit #1 in my kit guide- The Blinking LED. In the project, I made a circuit requiring three jumper wires, one LED light, a 330W resistor, an Arduino UNO board, a breadboard, and code. The outcome of the project was to be able to explore, build a circuit and execute the code for the program, which would result in making the LED blink. While doing so, the goal was to conduct circuit play, code play, and also try an extension challenge.

2. Blinking LED Light Code: The code is initially input into the sketchbook as provided.     



3.    Photo of the circuit, including Arduino and Breadboard

      

 








 

Above is a photo of the Arduino Micro Controller setup before running the code. The red wire connects the Arduino's 5V(power) section and the breadboard's positive (+) port. The black wire is connected to the Arduino's GND (Analog in) area and the  Negative (-) port on the breadboard. The green wire is connected to port 13 and links to the   e2 port on the breadboard.


 
The LED Anode(+) is connected to c2, and the cathode (-) is connected to c3 of the breadboard. The resistor is connected to a3 and the negative port between 5 and 6. Once the code is verified and uploaded, the light should blink at a delay of (1000) or 1 second.

 

 

4.    Electronic Diagram (Journal)


This is a schematic drawing of The Blinking Light.   I included a key for my notes and drew the schematic on the left according to my starter guide. After conducting some online research, I drew the schematic on the right, titled Schematic Blinking Light; the drawing below helped me visualize better.  






5. The Challenge: Circuit Play and Code Play and How it Works.




6. My Thinking:

       In the beginning, I was very intimidated by the challenge. I received my kit and was excited yet skeptical of my abilities. I began to research online. I found Arduino 101 Fundamentals to be helpful. I was able to gain a perspective of the vocabulary that was contained in creating the code. It clarified the "what and why" questions I had. Understanding and decoding what the symbols and vocabulary meant helped me make the connection. The difficulty that I ran across was the initial setup. I went to the Arduino website and could log in and go into a sketchbook, I typed in the code, and it would not work. I received a programming error. I went to the User's Guide to see if I  had missed anything, and that is when I realized That I had not Downloaded the Arduino IDE correctly and had to install the drivers. That would prove to be critical. Once I was able to get the program running. I successfully ran the first code after fixing a tiny error. I had left out the } curly brace to end the command. 

      As I worked through the challenge, I explored online to find examples and videos of how to write code and how to set up the two LEDs for the extension challenge. At times, some of the code changes just made sense to me. On other occasions, I wasn't sure and needed reassurance, so I did what I knew best, research and troubleshoot. Things became a little easier with the code writing and vocabulary each time I typed the code in for a new challenge. I found that I really had to take my time with things. I had to focus on the task and not give up.


Extension Challenge: Codes and Videos Below

  
 
In the video of the circuit above, two LEDs blink at the same rate.


 
In this circuit video and code, two LEDs blink at different rates.


One LED blinks in this circuit while the other LED stays on.



In this final video, I created the code and circuit program that executes all of the circuits programmed above.


7.  Final Reflection: 

         I learned a lot during this first project. I had to research websites, watch a few video tutorials, and read my starter kit guide. When I felt like giving up, I took a step back and took a breather.  I cannot say that I have retained everything I have done this week, but I had taken notes and am more familiar with coding today than when I started. I will continue to work on my skills to become more proficient with coding and have the ability to execute the program commands; maybe I can even extend my project in the future to create a holiday decoration or light show of some type.

         Similar programs exist in our everyday world, for example,  when driving and coming to an intersection. The lights are programmed to start and stop traffic at specific times/intervals. Holiday decorations and a crosswalk are other examples. Circuits make a lot of our lives easier. With a flick of a switch, we have electricity, and the technology that we use today all contain circuit boards, wires, and programs that involve some type of coding to help things run efficiently. 





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 ...