0% found this document useful (0 votes)
53 views17 pages

Unit 2 (CHP 2)

The document discusses various options for prototyping embedded devices, including microcontrollers and system-on-chips. It covers important considerations when choosing a platform such as processor speed, RAM, networking capabilities, power consumption, and interfacing with sensors. Common microcontroller boards like Arduino Uno and Arduino Mega are described. The document provides guidance on selecting an appropriate platform based on the specific needs of the embedded application.

Uploaded by

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

Unit 2 (CHP 2)

The document discusses various options for prototyping embedded devices, including microcontrollers and system-on-chips. It covers important considerations when choosing a platform such as processor speed, RAM, networking capabilities, power consumption, and interfacing with sensors. Common microcontroller boards like Arduino Uno and Arduino Mega are described. The document provides guidance on selecting an appropriate platform based on the specific needs of the embedded application.

Uploaded by

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

Unit 2(Ch 2): Prototyping Embedded Devices

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.

• The electronic components can talk to the computer in a number of ways:-

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.

6. Interfacing with Sensors and Other Circuitry


• Device needs to interact with something else—either sensors to gather data about its environment; or motors, LEDs,
screens, and so on, to provide output.
• You could connect to the circuitry through some sort of peripheral bus—SPI and I2C being common ones—or
through ADC or DAC modules to read or write varying voltages; or through generic GPIO pins, which provide
digital on/off inputs or outputs
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.
7. Physical Size and Form Factor
• Nowadays, the size is governed by the number of connections it needs to make to the surrounding components on the
PCB.
• Surface-mount technology because it doesn’t require holes to be drilled in the board for connections.
• Due to these trade-offs in size versus manufacturing complexity, many chip designs are available in a number of
different form factors, known as packages.
• All three chips pictured in the following figure provide identical functionality because they are all AVR ATmega328
microcontrollers.
Arduino:
• Its birth was in Ivrea in Northern Italy in 2005.
• A group from the Interaction Design Institute Ivrea (IDII) wanted a board for its design students to use
to build interactive projects.
• So, the team put together a board which was cheap to buy—around L20— and included an onboard
serial connection to allow it to be easily programmed.
• Combined with an extension of the Wiring software environment, it made a huge impact on the world
of physical computing.
• The “standard” Arduino board has gone through a number of iterations: Arduino NG, Diecimila,
Duemilanove, and Uno.
Properties Uno Arduino Mega 2560 Arduino Due

Microcontroller ATmega328 More powerful ATmega 32-bit ARM core


microcontroller microcontroller microcontroller

USB Socket a USB socket a USB socket a USB socket

Memory 32KB of storage and 2KB 256KB of Flash storage, 8KB of RAM to 96KB
of RAM RAM

GPIO pins 14 GPIO pins 54 GPIO pins 54 GPIO pins

ADC Pins 6 10-bit resolution ADC 16 ADCs 16 ADCs


pins

Serial ports 1 serial port 3 serial ports 3 serial ports


DEVELOPING ON THE ARDUINO:
• Integrated Development Environment
• Most Arduino projects consist of a single file of code, so you can think of the IDE mostly as a simple
file editor.
• The controls that you use the most are those to check the code (by compiling it) or to push code to the
board.
• Pushing Code
• Connecting to the board should be relatively straightforward via a USB cable.
• You need to choose the correct serial port and the board type
• If the code compiles successfully, it gets transferred to the Arduino and stored in its flash memory. At
this point, the Arduino reboots and starts running the new code.
DEVELOPING ON THE ARDUINO:
• Operating System
• It is possible to upload an OS to the Arduino, usually a lightweight real-time operating system (RTOS)
such as FreeRTOS/DuinOS.
• The avr-gcc toolset (www.nongnu.org/avr-libc/) is the collection of programs that let you compile code
to run on the AVR chips used by the rest of the Arduino boards and flash the resultant executable to the
chip.
• Language

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

You might also like