Académique Documents
Professionnel Documents
Culture Documents
SMD package code for discrete components such as resistors, capacitors, and inductors.
In the table below, you can see a list of some components in the Arduino UNO with their
respective package:
Part Package
NCP1117ST50T3G 5V regulator SOT223
LP2985-33DBVR 3.3V regulator SOT753/SOT23-5
M7 diode SMB
LMV358IDGKR dual channel amplifier MSOP08
FDN340P P-channel MOSFET transistor SOT23
ATmega16U2-MU MLF32
ATmega168 pinout with Arduino labels; the ATmega168 and ATmega328 are pin compatible.
As shown in the diagram above (via the red traces), the pins related to the A/D unit are:
AVCC: The power pin for the A/D unit.
AREF: The input pin used optionally if you want to use an external voltage reference for ADC
rather than the internal Vref. You can configure that using an internal register.
TWI:
The I2C or Two Wire Interface is an interface consisting of only two wires, serial data, and a
serial clock: SDA, SCL.
You can reach these pins from the last two pins in the digital header or pin4 and pin5 in the
analog header.
Other Functionality:
Other functionality is included in the MCU, such as that offered by the timer/counter
modules. You may not be aware of the functions that you don't use in your code. You can
refer to the datasheet for more information.
The LP2985-33DBVR is the 3V3 regulator. Both the 3V3 and 5V regulators are LDO (Low Dropout),
which means that they can regulate voltage even if the input voltage is close to the output voltage.
This is an improvement over older linear regulators, such as the 7805.
When you use USB as a power source, and to provide protection for your USB port, there is a
PTC (positive temperature coefficient) fuse (MF-MSMF050-2) in series with the USBVCC. This
provides protection from overcurrent, 500mA. When an overcurrent limit is reached, the PTC
resistance increases a lot. Resistance decreases after the overcurrent is removed.
Reading the Rugged Circuits post about protection in Arduino is very useful.
You should now be more familiar with the Arduino UNO's electronic design and have a better
understanding of its hardware. I hope this helps your design projects in the future!
History
If you wanted to build a circuit prior to the 1960s, chances are you would have used a
technique called wire-wrap. Wire wrap is a process that involves wrapping wires around
conductive posts attached to a perfboard (a.k.a. a protoboard). As you can see, the process
can get rather complex very quickly. Although this method is still used today, there is
something that makes prototyping much easier, breadboards!
Bread on a breadboard
So why do we call this electronic “circuit builder” a breadboard? Many years ago, when
electronics were big and bulky, people would grab their mom’s breadboard, a few nails or
thumbtacks, and start connecting wires onto the board to give themselves a platform on
which to build their circuits.
Circuit on an “original” breadboard (image courtesy of mischka and their awesome literal
breadboard tutorial)
Since then, electronic components have gotten a lot smaller, and we’ve come up with
better ways to connect circuits, making moms all over the world happy to have their
breadboards back. However, we are stuck with the confusing name. Technically, these
are still breadboards, but this discussion is going to be on modern, “solderless”
breadboards.
Why Use Breadboards?
An electronics breadboard (as opposed to the type on which sandwiches are made) is
actually referring to a solderless breadboard. These are great units for making temporary
circuits and prototyping, and they require absolutely no soldering.
Prototyping is the process of testing out an idea by creating a preliminary model from
which other forms are developed or copied, and it is one of the most common uses for
breadboards. If you aren’t sure how a circuit will react under a given set of parameters,
it’s best to build a prototype and test it out.
For those new to electronics and circuits, breadboards are often the best place to start.
That is the real beauty of breadboards–they can house both the simplest circuit as well as
very complex circuits. As you’ll see later in this tutorial, if your circuit outgrows its current
breadboard, others can be be attached to accommodate circuits of all sizes and
complexities.
Another common use of breadboards is testing out new parts, such as Integrated circuits
(ICs). When you are trying to figure out how a part works and constantly rewiring things,
you don’t want to have to solder your connections each time.
As mentioned, you don’t always want the circuit you build to be permanent. When trying
to duplicate a customer’s problem, SparkFun’s Technical Support team will often use
breadboards to build, test, and analyze the circuit. They can connect the parts the
customer has, and once they’ve gotten the circuit setup and figured out the problem,
they can take everything apart and put it aside for the next time they need to do some
troubleshooting.
The best way to explain how a breadboard works is to take it apart and see what’s inside.
Using a smaller breadboard it’s easier to see just how they function.
Terminal Strips
Here we have a breadboard where the adhesive backing has been removed. You can see lots
of horizontal rows of metal strips on the bottom of the breadboard.
Mini Breadboard from the top (left) and the same breadboard flipped over with the
adhesive back removed (right).
The tops of the metal rows have little clips that hide under the plastic holes. These clips
allow you to stick a wire or the leg of a component into the exposed holes on a
breadboard, which then hold it in place.
Once inserted that component will be electrically connected to anything else placed in that
row. This is because the metal rows are conductive and allow current to flow from any point
in that strip.
Notice that there are only five clips on this strip. This is typical on almost all breadboards.
Thus, you can only have up to five components connected in one particular section of the
breadboard. The row has ten holes, so why can you only connect five components? You’ll
also notice that each horizontal row is separated by a ravine, or crevasse, in the middle of the
breadboard. This ravine isolates both sides of a given row from one another, and they are not
electrically connected. We’ll discuss the purpose of this in just a bit, but, for now, just know
that each side of a given row is disconnected from the other, leaving you with five spots for
components on either side.
Where does the name "breadboard" come from?
You might be wondering what any of this has to do with bread. The term breadboard
comes from the early days of electronics, when people would literally drive nails or
screws into wooden boards on which they cut bread in order to connect their circuits.
Luckily, since you probably do not want to ruin all your cutting boards for the sake of an
electronics project, today there are better options.
Breadboards are designed so you can push these leads into the holes. They will be held
in place snugly enough that they will not fall out (even if you turn the breadboard
upside-down), but lightly enough that you can easily pull on them to remove them.
When you press a component's lead into a breadboard hole, one of these clips grabs onto it.
Most breadboards have a backing layer that prevents the metal clips from falling out. The
backing is typically a layer of sticky, double-sided tape covered by a protective layer of
paper. If you want to permanently "stick" the breadboard to something (for example, a
robot), you just need to peel off the paper layer to expose the sticky tape underneath. In
this picture, the breadboard on the right has had its backing removed completely (so you
can see all the metal clips). The breadboard on the left still has its sticky backing, with one
corner of the paper layer peeled up.
Most breadboards have a backing layer that prevents the metal clips from falling out. The
backing is typically a layer of sticky, double-sided tape covered by a protective layer of
paper. If you want to permanently "stick" the breadboard to something (for example, a
robot), you just need to peel off the paper layer to expose the sticky tape underneath. In
this picture, the breadboard on the right has had its backing removed completely (so you
can see all the metal clips). The breadboard on the left still has its sticky backing, with one
corner of the paper layer peeled up.
Breadboard labels: rows, columns, and buses
What do the letters and numbers on a breadboard mean?
Most breadboards have some numbers, letters, and plus and minus signs written on
them. What does all that mean? While their exact appearance might vary from
breadboard to breadboard, the general purpose is always the same. These labels help
you locate certain holes on the breadboard so you can follow directions when building
a circuit. If you have ever used a spreadsheet program like Microsoft Excel® or Google
Sheets™, the concept is exactly the same. Row numbers and column letters help you
identify individual holes in the breadboard, just like cells in a spreadsheet. For example,
all of the highlighted holes are in "column C.“
These strips are typically marked by red and blue (or red and black) lines, with plus (+)
and minus (-) signs, respectively. They are called the buses, also referred to as rails, and
are typically used to supply electrical power to your circuit when you connect them to a
battery pack or other external power supply. You may hear the buses referred to by
different names; for example, power bus, positive bus, and voltage bus all refer to the
one next to the red line with the plus (+) sign. Similarly, negative bus and ground bus
both refer to one next to the blue (or black) line with the minus (-) sign. Sound
confusing? Use this table to help you remember—there are different ways to refer to the
buses, but they all mean the same thing. Do not worry if you see them referred to by
different names in different places (for example, in different Science Buddies projects or
other places on the internet). Sometimes you might hear "power buses" (or rails) used to
refer to both of the buses (or rails) together, not just the positive one.
Positive Negative
Power Ground
Plus sign (+) Minus sign (-)
Red Blue or black
Note that there is no physical difference between the positive and negative buses, and
using them is not a requirement. The labels just make it easier to organize your circuit,
similar to color-coding your wires.
How are the holes connected?
Remember that the inside of the breadboard is made up of sets of five metal clips. This
means that each set of five holes forming a half-row (columns A–E or columns F–J) is
electrically connected. For example, that means hole A1 is electrically connected to holes
B1, C1, D1, and E1. It is not connected to hole A2, because that hole is in a different row,
with a separate set of metal clips. It is also not connected to holes F1, G1, H1, I1, or J1,
because they are on the other "half" of the breadboard—the clips are not connected
across the gap in the middle (to learn about the gap in the middle of the breadboard, see
the Advanced section). Unlike all the main breadboard rows, which are connected in sets
of five holes, the buses typically run the entire length of the breadboard (but there are
some exceptions). This image shows which holes are electrically connected in a typical half-
sized breadboard, highlighted in yellow lines.
Buses on opposite sides of the breadboard are not connected to each other. Typically, to
make power and ground available on both sides of the breadboard, you would connect the
buses with jumper wires, like this. Make sure to connect positive to positive and negative to
negative (see the section on buses if you need a reminder about which color is which).
Diodes
are like one-way valves that only let electricity flow in one direction. They are usually
small cylinders marked with a band or stripe on one end (this is the direction electricity
can flow toward).
Capacitors
are components that can store electrical charge. Common "ceramic disc" capacitors (small
orange/tan circles) are not polarized, but several other types of capacitors are, and will
typically have arrow or minus signs pointing toward the negative lead.
Transistors
are like electronically controlled switches that can be used to turn things like motors and
lights on and off. Transistors generally have three pins. Putting a transistor in a
breadboard backwards will reverse the order of the pins and prevent it from working.
Transistors come in several different "packages," usually a black plastic body with small
writing on one side.
For some electronic components, direction does not matter. For example, jumper wires and
resistors work the same in both directions. Look closely at these two images. Even though
the jumper wire and resistor have been flipped around in the picture on the right (the jumper
wire has a black mark on one end so you can tell which end is which, and the resistor has
colored bands), the LED still lights up. Electrically, nothing has changed in the circuit.
Short circuits
Short circuits occur when "accidental" connections are made on a breadboard between two
components that are not supposed to be connected. This can happen from putting
components into the wrong rows or buses, or from letting exposed metal parts bump into
each other. For example, resistors and LEDs have long metal leads; if you are not careful,
these leads could bump into each other and cause a short circuit. If your circuit has
components with long, exposed leads, always make sure the leads are not touching each
other.
Depending on the circuit, sometimes short circuits are harmless. They may just prevent the
circuit from functioning properly until they are located and fixed. However, sometimes short
circuits can "burn out" components and cause permanent damage. Short circuits between
the power and ground buses are especially important to avoid, because they can get hot
enough to burn you and even melt the plastic on the breadboard! In this picture, the red
and black wires from a 4xAA battery pack have both been inserted into the ground bus,
instead of one into the ground bus and one into the power bus. This causes the breadboard
and wire insulation to start melting.
If you ever see or smell smoke when building a circuit, you probably have a short circuit. You
should immediately disconnect the battery pack.
Advanced
Integrated circuits (ICs)
Integrated circuits, or ICs for short (sometimes just referred to as "chips") are specialized circuits
that serve a huge variety of purposes, such as controlling a robot's motors or making LEDs respond
to music. Many ICs come in something called a dual in-line package, or DIP, meaning they have two
parallel rows of pins. The gap in the middle of a breadboard (between columns E and F) is just the
right width for an IC to fit, straddling the gap, with one set of pins in column E, and one set of pins in
column F. Projects that use ICs will always tell you to connect them to the breadboard in this
manner.
40 pin head connector
You can therefore see that there is a large variation between these figures. If you
plotted this variation on a graph you would get something similar to that shown by the
graph shown above.
Applications of LDRs
There are many applications for Light Dependent Resistors. These include:
Lighting switch
The most obvious application for an LDR is to automatically turn on a light at a certain
light level. An example of this could be a street light or a garden light.
Camera shutter control
LDRs can be used to control the shutter speed on a camera. The LDR would be used to
measure the light intensity which then adjusts the camera shutter speed to the
appropriate level.
The circuit shown above shows a simple way of constructing a circuit that turns on when it
goes dark. In this circuit the LDR and the other Resistor form a simple 'Potential Divider'
circuit, where the centre point of the Potential Divider is fed to the Base of the NPN
Transistor.
When the light level decreases, the resistance of the LDR increases. As this resistance
increases in relation to the other Resistor, which has a fixed resistance, it causes the voltage
dropped across the LDR to also increase. When this voltage is large enough (0.7V for a
typical NPN Transistor), it will cause the Transistor to turn on.
The value of the fixed resistor will depend on the LDR used, the transistor used and the
supply voltage.
Potentiometer (Adjustable Resistor)
An RGB LED is actually three LEDs, red, green, and blue inside one package. LEDs need to
be turned on and off very fast for dimming (changing the voltage across it does not work
like it does in incandescent bulbs).The on and off times are so fast that human vision does
not see a flicker on the LED and only the average value is perceived. Three PWM output
bits would normally be used so that the brightness of each of the three LEDs can be
controlled independently. In the mbed APIs, three PWMOuts would be used to control the
RGB LED. A PWM value of 0.0 would be off and a 1.0 full on for each color LED. This allows
a program to vary both the color and brightness level of the LED. Typically an RGB LED has
four pins. One common pin and one for each of the three LEDs. In the LED seen below, the
common pin is the longest pin. If hardware PWM pins are not available, SoftPWM can
produce PWM signals on any pin by using software with timer interrupts.
A voltage dropping resistor is needed to drop the output voltage of a digital logic signal to the
operating voltage of the LED. Typically they run around 2.2 volts, but can be higher. By
checking the current level in the LEDs data sheet, the value of the required dropping resistor
can be calculated so that it drops down the voltage by the required amount from the digital
logic output level (5 or 3.3V). Since the resistor is in series with the LED they both have the
same current. Resistor values are typically around 100-330 ohms. The three LEDs inside a
single RGB LED often have different operating voltages and current levels, so check the
datasheet. A red LED typically needs about 2 volts. The voltage drop tends to rise as the
frequency of the light wave increases. A blue LED may drop around 3 volts. The equations
used to compute the correct resistance for an LED can be found in this Wikipedia series
resistance formula or use this web page calculator. In some cases, the digital logic output
driver circuit might have an internal voltage drop when providing around 2-20ma current for
the typical small indicator LED and this could also reduce the value of the resistance used a
bit. Brighter high-power LEDs require higher current levels and special driver circuits.
Standard Buzzer