You are on page 1of 5

Arduino:Arduino is a prototype platform (open-source) based on an easy-to-use hardware and software.

It
consists of a circuit board, which can be programed (referred to as a microcontroller) and a ready-made
software called Arduino IDE (Integrated Development Environment), which is used to write and upload the
computer code to the physical board
1 Power USB:Arduino board can be powered by using the USB cable from your computer. All you
need to do is connect the USB cable to the USB connection (1).

Power (Barrel Jack):Arduino boards can be powered directly from the AC mains power supply by
2
connecting it to the Barrel Jack (2).

Voltage Regulator:The function of the voltage regulator is to control the voltage given to the
3
Arduino board and stabilize the DC voltages used by the processor and other elements.

Crystal Oscillator:The crystal oscillator helps Arduino in dealing with time issues. How does
4 Arduino calculate time? The answer is, by using the crystal oscillator. The number printed on top
of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz.

Arduino Reset:You can reset your Arduino board, i.e., start your program from the beginning.
5 You can reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET (5).

Pins (3.3, 5, GND, Vin)


 3.3V (6) − Supply 3.3 output volt
 5V (7) − Supply 5 output volt

6  Most of the components used with Arduino board works fine with 3.3 volt and 5 volt.
 GND (8)(Ground) − There are several GND pins on the Arduino, any of which can be used
to ground your circuit.
 Vin (9) − This pin also can be used to power the Arduino board from an external power
source, like AC mains power supply.

Analog pins:The Arduino UNO board has six analog input pins A0 through A5. These pins can
7 read the signal from an analog sensor like the humidity sensor or temperature sensor and
convert it into a digital value that can be read by the microprocessor.

8 Main microcontroller:Each Arduino board has its own microcontroller (11). You can assume it as
the brain of your board. The main IC (integrated circuit) on the Arduino is slightly different from
board to board. The microcontrollers are usually of the ATMEL Company. You must know what
IC your board has before loading up a new program from the Arduino IDE.

ICSP pin:Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of
MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral
9
Interface), which could be considered as an "expansion" of the output. Actually, you are slaving
the output device to the master of the SPI bus.

Power LED indicator:This LED should light up when you plug your Arduino into a power source
10 to indicate that your board is powered up correctly. If this light does not turn on, then there is
something wrong with the connection.

TX and RX LEDs:On your board, you will find two labels: TX (transmit) and RX (receive). They
appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the
pins responsible for serial communication. Second, the TX and RX led (13). The TX led flashes
11 with different speed while sending the serial data. The speed of flashing depends on the baud
rate used by the board. RX flashes during the receiving process.

Digital I/O:The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to read
12 logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The
pins labeled “~” can be used to generate PWM.

AREF:AREF stands for Analog Reference. It is sometimes, used to set an external reference
13
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.

Raspberry Pi: The Raspberry Pi is a tiny computer about the size of a deck of cards. It uses what's called
a system on a chip, which integrates the CPU and GPU in a single integrated circuit, with the RAM, USB ports,
and other components soldered onto the board for an all-in-one package.
It doesn't have onboard storage, but it has an SD card slot you can use to house your operating system and
files. The Raspberry Pi is small, doesn't use much power, and is relatively inexpensive
Raspberry Pi 3 Model B+
The Raspberry Pi 3 Model B+ is the latest product in the Raspberry Pi 3 range, boasting a 64-bit quad core
processor running at 1.4GHz, dual-band 2.4GHz and 5GHz wireless LAN, Bluetooth 4.2/BLE, faster Ethernet.
The Raspberry Pi 3 Model B+ maintains the same mechanical footprint as both the Raspberry Pi 2 Model B and
the Raspberry Pi 3 Model B.
Hardware Specifications of Raspberry pi
Memory:The raspberry pi model Aboard is designed with 256MB of SDRAM and model B is designed with
512MB.Raspberry pi is a small size PC compare with other PCs. The normal PCs RAM memory is available in
gigabytes. But in raspberry pi board, the RAM memory is available more than 256MB or 512MB
CPU (Central Processing Unit):The Central processing unit is the brain of the raspberry pi board and that is
responsible for carrying out the instructions of the computer through logical and mathematical operations.
The raspberry pi uses ARM11 series processor, which has joined the ranks of the Samsung galaxy phone.
GPU (Graphics Processing Unit):The GPU is a specialized chip in the raspberry pi board and that is designed to
speed up the operation of image calculations. This board designed with a Broadcom video core IV and it
supports OpenGL
Ethernet Port:The Ethernet port of the raspberry pi is the main gateway for communicating with additional
devices. The raspberry pi Ethernet port is used  to plug your home router to access the internet.
GPIO Pins:The general purpose input & output pins are used in the raspberry pi to associate with the other
electronic boards. These pins can accept input & output commands based on programming raspberry pi. The
raspberry pi affords digital GPIO pins. These pins are used to connect other electronic components. For
example, you can connect it to the temperature sensor to transmit digital data.
XBee Socket:The XBee socket is used in raspberry pi board for the wireless communication purpose.
Power Source Connector:The power source cable is a small switch, which  is placed on side of the shield. The
main purpose of the power source connector is to enable an external power source.
UART:The Universal Asynchronous Receiver/ Transmitter is a serial input & output port. That can be used to
transfer the serial data in the form of text and it is useful for converting the debugging code.
Display:The connection options of the raspberry pi board are two types such as HDMI and Composite.Many
LCD and HD TV monitors can be attached using an HDMI male cable and with a low-cost adaptor. The versions
of HDMI are 1.3 and 1.4 are supported and 1.4 version cable is recommended.

