0% found this document useful (0 votes)
2 views30 pages

Prototyping in the Internet of Things

Uploaded by

chandani9189
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)
2 views30 pages

Prototyping in the Internet of Things

Uploaded by

chandani9189
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

INTERNET OF THINGS

TYBSC IT- SEM V


UNIT II

Ms. Arti Gavas


Assistant Professor,
Anna Leela College of Commerce & Eco., Shobha Jayaram Shetty
College for BMS, Kurla
CHAPTER 4:
THINKING ABOUT PROTOTYPING
• SKETCHING
• FAMILIARITY
• COSTS VERSUS EASE OF PROTOTYPING
• PROTOTYPES AND PRODUCTION
• CHANGING EMBEDDED PLATFORM
• PHYSICAL PROTOTYPES AND MASS PERSONALISATION
• CLIMBING INTO THE CLOUD
• OPEN SOURCE VERSUS CLOSED SOURCE
• WHY CLOSED?
• WHY OPEN?
• MIXING OPEN AND CLOSED SOURCE
• CLOSED SOURCE FOR MASS MARKET PROJECTS
THINKING ABOUT PROTOTYPING

• With the Internet of Things, we are always looking at building three things in parallel:
• the physical Thing;
• the electronics to make the Thing smart; and
• the Internet service that we’ll connect to.

• The prototype is optimized for ease and speed of development and also the ability to
change and modify it.

• Many Internet of Things projects start with a prototyping microcontroller, connected by


wires to components on a prototyping board, such as a “breadboard”, and housed in
some kind of container. At the end of this stage, you’ll have an object that works.

• it’s a demonstrable product that you can use to convince yourself, your business
partners, and your investors.

• Finally, the process of manufacture will iron out issues of scaling up and polish.
SKETCHING

• Jot down some ideas or draw out some design ideas


with pen and paper. •
• That is an important first step in exploring your idea
and one we’d like to extend beyond the strict
definition to also include sketching in hardware and
software.
• What we mean by that is the process of exploring
the problem space: iterating through different
approaches and ideas to work out what works and
what doesn’t.
FAMILIARITY

• If you can already program in Python, for example, maybe


picking a platform such as Raspberry Pi, which lets you write
the code in a language you already know, would be better
than having to learn Arduino from scratch.
COSTS VERSUS EASE OF PROTOTYPING

• it is also worth considering the relationship between the costs (of prototyping and
mass producing) of a platform against the development effort that the platform
demands.
• It is beneficial if you can choose a prototyping platform in a performance/
capabilities bracket similar to a final production solution.
• For the first prototype, the cost is probably not the most important issue
• if your device has physical interactions , you will find that a PC is not optimized
for this kind of work.
• For many beginners to hardware development, the Arduino toolkit is a
surprisingly good choice.
• An important factor to be aware of is that the hardware and programming choices
you make will depend on your skill set.
COSTS VERSUS EASE OF PROTOTYPING

• Four choices:
• AVR(AT8051), Arduino, Raspberry Pi Microcontroller, General
Purpose Computers.
• the smartphone or computer options are particularly convenient if you already have one
available, at which point they are effectively zero-cost.
• if your device has physical interactions , you will find that a PC is not optimized for this kind of work.
• An electronics prototyping board, unsurprisingly, is better suited to this kind of work.
• For many beginners to hardware development, the Arduino toolkit is a surprisingly good choice.
• The input/output choices are basic and require an ability to follow wiring diagrams and, ideally, a basic
knowledge of electronics.
• Yet the interaction from a programming point of view is essentially simple— writing and reading values to
and from the GPIO pins.
• And the language is C++.
• The IDE pushes the compiled code onto the device where it just runs, automatically, until you unplug it.
CASE STUDY: BUBBLINO

• Bubblino responded by blowing bubbles for that many seconds.


• The current devices are based on an Arduino Ethernet.
• This means that the Twitter search and XML processing are done on the
device, so it can run completely independently of any computer, as long as it
has an Ethernet connection.
• In a final twist, the concept of Bubblino has been released as an iPhone app,
“Bubblino and Friends”, which simply searches Twitter for defined keywords
and plays an animation and tune.
• A kit such as an Arduino easily connects to a computer via USB, and you can
speak to it via the serial port in a standard way in any programming
language.
PROTOTYPES AND PRODUCTION

• CHANGING EMBEDDED PLATFORM: When you scale up,


you may well have to think about moving to a different
platform, for cost or size reasons.
• PHYSICAL PROTOTYPES AND MASS PERSONALISATION:
digital fabrication tools can allow each item to be slightly
different, letting you personalize each device in some way.
• CLIMBING INTO THE CLOUD: If you are running on a cloud
computing platform, such as Amazon Web Services, you can
even have the service dynamically expand and contract, as
demand dictates.
WHY CLOSED?

• Asserting Intellectual Property rights is often the default approach,


