0% found this document useful (0 votes)
40 views

Digital Control System (BVM)

1) A digital control system samples a continuous-time control system's signals and converts them to discrete-time digital signals using analog-to-digital conversion. This allows a digital computer to implement the control algorithm. 2) A digital control system has advantages over analog systems like improved accuracy, easier implementation of complex algorithms, and reconfigurability. 3) Digital signals are represented by discrete values while analog signals are continuous, which impacts aspects like accuracy, processing, and transmission quality. Converters are needed to change between analog and digital domains.

Uploaded by

Rohit Jasoliya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Digital Control System (BVM)

1) A digital control system samples a continuous-time control system's signals and converts them to discrete-time digital signals using analog-to-digital conversion. This allows a digital computer to implement the control algorithm. 2) A digital control system has advantages over analog systems like improved accuracy, easier implementation of complex algorithms, and reconfigurability. 3) Digital signals are represented by discrete values while analog signals are continuous, which impacts aspects like accuracy, processing, and transmission quality. Converters are needed to change between analog and digital domains.

Uploaded by

Rohit Jasoliya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Digital Control System

A digital control system model can be viewed from different perspectives


including control algorithm, computer program, conversion between analog and
digital domains, system performance etc. One of the most important aspects is
the sampling process level. In continuous time control systems, all the system
variables are continuous signals. Whether the system is linear or nonlinear, all
variables are continuously present and therefore known (Available) at all times.
A typical continuous time control system is shown in Figure 1.1

Figure:1.1A typical closed loop continuous time control system


In a digital control system, the control algorithm is implemented in a digital
computer. The error signal is discretized and fed to the computer by using an A/D
(analog to digital) converter. The controller output is again a discrete signal which
is applied to the plant after using a D/A (digital to analog) converter. General
block diagram of a digital control system is shown in Figure 1.2.
e(t) is sampled at intervals of T. In the context of control and communication,
sampling is a process by which a continuous time signal is converted into a
sequence of numbers at discrete time intervals. It is a fundamental property of
digital control systems because of the discrete nature of operation of digital
computer. Figure 1.3 shows the structure and operation of a finite pulse width
sampler, where (a) represents the basic block diagram and (b) illustrates the
function of the same. T is the sampling period and p is the sample duration.
Figure1.2 General block diagram of a digital control system

Figure1.3 Basic structure and operation of a finite pulse width sampler


In the early development, an analog system, not containing a digital device like
computer, in which some of the signals were sampled was referred to as a sampled
data system. With the advent of digital computer, the term discrete-time system
denoted a system in which all its signals are in a digital coded form. Most practical
systems today are of hybrid nature, i.e. contains both analog and digital
components.
Before proceeding to any depth of the subject we should first understand the
reason behind going for a digital control system. Using computers to implement
controllers has a number of advantages. Many of the difficulties involved in
analog implementation can be avoided. Few of them are enumerated below.
1. Probability of accuracy or drift can be removed.
2. Easy to implement sophisticated algorithms.
3. Easy to include logic and nonlinear functions.
4. Reconfigurability of the controllers.

Differences between Analog and Digital Signal

Key Characteristics Analog Signal Digital Signal

Data Value Continuous values Limited to distinct set of


across time spanC values across discreet time
intervals

Wave Type Sine Wave Square Wave

Representation

Polarity Both negative and Only positive values


positive values

Processing Offered Easy Quite complex

Accuracy More Accurate Less Accurate

Decoding Difficult to understand Easy to understand and


and decode decode

Security Not Encrypted Encrypted

Bandwidth Low High

Parameters Amplitude, frequency, Bit rate, bit interval, etc.


Associated phase, etc.

Transmission Quality Deterioration due to Almost zero interference of


noise interference noise resulting in good
transmission quality

Data Storage Data is stored in wave Data is stored in binary bit


form form

Data Density More Less


Key Characteristics Analog Signal Digital Signal

Power Consumption More Less

Transmission Mode Wire or Wireless Wire

Impedance Low High

Transmission Rate Slow Fast

