Vous êtes sur la page 1sur 36

REKA BENTUK ELEKTRONIC

ARDUINO UNO Hardware (Board)


REKA BENTUK ELEKTRONIC
ARDUINO UNO Hardware (Board)

Understanding Arduino UNO Hardware Design


How Arduino works from an electronic design perspective. However, understanding
hardware design helps you to make the next step in the Arduino journey. A good grasp of
the electronic design of your Arduino hardware will help you learn how to embed an
Arduino in the design of a final product, including what to keep and what to omit from
your original design.
Components Overview
The PCB design of the Arduino UNO uses SMD (Surface Mount Device) components. I
entered the SMD world years ago when I dug into Arduino PCB design while I was a part of
a team redesigning a DIY clone for Arduino UNO.
Integrated circuits use standardized packages, and there are families for packages.
The dimensions of many SMD resistors, capacitors, and LEDs are indicated by package
codes such as the following:

SMD package code for discrete components such as resistors, capacitors, and inductors.

Arduino UNO Hardware


Most packages are generic and can be used for different parts with different functionality.
The SOT-223 package, for example, can contain a transistor or a regulator.

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

Arduino UNO Hardware


Arduino UNO System Overview
Before we can understand the UNO's hardware, we must have a general overview of the system
first.
After your code is compiled using Arduino IDE, it should be uploaded to the main microcontroller of
the Arduino UNO using a USB connection. Because the main microcontroller doesn’t have a USB
transceiver, you need a bridge to convert signals between the serial interface (UART interface) of the
microcontroller and the host USB signals.
The bridge in the latest revision is the ATmega16U2, which has a USB transceiver and also a serial
interface (UART interface).
To power your Arduino board, you can use the USB as a power source. Another option is to use a DC
jack. You may ask, “if I connect both a DC adapter and the USB, which will be the power source?”
The answer will be discussed in the “Power Part” section from this article.
To reset your board, you should use a push button in the board. Another source of reset should
be every time you open the serial monitor from Arduino IDE.
I redistributed the original Arduino UNO schematic to be more readable below. I advise you to
download it and open the PCB and schematic using Eagle CAD while you are reading this article.

Redistributed version of the original Arduino schematic.

Arduino UNO Hardware


The Microcontroller
It is important to understand that the Arduino board includes a microcontroller, and this
microcontroller is what executes the instructions in your program. If you know this, you
won't use the common nonsense phrase "Arduino is a microcontroller" ever again.
The ATmega328 microcontroller is the MCU used in Arduino UNO R3 as a main controller.
ATmega328 is an MCU from the AVR family; it is an 8-bit device, which means that its data-
bus architecture and internal registers are designed to handle 8 parallel data signals.
ATmega328 has three types of memory:
Flash memory: 32KB nonvolatile memory. This is used for storing application, which
explains why you don't need to upload your application every time you unplug arduino from
its power source.
SRAM memory: 2KB volatile memory. This is used for storing variables used by the
application while it's running.
EEPROM memory: 1KB nonvolatile memory. This can be used to store data that must be
available even after the board is powered down and then powered up again.
Let us briefly go over some of this MCU's specs:
Packages:
This MCU is a DIP-28 package, which means that it has 28 pins in the dual in-line package.
These pins include power and I/O pins. Most of the pins are multifunctional, which means
that the same pin can be used in different modes based on how you configure it in the
software. This reduces the necessary pin count, because the microcontroller does not
require a separate pin for every function. It can also make your design more flexible,
because one I/O connection can provide multiple types of functionality.
Other packages of ATmega328 are available like TQFP-32 SMD package (Surface Mount
Device).

Two different packages of the ATmega328


Power:
The MCU accepts supply voltages from 1.8 to 5.5 V. However, there are restrictions on the
operating frequency; for example, if you want to use the maximum clock frequency (20
MHz), you need a supply voltage of at least 4.5 V.
Digital I/O:
This MCU has three ports: PORTC, PORTB, and PORTD. All pins of these ports can be used for
general-purpose digital I/O or for the alternate functions indicated in the pinout below. For
example, PORTC pin0 to pin5 can be ADC inputs instead of digital I/O.
There are also some pins that can be configured as PWM output. These pins are marked
with “~” on the Arduino board.

Arduino UNO Hardware


