0% found this document useful (0 votes)
32 views24 pages

Unit 3-Controllers

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

Unit 3-Controllers

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

Controllers

Different Hardware for IoT

ARDUINO NODE MCU RASPBERRY PI


Comparison

ESP8266 (Node MCU) Arduino Raspberry Pi

Cost ~ INR 300 ~ INR 400 ~INR 2500

Wifi Built-in ESP8266 Module USB Dongle / INBUILT / Ethernet


~ INR 150

Programming C++/Lua C++ Python/Java/C++

Storage Built-In Built-In SD-Card

I/O 10 GPIO/ 1 ADC Arduino Uno: 17 GPIO


13 GPIO/ 6 ADC
Comparison

ESP8266 (Node MCU) Arduino Raspberry Pi

Operating Voltage 3.3v 5v 5v

Clock Speed 26 MHz – 52 MHz 16 MHz 1.2GHz

Flash Memory Upto 128 MB 32 KB -


Parameter Microprocessor Microcontroller
Microprocessors can be understood as the Microcontrollers can be understood as the heart of an
Definition
heart of a computer system. embedded system.
A microprocessor is a processor where the A microcontroller is a controlling device wherein the memory
What is it? memory and I/O component are connected and I/O output component are present internally.
externally.
Circuit The circuit is complex due to external Microcontrollers are present on chip memory. The circuit is less
complexity connection. complex.
Memory and I/O The memory and I/O components are to be The memory and I/O components are available.
components connected externally.
Compact system Microprocessors can’t be used in compact Microcontrollers can be used with a compact system.
compatibility system.
Efficiency Microprocessors are not efficient. Microcontrollers are efficient.
Zero status flag Microprocessors have a zero status flag. Microcontroller doesn’t have a zero status flag.
Number of Microprocessors have less number of Microcontrollers have more number of registers.
registers registers.
Microprocessors are generally used in Microcontrollers are generally used in washing machines, and air
Applications
personal computers. conditioners.
What is arduino
• Arduino is a microcontroller platform.
• It is ease of use and open source.
Arduino Uno
• It allows you to connect electronic components through its pins so that it
can control things—for instance, turn lights or motors on and off or sense
things such as light and temperature.
• An Arduino board consists of an Atmel 8-bit AVR microcontroller with
complementary components that facilitate programming and incorporation
into other circuits.
• It's an open-source physical computing platform based on a simple
microcontroller board, and a development environment for writing
software for the board.
Microcontroller
Arduino UNO
Arduino UNO Specs
• 8-Bit Microcontroller
Arduino IDE
• Download: Software | Arduino
• Programming Environment.
• Online Platforms:
• https://www.tinkercad.com/login
• https://wokwi.com/
LED Glow and blink Program
LED Glow Program
void setup()
{
pinMode(2, OUTPUT);
}
void loop()
{
digitalWrite(2, HIGH);
}

LED Blink Program


void setup()
{
pinMode(2, OUTPUT);
}
void loop()
{
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
PIR sensor interfacing with Arduino Uno
int sensorState = 0;
void setup()
{ pinMode(2, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{ // read the state of the sensor/digital input
sensorState = digitalRead(2);
// check if sensor pin is HIGH. if it is, set the
// LED on.
if (sensorState == HIGH) {
digitalWrite(LED_BUILTIN, HIGH);
} else {
digitalWrite(LED_BUILTIN, LOW);
}
delay(10); // Delay a little bit to improve simulation performance
}
Raspberry Pi
• Raspberry Pi is a small single board computer. By connecting peripherals like Keyboard,
mouse, display to the Raspberry Pi, it will act as a mini personal computer.
• Raspberry Pi is popularly used for real time Image/Video Processing, IoT based
applications and Robotics applications.
• OS for Raspberry Pi
• Raspberry Pi Foundation officially provides Debian based Raspbian OS. Also, they provide
NOOBS OS for Raspberry Pi. We can install several Third-Party versions of OS like Ubuntu,
Archlinux, RISC OS, Windows 10 IOT Core, etc.
• Raspbian OS is official Operating System available for free to use. This OS is efficiently
optimized to use with Raspberry Pi. Raspbian have GUI which includes tools for Browsing,
Python programming, office, games, etc.
• We should use SD card (minimum 8 GB recommended) to store the OS (operating
System).
• Raspberry Pi is more than computer as it provides access to the on-chip hardware i.e.
GPIOs for developing an application. By accessing GPIO, we can connect devices like
LED, motors, sensors, etc and can control them too.

https://www.electronicwings.com/raspberry-pi/raspberry-pi-introduction
• Raspberry Pi processor
• It has ARM based Broadcom Processor SoC along with on-chip
GPU (Graphics Processing Unit).
• The CPU speed of Raspberry Pi varies from 700 MHz to 1.2
GHz. Also, it has on-board SDRAM that ranges from 256 MB to
1 GB.
• Raspberry Pi also provides on-chip SPI, I2C, I2S and UART
modules.
Versions of Raspberry pi models

• There are different versions of raspberry pi available as listed


below:
1.Raspberry Pi 1 Model A
2.Raspberry Pi 1 Model A+
3.Raspberry Pi 1 Model B
4.Raspberry Pi 1 Model B+
5.Raspberry Pi 2 Model B
6.Raspberry Pi 3 Model B
7.Raspberry Pi Zero
Raspberry Pi 2 Raspberry Pi 3
Features Raspberry Pi Model B+ Raspberry Pi zero
Model B Model B

SoC BCM2835 BCM2836 BCM2837 BCM2835

CPU ARM11 Quad Cortex A7 Quad Cortex A53 ARM11

Operating Freq. 700 MHz 900 MHz 1.2 GHz 1 GHz

RAM 512 MB SDRAM 1 GB SDRAM 1 GB SDRAM 512 MB SDRAM

250MHz Videocore
GPU 250 MHz Videocore IV 400 MHz Videocore IV 250MHz Videocore IV
IV

Storage micro-SD Micro-SD micro-SD micro-SD


Ethernet Yes Yes Yes No

Wireless WiFi and Bluetooth No No No


Raspberry Pi 3 Hardware Details
• Some Hardware Components shown above are mention below:
1.HDMI (High-Definition Multimedia Interface): It is used for transmitting
uncompressed video or digital audio data to the Computer Monitor, Digital TV,
etc. Generally, this HDMI port helps to connect Raspberry Pi to the Digital
television.
2.CSI Camera Interface: CSI (Camera Serial Interface) interface provides a
connection in between Broadcom Processor and Pi camera. This interface
provides electrical connections between two devices.
3.DSI Display Interface: DSI (Display Serial Interface) Display Interface is used for
connecting LCD to the Raspberry Pi using 15-pin ribbon cable. DSI provides fast
High-resolution display interface specifically used for sending video data directly
from GPU to the LCD display.
4.Composite Video and Audio Output: The composite Video and Audio output port
carries video along with audio signal to the Audio/Video systems.
5.Power LED: It is a RED colored LED which is used for Power indication. This LED
will turn ON when Power is connected to the Raspberry Pi. It is connected to 5V
directly and will start blinking whenever the supply voltage drops below 4.63V.
6.ACT PWR: ACT PWR is Green LED which shows the SD card activity.

You might also like