Hardware Offers No flexibility, Offers flexibility, very


Implementation Less adjustable for adjustable to range of use
Adaptability range of use

Application Audio and Video Computing and Digital


transmission Electronics

Instruments Give many Never cause any


Application observational errors observational errors

Converting Analog To Digital Signal And Vice-versa

Digital signals fulfilled the necessity of storing and retrieving the signals. But in order to listen
or see the stored signal, the digitized signal had to be converted into analog signals. This is the
reason we use analog-to-digital and digital-to-analog converters in many of our daily used
apparatus like phones, TV, iPod, etc.

Analog-to-Digital Converter
ADC is an Analog-to-Digital converter. Continuous varying signal data is converted to discreet
values at discreet time intervals using an ADC device. Like the highest peak of a sound wave
is represented as the highest discreet value in the digital scale. Similarly, the analog value
captured at the selected time interval is converted to the appropriate value on the digital scale.
These rounding off values to the appropriate discreet value on the digital scale injects
conversion errors. But if the discreet values are selected properly, these deviation errors can be
minimized.

While talking on our mobiles, the ADC in the phone converts what we speak from analog-to-
digital signals. At the other end, in order to listen to the voice reaching the other microphone,
DAC converts the digitized talk to analog signals for the person to listen.

ADC Method:
 The Pulse Code Modulation (PCM) method is used to convert analog-to-digital signals.
 Basically, Analog signal conversion has main 3 steps – Sampling, Quantizing,
Encoding.
 Multiple discreet sample values are taken and a continuous signal stream is generated.
 A good sample rate (or sampling frequency) is required for good quality conversion.
 The sampling rate is the number of samples per unit (sec) taken from an analog signal
that is continuous to convert it to a digital signal, which is captured at discreet time
intervals.
 The sample rate differs from medium to medium. The sample rate of 8KHz for
telephones, for VoIP rate of 16KHz, for CD and MP3 rate of 44KHz is considered good.
 Sampling gathers the variation of data into discreet time signals.
 The step of quantizing rounds of the amplitude of the sample gathered to a manageable
number of levels that can be represented in binary orbit form.
 Encoding is done next to convert each value level at the specified discreet time
intervals.
 The accuracy of the digital sample depends on the sampled analog signal. The sampling
rate is a very important parameter that impacts the quality during the conversion of the
analog-to-digital signals.
 Digital values take only discreet values, unlike analog signals. There can be a difference
when the actual value has to be modified to the closest discreet value allowed in digital
mode. This round-off done results in some deviation from the actual value and is
referred to as the quantization error.
 So, the converted sample is always not the exact copy of the original signal.
Digital-to-Analog Converter

DAC is a Digital-to-Analog converter. An abstract digital data stored needs to be converted to


analog to be used in real life. These devices convert the binary digital code to a continuous
analog signal. The music stored in a digital apparatus like iPod is in digital mode. In order to
listen to the music, a DAC device is used to convert it to an analog signal.

The key factors impacting the conversion are the resolution, conversion time, and reference
value.

 The resolution of DAC is the smallest output increment that it can produce.
 DAC settling time or conversion time is the time from the input code application until
the output comes and is stable around the final value. A deviation from the final value
within the allowed error band is accepted.
 The reference voltage (Vref) is the highest voltage value that the DAC can reach. The
DAC chosen for audio output requires low frequency but a high resolution. Low
resolution and high-frequency DAC are required for image, video, visual output.

Analog Vs Digital Signal – Example Applications In Real Life

Let us take a real-life example to explain the Analog and Digital application in the system.

Original technology used in TV and Radio was analog. The brightness, volume, color were all
represented by the value of the frequency, amplitude, and phase of the analog signal. Noise and
interference made the signal weak and the final picture was snowy and the sound was very
erratic. Digital signals paved the way to improving the quality.

In the debate, Analog vs digital Audio and Analog vs Digital television, the digital signals have
made an impeccable inroad. Digital signals have improved the quality of audio and videos in
the new apparatus like mobile, computers, IPAD, Television, etc.