Note: The ATmega168 is almost identical to the ATmega328 and they are pin compatible. The difference is
that the ATmega328 has more memory—32KB flash, 1KB EEPROM, and 2KB RAM compared to the
ATmega168's 16KB flash, 512 bytes EEPROM, and 1KB RAM.

ATmega168 pinout with Arduino labels; the ATmega168 and ATmega328 are pin compatible.

Arduino UNO Hardware


Arduino UNO R3 pinout.
ADC Inputs:
This MCU has six channels—PORTC0 to PORTC5—with 10-bit resolution A/D converter. These pins are
connected to the analog header on the Arduino board.
One common mistake is to think of analog input as dedicated input for A/D function only, as the header in the
board states ”Analog”. The reality is that you can use them as digital I/O or A/D.

Arduino UNO Hardware


ATmega328 block diagram.

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.

Internal register settings for selecting the Vref source.


UART Peripheral:
A UART (Universal Asynchronous Receiver/Transmitter) is a serial interface. The ATmega328
has only one UART module.
The pins (RX, TX) of the UART are connected to a USB-to-UART converter circuit and also
connected to pin0 and pin1 in the digital header. You must avoid using the UART if you’re
already using it to send/receive data over USB.

Arduino UNO Hardware


SPI Peripheral:
The SPI (Serial Peripheral Interface) is another serial interface. The ATmega328 has only
one SPI module.
Besides using it as a serial interface, it can also be used to program the MCU using a
standalone programmer. You can reach the SPI's pins from the header next to the MCU in
the Arduino UNO board or from the digital header as below:
11<->MOSI
12<->MISO
13<->SCK

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.

Arduino UNO R3 MCU part.

Arduino UNO Hardware


Returning to the electronic design, the microcontroller section has the following:
ATmega328-PU: The MCU we just talked about.
IOL and IOH (Digital) Headers: These headers are the digital header for pins 0 to 13 in addition to
GND, AREF, SDA, and SCL. Note that RX and TX from the USB bridge are connected with pin0 and
pin1.
AD Header: The analog pins header.
16 MHz Ceramic Resonator (CSTCE16M0V53-R0): Connected with XTAL2 and XTAL1 from the MCU.
Reset Pin: This is pulled up with a 10K resistor to help prevent spurious resets in noisy
environments; the pin has an internal pull-up resistor, but according to the AVR Hardware Design
Considerations application note (AVR042), “if the environment is noisy, it can be insufficient and
reset may occur sporadically.” Reset occurs if the user presses the reset button or if a reset is issued
from the USB bridge. You can also see the D2 diode. The role of this diode is described in the same
app note: “If not using High Voltage Programming it is recommended to add an ESD protection diode
from RESET to Vcc, since this is not internally provided due to High Voltage Programming”.
C4 and C6 100nF Capacitors: These are added to filter supply noise. The impedance of a capacitor
decreases with frequency:
Xc = 12πfC
The capacitors give high-frequency noise signals a low-impedance path to ground. 100nF is the most
common value. Read more about capacitors in the AAC textbook.
PIN13: This is connected to the SCK pin from the MCU and is also connected to an LED. The Arduino
board uses a buffer (the LMV358) to drive the LED.
ICSP (In-Circuit Serial Programming) Header: This is used to program the ATmega328 using an
external programmer. It’s connected to the In-System Programming (ISP) interface (which uses the
SPI pins). Usually, you don’t need to use this way of programming because bootloader handles the
programming of the MCU from the UART interface which is connected using a bridge to the USB. This
header is used when you need to flash the MCU, for example, with a bootloader for the first time in
production.

The USB-to-UART Bridge

Arduino USB bridge part.

Arduino UNO Hardware


