22
1 Electrical and Computer Engineering Team 2 Delphine Mweze, Elizabeth Cole, Jinbang Fu, May Oo MotionPro Preliminary Design Review Advisor: Professor Bardin

MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

1Electrical and Computer Engineering

Team 2Delphine Mweze, Elizabeth Cole, Jinbang Fu, May Oo

MotionPro

Preliminary Design Review

Advisor: Professor Bardin

Page 2: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

2Electrical and Computer Engineering

Project Description

▪ Our team is going to design and build a gaming machine that projects a game on any flat surface

▪ The machine detects motion of a finger to control the game

▪ We will be using a microcontroller and pico-projector to display the video game and detect motion using a camera and sensors

Page 3: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

3Electrical and Computer Engineering

Significance and Societal Impacts▪ Affordable and portable

▪ Implementation of augmented

reality

▪ Step toward hologram gaming

▪ Less expensive than other gaming

devices

▪ Educational purpose

Page 4: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

4Electrical and Computer Engineering

Requirements-Specifications

▪ Negligible delay during gameplay:• Camera + Projector resolution ≅ 10,692,096 pixels• Frames to find hand locations, interpret locations, update

game state, output image• 4 bytes per pixel (RGBA) ≅ 3,072,000 bytes per frame• Processing speed of at least 460MHz required

▪ Small compact size and energy efficiency

▪ High resolution game with multiple options

▪ Bright and visible in normal room lighting

Page 5: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

5Electrical and Computer Engineering

High Level Block Diagram

Ultrasonic Sensors(Hand Location)

Projector

Raspberry Pi

Image Processing

Power Supply

SpeakerRaspbian OS

Coordinate Detection

Game Program

Camera (Hand Motion)

Class Interfaces

+ Main()

Page 6: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

6Electrical and Computer Engineering

Distribution of Responsibilities

Delphine

• Class Interfaces• Data Processing • Game code to graphics

Fu

• Power supply• Ultrasonic sensor circuits• Game programming

Elizabeth

• Coordinates detection• PCB design• Projection optics

May

• Edge detection• Motion detection • Pi Camera

Page 7: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

7Electrical and Computer Engineering

Pi Camera - May

▪ 5 MegaPixel Camera▪ Ability to detect motion accurately in real time▪ Camera resolution: 2592 x 1944 pixel▪ Video resolution: 720p 60 fps, 480p 60fps ▪ Low power consumption▪ Support Raspberry Pi Operating system▪ Requirement: 30 frames/ second▪ Approx. $25

https://www.amazon.com/gp/product/B00E1GGE40/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A20U1P78VRGMGR

Page 8: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

8Electrical and Computer Engineering

Motion Detection - May

ImageProcessing

EdgeDetection

MotionDetection

Using C++ and OpenCV

Edge Detection

● filter()● outline()● getEdgeDetection()

Motion Detection

● frameDifference()● threshold()● getHandDirection()

Page 9: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

9Electrical and Computer Engineering

Motion Detection - May

http://www.entangler.in/uploads/2/5/5/1/25517561/6413877_orig.png

http://www.entangler.in/uploads/2/5/5/1/25517561/1685908_orig.png

Page 10: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

10Electrical and Computer Engineering

Ultrasonic Sensors - Elizabeth

Ultrasonic sensors▪ Operate at 40 kHz▪ Sends out sound▪ Times how long it

takes for reflection to come back

▪ Positioned at base of system facing projection

https://www.teachengineering.org/lessons/view/umo_sensorswork_lesson06

Page 11: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

11Electrical and Computer Engineering

Coordinate Detection - Elizabeth

Coordinate Detection

▪ Finger localization

▪ Convert P(x,y) in projection to P’(x,y) in the

game

▪ Using ultrasonic sensors

Page 12: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

12Electrical and Computer Engineering

Ultrasonic Sensors’ Circuit - Fu

▪ Based on the circuit of ultrasonic sensor HC-SR04

http://s1367.photobucket.com/user/Monica_Jing/media/4E0B8F7D_zpsc74db897.jpg.html https://electrosome.com/wp-content/uploads/2014/08/H

C-SR04-Ultrasonic-Sensor.jpg

Page 13: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

13Electrical and Computer Engineering

Ultrasonic Sensors’ Circuit - Fu

Reasons to rebuild the circuit:▪ Need at least 10 sensors to detect the

coordinates of the hand ▪ For HC-SR04, each sensor has 4 pins, which

means the microcontroller needs to have at least 40 I/O pins

▪ Our microcontroller does not have enough pins

▪ Need the transmitter and the receiver to be more compact

Page 14: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

14Electrical and Computer Engineering

Microprocessor - Delphine

▪ Raspberry Pi 3 Model B▪ Power efficient▪ HDMI out capability▪ Compatible with IR camera▪ Image data processing▪ Output of game data to projector

http://www.mcmelectronics.com/product/RASPBERRY-PI-RASPBERRYPI-MODB-1GB-/83-17300

Page 15: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

15Electrical and Computer Engineering

Microprocessor - Delphine

▪ Camera to Pi configuration▪ Multi-threading▪ Game data to video conversion▪ Class Interfaces between image algorithms,

sensor signals and game

Code to GraphicsAlgorithm

Main ()

ImageData Sensor Data

Page 16: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

16Electrical and Computer Engineering

Game Programming - Fu

▪ Program with C++▪ Snake(accompany with background music)▪ Users only move left, right, up and down▪ User can choose different difficulties and modes▪ Snake can only go left, right, up and down

http://www.igyaan.in/wp-content/uploads/2015/10/snake-game.jpg

http://mobile.my-symbian.com/s60v3/grafika/snake.png

Page 17: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

17Electrical and Computer Engineering

Projector - Elizabeth

Challenges:▪ Height needed in projection▪ Projection brightness vs room ambiance▪ Fixing optical distortion of angled projectionProjector Specifications:▪ Resolution of at least 480p▪ HDMI connection▪ Portable (pocket-sized)▪ Less than 2 pounds▪ Under $150

Page 18: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

18Electrical and Computer Engineering

Power Supply - Fu

Battery(12V)

Low Pass Filter

Linear Regulator

Low Pass Filter

5V

12V

● 12V rechargeable battery

● Sallen-key low-pass filter

● LM 1117 For the linear regulator

http://www.getfpv.com/lumenier-1300mah-3s-35c-lipo-battery.html?

http://datasheetcafe.databank.netdna-cdn.com/wp-content/uploads/2015/09/LM1117-Image.gif

https://en.wikipedia.org/wiki/Sallen%E2%80%93Key_topology

Page 19: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

19Electrical and Computer Engineering

Budget

Component CostProjector $120Camera $25Microprocessor $36Power Supply $90PCB $33Total $304

Page 20: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

20Electrical and Computer Engineering

Alternative Approaches

Custom built microcontroller

IR camera for coordinate detection

Advantages ● Less components● Faster processing

speed

● Less expensive● Less space

occupied

Disadvantages● Compatibility issues● Higher risk of failure● Less drivers

● Need high resolution

Page 21: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

21Electrical and Computer Engineering

MDR Deliverables

▪ Functioning edge detection and motion detection without noisy background (May)

▪ Raspberry Pi receiving game input and sending game output (Delphine)

▪ Successful projection of game and detection of hand coordinates (Elizabeth)

▪ Programmed snake game and power supply design (Fu)

Page 22: MotionPro - storage.googleapis.com · Ultrasonic Sensors’ Circuit - Fu Reasons to rebuild the circuit: Need at least 10 sensors to detect the coordinates of the hand For HC-SR04,

22Electrical and Computer Engineering

Questions?