TV relay–The starting point is the camera where pictures are shot to be relayed. The lights
captured by the sensors are analog. These are then converted to digital values. So, now the
picture captured is represented as streams 0 and 1. Now the next step is to transmit the image
from the TV station to our home TV.
The transmission is over cable if the connection in the case is of cable else it is transmitted
through the air. For this transmission, the digitized signals are converted to analog. After the
analog signal reaches our home, it is converted to digital for the home TV set to display the
picture on the screen. To reach us it is converted to analog so that the light can reach us to view
the image.

In real-life applications, this basic inter looping between digital and analog happens for us to
get the message in our computers, HD television, digital phones, camera, etc. All the discussed
phenomenon of signal distortion impacting the image and sound and their restoration is applied
in these apparatuses.
About Arduino
The Arduino Uno is a general purpose microcontroller programming and
prototyping platform that you can easily program to react to things going on in
the real world. You can also link between the real world and the virtual world by
connecting up your Arduino to the Internet, either sending data to the Internet or
responding to data on the Internet, or both. You can use it to sense almost
anything you can find an electronic sensor for, including light, temperature,
pressure, sound, even smell — if you consider environmental pollution to be a
smell. You can even build your own sensors. You can use its output capabilities
to sound alarms, open doors and windows, activate lights or motors — the
possibilities are almost endless. Arduino is used for prototyping ideas — getting
them half built and then trying out what works.

Figure1 The general purpose Arduino Uno prototyping board.


Arduino is made up of both hardware and software. The Arduino board is a
printed circuit board (PCB) designed to use a microcontroller chip as well as other
input and outputs. The board has many other electronic components that are
needed for the microcontroller to function or to extend its capabilities.
A microcontroller is a small computer contained in a single, integrated circuit or
computer chip. Microcontrollers are an excellent way to program and control
electronics. Microcontroller boards have a microcontroller chip and other useful
connectors and components that allow a user to attach inputs and outputs. Some
examples of devices with microcontroller boards are the Wiring board, the PIC,
and the Basic Stamp.
You write code in the Arduino software to tell the microcontroller what to to-do.
For example, by writing a line of code, you can tell a light-emitting diode (LED)
to blink on and off. If you connect a pushbutton and add another line of code, you
can tell the LED to turn on only when the button is pressed. Next, you may want
to tell the LED to blink only when the pushbutton is held down. In this way, you
can quickly build a behaviour for a system that would be difficult to achieve
without a microcontroller.

The Brains: ATmega328P microcontroller chip:


You can think of the microcontroller chip itself as the brains of the board. The
chip used in the Arduino Uno is the ATmega328P, made by Atmel. It’s the large,
black component in the center of the board. This chip is known as an integrated
circuit, or IC. It sits in a socket; if you were to remove it, it would look like the
one shown in Figure 2. This same chip can come in different forms, referred to
as packages. The one in an Arduino Uno is in a plated-through hole, or PTH,
package, named because of the way it makes contact with the board. Another
variation you may find is the Arduino Uno SMD, or surface mount device,
package, which is mounted on the surface of the board rather than in holes that
go through it. This chip is much smaller, but it is not replaceable, whereas the
PTH chip is. Apart from that, it functions exactly the same as the PTH and differs
only in looks.
Figure 2: An ATmega328P Microcontroller

Header sockets
The microcontroller socket connects all the legs of the ATmega328
microcontroller chip to other sockets, referred to as header sockets, which are
arranged around the edge of the board and are labelled for ease of use. These
black sockets are divided into three main groups: digital pins, analog input pins,
and power pins.
All these pins transfer a voltage, which can be either sent as output or received as
an input. Why are these pins important? They allow you to connect additional
circuitry to the board quickly and easily when prototyping with a breadboard and
to design additional boards, called shields that fit neatly on top of your Arduino
board . This same process of sending and receiving electrical signals is going on
inside modern computers. But because they are so advanced and refined
compared to a humble Arduino, it is difficult to directly link a computer
accustomed to digital signals (0s and 1s) to an electronic circuit that deals with a
range of voltages (0v to 5v in the ATmega328P’s case).
The Arduino is special because it can interpret these electric signals and convert
them to digital signals that your computer can understand and vice versa. It also
enables you to write a program using software on a conventional computer that
the Arduino IDE (integrated development environment) converts or compiles to
electrical signals that your circuit can understand. By bridging this gap, it is
possible to use a conventional computer’s benefits ease of use, user-friendly
interfaces, and code that is easy for humans to understand to control a wide range
of electronic circuits and even give them complex behaviours with relative ease.

