SY_E1_CH4_Interfacing_of_Devices_Using_Python_Programming
SY_E1_CH4_Interfacing_of_Devices_Using_Python_Programming
Electronics Paper -1
(ELC-241)
Embedded System Design
Chapter 4: Interfacing of Devices using Python Programming
Prepared for S.Y.B.Sc. (Computer Science)
40 Pins
Connect anything –
PCM_DOUT- 40 - DAC
Basic Interfacing
Unit 4:Interfacing of Devices using Python Programming
Basic Interfacing
Unit 4:Interfacing of Devices using Python Programming
R
LED Interfacing
Unit 4:Interfacing of Devices using Python Programming
R
LED Interfacing Program
Unit 4:Interfacing of Devices using Python Programming
+5V
R
Switch Interfacing Program
Unit 4:Interfacing of Devices using Python Programming
Cheaper
VCC
D0
D1
D2 VEE
D3
D4 LCD
D5
D6 VSS
D7
RS E
LCD Interfacing Program
Unit 4:Interfacing of Devices using Python Programming
LCD Interfacing Program
Unit 4:Interfacing of Devices using Python Programming
LCD Interfacing Program
Unit 4:Interfacing of Devices using Python Programming
LCD Interfacing Program
Unit 4:Interfacing of Devices using Python Programming
Command to LCD
Command to LCD
GSM (Global System For Mobile) is rectify the limitation of dial up MODEM
GSM –data can be transmitted and received by any embedded system
Interfaced to Raspberry Pi- image, video, audio processing, automation and
surveillance
Interface through – USB or GPIO pins(UART- serial)
Modem communication at 9600 bps baud rate and 8N1 UART data encoding
Interfacing GSM Module to
Raspberry Pi Unit 4:Interfacing of Devices using Python Programming
Interfacing GSM Module to
Raspberry Pi Unit 4:Interfacing of Devices using Python Programming
3.3V
10k
RPi GSM
3.3V Rx 5V Tx
1N4148
3.3V Tx 5V Rx
Interfacing GSM Module to
Raspberry Pi Unit 4:Interfacing of Devices using Python Programming
import serial
import os , time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
port=serial.Serial(“/dev/ttyS0”, baudrate=9600, timeout=1)
port.write(b‘AT\r’)
a=port.read(10)
print(a)
time.sleep(1)
port.write(b ‘ATD9766705885;\r’)
print(“Calling….”)
time.sleep(30)
port.write(b ‘ATH\r’)
print(“Hang Call…”)
Interfacing GSM Module to
Raspberry Pi Unit 4:Interfacing of Devices using Python Programming
Types
1. Electrostatic sensors
2. Piezoelectric sensors
Interfacing Ultrasonic Sensor
Unit 4:Interfacing of Devices using Python Programming
2. Piezoelectric sensors
Piezoelectric material to generate the ultrasonic waves.
Interfacing Ultrasonic Sensor
Unit 4:Interfacing of Devices using Python Programming
HC-SR04
Used to measure distance upto 400 cm
It has
Transmitter
Receiver
Control Circuit
Vcc
GND Vout
Measure infrared light radiating from object which temp is above 00k (absolute
zero)
Every object that has temp above absolute zero emits thermal energy(heat) in the
form of radiation.
Interfacing of PIR sensor
Unit 4:Interfacing of Devices using Python Programming
Interfacing of PIR sensor
Unit 4:Interfacing of Devices using Python Programming
Interfacing of PIR sensor
Unit 4:Interfacing of Devices using Python Programming
Vcc
GND Vout
Interfacing of PIR sensor
Unit 4:Interfacing of Devices using Python Programming
Interfacing of PIR sensor
Unit 4:Interfacing of Devices using Python Programming
Program
Unit 4:Interfacing of Devices using Python Programming
Thank
you !
Unit 4:Interfacing of Devices using Python Programming
D- Switching Diode
R C
Vin +VCC
+VCC
-
- R1 A
Vnon-inv
A + Vsat
Vint
+ -VCC
-VCC
R2
R