= Electricity = [[Image(shock.png,margin=10, align=right)]] == Why do I need to learn this? == Robots run on electricity. Mini-bots are small, safe, light, and uses penlight batteries, however the FRC robots you will build later this year weigh up to a couple of hundred pounds, use powerful motors, solenoids, and pneumatics, and run on batteries with enough energy to seriously hurt you. So you need to learn the basics of electricity and how to control it because: 1. It's interesting and fun 2. Ignorance is **not** bliss: so much of our modern world depends on electricity, everyone should have a basic understanding of what it is and how it works 3. Safety: everyone who works on or with the FIRST robot must understand how to stay safe and keep the robot from hurting itself or others. == Objectives == By the end of the lesson you should understand: * Electricity * [https://learn.sparkfun.com/tutorials/what-is-electricity What is electricity] * The [http://hyperphysics.phy-astr.gsu.edu/hbase/electric/watcir.html water analogy] * Volts jolt, mils kill - see what **not** to do with electricity [https://www.youtube.com/watch?v=hp97GjuULX8 here] (note: this guy is an idiot and likely to get a [https://darwinawards.com/darwin/ Darwin award]...DON'T DO WHAT HE DOES!) * Units of measure: * Volts - the pressure behind the electrons (potential energy) * Amperes - the number of electrons flowing * Watts = Volts x Amperes - a measure of the actual work being done * Joules = A measure of energy = Watts-per-second * KWh = Kilowatt-Hours (another measure of energy) = Watts-per-hour/1000 * Who's who (literally): [https://en.wikipedia.org/wiki/Alessandro_Volta Volta], [https://en.wikipedia.org/wiki/Andr%C3%A9-Marie_Amp%C3%A8re Ampere], [https://en.wikipedia.org/wiki/James_Watt Watt], [https://en.wikipedia.org/wiki/James_Prescott_Joule Joule], [https://en.wikipedia.org/wiki/Georg_Ohm Ohm] * Batteries - old school vs. new school * [http://engineering.mit.edu/ask/how-does-battery-work What is a battery] * [http://mechanicalmania.blogspot.com/2011/07/types-of-battery.html Primary vs. secondary] * FIRST bots use sealed [https://en.wikipedia.org/wiki/Lead%E2%80%93acid_battery lead-acid] batteries (1800s technology!) * Mini-bots use primary alkaline batteries (developed 1899-1901) * See [https://www.youtube.com/watch?v=6wFPsxgm_ak why we are not using lithium batteries] (new school) * Good gracious...I have one of those in my pocket! Why do they use lithium batteries in cell phones and laptops if they are so volatile? For the same reason they are used in quad-copters and other applications where weight really matters: [http://www.allaboutbatteries.com/Battery-Energy.html Wh/kg] * Voltage: * Nominal voltage (alkaline=1v5/cell, SLA=2v15/cell) * [https://www.batterysystems.net/series-vs-parallel/ Series connected] cells multiply the voltage * Datasheets: [http://data.energizer.com/PDFs/E91.pdf alkaline] [https://www.power-sonic.com/wp-content/uploads/2018/12/Technical-Manual.pdf SLA] * Current: * [http://data.energizer.com/PDFs/BatteryIR.pdf Internal resistance] * What are [https://www.optimabatteries.com/en-us/experience/2014/01/what-does-cold-cranking-amps-cca-mean Cold Cranking Amps] anyway? * Why it matters: motors draw a **lot** of current. * Capacity: [[Image(https://upload.wikimedia.org/wikipedia/en/e/e0/Energizer_Bunny.png, align=left, width=150, margin-right=30)]] * [http://www.dcbattery.com/faq.html Amp-hours] (or milli-Amp-hours) * [http://batteryuniversity.com/learn/article/the_battery_and_the_digital_load discharge rate matters!] * [http://batteryuniversity.com/learn/article/will_secondary_batteries_replace_primaries The ratings game] * [http://web.mit.edu/evt/summary_battery_specifications.pdf specifications cheat sheet] * Energy density (SLA -> Lithium) * Self discharge (shelf life) * **EXERCISE**: [https://learn.sparkfun.com/tutorials/how-to-use-a-multimeter/all Use a multimeter] to measure voltage of a battery (ask a mentor if you don't have one) * Conductors/[https://learn.sparkfun.com/tutorials/what-is-a-circuit Circuits] * What is a conductor * **EXERCISE**: Use a multimeter to measure continuity * What is a resistor * Units of measure: Ohms * The [http://www.engineeringtoolbox.com/electrical-resistor-colour-code-value-tolerance-d_1655.html resistor color code] [http://physics.ucsd.edu/neurophysics/courses/physics_120/resistorcharts.pdf chart] * How current, voltage, and resistance relate: [http://www.electronics-tutorials.ws/dccircuits/dcp_2.html Ohms Law] * Applications: * limiting current ([https://www.sparkfun.com/tutorials/219 how do I stop my LED from burning up]) * voltage divider ([https://learn.sparkfun.com/tutorials/voltage-dividers how can I (safely) connect the 5v control signal from my Arduino to my 3v3 sensor]) * current sensing ([http://www.scienceshareware.com/bg-current-monitoring.htm how can I stop my motor from burning up]) [http://www.eetimes.com/document.asp?doc_id=1279404 more advanced tutorial] [http://www.romanblack.com/current.htm circuit] * [http://www.learnabout-electronics.org/Resistors/resistors_20.php Series and parallel resistance] [http://www.electronics-tutorials.ws/resistor/res_5.html another tutorial] [https://www.brown.edu/Departments/Engineering/Courses/En123/CirRevFiles/Resistance2.htm exercises] * **EXERCISE**: Use a multimeter to measure resistance * Power dissipation (or why you don't want to be a fuse) * What is a [http://www.allaboutcircuits.com/textbook/semiconductors/chpt-3/introduction-to-diodes-and-rectifiers/ diode] * anode, cathode: controlling the direction of current flow * [https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds light emitting diodes] aka LEDs * Applications include indicators, [http://www.instructables.com/id/Simple-IR-proximity-sensor-with-Arduino/ proximity sensing] [http://bildr.org/2011/03/various-proximity-sensors-arduino/ tutorial] * [http://www.robotshop.com/blog/en/lidar-lite-laser-rangefinder-simple-arduino-sketch-of-a-180-degree-radar-15284 LIDAR distance sensing] == Experiments == [[Image(http://www.ladyada.net/images/pshield/miniproto_t.jpg, align=right)]]Your kit includes a variety of electronic components that you can experiment with including connecting them to your Arduino computer. The kit also includes a solderless breadboard that lets you build electronic circuits quickly and easily without having to use a soldering iron. Please read the tutorial on how to [https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard use a breadboard and jumper wires to make circuits] Your kit also includes an Arduino protoshield: a circuit board with pass-through connectors that you can stack onto your Arduino computer to power and control your electrical circuits. Please read the [https://learn.adafruit.com/downloads/pdf/adafruit-proto-shield-arduino.pdf protoshield tutorial] on how to use your protoshield and solderless breadboard to connect sensors and actuators to your Arduino computer. * Connect jumper wires to +5v and Gnd connections and measure the voltage with your multimeter * Connect +5v and Gnd through a 270-ohm series resistor and an LED to make it light up * [https://learn.sparkfun.com/tutorials/sik-experiment-guide-for-arduino---v32/experiment-1-blinking-an-led Blink an LED]: connect a 270-ohm series resistor and an LED between an Arduino digital pin and Gnd and make it blink * [https://learn.sparkfun.com/tutorials/sik-experiment-guide-for-arduino---v32/experiment-4-driving-multiple-leds Multiple LEDs]: connect a bunch of Arduino pins, resistors, and LEDs to make a festive light display * Using a multimeter, measure the voltage across a series resistor in a circuit and calculate the current being used by the circuit.