This is an old revision of the document!


Steve Learning about Arduino Microcontrollers

Tell complete story of circuit. (button) (potentiometer)

First we learnt how to make simple things like LEDs

Resistor Value: 2000 Ohms The light bulb on this is the least bright because it has the most resistance. So, it makes sense that this LED is the least bright out of the three.

Resistor Value: 1000 Ohms The brightness is almost as bright as the on with resistor 3. That should not be becuase this resistor has a greater resistor value. It may be because I am using my hand to conduct some electricity. Therefore, bypassing the resistor. I have no idea this is just a guess.

Resistor Value: 470 Ohms The brightness is almost as bright as the on with resistor 2 which is weird becuase resistor 2 has a greater resistor value and the bulb connected to resistor 2 should be less bright compared to this bulb. Again, it may be becuase I did not connect the wires properly on this circuit which resulted on the electricity not flowing properly. .

Number of BulbsResistor (470)Bulb 1Bulb 2Bulb 3Bulb 4total
14.49 2.04xxx6.53
22.5122.3xx6.81
30.791.921.931.93x6.61
401.661.621.641.646.6

1 Light Bulb

2 Light Bulb

3 Light Bulb

4 Light Bulb

It was weird when the I measured the volts of the resistance it was 0. I think it is becuase all the light bulbs have used up all the electrcity and by the time the elctricity gets to the resistor, there was no more electricity left to resist.

COnclusions

The amount of current recroded at the resistores decreases as the amount of LEDs increases. The totoal current stays about the same.

The amount of current recorded next to the LEDs decreases as the amount of LEDs increases.

Then, we learnt how to use potentiometers. For this one, I followed the instructions and got the results I expected when I turned the knob. Turning it to one side dimmed the light. Turning it to the other side increased the brightness.

At first, I thought the difference was it was brighter this time. However, after a demonstration, I realised that the direction to dim the light and increase the brightness has changed. That was very hard to spot.

we learnt the basics. Resistors, potentiometers, and drawing diagrams


Things like, switches, potentiometers, capacitors, and transistors.

  1. Mode 1:
    1. The left and the right forms a closed circuit.
  2. Mode 2:
    1. The middle and one of the side forms a closed curcuit

New resistor : 150Ohms

I figured out how the switch worked. I used the multimeter to figure it out.

On one side of the switch when it is up, the left side and the right side. When the switch is donw, the middle and the right side of the switch form a closed circuit. So, to get alternating lights, the power is always needed so it shuld be connected to the right hole. To ensure the breadboard does not mess with the swith, the I need to make sure the other side is not plugged in.

The rows from that are of english letters are connected so if one of the holes on that row is powered all of the holes are powered. However, the two lines on the side are different. If one of the point is powered all the ones on the same collum is powered. Only for those four rows only. So, the breadboard is very useful when making intricate ciruits that need to be squashed in small spaces. Also, with this alligator clips are now useless.

Resistor amountstime
4701s
2K5.8s
27K1.14m
50K (new capacitor)3.5m
100K4.23m

My results are a bit weird becuase halfway through, I though that my capacitor was broken. I tried to charge it using the 227k resistor but it would only go up to 3. something no matter what I did. So, when I got a new capacitor evevrything worked. However, after Dr.Bell tested my old capacitor, he said it was fine and not broken.

Charging Capacitor

Discharging capacitor

As you increase the resistance, what happens to the charging time? The charging time increases. When the amount of voltage in the capacitor increases, the charging rate of the capacitor increases.

capacitor

The transistor makes a closed circuit with the one on the left and right if there is power going through the middle one.

This works because my hand acts like the switch. When my hand is touching the wires, I conduct the electricity. When my hand is not there the circuit is open and the LED does not light up

Steve building an oscillator

Components:

  1. Capacitor *2
  2. Transistor
  3. Wires *5
  4. Staple bullets wires *2
  5. 230 ohm resistor *2
  6. 9800 9.8k ohm resistor *2
  7. Potentiometer left high right low.

Both LEDs almost have a closed circuit they are blocked by a transistor. We want to activate the transistor by discharging a capacitor. So, we have to charge the capacitor first. Both capacitors do not charge at the same speed because, even though the resistors should have the same amount of resistance, they are not built perfectly so they do not. One of the capacitors will charge faster which will allow it to discharge earlier than the other. That would cause one of the LEDs to light up earlier than the other. When the other capacitor is ready to discharge, the first capacitor has already finished discharging which causes the first LED to turn off. That is how the circuit to have alternating LEDs.

The resistor controls the blinking speed because, the resistor controls speed the capacitor charges at. If the charging of capacitor slows down, the LED will need more time before it can turn on. I can add resistance by adding a resistor with greater resistance and doing that would slow down the current. To change the amount of resistance without swapping out parts, I can use a potentiometer.

Resistor: Resist flow of current. Resistance is measured in ohms (Omega).

Transistor: An electrical component that can switch circuits on and off and amplify signals

Capacitor: Stores energy like a battery but discharges much faster

Speaker: When it has electricity, it will move the cone back and forth which creates air pressure that we perceive as sound.

Potentiometer: An electrical component that can change the amount of resistance.

Momentary Switch: A switch that creates a circuit only when presses.

This is a button I made with the arduino for the Old Man Simulation. It works like this: When I hold donw the button , it starts a time and plays a little sound and when the simulation is done, the person clicks on the button which plays the flush sound effect by lorenzgillner on freesound website. Here is the video:

  • steve-wang-arduino.1672227724.txt.gz
  • Last modified: 2022/12/28 03:42
  • by steve.wang