This is Plan-A.
This is Plan-B.

Plan-C is taken!

Final Project Plan-C

Watchdog
My dog which is from Week07 , will be "Watchdog"!



What to do
Sensor will be set on the head, possibly near eye. When Sensor detect, make a sound from speaker and send email to smart phone.

Input Device

Motion Sensor SB412A is used.
Compact size: 18*10 mm Supply Voltage: DC3~12V
Quiescent Current : ≤20uA
Voltage Output: High level signal: 3V, Standby output is 0V or Open-Collector Output
Delay time: 2.3S-80min(customized)
Blockade time:2.3S
Trigger mode: Repeatable triggered
Operation Temperature: -20℃~+55℃
Infrared sensor: dual element, low noise, high sensitivity
Detecting length: 3~5m
Detecting Angle:≥100°

Datasheet

Output Device

Output device is a Speaker which make dog barking "bow-wow"!!

LED is another output device which shows motion is detected.

Network board

ESP8266 ESP-WROOM-02 board is used.

TEST: Motion Detection to Send Email

Referenced this site for motion detection. I tried it in Arduino Uno, then ESP8266. This can be trigger for sending email.

Referenced ESP8266 GMail Sender to send email from ESP8266 via Gmail SMTP server. Email with no image is only included in this sample. So I add image link in sketch, which is upload to my FabAcademy site. Then I could get email with image! Unfortunately my dog has no camera, so the image is not a picture of someone detected.

TEST: Speaker

Piezo speaker is used as output device.

When motion detected, make a sound for alert.

Result: Motion detect -> email send -> alert melody is Work!!

Output Device Board

There are two output devices in this project, which are Speaker and LED. I designed and milled LED circuit board as output device board.


download eagle_led_board.zip
download led_board.zip

Prototype

I tried to put all in one device case.

Battery
I use this mobile battery as power supply in this project. Out put is 5V from USB port.


Circuit Board
I designed and milled two boards. One is main board which includes ESP8266. Other one is LED board.



Device case
I designed and laser cut device case. MDF 2.5mm is used.


Assembled
I put all parts in the case.


How look with my dog

Spiral Development

Main board

As I used piezo speaker, the sound was melody. Dog barking should be very better in this project. So I remake main board with mp3 module for playing dog barking mp3 file and change speaker. Dog sounds is from this site.



This is new main board.

download eagle_main_board.zip
download PNG main_board.zip
download main_board_sketch.zip

Input Device Board

I made the circuit board with motion sensor. This is based on hello.HC-SR501 from class page. I change c code in order to send signal to main board instead of serial. Because serial pins on ESP8266 on main board are already used to connect with mp3 module.


download eagle_motion_board.zip
download PNG motion_board.zip
download motion_c_and_make.zip

3D Parts

I used Fusion 360 to model "Strap Holder" and 3D printed.

download strap_holder.f3d

This part can be press-fit to the hole on device case as I designed.

Device Case

This is the device case I designed. MDF 2.5mm is used.
download device_case.cdr

System Integration

Front Open
Back Inside
Components

BOM(Bill of Materials)

Main Board
- ESPr Developer x1
- DFPlayer mini x1
- MicroSD card x1
- Pin Header(1x2) x2
- Pin Header(1x3) x1
- Pin Header(1x10) x2
- Pin Socket(1x10) x2
- Pin Socket(1x8) x2

Input Device Board
- ATtiny45 x1
- Resister 0 ohm x3
- Resister 10k ohm x1
- Capacitor 1uF x1
- Pin Header(2x3) x1
- Pin Header(1x3) x1
- Pin Header(1x6) x1

Output Device Board
- LED x1
- Resister 330 ohm x1
- Pin Header(1x2) x2

Sensor
- Motion Sensor x1

Speaker
- Speaker x1

Battery
- Mobile Battery x1

Material
- MDF 2.5mm (300mm x 450mm) x1

Final Presentation Slide and Video

Summary Slide


Video Clip
Open in new tag: presentation.mp4

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.