Figure 3: An Arduino Uno with all the important parts labelled.

Digital pins
You use digital pins to send and receive digital signals. Digital implies that the
pins have two states: off or on. In electrical terms, these states translate to a value
of 0 or 5 volts, but no values in between.
Analog in pins
You use analog in pins to receive an analog value. An analog value is taken from
a range of values. In this case, the range is the same 0V to 5V as with the digital
pins, but the value can be at any point — 0.1, 0.2, 0.3, and so on.
What about analog out?
The shrewd ones among you may have noticed that there seem to be no analog
out pins. In fact, the analog out pins are there, but they’re hidden among the digital
pins marked as PWM using the ~ symbol. PWM stands for pulse-width
modulation, which is a technique you can use to give the impression of an analog
output using digital pins. The ~ symbol appears next to digital pins 3, 5, 6, 9, 10,
and 11, showing that you have six pins that are capable of PWM.

Power pins
You use the power pins to distribute power to inputs and outputs wherever power
is needed. Vin, which stands for voltage in, can be used to supply a voltage (V)
equal to the one supplied by the external supply jack (for example, 12V). You
can also use this pin to supply power to the Arduino from another source. GND
marks the ground pins, which are essential to complete circuits. There is also a
third ground by pin 13. All these pins are linked and share the same (called
common) ground. You can use 5V or 3.3V to supply a 5-volt or 3.3-volt power
supply, respectively, to components or circuits.

USB socket
To tell the microcontroller on the Arduino board what to do, you need to send a
program to it. On the Uno, you send programs primarily by a USB connection.
The large, metallic socket is a USB port for a USB A-B cable. This cable is similar
to the one used on your home printer or scanner, so you may find a few around
the house that can serve as handy spares. The Arduino uses the USB both for
power and to transfer data. Using a USB cable is perfect for low-power
applications and when data is being sent to or received from a computer.

Power socket
Next to the USB socket is another socket; this one is for power. This socket allows
you to power your Arduino from an external power supply. The supply could be
from an AC-to-DC adaptor (similar to those used on other consumer electronics),
a battery, or even a solar panel. The connector needed is a 2.1 mm center positive
plug. Center positive simply means that the plug has an outside and an inside that
fit the socket and that the inside of the plug must be positive. You should be able
to find this plug among the standard connectors that come with most power
supplies; otherwise, you can buy the connector and attach it to bare wires. If you
connect a power supply that is the opposite (center negative), it is known as
having a reverse polarity. Components on the Arduino Uno will resist your
attempts to send voltage the wrong way around the board, but those components
can melt in the process of saving your board, depending on how much power
you’re sending and how long it takes you to notice the burning smell! If you
reverse the polarity when using the Vin, 5V, or 3.3V pins, you bypass this
protection and almost instantly destroy several parts of your board and the
ATmega328P chip. The recommended voltage for the Uno board is 7–12V. If
you supply too little power, your board might not function correctly. Or if you
provide too much power, your board might overheat and potentially be damaged.

LEDs
LEDs come in a variety of shapes and sizes and are found in almost every modern
piece of consumer electronics, from bike lights to TVs to washing machines. You
see a lot more of them in numerous examples throughout the book. The
components described in this section are tiny. The Uno board has four LEDs
(light-emitting diodes) labeled L, RX, TX, and ON. An LED is a component that
produces light when electrical current flows through it.
Reset button
The Uno board also has a button next to the USB socket called the reset button.
It resets the program on the Arduino or stops it completely when held down for a
time. Connecting a wire between GND and the reset pin, which is located next to
the 3.3V, achieves the same results. The board has many other components, all
of which perform important jobs, but the ones described in this section are the
key ones for you to know for now.

