Introduction: Theft Alarm on Tinkercad
I was teaching students how to interface led, potentiometer, buzzer, LCD, PIR sensor and using all these i teach them to create a theft alarm
What will happen when a thief comes. It will be detected by PIR sensor and it give signal to LED to glow, buzzer to produce sound, LCD to display a message (means alert by light, sound, message)
Theft alarm
Attachments
Supplies
Computer and internet connection (In TinkerCad Arduino Uno R3, Breadboard, 2 resistor(220 ohms), led, potentiometer, buzzer, LCD, PIR sensor is required)
Step 1: Interfacing of Components
- LED interface to digital pin no. 7 via 220 ohm resistor
- buzzer to digital pin no. 8
- PIR sensor digital pin no. 4
- LCD interfacing:
- GND to ground pin
- VCC to 5V
- contrast(v0) to potentiometer
- Register select(RS) to digital pin no.13
- Read/write(RW) to ground pin
- Enable to digital pin no.12
- DB4 to digital pin no. 6
- DB5 to digital pin no. 5
- DB6 to digital pin no. 3
- DB7 to digital pin no. 2
- LED anode to 5v via 220 ohm resistor
- LED cathode to ground pin
Step 2: Text Coding
Steps involves are:
- include Liquid Crystal Library.
- Create object for LCD
- Create variables for led, buzzer, PIR sensor, PIRstatus(for HIGH and LOW)
- initialize the pinMode in setup function.
- In loop function we use if else condition
- If something is there in the range of a PIR sensor (PIRstatus is HIGH) buzzer will produce a sound, LED will glow and LCD will display 'ALERT'.
- else nothing will work and LCD displays 'SAFE'.
Step 3: Simulation
Last step is to check if it is working or not. Click on start simulation to see its working



