Unit 2 (CHP 2)
Unit 2 (CHP 2)
Presented by –
Ms Abha Dhote
By the end of the chapter you will have a good feel for the trade-offs between the different options and
enough knowledge of the example boards to make a choice on which to explore further.
ELECTRONICS
• When it comes to thinking about the electronics, it’s useful to split them into two main categories:
◾ Sensors: Sensors are the ways of getting information into your device, finding out things about your surroundings.
◾ Actuators: Actuators are the outputs for the device—the motors, lights, and so on, which let your device do
something to the outside world.
1. Digital I/O, which has only two states: a button can either be pressed or not; or an LED can be on or off.
2. If you wire up a potentiometer to let you read in the position of a rotary knob, you will get a varying voltage,
depending on the knob’s location.
• An analogue-to-digital converter (ADC) lets you measure varying voltages. They will convert the voltage level
between 0V and a predefined maximum into a number, depending on the accuracy of the ADC.
• Digital-to-Analogue converter (DACs) let you generate varying voltages from a digital value using a technique
called pulse-width modulation (PWM).
SENSORS
Types of Sensors:-
1. Pushbuttons and switches, which are probably the simplest sensors, allow some user input. Potentiometers (both
rotary and linear) and rotary encoders enable you to measure movement.
2. Sensing the environment is another easy option. Light-dependent resistors (LDRs) allow measurement of ambient
light levels, thermistors and other temperature sensors allow you to know how warm it is, and sensors to
3. measure humidity or moisture levels are easy to build.
4. Microphones obviously let you monitor sounds and audio, but piezo elements (used in certain types of microphones)
can also be used to respond to vibration.
5. Distance-sensing modules, which work by bouncing either an infrared or ultrasonic signal off objects, are readily
available and as easy to interface to as a potentiometer.
ACTUATORS
Types of Actuators:-
1. One of the simplest and yet most useful actuators is light, because it is easy to create electronically and gives an
obvious output. Light-emitting diodes (LEDs) typically come in red and green but also white and other colours.
2. Piezo elements, as well as responding to vibration, can be used to create it, so can use a piezo buzzer to create
simple sounds and music.
3. You might also want to use components that move things in the real world. Solenoids can by used to create a single,
sharp pushing motion, which could be useful for pushing a ball off a ledge or tapping a surface to make a musical
sound.
4. Stepper motors can be moved in steps, as the name implies. Usually, a fixed number of steps perform a full rotation.
5. DC motor and Servo motors can also be used as Actuators.
EMBEDDED COMPUTING BASICS
MICROCONTROLLERS:-
• Microcontrollers to more powerful system-on-chip (SoC) modules - These systems combine the processor, RAM, and
storage onto a single chip, which means they are much more specialised, smaller than their PC equivalents, and also
easier to build into a custom design.
• There are lots of microcontroller manufacturers (Atmel, Microchip, NXP, Texas Instruments, to name a few), each
with a range of chips for different applications.
• The ubiquitous Arduino platform is based around Atmel’s AVR Atmega family of microcontroller chips.
• In Arduino, functions which require greater resource levels are usually provided by additional single-purpose chips
which at times are more powerful than their controlling microcontroller.
• The WizNet Ethernet chip used by the Arduino Ethernet has eight times more RAM than the Arduino itself.
EMBEDDED COMPUTING BASICS
SYSTEM-ON-CHIPS:-
• In between the low-end microcontroller and a full-blown PC sits the SoC (for example, the BeagleBone or the
Raspberry Pi).
• Like the microcontroller, these SoCs combine a processor and a number of peripherals onto a single chip but usually
have more capabilities.
• Storage for SoC modules tends not to be included on the chip, with SD cards being a popular solution.
• Wide selection of embedded operating systems, both closed and open source, is available and from both specialised
embedded providers and the big OS players, such as Microsoft and Linux.
CHOOSING YOUR PLATFORM
• The platform you choose depends on the particular blend of price, performance, and capabilities that suit what you’re
trying to achieve.
1. Processor Speed
• The processor speed, or clock speed, of your processor tells you how fast it can process the individual instructions
in the machine code for the program it’s running.
• Some processors may lack hardware support for floating-point calculations, so if the code involves a lot of
complicated mathematics, a by-the-numbers slower processor with hardware floating-point support could be faster
than a slightly higher performance processor without it.
• Microcontrollers tend to be clocked at speeds in the tens of MHz, whereas SoCs run at hundreds of MHz or possibly
low GHz.
CHOOSING YOUR PLATFORM
• The platform you choose depends on the particular blend of price, performance, and capabilities that suit what you’re
trying to achieve.
2. RAM
• RAM provides the working memory for the system.
• If you have more RAM, you may be able to do more things or have more flexibility over your choice of coding
algorithm.
• Microcontrollers with less than 1KB of RAM are unlikely to be of interest, and if you want to run standard
encryption protocols, you will need at least 4KB, and preferably more.
• For SoC boards, particularly if you plan to run Linux as the operating system, we recommend at least 256MB.
CHOOSING YOUR PLATFORM
• The platform you choose depends on the particular blend of price, performance, and capabilities that suit what you’re
trying to achieve.
3. Networking
• How your device connects to the rest of the world is a key consideration for Internet of Things products.
• Ex: Wired Ethernet, Wireless Ethernet
• ZigBee is one such technology, aimed particularly at sensor networks and scenarios such as home automation.
• The recent Bluetooth LE protocol (also known as Bluetooth 4.0) has a very low power-consumption profile similar to
ZigBee’s.
• For low-bandwidth, higher-latency communication, you could use something as basic as SMS; for higher data rates,
you will use the same data connections, like 3G, as a smartphone.
CHOOSING YOUR PLATFORM
• The platform you choose depends on the particular blend of price, performance, and capabilities that suit what you’re
trying to achieve.
4. USB
• Tethering to it via USB can be an easy way to provide both power and networking.
• Instead of the microcontroller presenting itself as a device, some can also act as the USB “host”.
• This configuration lets you connect items that would normally expect to be connected to a computer devices such as
phones, for example, using the Android ADK, additional storage capacity, or WiFi dongles.
CHOOSING YOUR PLATFORM
• The platform you choose depends on the particular blend of price, performance, and capabilities that suit what you’re
trying to achieve.
5. Power Consumption
• Faster processors are often more power hungry than slower ones.
• Processors may have a minimal power-consumption sleep mode. This mode may allow you to use a faster processor
to quickly perform operations and then return to low-power sleep. Therefore, a more powerful processor may not be a
disadvantage even in a low-power embedded device.
Memory 32KB of storage and 2KB 256KB of Flash storage, 8KB of RAM to 96KB
of RAM RAM
• The language usually used for Arduino is a slightly modified dialect of C++. It includes some libraries
used to read and write data from the I/O pins provided on the Arduino and to do some basic handling
for “interrupts”.
• This variant of C++ tries to be forgiving about the ordering of code; for example, it allows you to call
functions before they are defined.