Official Arduino boards:


Arduino Leonardo
The Leonardo has the same footprint (shape of circuit board), but the
microcontroller used is different and can be recognized as a keyboard or mouse
by a computer. In the “Hacking Other Hardware” bonus chapter
(www.dummies.com/go/ arduinofd), I provide more detail about the differences
between this board and the Uno and how to use it.
Arduino Mega 2560 R3
As the name suggests, the Arduino Mega 2560 R3 is a bigger board than the
Arduino Uno R3. It is for people who want more: more inputs, more outputs, and
more processing power! The Mega has 54 digital pins and 16 analog pins whereas
the Uno has a measly 15 digital and 6 analog pins.

Arduino Mega ADK


The Arduino Mega ADK is essentially the same board as the Mega 2560 Arduino
but is designed to interface with Android phones. This means you can share data
between your Android mobile or tablet and an Arduino to broaden the range of
either.

Arduino Nano 3.0


The Arduino Nano 3.0 is a condensed Arduino that measures just 0.70″ x 1.70″.
This size is perfect for making your project smaller. The Nano has all the power
of an Arduino Uno (both use the same ATmega328 microcontroller), but it’s a
fraction of the size. The Nano also handily fits into a breadboard, making it ideal
for prototyping as well.

Arduino Mini R5
Despite what the names suggest, the Arduino Mini R5 is smaller than the Nano.
This board also uses the same ATmega328 microcontroller chip but is condensed
further, removing all header pins and the Mini-USB connector of the Nano. The
Mini board is great if space is at a premium, but it does require great care when
connecting because an incorrect connection can easily destroy the board.
Arduino 101
The Arduino 101 uses the Intel Curie module to provide a board that’s as easy to
use as Arduino but with the latest Bluetooth low energy technology. It also
features a six-axis accelerometer to detect movement, making it a great
companion for any wearable technology projects or for talking to other Bluetooth
devices.

Arduino MKR1000
The Arduino MKR1000 is a simple but powerful board, combining a 32-bit
processor with a Wi-Fi module. It’s perfect for linking sensors and actuators to
the Internet or prototyping your next Internet of Things (IoT) project. Along with
its small form factor, it has a handy battery connector to allow you to take your
project on the move.

Arduino Pro
The Arduino Pro is a minimal and super skinny Arduino, by SparkFun
Electronics, based on the same microcontroller as those used in the Uno. It comes
without any of the normal headers or sockets but has all the same capabilities of
an Uno. It’s ideal when height is at a short supply. In addition, it has a battery
socket, which allows you to easily make your project portable.

Arduino Pro Mini


The Pro Mini is another SparkFun product; this one pushes the minimalism of the
Arduino Pro to new limits. In the scale of Arduino, the Pro Mini sits neatly
between the Nano and the Mini. It has none of the header pins or the Mini-USB
port of the Nano, and is slightly more spread out than the Arduino Mini. The Pro
Mini has none of the safety features of the Uno, so take great care when wiring
because a wrong connection can easily destroy the board.
Figure 4: The most popular Arduino boards, currently

