Overview:
Up to now, my primary experience has been programming. It’s time to take a leap into electronics with circuit building. What will be interesting is integrating the Arduino board with C++ programming. Within the inventr.io 30 Days Lost in Space, Day 2 lesson introduces many new concepts. The component names are familiar, but I’ve never had to understand the details.
This post introduces each electronic component needed for first project (lighting up LED light on breadboard). The next post will be specifics to make the LED steadily light up. Post after that will be integration of programming, where we get LED to blink.
A USB cable connects (and delivers power) from computer to Arduino board. 5 volts of power can transfer from Arduino board to breadboard. Until now, my knowledge is limited to small batteries – 1.5 volts and 9 volts.
Terms used in measuring electricity
Current: Directional flow of electricity in the circuit
Voltage: Commonly 5V or 3.3V (on board). USB is 5V and barreljack is 9 to 12 volts
Analogy of water in a pipe: Pipe = wires; Water = electricity. Voltage is electrical pressure, which will get water out of the pipes. 3.3 volts are lower electrical pressure than 5 volts.
The A/C wall socket outputs 110 volts
Batteries have different voltages: 1.5; 9; 12
Tip: Always check components to ensure can be connected to 3.3 volts or 5 volts. An overvoltage can cause damage to components. An undervoltage can cause component to not run as intended
Amps (Ampere): Measures electric current. For example, how much water can I collect in a bucket in one second. The higher the ampere, in a charger, the more quickly it will likely to charge.
Note: Arduino board can only supply 40mA or 0.04A per pin
Components with higher current draw, or Amps, should be connected to an external power source (eg battery or power adapter).
Watts (wattage – a unit of power):
In our circuit, electricity converted to energy.
Energy / Power = Watts (W)
Formula is: P (Watts) = I (Amperes) times V (Volts)
Water formula is: P (Force of water hitting you) = I (Amount of water in 1 second) times V (Water Pressure)
Summary: Voltage (V) is electric current pressure. Amperes (I) is amount of electricity produced by the current per second. Wattage (P) is how strong is the power produced by current.
Volts:
Flow (direction) of power:
I have basic understanding to know, when inserting batteries, you match the positive (+) and negative (-) ends. It’s good practice to remove batteries from devices if not using for a while – it can corrode.
Breadboard
Rectangular plastic block, under-laid with metal strips, strategically mapped out with holes, allowing for rapid circuit building (ideally from a schematic). Has some limitations, but you don’t need to solder. Orientation of breadboard in my setup is portrait mode, positioned to the right of the Arduino HERO, and both attached to underlying plexi-board.
The following image shows a breadboard, in portrait orientation, that came with the inventr.io kit.
Power lines/rails are the vertical red and blue lines shown on left and ride side of breadboard. Red denotes positive charge and blue denotes negative/ground. Grouping of 5 holes – why. Power runs the length of the power line. Left and right power rails can be connected with jumper wires. Attaching a wire from Arduino 5 volt port, into any hole, would power the entire rail.
Terminal strips are the horizontal rows (aka components lines), for example: row 1, from column a to e. They are all grouped into 5 holes (named A – G and F – J). Columns of the group are marked with numbers.
Down the middle is just plastic, but it’s relevant, as I’ve seen components that have pins straddling left and right side of the board. You may have a component with a DIP (Dual Inline Package) – one set of pins will straddle each side. It also prevents IC’s from overheating.
There are different sizes of breadboards. Mine is the half-size, with 30 columns.
Tip #1: Use the power lines/rails. Positive (Red) to first row of horizontal row and Negative (Black ) to second horizontal row. I can connect (using jumper cables) the power lines/rails to one power source – one Row (Red to the other side) and the next Row (Black to the other side).
Tip #2: Avoid using all legs of components on a single terminal strip. Avoid this, as you can create a short circuit by having an empty pin on a terminal strip.
Tip #3: Always put the IC (Integrated Circuit) on the center part of the board – straddling pins on each side. Avoid short circuits.
Bus strips are not depicted, I don’t think they are on my particular breadboard
How NOT to break my HERO Board
Current limit of IO Pins is: 40 mA (Milliamp) or .04 A
Limit of barrel jack is 20 volts
HIGH = 5 volts
OHMS Law: Voltage = current times resistance (V = I * R)
For example (voltage is 5 and resistance about 25): 5 = I * 25 (Ohms for each IO pin – based on hardware specs)
I = 5 / 25 = .2A = 200 mA
200 mA is 5 times more than 4o mA, therefore pin/board will be fried
I also don’t want to attach devices which draw more power than the pin can provide. For example, if a pin is 40 mA, then I shouldn’t attach 5 motors each with 10 mA.
Attaching a battery. Positive (red) goes to VIN (Voltage In) and Negative (black) goes to GND (Ground)
Don’t attach barrel connector and USB connector at same time – can overload power and fry the board
HERO Board Anatomy
Main processor chip is the: ATMega 328p
USB Jack: goes to computer USB port
Reset button (next to USB jack). Reboots the board and clears memory.
Barrel jack (power) can be used for external power supply (5V to 20V adaptor). 9V (2A) is recommended.
Type B USB Cable connects USB jack to computer, and receives 5 volts of power from computer
4 LEDS on board: ON; RX; TX; L
-ON – power is on; L – onboard LED turned on by Arduino software; TX (transmit) and RX (receive) – communication between HERO board and another device
Power section of board: Unused pin (for future); 5V (5 Volts); REST (Reset pin – for an external reset button); 3.3V (3.3 Volts); GND pins (2 ground pins) – exit point of electricity in our circuit; VIN (Voltage Input) – additional option for powering up HERO board.
Note: There is an IOREF pins on my board, which is used for XXX. Also, my board only have one 5V pin
Analog signals can be measured. We have a section on board called Analog IN, with pins A0 thru A5. Analog components like potentiometers, sensors
Digital is either ON or OFF. Eg 1 or 0. Eg HIGH or LOW
We have 13 digital pins. Digital input or output of a component. Serial communication pins are 0 (Rx) and 1 (Tx), for communication with other serial devices (eg bluetooth and WiFi modules)
PWM (Pulse width modulation) enabled pins are marked on board with a squiggle next to number. These are commonly known as analog out – eg LEDs and motors
Resistor
Calculation of resistor
LED (Light Emitting Diode)
Containers for components
Anode
Cathode
Cables (including color)
Connecting Pins between Arduino and breadboard
Schematic map
Power connection on Arduino board
REFERENCE
https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard/anatomy-of-a-breadboard