especially for larger companies.
• If you declared copyright on some source code or a design, someone who
wants to market the same project cannot do so by simply reading your
instructions and following them.
• You might also be able to protect distinctive elements of the visual design
with trademarks and of the software and hardware with patents.
• Note that starting a project as closed source doesn’t prevent you from
later releasing it as open source.
WHY OPEN?

• In the open source model, you release the sources that you use to create the project to the
whole world.
• why would you give away something that you care about, that you’re working hard to
accomplish?
• There are several reasons to give away your work: • ◾ You may gain positive comments from
people who liked it.
• It acts as a public showcase of your work, which may affect your reputation and lead to new opportunities.
• People who used your work may suggest or implement features or fix bugs.
• By generating early interest in your project, you may get support and mindshare of a quality that it would
be hard to pay for.

• A few words of encouragement from someone who liked your design and your blog post
about it may be invaluable to get you moving when you have a tricky moment on it.
• A bug fix from someone who tried using your code in a way you had never thought of may
save you hours of unpleasant debugging later.
DISADVANTAGES OF OPEN SOURCE

• deciding to release as open source may take more resources.


• If you’re designing for other people, you have to make something of a
high standard, but for yourself, you often might be tempted to cut
corners.
• Then having to go back and fix everything so that you can release it in a
form that doesn’t make you ashamed will take time and resources.
• After you release something as open source, you may still have a
perceived duty to maintain and support it, or at least to answer questions
about it via email, forums, and chatrooms.
• Although you may not have paying customers, your users are a
community that you may want to maintain.
BEING A GOOD CITIZEN

• If you say you have an open platform, releasing only a few


libraries, months afterwards, with no documentation or
documentation of poor quality could be considered rude.
• Also, your open source work should make some attempt to
play with other open platforms.
OPEN SOURCE AS A COMPETITIVE
ADVANTAGE
• First, using open source work is often a no-risk way of getting software
that has been tested, improved, and debugged by many eyes.
• Second, using open source aggressively gives your product the chance
to gain mindshare.
• (ex: Arduino : one could easily argue that it isn’t the most powerful platform ever
and will surely be improved.)

• If an open source project is good enough and gets word out quickly and
appealingly, it can much more easily gain the goodwill and enthusiasm
to become a platform.
OPEN SOURCE AS A STRATEGIC WEAPON

• In economics, the concept of complements defines products and services that are bought
in conjunction with your product
• —for example, DVDs and DVD players.
• If the price of one of those goods goes down, then demand for both goods is likely to rise.
• Companies can therefore use improvements in open source versions of complementary
products to increase demand for their products.
• If you manufacture microcontrollers, for example, then improving the open source software
frameworks that run on the microcontrollers can help you sell more chips.
• While open sourcing your core business would be risky indeed, trying to standardize things
that you use but which are core to your competitor’s business may, in fact, help to
undermine that competitor.
• So Google releasing Android as open source could undermine Apple’s iOS platform.
CLOSED SOURCE FOR MASS MARKET
PROJECTS
• a project might be not just successful but huge, that is, a mass market
commodity.
• The costs and effort required in moving to mass scale show how, for a physical
device, the importance of supply chain can affect other considerations.
• Consider Nest, an intelligent thermostat: the area of smart energy metering
and control is one in which many people are experimenting.
• The moment that an international power company chooses to roll out power
monitors to all its customers, such a project would become instantaneously
mass market.
TAPPING INTO THE COMMUNITY
• While thinking about which platform you want to build for, having a community to tap
into may be vital or at least useful.

• If you have a problem with a component or a library, or a question about how to do


something you could simply do a Google search on the words “arduino servo
potentiometer” and find a YouTube video, a blog post, or some code.

• If you are doing something more obscure or need more detailed technical assistance,
finding someone who has already done exactly that thing may be difficult.
• When you are an inexperienced maker, using a platform in which other people can mentor
you is invaluable.
• Local meetings are also a great way to discuss your own project and learn about others.
• While to discuss your project is in some way being “open” about it, you are at all times in
control of how much you say and whom you say it to.
• In general, face-to-face meetings at a hackspace may well be a friendlier and more
CHAPTER 5:
PROTOTYPING EMBEDDED DEVICES
• ELECTRONICS: SENSORS & ACTUATORS
• SCALING UP THE ELECTRONICS
• EMBEDDED COMPUTING BASICS
• MICROCONTROLLERS
• SYSTEM-ON-CHIPS
• CHOOSING YOUR PLATFORM
• Processor Speed
• RAM
• Networking
• USB
• Power Consumption
• Interfacing with Sensors and Other Circuitry
• Physical Size and Form Factor

• ARDUINO
ELECTRONICS: SENSORS & ACTUATORS

• Solder-less breadboards. • They enable you to build components


together into a circuit with just a push-fit connection.
• 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.
• Within both categories, the electronic components can talk to the
computer in a number of ways.
• The simplest is through digital I/O, which has only two states: a button
can either be pressed or not; or an LED can be on or off.
SENSORS
• Pushbuttons and switches, which are probably the
simplest sensors, allow some user input.
• Sensing the environment is another easy option.
• Light-dependent resistors (LDRs) allow measurement
of ambient light levels, temperature sensors allow
you to know how warm it is, and sensors to measure
humidity or moisture levels are easy to build.
• Microphones obviously let you monitor sounds and
audio.
• Distance-sensing modules, which work by bouncing
either an infrared or ultrasonic signal off objects, are
readily available.
ACTUATORS