Arduino Uno: This is the board you know and love. USB A-B cable: This cable
is essential to make use of your Arduino. It can also be found on printers and
scanners. LEDs: Light-emitting diodes in various colors are great for providing
visual feedback for your project as well as for testing lighting projects on a small
scale. Resistors: Also referred to as fixed resistors, these are fundamental
electrical components used to resist the flow of current through a circuit. Resistors
are essential for the smooth running of most circuits. Each resistor has a fixed
value, which is indicated by a colored band on the side of the resistor. These bands
help you to quickly identify a resistor’s resistance visually.
Variable resistors: Also known as potentiometers or pots, variable resistors
resist current in the same way as fixed-value resistors, but they can change their
resistance. They are most commonly used in radios and hi-fi equipment for tuning
and volume control dials, and are available also in other housings to detect other
inputs such as force or flex on a surface.
Diodes: Also known as rectifier diodes, diodes are similar to LEDs but without
the light. They have an extremely high resistance to the flow of current in one
direction and an extremely low (ideally zero) resistance in the other, which is the
same reason that an LED works in only one direction. Instead of emitting light
like LEDs, diodes control the flow of current throughout your circuit.
Photo diodes: Also known as photo resistors or light-dependent resistors (LDRs),
photo diodes change their resistance when light falls on them. They can have a
variety of different uses depending on how they’re placed relative to the light
source.
Pushbuttons: These components are found behind the scenes in many bits of
consumer electronics such as game console controllers and stereos. They’re used
to either connect or disconnect parts of a circuit so that your Arduino can monitor
human inputs.
Temperature sensors: These sensors tell you what the ambient temperature is
wherever they are placed. They are great for observing changes in your
environment. Piezo buzzer: A piezo buzzer is technically described as a discrete
sounding device. These simple components can be supplied with a voltage to
produce simple notes or music. They can also be attached to surfaces to measure
vibrations.
Relays: These electrically operated switches are used to switch higher power
circuits using your low-voltage Arduino. Half of a relay is an electromagnet, and
the other half is a magnetic switch. The electromagnet can be activated by the 5V
of the Arduino, which moves the contact of the switch. Relays are essential for
bigger lighting and motor-based projects.
Transistors: These components are the basis for all modern computers.
Transistors are electrically operated switches, similar to relays, but the switch
happens on a chemical level rather than a physical level. This means that the
switching can be super-fast, making transistors perfect for high-frequency
operations such as animating LED lighting or controlling the speed of motors.
DC motors: These motors are simple electric motors. When electric current is
passed through a motor, it spins in one direction; when that direction is reversed,
it spins in the other. Electric motors come in great variety, from those in your
phone that vibrate to those in electric drills.
Servo motors: These motors have on-board circuitry that monitors their rotation.
Servo motors are commonly used for precision operations such as the controlled
opening of valves or moving the joints of robots.

Discovering Who Uses Arduino


