Microduino Ultrasonic anti-theft

From Microduino Wiki
Revision as of 10:26, 28 September 2016 by Fengfeng (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Language: English  • 中文

Objective

This tutorial will teach you how to use the ultrasonic sensor to design a security system.

Equipment

  • Other equipment
    • USB cable one
    • Small bread board one
    • Jumper several
    • Infrared receiver one
    • LED one
    • 220Ω registor (protect LED) one
    • Ultrasonic sensor one
    • Remote control one

Schematic

Microduino超声波防盗原理图.jpg

Program

Refer to UltrasonicBurglar

Debug

Step 1: Stack all the Micorduino module, as follows:

Microduino超声波防盗连接图1.jpg

Front:

Microduino超声波防盗连接图2.jpg

Back:

Microduino超声波防盗连接图3.jpg


Step 2: Compile the program and download it, then paste the system on the door, just like this:

Microduino超声波防盗连接图4.jpg


Step 3: Put an object in front of the sensor, about 30cm, check if the LED will light?

Set button 1 is the day mode and button 2 is the night mode. You can press these two buttons respectively, then check the OLED's output and check does the time setting function work?

Result

If set to day mode, OLED will dispaly "Enable:Day". In this mode, put an object infront of the sensor about 30cm during 7 o'clock to 23 o'clock, LED will light. It doesn't work in other time slot.

If set to night mode, OLED will display "Enable: Night". In this mode, put an object infront of the sensor about 30cm during 23 o'clock to 7 o'clock, LED will light. It doesn't work in other time slot.

Video

http://v.youku.com/v_show/id_XNzAxMDkwODA0.html