As we discussed in the “Arduino UNO System Overview” section, the role of the USB-to-UART
bridge part is to convert the signals of USB interface to the UART interface, which the ATmega328
understands, using an ATmega16U2 with an internal USB transceiver. This is done using special
firmware uploaded to the ATmega16U2.
From an electronic design perspective, this section is similar to microcontroller section. This MCU
has an ICSP header, an external crystal with load capacitors (CL), and a Vcc filter capacitor.
Notice that there are series resistors in the D+ and D- USB lines. These provide the proper
termination impedance for the USB signals. Here is some further reading about these resistors:
Why USB data series resistors
USB Developers FAQ
Z1 and Z2 are voltage-dependent resistors (VDRs), also called varistors. They are used to protect
the USB lines against ESD transients.
The 100nF capacitor connected in series with the reset line allows the Atmega16U2 to send a reset
pulse to the Atmega328. You can read more about this capacitor here.
The Power
For a power source, you have the option of using the USB or a DC jack. Now it’s time to answer the
following question: “If I connect both a DC adapter and the USB, which will be the power source?”
The 5V regulator is the NCP1117ST50T3G and the Vin of this regulator is connected via DC jack
input through the M7 diode, the SMD version of the famous 1N4007 diode (PDF). This diode
provides reverse-polarity protection.
The output of the 5V regulator is connected to the rest of 5V net in the circuit and also to the input
of the 3.3V regulator, LP2985-33DBVR. You can access 5V directly from the power header 5V pin.
Another source of 5V is USBVCC which is connected to the drain of an FDN340P, a P-channel
MOSFET, and the source is connected to the 5V net. The gate of the transistor is connected to the
output of an LMV358 op-amp used as a comparator. The comparison is between 3V3 and Vin/2.
When Vin/2 is larger, this will produce a high output from the comparator and the P-channel
MOSFET is off. If there is no Vin applied, the V+ of the comparator is pulled down to GND and Vout
is low, such that the transistor is on and the USBVCC is connected to 5V.

Power source switching mechanism.

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.

Arduino UNO Hardware


The last thing I'll talk about is the power protection that is provided in Arduino UNO.
As mentioned above, VIN from a DC jack is protected from reverse polarity by using a serial M7
diode in the input. Be aware that the VIN pin in the power header is not protected. This is
because it is connected after the M7 diode. Personally, I don’t know why they decided to do that
when they could connect it before the diode to provide the same protection.

VIN pin from power header.

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!

Arduino UNO Hardware


Arduino UNO Hardware
Breadboard
Introduction of Breadboard
Breadboards are one of the most fundamental pieces when learning how to build circuits.
In this tutorial, you will learn a little bit about what breadboards are, why they are called
breadboards, and how to use one. Once you are done you should have a basic
understanding of how breadboards work and be able to build a basic circuit on a
breadboard.

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!

A wire-wrap circuit (image courtesy of Wikipedia user Wikinaut)


What’s in a Name?
When you picture a breadboard in your head, you may envision a big piece of wood and a
large loaf of freshly baked bread. You wouldn’t be too far off either.

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.

A circuit built on a solderless breadboard


Anatomy of a Breadboard

The major features of a Breadboard

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.

A single strip of conductive metal removed from the above


breadboard.

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.

Are there different kinds of breadboards?


Modern breadboards are made from plastic, and come in all shapes, sizes, and even
different colors. While larger and smaller sizes are available, the most common sizes you
will probably see are "full-size," "half-size," and "mini" breadboards. Most breadboards
also come with tabs and notches on the sides that allow you to snap multiple boards
together. However, a single half-sized breadboard is sufficient for many beginner-level
projects.

What is a "solderless" breadboard?


Technically, these breadboards are called solderless breadboards because they do not
require soldering to make connections. Soldering (pronounced SAW-der-ing) is a method
where electronic components are joined together by melting a special type of metal called
solder. Electronic components can be soldered directly together, but more commonly they
are soldered onto printed circuit boards (PCBs). PCBs are what you will see if you take the
cover off many electronic devices, like a computer or cell phone. Frequently, engineers will
use solderless breadboards to prototype and test a circuit before building the final,
permanent design on a PCB. This image shows the same circuit (battery, switch, resistor, and
LED) built three different ways: on a solderless breadboard (left), with the components
soldered directly together (middle), and on a printed circuit board (right):
Which electronic parts are compatible with breadboards?
So, how do electronic components fit into a breadboard? Many electronic components
have long metal legs called leads (pronounced "leeds"). Sometimes, shorter metal legs
are referred to as pins instead. Almost all components with leads will work with a
breadboard (to learn more about these components and which types work with a
breadboard, see the Advanced section).

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.

Do I need any tools to use a breadboard?


You do not need any special tools to use a solderless breadboard. However, many
electronic components are very tiny, and you may find them difficult to handle. A pair of
miniature needle nose pliers or tweezers may make it easier to pick up small
components.
What is inside a breadboard?
The leads can fit into the breadboard because the inside of a breadboard is made up of
rows of tiny metal clips. This is what the clips look like when they are removed from a
breadboard.