The Arduino family is used by makers, hackers, designers, artists, architects, and
even professional engineers to quickly and easily try out interactive design ideas.
The Arduino Uno is inexpensive and easy to use, with a big community of
supporters, tinkerers, and developers who are constantly coming up with new
ways to use it and improve it. In the next sections, I go over a few of the kinds of
people and communities that are using Arduinos every day.
Arduino in education
Arduino provides a really simple way to learn how to program microcontrollers
to sense and react to events in the real world and even online. Because it was
conceived as a way to support designers and artists — people who are not
typically computer programmers it is very easy to get started and easy to use. I
have taught hundreds of people — from little kids to retirees to get started
programming with Arduino. They have gotten simple programs up and running
in as little as a half-hour and built their skills to develop their own sophisticated
projects in a weekend. As you see from the projects in this book, it doesn’t take
long to get your Arduino doing some pretty interesting stuff. And the more time
you put into using it, the more you can get out of it. Art and design schools use
Arduino to design new interactive product prototypes, interactive artwork,
performances, and even clothing. High schools and secondary schools teach core
concepts in computer programming. University students in engineering and
computer science departments use Arduino to create interactive models and
prototypes as well as learn sophisticated computer-controlled engineering
techniques.
Arduino in the corporate world
A growing community of industry professionals in the corporate world use
Arduinos to make interactive stuff in their work. Design firms use them to
develop interactive product prototypes. Software engineering companies use
them to test software systems that interact with the physical world. Ad agencies
use them to come up with new and creative interactive campaigns. Arduinos are
used to control interactive exhibits and conferences and trade shows in both the
industry and in digital media sectors. They are used as management-consulting
tools to help teams coordinate problem solving and improve collaboration.
Making and hacking communities
In little pockets all over the world, a new community of tinkerers, makers, and
hackers has emerged. Arduino has been a fuel for this creative fire and continues
to be one of the key hardware prototyping platforms that people create projects
with, talk about, and share with one another.
What are they about?
There have been small electronics and hardware clubs since the early days of the
twentieth century, when teenage boys were encouraged to build their own “cat’s
whisker” radios to listen to the new local radio stations that were popping up all
across the United States. Over the decades, a large community of radio buffs
grew, especially among fans of the shortwave radio frequencies. These “ham”
radio aficionados set up their own transmitters and spent long hours listening to
the radio waves for new and far-flung transmissions from friends and strangers.
By the 1970s, the stage was set for a whole new generation of electronics fans
who started clubs around not just radios but also the newly available home
computers. Lots of midnight oil was burned as tinkerers and hobbyists stayed up
hacking code and trading ideas on electronic bulletin board systems. This was the
breeding ground for some of today’s giants, including Apple. Then the Internet
exploded onto the scene and changed everything. At about the same time Arduino
was created in 2005, a small subculture emerged that was sort of an extension of
the computer clubs and do-it-yourself groups and clubs. Fueled by the Internet,
there was sort of a renaissance of computer clubs and do-it-yourself groups, as it
became easier to use computers and electronics to make interesting interactive
stuff. Some people even call it a “maker movement.” The Arduino fits right in
with DIY groups, makers, tinkerers, and hackers.
There are now hundreds of makerspaces (also called hackspaces) around the
world. If you live in a big or medium-size city, there is probably one near you.
Makerspaces are community-operated physical space where people with
common interests (like Arduino!) can meet, get ideas, collaborate, and share
accomplishments. Check for a makerspace in your area. These are the best places
to learn how to build even more cool stuff with your Arduino.
The open source world
The term open source is thrown around a lot these days. If you haven’t come
across it, you will, because the Arduino is one aspect of the open source world.
Open source refers to both a philosophy and a software development approach
that advocates for complete transparency in all the points of authorship of
software. That lets anyone see how a program is built and potentially contribute
to its development. The open source movement is a reaction to the tight control
that software companies have had over their products. Their code is intellectual
property, and they want to keep control of it both to prevent others from stealing
their ideas and to maintain the quality of their products. However, the downside
is that consumers are disempowered from making changes and can sometimes be
locked in to buying upgrades they may not want. In principle, anyone with a little
know-how can pitch in and contribute to the software development of open source
projects, because the code is all online and freely downloadable. The Linux
operating system, Google’s Android operating system for mobile phones, and
Mozilla’s Firefox Web Browser are popular examples of open source software.
Thinking about computer hardware as being open source is a relatively new idea,
and Arduino is at the forefront. It was conceived as a tool that anyone can build
and use to do his own prototyping, using the ATmega328 microcontroller. All the
plans to produce your own Arduino are freely available online, and you can put
one together without paying anyone else to do so. In practice, it’s usually cheaper
to buy one, but the principle still holds that the plans are freely available and
redistributable.
Using tiny computers to do useful stuff
Microcontrollers are the unseen helping hands that are all around us, working
tirelessly all the time to make modern life convenient and pleasant. They open
doors for us (literally), keep us entertained, and can make a pretty decent cup of
coffee. They also ensure that we get from Point A to Point B safely, being
embedded in planes, trains, and yes, automobiles. Here are a few examples of
what we use them for and similar projects in this book. It’s not an exhaustive list,
but it should give you an idea of what microcontrollers are used for and how
ubiquitous they are!
Toys and games
If you walk into a toy store these days, you come across hundreds of devices that
walk, talk, blink, flash, and even respond to how you position their parts or speak
to them. Even very inexpensive interactive toys have embedded microcontrollers
that perform the same functions as an Arduino. They are usually very tiny and
specially designed for mass production and are often hidden under a dab of epoxy
on the printed circuit board (PCB) inside the toy, as shown in Figure 1-3. In fact,
some products may even use a microcontroller from the same Atmel family. They
are programmed at the factory to respond to input and actuate lights, sounds, and
movements. It’s not interactive, but by the time you finish a few projects in this
book, you’ll be able to make it respond interactively to light, touch, temperature,
or other kinds of input.
Home appliances
Your kitchen is almost literally a digital mission control center. A major
proportion of the electronic appliances you use to whip up a meal have a
microcontroller in them. The microwave has a timer to control power changes
and timing. The oven has similar capabilities. A coffee machine also has a timing
function and different programs for brewing different cups of java. Advanced
food processors sense the consistency of the food mixture and have safety
shutoffs. All of these capabilities are done with embedded microcontrollers that
sense and respond to the world.
With a little further research, you could even hook up its alarm to kick off your
own cup of brew!
Automated manufacture
If you are building lots of components into a single product, automation is
essential and microcontrollers assist with the process. Whether it’s a child’s toy
car or a real car, microcontrollers embedded into the assembly line ensure the
precise placement of parts, test for errors in manufacture, adjust the feed of
subcomponents, track inventory, and perform other useful functions. Their core
capability of sensing the environment and responding quickly, and according to
a fixed program, ensures that manufactured products are consistently built and
product inventories carefully managed. The radio frequency ID (RFID) reader
uses the same RFID technology that many inventory tracking systems use to
manage raw materials, parts, and inventory warehouses.
Field sensing and response
Microcontrollers can be placed into conditions where it is simply impractical or
downright dangerous to place a human. Imagine you want to ensure that a leak in
a gas pipeline doesn’t progress into a full-scale explosion. A microcontroller
embedded in the line can ensure that the supply is switched off if a pressure leak
is detected. Similarly, you wouldn’t want to pay someone to monitor moisture
levels in a greenhouse. A microcontroller can activate a spray of water at a fixed
interval or according to measured environmental conditions. The automated plant
irrigator use a household version of this very useful capability.
Building automation
You are familiar with building security systems to keep out intruders. Along with
this, many buildings are now using sensors to detect the internal climate and
energy efficiency conditions. Architects now design many modern structures with
a “nervous system” of embedded sensors that can adjust heating and cooling
automatically, in specific zones or individual rooms, and with the use of energy-
efficient heating, cooling, and air handling. The home sensing project use a mini-
sized version of a sensor network that you can build in your own home.
Process control
Microcontrollers are used in industry for things such as assembly line control and
sensing. For example, microcontrollers can test to find out if all bottles in a line
have been filled to the correct level. Microcontrollers attached to sensors can
quickly and easily detect problems and either report the fill problem to a central
computer or actuate a system to remove the bottle from the line. This can be done
much faster than any human could do it. Many product manufacturing processes
use microcontrollers because they are cheap and reliable. Similarly, mixing up
the raw materials for batches of bread, candy, petroleum products, or concrete
can be precisely monitored and controlled with microcontrollers like the one on
an Arduino. Although none of the projects in this book does quite this kind of
thing, after you’ve built a few of them you can figure out how to modify,
prototype, and pick and choose from the features you want to build into a project
to control many different kinds of processes or activities.

SL Raspberry Pi Arduino
It is a mini computer with Raspbian Arduino is a microcontroller, which is
1 OS.It can run multiple programs at a part of the computer. It runs only one
a time. program again and again.

It is difficult to power using a Arduino can be powered using a


2
battery pack. battery pack.

It requires complex tasks like


It is very simple to interface sensors
installing libraries and software for
3 and other electronic components to
interfacing sensors and other
Arduino.
components

4 It is expensive It is available for low cost.

Raspberry Pi can be easily Arduino requires external hardware to


connected to the internet using connect to the internet and this
5
Ethernet port and USB Wi-Fi hardware is addressed properly using
dongles. code.

Raspberry Pi did not have storage


6 on board. It provides an SD card Arduino can provide onboard storage.
port.

Raspberry Pi has 4 USB ports to Arduino has only one USB port to
7
connect different devices. connect to the computer.
The processor used is from ARM Processor used in Arduino is from
8
family. AVR family Atmega328P
This is a just plug and play device. If
This should be properly shutdown
power is connected it starts running the
9 otherwise there is a risk of files
program and if disconnected it simply
corruption and software problems.
stops.

The Recommended programming


10 language is python but C, C++, Arduino uses Arduino, C/C++.
Python, ruby are pre-installed.

You might also like