LED Blinking Using Raspberry Pi with Programming


LED Positive-Pin3, LED Ground –Pin6
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD) //or GPIO.BCM
GPIO.setup(3, GPIO.OUT) //Let we want to get the output at pin 3
GPIO.setup(3, True)
1.(b) LED Blinking Using Raspberry Pi with Programming
1. import RPi.GPIO as GPIO 5. while True:
2. import time 6. GPIO.output (3, True)
3. GPIO.setmode(GPIO.BOARD) //or 7. time.sleep(5)
GPIO.BCM 8. GPIO.output (3, True)
4. GPIO.setup(3, GPIO.OUT) //Let we want 9. time.sleep(5)
to get the output at pin 3
Brightness control
1. import RPi.GPIO as GPIO 4. GPIO.setup(3, GPIO.OUT)
2. import time 5. P=GPIO.PWM (3, 100)
3. GPIO.setmode(GPIO.BOARD) 6. P.start(0)
7. while True: 11. for X in range(100):
8. for X in range(100): 12. P.start(100-X)
9. P.start(X) 13. time.sleep(0.1)
10. time.sleep(0.1)

UART: 1) Universal Asynchronous Receiver/Transmitter. 2) As this is asynchronous communication, data rate


between two devices wanting to communicate should be set to equal value. Maximum data rate supported is
about 230 Kbps to 460kbps.3) It is Asynchronous. 4) No Common Clock signal is used. Both the devices will use
their independent clocks. 5) Lesser Hardware complexity.6) Protocol: For 8 bits of data one start bit and one
stop bit is used. 7) Advantage: It is simple communication and most popular which is available due to UART
support in almost all the devices with 9 pin connector. It is also referred as RS232 interface.
8) Disadvantage: a) They are suitable for communication between only two devices.b) It supports fixed data
rate agreed upon between devices initially before communication otherwise data will be garbled.
SPI: 1) Serial Peripheral Interface. 2) Maximum data rate limit is not specified in SPI interface. Usually
supports about 10 Mbps to 20 Mbps. 3) It is Synchronous. 4) There is one common serial clock signal between
master and slave devices. 5) Less Hardware Complexity. 6)Protocol: Each company or manufacturers have got
their own specific protocols to communicate with peripherals. Hence one needs to read datasheet to know
read/write protocol for SPI communication to be established. 7) Advantage: a) It is simple protocol and hence
so not require processing overheads. b) Supports full duplex communication. c) Due to separate use of CS
lines, same kind of multiple chips can be used in the circuit design. d) SPI uses push-pull and hence higher data
rates and longer ranges are possible.  e) SPI uses less power compare to I2C. 8)Disadvantage: a) As number of
slave increases, number of CS lines increases, this results in hardware complexity as number of pins required
will increase.  b) To add a device in SPI requires one to add extra CS line and changes in software for particular
device addressing is concerned. c) Master and slave relationship can not be changed as usually done in I2C
interface. d) No flow control available in SPI.
I2C: 1) Inter-Integrated Circuit. 2) I2C supports 100 kbps, 400 kbps, 3.4 Mbps. Some variants also supports 10
Kbps and 1 Mbps. 3) It is Synchronous. 4) There is common clock signal between multiple masters and
multiple slaves. 5) More Hardware Complexity. 6) Protocol: It uses start and stop bits. It uses ACK bit for each
8 bits of data which indicates whether data has been received or not. Figure depicts the data communication
protocol. 7) Advantage: a) Due to open collector design, limited slow rates can be achieved. b) More than one
masters can be used in the electronic circuit design. c) Needs fewer i.e. only 2 wires for communication.
 d) I2C addressing is simple which does not require any CS lines used in SPI and it is easy to add extra devices
on the bus. e) It uses open collector bus concept. Hence there is bus voltage flexibity on the interface bus.
f) Uses flow control. 8) Disadvantage: a) Increases complexity of the circuit when number of slaves and
masters increases. b) I2C interface is half duplex. c) Requires software stack to control the protocol and hence
it needs some processing overheads on microcontroller/microprocessor.
1. Temperature monitoring using Raspberry Pi
https://github.com/adafruit/Adafruit_Python_DHT

a. cd path iii. GPIO.setmode(GPIO.BCM)


b. sudo python3 setup.py install iv. while True:
c. + to 5 volt v. temp, hum
2. To GND =Adafruit_DHT.read_retry
3. Out to GPIO 2 (Adafruit_DHT.DHT11, 2)
i. import Adafruit_DHT vi. print(temp, hum)
ii. import RPi.GPIO as GPIO

You might also like