When you press a component's lead into a breadboard hole, one of these clips grabs onto it.

Some breadboards are actually made of transparent


plastic, so you can see the clips inside.

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.“

All of the highlighted holes are in "row 12."

"Hole C12" is where column C intersects row 12.


What do the colored lines and plus and minus signs mean?
What about the long strips on the side of the breadboard, highlighted in yellow
here?

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).

Are all breadboards labeled the same way?


Note that exact configurations might vary from
breadboard to breadboard. For example, some
breadboards have the labels printed in "landscape"
orientation instead of "portrait" orientation. Some
breadboards have the buses broken in half along the
length of the breadboard (useful if you need to
supply your circuit with two different voltage levels).
Most "mini" breadboards do not have buses or labels
printed on them at all.
There may be small differences in how the buses are labeled from breadboard to breadboard.
Some breadboards only have the colored lines and no plus (+) or minus (-) signs. Some
breadboards have the positive buses on the left and the negative buses on the right, and on
other breadboards, this is reversed. Regardless of how they are labeled and the left⁄right
positions, the function of the buses remains the same.
LEDs
have a positive side (called the anode) and a negative side (called the cathode). The metal lead for
the anode is longer than the lead for the cathode. The cathode side also usually has a flat edge on
the plastic part of the LED.

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.

Integrated circuits, or ICs for short (sometimes also called "chips")


are black rectangular pieces with two rows of pins. They typically have a notch or hole at
one end that tells you which way is "up," so you do not put the IC in the breadboard
upside-down. See the advanced section on integrated circuits to learn more.
Directions on the Science Buddies website will almost always specify which way a component
should be facing; for example, "make sure the gray stripe on the diode is facing toward the
positive bus" or "make sure the writing on the transistor is facing to the left." However, some
advanced electronics projects may assume you know how to connect certain components
properly.

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

This connector is a single-row, 40-pin, straight male header strip


that can be cut or broken into smaller strips. Both sides of the
strip are long, allowing for unique connections that cannot be
made with standard male header strips. For example, this
header can be used as a female-to-male adapter, and both sides
are compatible with wire wrap.
Light Dependent Resistor

Light Dependent Resistor


An LDR is a component that has a (variable) resistance that
changes with the light intensity that falls upon it. This allows
them to be used in light sensing circuits.

LDR Circuit Symbol

Variation in resistance with changing light intensity


The most common type of LDR has a resistance that falls with an increase in the light
intensity falling upon the device (as shown in the image above). The resistance of an
LDR may typically have the following resistances:
Daylight
= 5000Ω
Dark
= 20000000Ω

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.

Example - LDR controlled Transistor circuit

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)

Potentiometer (Adjustable Resistor)

Circuit symbol of a potentiometer as typically drawn in Europe.

One of the symbols used on circuit diagrams to represent a


potentiometer, a type of resistor that is used as a voltage divider. The
image is oriented for horizontal presentation.

Drawing of potentiometer with case cut away, showing


parts: (A) shaft, (B) stationary carbon composition
resistance element, (C) phosphor bronze wiper, (D) shaft
attached to wiper, (E, G) terminals connected to ends of
resistance element, (F) terminal connected to wiper. A
mechanical stop (H) prevents rotation past end points
RGB LED

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

A buzzer or beeper is an audio signalling device, which may be mechanical,


electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beepers
include alarm devices, timers, and confirmation of user input such as a mouse click or
keystroke.

What is the difference between active and passive buzzer?


An active buzzer will generate a tone using an internal oscillator, so all that is needed is a
DC voltage. A passive buzzer requires an AC signal to make a sound. It is like an
electromagnetic speaker, where a changing input signal produces the sound, rather than
producing a tone automatically.

Here’s the working principle of active buzzer:


Because active buzzer has integrated amplify sampling circuit and resonance
system, when DC power input pass through active buzzer, it will make resonance
device generate sound signal. We can see the schematic diagram below for the
working principle of active buzzer:

The working principle of passive buzzer is:


When square wave signal pass through the buzzer, its resonance device will
transform the square wave signal input into sound signal output. Below is the
schematic diagram for the working principle of passive buzzer:

Vous aimerez peut-être aussi