Professional Documents
Culture Documents
1
What Exactly are We Trying to do?
Introduction Cyber-Physical Systems
• Move stuff around with a piece you write and manifest in physical world.
• Program ‘behaviors’ to a simple robot and see how it affects how it interacts
with surroundings.
Digital Electronics
• Understand how individual bits (0s and 1s) behave as voltage signals.
Perception
• Gather data about real, physical world with simple sensors.
• Interpret digital signals and make sense out of it and see how it describes
the surroundings.
What Exactly are We Trying to do?
• Master Arduino, the holy grail of rapid prototyping and simplifying physical
computing (It’s easier than it sounds).
• Get a bird’s eye view of how devices communicate with each other and how
programs translate to electrical signals.
Set of Skills
Basically, there are three things that make this robot a robot:
HC SR-04 has a transmitter that sends ultrasonic pulses and a receiver to detect the pulses
that reflect from Cheems (we don’t want the robot to hit Cheems, do we?) and the distance
can be calculated form the time delay, provided that the acoustic velocity is known.
The “Eyears”
Ground Pin: Keep your feet firmly on the ground while you wield great power!
Echo Pin: Goes high for a specific time period equivalent to the time it takes for
the wave to return from Cheems.
Proper Eyes (But Simpler)
IR sensor for “seeing” stuff:
Uses reflected IR rays to estimate detect differences in color (reflectivity) on the
floor, enabling the robot to trace a line.
The Muscles
Brushed PMDC motors: Not the most efficient, but certainly the simplest to begin with
• Geared to provide a lower speed and greater torque for any given power input.
It’s tempting to use a variable resistor/potentiometer to drop voltage or reduce current and
thereby power.
However, that is waste of power (resistive heating) and certainly not the Plaksha way.
A microcontroller an integrated circuit that contains a microprocessor along with memory and
associated circuits and that controls some or all the functions of an electronic device (such as a
home appliance) or system.
English Translation: Programmable small thingy (which you can have fun with)
Arduino: The Skull for the Delicate Brain
Arduino simplifies using a microcontroller by providing ways to flash programs, an easy language to
talk to ATMega328 and hiding all low-level electronic details like power management.
Cherry on top, it saves you lots of soldering and frying some components.
Translation to English: It’s a cool board you can program and have fun controlling things with.
Setting up the PC
Step I
• Download the IDE, it’s free, although you can donate to the Arduino team.
• Basically, accept all terms and conditions in the license agreement (it’s engineering
blasphemy to read them) and install the IDE for Windows, Linux, or Mac.
• This is possible with the GUI, for windows and Mac. For Linux, open Terminal and type
sudo apt install arduino and press enter.
The apt repository is not up to date but is good enough for this workshop. For detailed
information, visit https://www.arduino.cc/en/Guide/Linux and follow the steps.
Step II
• Plug in the USB cable and connect Arduino to your PC.
• You do not need to provide power to the Arduino, as the USB provides 5V up to 2A.
Setting up the PC
Step III
For Windows:
Open device manager (search this in
start menu)
For Linux:
Open terminal and type: ls /dev/*