Practical No 1: Aim: Requirement (Hardware/Software) : Theory
Practical No 1: Aim: Requirement (Hardware/Software) : Theory
Practical No 1: Aim: Requirement (Hardware/Software) : Theory
Practical No 1
Aim: To study Arduino Uno IoT kit with ATMega 328 Microcontroller.
Requirement (Hardware/Software) :
Hardware : Arduino Uno R3
Software: Ardino IDE
Theory:
IoT stands for Internet of Things, which means accessing and controlling daily usable
equipments and devices using Internet. The term "Things" in the Internet of Things refers to
anything and everything in day to day life which is accessed or connected through the
internet.
IoT is an advanced automation and analytics system which deals with artificial intelligence,
sensor, networking, electronic, cloud messaging etc. to deliver complete systems for the
product or services. The system created by IoT has greater transparency, control, and
performance. As we have a platform such as a cloud that contains all the data through which
we connect all the things around us. For example, a house, where we can connect our home
appliances such as air conditioner, light, etc. through each other and all these things are
managed at the same platform. Since we have a platform, we can connect our car, track its
fuel meter, speed level, and also track the location of the car.
If there is a common platform where all these things can connect to each other would be great
because based on my preference, I can set the room temperature. For example, if I love the
room temperature to to be set at 25 or 26-degree Celsius when I reach back home from my
office, then according to my car location, my AC would start before 10 minutes I arrive at
home. This can be done through the Internet of Things (IoT).
Arduino Uno:
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Uno
differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial converter. "Uno" means
one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and
version 1.0 will be the reference versions of Arduno, moving forward. The Uno is the latest
in a series of USB Arduino boards, and the reference model for the Arduino platform; for a
comparison with previous versions, see the index of Arduino boards.
Technical Specification:
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V I
nput Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 0.5 KB used by bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
Board
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno w/ ATmega328" from the Tools > Board menu (according to the
microcontroller on your board). For details, see the reference and tutorials. The ATmega328
on the Arduino Uno comes preburned with a bootloader that allows you to upload new code
to it without the use of an external hardware programmer. It communicates using the original
STK500 protocol (reference, C header files). You can also bypass the bootloader and
program the microcontroller through the ICSP (In-Circuit Serial Programming) header; see
these instructions for details. The ATmega8U2 firmware source code is available . The
ATmega8U2 is loaded with a DFU bootloader, which can be activated by connecting the
solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader).
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Three screw holes
allow the board to be attached to a surface or case. Note that the distance between digital pins
7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
Arduino Uno
After learning about the main parts of the Arduino UNO board, we are ready to learn how to
set up the Arduino IDE. Once we learn this, we will be ready to upload our program on the
Arduino board.
In this section, we will learn in easy steps, how to set up the Arduino IDE on our computer
and prepare the board to receive the program via USB cable.
Step 1 − First you must have your Arduino board (you can choose your favorite board) and
a USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega
2560, or Diecimila, you will need a standard USB cable (A plug to B plug), the kind you
would connect to a USB printer as shown in the following image.
In case you use Arduino Nano, you will need an A to Mini-B cable instead as shown in the
following image.
Here, we are selecting just one of the examples with the name Blink. It turns the LED on
and off with some time delay. You can select any other example from the list.
Step 6 − Select your Arduino board.
To avoid any error while uploading your program to the board, you must select the correct
Arduino board name, which matches with the board connected to your computer.
Go to Tools → Board and select your board.
Here, we have selected Arduino Uno board according to our tutorial, but you must select the
name matching the board that you are using.
Step 7 − Select your serial port.
Select the serial device of the Arduino board. Go to Tools → Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial
ports). To find out, you can disconnect your Arduino board and re-open the menu, the entry
that disappears should be of the Arduino board. Reconnect the board and select that serial
port.
Step 8 − Upload the program to your board.
Before explaining how we can upload our program to the board, we must demonstrate the
function of each symbol appearing in the Arduino IDE toolbar.
A − Used to check if there is any compilation error.
B − Used to upload a program to the Arduino board.
C − Shortcut used to create a new sketch.
D − Used to directly open one of the example sketch.
E − Used to save your sketch.
F − Serial monitor used to receive serial data from the board and send the serial data to the
board.
Now, simply click the "Upload" button in the environment. Wait a few seconds; you will see
the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.
Conclusion:
In This way, we have studied about Arduino Uno IoT kit with ATMega 328 Microcontroller.