• 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.
• More complicated visual outputs also are available, such as LCD screens to display
text or even simple graphics.
• You can wire up outputs to speakers to create more complicated synthesised sounds.
• More complicated again are motors.
• Stepper motors can be moved in steps, as the name implies.
• Usually, a fixed number of steps perform a full rotation.
• DC motors simply move at a given speed when told to. • Both types of motor can be
one-directional or move in both directions.
ELECTRONICS: SENSORS & ACTUATORS
SCALING UP THE ELECTRONICS

• From the perspective of the electronics, the starting point for prototyping is usually a
“breadboard”.
• It’s common to solder the components onto some protoboard, which may be
sufficient to make the circuit more permanent.
• Moving beyond the protoboard (stripboard) option tends to involve learning how to
layout a PCB.
BREADBOARD PROTOBOARD PCB
• It involves learning how to use a new piece of software and understanding some new
terminology.
EMBEDDED COMPUTING BASICS

• MICROCONTROLLERS:
• These systems combine the processor, RAM, and storage onto a single chip, which means they are much
more specialized, smaller than their PC equivalents, and also easier to build into a custom design.
• Microcontrollers are very limited in their capabilities. • Usually, they offer RAM capabilities measured in
kilobytes and storage in the tens of kilobytes.
• Atmel, Microchip, NXP, Texas Instruments, to name a few
• SYSTEM-ON-CHIPS:
• In between the low-end microcontroller and a full-blown PC sits the SoC.
• Like the microcontroller, these SoCs combine a processor and a number of peripherals onto a single chip
but usually have more capabilities.
• The processors usually range from a few hundred megahertz to the gigahertz.
• RAM measured in megabytes rather than kilobytes.
• Storage for SoC modules tends not to be included on the chip, with SD cards being a popular solution.
• The greater capabilities of SoC mean that they need some sort of operating system to marshal their
resources.
CHOOSING YOUR PLATFORM

• Processor Speed: The processor speed, or clock speed & millions of instructions per
second (MIPS)
• RAM: working memory for the system
• Networking: Wired Ethernet is often the simplest for the user—generally plug and play—
and cheapest, but it requires a physical cable. Wireless solutions obviously avoid that
requirement but introduce a more complicated configuration
• USB: You can buy some of the microcontrollers in versions which include support for USB
• Power Consumption: rely on an unconventional power supply (batteries, solar power)
• Interfacing with Sensors and Other Circuitry: Need interfacing; some sort of peripheral
bus—SPI and I2C for sensors to gather data about its environment; & motors, LEDs, screens,
and so on, to provide output.
• Physical Size and Form Factor: 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.
ARDUINO

• The “standard” Arduino board has gone through a number of iterations:


• Arduino NG, Diecimila, Duemilanove, and Uno.
• The Uno features an ATmega328 microcontroller and a USB socket for
connection to a computer.
• It has 32KB of storage and 2KB of RAM
• The Uno also provides 14 GPIO pins.
• Arduino Mega 2560 provides 256KB of Flash storage, 8KB of RAM, three
more serial ports, a massive 54 GPIO pins.
• The more recent Arduino Due has a 32-bit ARM core microcontroller.
• Its specs are similar to the Mega’s, although it ups the RAM to 96KB.
ARDUINO
Ex: blinking a single LED:
// Pin 13 has an LED connected on most
Arduino boards. give it a name:
• DEVELOPING ON THE ARDUINO int led = 13;
// the setup routine runs once when you press
• Integrated Development reset: • void setup()
{
Environment (IDE)
// initialize the digital pin as an output.
• Pushing Code pinMode(led, OUTPUT);
}
• Operating System // the loop routine runs over and over again
forever:
• Language void loop()
{
• Debugging digitalWrite(led, HIGH); // turn the LED on
delay(1000); // wait for a second
• Shields (LilyPad) digitalWrite(led, LOW); // turn the LED off
delay(1000); // wait for a second
• OPENNESS }
RASPBERRY PI

• DEVELOPING ON THE ARDUINO


“blinking lights” example:
import [Link] as GPIO
• Operating System from time import sleep
[Link]([Link])
• Programming Language # set the numbering scheme to be the
# same as on the board
• Contrast Python with C++ [Link](8, [Link])
# set the GPIO pin 8 to output mode
• Debugging led = False
[Link](8, led)
• OPENNESS # initiate the LED to off
while 1: [Link](8, led)
led = not led
# toggle the LED status on/off for
the next iteration
sleep(10) # sleep for one second
RASPBERRY PI
THANK YOU!

Ms. Arti Gavas


Assistant Professor,
Anna Leela College of Commerce & Eco., Shobha Jayaram Shetty
College for BMS, Kurla

You might also like