Changes between Version 26 and Version 27 of ControlSystems/Electrical/Training/FallTraining


Ignore:
Timestamp:
Dec 6, 2020, 2:09:37 PM (5 years ago)
Author:
Ryan Nguyen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/Electrical/Training/FallTraining

    v26 v27  
    88== Materials/parts needed
    99
    10 For this project, you can use either your Arduino kit or TinkerCAD. Note that if you don’t use a high enough resistance for your real life circuit, the LED might stop working permanently.
    11 Parts needed: Arduino Uno, wires, LED, breadboard, and a 370-500 ohm resistor.
     10a. For this project, you can use either your Arduino kit or TinkerCAD. Note that if you don’t use a high enough resistance for your real life circuit, the LED might stop working permanently.
     11b. Parts needed: Arduino Uno, wires, LED, breadboard, and a 370-500 ohm resistor.
    1212----
    1313
    1414== Steps
    15 Once you have all the parts laid out, connect the components together like shown in the picture above, but before you do that, you will need the correct resistance for your resistor.
     15a. Once you have all the parts laid out, connect the components together like shown in the picture above, but before you do that, you will need the correct resistance for your resistor.
    1616How do you find the correct resistor? You can use this chart to figure out the resistances of the resistors in your kit:
    1717
    1818[[Image(Resistor color code.png​, 25%)]]
    1919
    20 However, for TinkerCAD, you can just click on the resistor and set the units to ohms (looks like a horseshoe) and type in 370 to get a 370 ohm resistor.
     20b. However, for TinkerCAD, you can just click on the resistor and set the units to ohms (looks like a horseshoe) and type in 370 to get a 370 ohm resistor.
    2121
    22 Notice how the green wire right under the red LED is not close to the lead of the LED, but it is still connected. This is because all the holes on the breadboard in the center (between the black and red colored lines) are connected to each other vertically (in this orientation of the breadboard).
     22c. Notice how the green wire right under the red LED is not close to the lead of the LED, but it is still connected. This is because all the holes on the breadboard in the center (between the black and red colored lines) are connected to each other vertically (in this orientation of the breadboard).
    2323
    24 Another thing is that all the holes next to the black lines are connected to each other, and all the holes next to the red lines are connected to each other by a piece of metal.
     24d. Another thing is that all the holes next to the black lines are connected to each other, and all the holes next to the red lines are connected to each other by a piece of metal.
    2525LEDs only light up when they are connected so that electricity flows through it in the correct direction. The cathode side of the LED, which is the shorter metal leg, gets connected to the ground of the Arduino. The anode side of the LED, the longer leg, is connected to the digital pins.
    2626
    27 This will require some code, which is provided:
     27e. This will require some code, which is provided:
    2828
    2929void setup()\\
     
    3939}\\
    4040
    41 Just copy and paste this into the code section of TinkerCAD (its the button next to start simulation, and after that, change the code type to text, and not blocks), or your arduino software (which is found at Software | Arduino) which you will need to have the arduino connected to your computer by USB to upload the code.
     41f. Just copy and paste this into the code section of TinkerCAD (its the button next to start simulation, and after that, change the code type to text, and not blocks), or your arduino software (which is found at Software | Arduino) which you will need to have the arduino connected to your computer by USB to upload the code.
    4242
    43 Finally, press start simulation on TinkerCAD, or press the upload button on your arduino software if you are using the arduino kit.
     43g. Finally, press start simulation on TinkerCAD, or press the upload button on your arduino software if you are using the arduino kit.
    4444You should see the LED light up for 1 second, and turn off for 1 second in a repeated fashion.
    4545
     
    4848== Explanation of how it works
    4949
    50 Let's follow the trip that an electron takes through your circuit.
     50a. Let's follow the trip that an electron takes through your circuit.
    5151
    52 First, it starts at digital pin 2, and is sent off towards the resistor because of our code.
     52b. First, it starts at digital pin 2, and is sent off towards the resistor because of our code.
    5353
    54 The resistor is there because it helps to limit the amount of current (how many electrons pass by per second) so that the LED won’t get too much (which is bad).
     54c. The resistor is there because it helps to limit the amount of current (how many electrons pass by per second) so that the LED won’t get too much (which is bad).
    5555
    56 The electron then goes through the LED, lighting it up, and travels to the GND, which is what it is attracted to.
     56d. The electron then goes through the LED, lighting it up, and travels to the GND, which is what it is attracted to.
    5757
    5858