Unit-2: Embedded Devices-1: Dr. M.S. Pradeep Kumar Patnaik
Unit-2: Embedded Devices-1: Dr. M.S. Pradeep Kumar Patnaik
SESSION -1
Electronics Overview
• One of the main areas where something vastly overpowered, and in theory much more expensive, can be the
right choice for prototyping is using a mobile phone, laptop, or desktop computer to develop the initial software.
• If you already have a phone or computer which you can use, using it for your prototype isn’t actually any more
expensive.
• Even if you know that the board you’re using won’t be the ideal fit for a final version, if it lets you try out some
of the functionality more quickly or more cheaply, that can mean it’s the right choice for now.
• Most of the prototyping can be done on what are called solderless breadboards.
• They enable you to build components together into a circuit with just a push-fit connection, which also
means you can experiment with different options quickly and easily.
• When it comes to thinking about the electronics, it’s useful to split them into two main categories:
• A. Sensors: Sensors are the ways of getting information into your device, finding out things about your
surroundings.
• B. Actuators: Actuators are the outputs for the device—the motors, lights, and so on, which let your device
do something to the outside world.
• Within both categories, the electronic components can talk to the computer in a number of ways.
SCALING UP THE
ELECTRONICS
• From the perspective of the electronics, the starting point for prototyping is usually a “breadboard”. It lets push-fit
components and wires to make up circuits without requiring any soldering and therefore makes experimentation
easy.
• When things are wired up, it’s common to solder the components onto some protoboard, which may be sufficient to
make the circuit more permanent and prevent wires from going astray.
• For small production runs, use through-hole components, so called because the legs of the component go through
holes in the PCB and tend to be soldered by hand.
• Can often create your designs as companion boards to an existing microcontroller platform, generally called shields
in the Arduino community.
• Breadboard PCB(printed circuit board)
• Moving to a combined board allows you to remove any unnecessary components from the microcontroller
board, and switching to surface mount components, where the legs of the chips are soldered onto the same
surface as the chip, eases the board’s assembly with automated manufacturing lines.
Embedded Computing Basics
• When talking about computing power getting cheaper and more powerful,
cannot just throw a bunch of PC components into something and call it an
Internet of Things (IoT) product.
• If ever opened up a desktop PC then might have seen that it’s a collection of
discrete modules to provide different aspects of functionality.
• It has a main motherboard with its processor, one or two smaller circuit boards
providing the RAM, and a hard disk to provide the long-term storage.
• So, it has a lot of components, which provide a variety of general-purpose
functionality and which all take up a corresponding chunk of physical space.
• A device embeds software into the computing and communication
hardware, and the device functions for the applications.
Embedded Software
Software consists of instructions, commands and data.
A computing and communicating device needs software.
Software does the bootloading and enables the applications and
services. The software includes an OS.
A device embeds software which also includes the device application
programming interface (API) and middleware which enable the
device to perform computing and communication functions.
Bootloader
Bootloader is a program which runs at the start of a computing device,
such as an MCU.
A bootloader initiates loading of system software (OS) when the system
power is switched on, and power-on-self test completes.
Bootloader may also facilitate the use of system hardware and networking
capabilities. Bootloader loading of the OS may be from an external source.
Alternatively, bootloader can itself function as a system software, when
the codes for IO functions and OS basic system functions happen to be
from the same source.
Booting is said to complete when normal, operational runtime
environment is attained.
Operating System
An operating system is a program that acts as an interface
between the user and the computer hardware and controls the
execution of all kinds of programs.
An operating system (OS) is system software that
manages computer hardware, software resources and provides
common services for computer programs.
Integrated Development
Environment (IDE)
Integrated Development Environment (IDE) is a set of software
components and modules which provide the software and hardware
environment for developing and prototyping.
An IDE enables the codes development on a computer, and later on
enables download of the codes on the hardware platform.
IDE enables software that communicates with the Internet web server
or cloud service.
The work of a developer is complex and time-consuming, but arming
yourself with the most sophisticated tools makes the job both quicker
and easier. That’s why many developers turn to integrated
development environments (IDEs) to manage workflows, access a suite
of development tools within a single dashboard, and reduce errors that
can have catastrophic consequences if deployed unchecked.
Operating System
Important functions of an operating
System.
Memory Management
Processor Management
Device Management
File Management
Security
Control over system performance
Job accounting
Error detecting aids
Coordination between other software and users
Real Time Operating System (RTOS)
Operating system
Utility software applications
Voltage regulators and power management circuits
Timing sources such as phase lock loop control systems or
oscillators
A microprocessor, microcontroller or digital signal processor
Peripherals such as real-time clocks, counter timers and
power-on-reset generators
External interfaces such as USB, FireWire, Ethernet, universal
asynchronous receiver-transmitter or serial peripheral
interface bus
Analog interfaces such as digital-to-analog converters and
analog-to-digital converters
RAM and ROM memory
SoC Advantages
Essentially the great benefits of using an SoC are:
power saving, space saving and cost reduction
SoCs are also much more efficient as systems as their
performance is maximized per watt
Systems on chip also tend to minimize the latency
provided the various elements are strategically placed
on the motherboard in order to minimize interference
and interconnection delays as well as speed up the
data transmission process
CHOOSING YOUR PLATFORM
An IoT platform is an integral part of any IoT product. It can help you accelerate your
time-to-market, minimize risk, reduce development cost, and help you arrive at product-
market fit faster.
Selection among the number of different available platforms depends on a number of
factors like price, open-source availability, ease of application development and needed
capabilities, performance required from IoT device and suitability for developing and
using for prototyping and designing.
Think of an Internet of Things platform as a group of technologies that provide the
building blocks for developing your product. IoT platforms provide the “infrastructure”
you use to create the specific features of your solution.
The goal of an IoT platform is to provide all the generic functionality for your application
so you can focus on building features that differentiate your product and add value for
your customers.
An IoT product needs to:
• setup() function does very little; it just sets up that pin number 13 is the one that is going to control.
• In loop(), the LED is turned on and then off, with a delay of a second between each flick of the (electronic) switch.
e) Debugging
• C++ is a compiled language, a fair number of errors, such as bad syntax or failure to declare variables, are caught at
compilation time.
• So, compiler provides detailed and possibly helpful information about the type of problem.
• Ex: Blink.cpp: In function ‘void loop()’:Blink:21:
error:’digitalWrite’ was not declared in this scope
• in the function loop(), deliberately misspelled the call to digitalWrite.
• Arduino isn’t generally connected to a screen, it is hard for it to tell user when something goes wrong.
• Even if the code compiled successfully, certain errors still happen. An error could be raised that can’t be handled, such as
a division by zero, or trying to access the tenth element of a 9-element list.
• Or perhaps your program leaks memory and eventually just stops working.
• Or (and worse) a programming error might make the code continue to work dutifully but give entirely the wrong results.
• In the absence of a screen, the Arduino allows you to write information over the USB cable using Serial.write().
• Arduino IDE provides a serial monitor which echoes the data that the Arduino has sent over the USB cable.
• This could include any textual information, such as logging information, comments and details about the data that the
Arduino is receiving and processing.
SOME NOTES ON THE
HARDWARE
• https://
www.youtube.com/watch?v=Yj639_ez6TM&ab_channel=Make%3A
Lilypad
• https://www.youtube.com/watch?v=Tt649mcmi5Y&ab_channel=Laur
enDehrone
• http://shieldlist.org/
OPENNESS
The Arduino project is completely open hardware and an open hardware
success story. The only part of the project protected is the Arduino
trademark, so they can control the quality of any boards calling
themselves an Arduino. In addition to the code being available to
download freely, the circuit board schematics and even the EAGLE PCB
design files are easily found on the Arduino website.
This culture of sharing has borne fruit in many derivative boards being
produced by all manner of people. Some are merely minor variations on
the main Arduino Uno, but many others introduce new features or form
factors that the core Arduino team have overlooked.
Arduino Case Study: The
Good Night Lamp
• https://
www.youtube.com/watch?v=FxLsZUTXYEU&t=3s&ab_channel=Good
NightLamp
• https://youtu.be/IVBCZ_QKW6Q
• A simple, consumer device, this lamp would be paired with another
lamp anywhere in the world, allowing it to switch the other lamp on
and off, and vice versa.
• Because light is integrated into our daily routine, seeing when our
loved ones turn, for example, their bedside lamp on or off gives us a
calm and ambient view onto their lives.
Arduino Case Study:
Botanicalls
• https://
www.youtube.com/watch?v=i7T82FZbAhg&feature=emb_logo&ab_chan
nel=Ignite
• https://www.botanicalls.com/
• Botanicalls is a collaboration between technologists and designers that
consists of monitoring kits to place in plant pots.
• The Botanicalls kits then contact the owner if the plant’s soil gets too dry.
• The project write-up humourously refers to this as “an effort to promote
successful interspecies understanding” and as a way of translating
between a plant’s communication protocols (the colour and drooping of
leaves) to human protocols, such as telephone, email, or Twitter.
Arduino Case Study:
BakerTweet
• https://www.youtube.com/watch?v=UKe1RJBX3Uc&ab_channel=SinPreocupaciones
• https://www.engadget.com/2009-04-03-bakertweet-the-arduino-based-pastry-early-warning-system.html
• The BakerTweet device (www.bakertweet.com/) is effectively a physical client for Twitter designed for use in a bakery.
• A baker may want to let customers know that a certain product has just come out of the ovens—fresh bread, hot muffins,
cupcakes laden with icing—yet the environment he would want to tweet from contains hot ovens, flour dust, and sticky
dough and batter, all of which would play havoc with the electronics, keyboard, and screen of a computer, tablet, or phone.
• Staff of design agency Poke in London wanted to know when their local bakery had just produced a fresh batch of their
favourite
• bread and cake, so they designed a proof of concept to make it possible.
• Because BakerTweet communicates using WiFi, bakeries, typically not built to accommodate Ethernet cables, can install it.
BakerTweet exposes the functionality of Twitter in a “bakery-proof” box with more robust electronics than a general-
purpose computer, and a simplified interface that can be used by fingers covered in flour and dough.
• It was designed with an Arduino, an Ethernet Shield, and a WiFi adapter.
• As well as the Arduino simply controlling a third-party service (Twitter), it is also hooked up to a custom service which
allows the baker to configure the messages to be sent.