Motion Sensing PowerPoint Controller Using Atmega644

Introduction

[Some Pic]
For our Final Project in ECE 4760, we built a controller that interfaces with a computer running a PowerPoint display through USB. The device can control slide transitions based on hand motions or button presses as well as play MP3 files when it detects people near the display.
We chose to do this project as we often encounter screens showing PowerPoint displays in Cornell. We thought that it would be interesting to create a device that makes the displays more interactive and interesting for viewers.
The controller is also a very good way to save electricity as it allows displays to idle and turn off when no one is nearby. Upon detecting the approach of a person, the controller sends a keystroke to the computer which wakes up the display. By playing audio files from an SD card, the controller can entertain or convey information to viewers through recorded voiceovers or music. We managed to fit all the components into a compact enclosure that can be mounted next to or below a display. The controller can also be used as a standalone motion sensing MP3 player if not hooked to the computer.

Rationale and Sources of Project Idea

There are many times when displays running PowerPoint are placed in public locations to advertise upcoming events, offerings, and other opportunities to passers-by. These displays are typically set up as slideshows by the administrator, and slides are cycled through at a fixed rate. Viewers have no control over which slide to read and are thus inconvenienced whenever slide transitions occur too quickly or too slowly. Visitors may be further frustrated because the slideshow loops in only one direction. However, the visitor cannot be given control of the PowerPoint host computer for many reasons. In one lecture in ECE 4760, Professor Bruce Land was tossing out ideas for final projects, and he suggested PowerPoint control for the displays down the hall on the second floor of Phillips Hall. These displays are large TVs that are fed video input by Mac Minis underneath each one. We decided to make good on the idea and implement it. And so, while the implementation and design is ours, the idea belongs to Professor Bruce Land.

High Level Design

[Top]

The Green LED lights up, signaling that the Right-hand IR sensor detects a signal. Music also plays from the SD card, but this is not visible.
 
With a simple USB connection and no installation at all, a system admin can allow visitors interfacing with our project to use hand motions or button presses to direct a PowerPoint to advance or rewind at will with no threat to system security. A normal hand wave is enough to trigger PowerPoint slide transitions. Our project also allows custom MP3s to be loaded into an SD card to be played when visitors are sensed in front of the display. This feature can be used to draw visitor attention to the display with a recorded greeting. After the greeting, additional music or recorded speeches can be played.
The project provides the minimal interaction with the PC necessary to control the avoids compromising the security of the host computer as the user can only send left and right keystrokes. The motion sensing interface is also intuitive and can be used by visitors of any age!
Power saving is a further benefit, as monitors can be set to turn off when idle (this project will then wake the monitor up if a person is detected walking past). A creative user could even ignore the PowerPoint aspect of this project and still get good utility out of this device; for example, one could load the SD card with Mozart and other classical music and place the device near a baby’s crib. Upon detection of the baby’s movement, the device would play Mozart and the baby would get much smarter.

Use

Our project can be mounted at chest-height underneath any PowerPoint display. Interfacing with the device via two motion-sensors or push buttons controls the PowerPoint. A detected hand wave at either sensor sends a USB keyboard scan code to the host computer corresponding to either the left-arrow key or the right-arrow key. Besides these two keys and an “a” keystroke, public users have no access to the rest of the host computer, ensuring system security. An extra button also allows the user to cycle through the other MP3s on the SD card or stop playback.

Logical Structure

[Some Pic]
This project uses an AVR Mega644 to implement IR sensing for motion detecting, SD card reading with SPI interfacing for file reading, MP3 decoding with either the VS1011E-L using SPI or the STA013 using I2C, and PC communication through a USB by emulating an keyboard human interface device (HID). By emulating a USB keyboard with plug and play functionality, we remove the need to install drivers or software.
The ATMega644 takes input from three sensors. Two IR sensors (on top of the box) are used for PowerPoint control. When a hand wave is detected at either sensor, the signal is processed and a USB keyboard scan code for either the left or right arrow key is sent by USB to the host computer.
A PIR sensor, situated front and center, has much higher range than the IR sensors and is used to detect the presence of a human in the display area. If the PIR senses someone’s presence, it signals the MCU to read from the attached SD card.
The SD card contains MP3 files, which must be in the base directory. Music data is read and sent to the MP3 decoder using SPI. Speakers are attached to the decoder’s output, and the music or sound bite is played for the visitor to hear. A good portion of this project was spent on this “extra feature” of reading the SD card and implementing audio playback.

Hardware / Software Tradeoffs

We used a dedicated IC to decode the MP3 files. Accessing of the SD card and FAT filesystem is done in software using the FatFS library by www.elm-chan.org. The USB HID emulation is done in software using the V-USB library from www.obdev.at/products/vusb/. We considered using the Texas Instruments TUSB1106 USB transceiver IC but decided that the circuit suggested by the V-USB developers was sufficient.

Existing Patents, Copyrights, and Trademarks

These are addressed in the Legal Considerations section.

Relationship of Design to standards

Our project adheres to the standards set by the SD Association for using the SD card through an SPI interface. The V-USB library complies to the USB 1.1 specification. The SPI and I2C standards are also used to communicate with the MP3 decoder ICs.

Previous Related Work

There does not seem to be any previous work that is aimed at publicly displayed PowerPoint control. It seems that everyone relies solely on the fixed rate timers built into PowerPoint for public displays. With regard to non-public display PowerPoints, normal PowerPoint presentations are usually conducted in person and can thus be controlled easily with remotes. There is thus no motivation for a motion sensing controller in this context. As far as we know, there is no previous work that has the same goal as ours does.
However, our project does draw aspects from many other previous works that relate to MP3 playback, SD card usage, and USB communication. A short description of similarities follow:
The Music Playing Alarm Clock was the most valuable example reference we used. Much of their SD card reading and MP3 decoding was similar to our needs, and their code was well documented. However, they used a different MP3 decoder (VS1033) as compared to our VS1011.
Our reference for information on the STA013 MP3 decoder was here. We referred to here and here for figuring out how write our code for using the I2C (TWI) bus on the Mega644.
Our IR sensor design is taken directly from the work we did in Lab 4. We constructed two of these sensors from our previous experience and used the same schematics. Our source for information on the PIR sensor was a tutorial at here, which was where we bought our sensor from.

Parts List:

Part Source Unit Price Quantity Total Price
ATmega644 Lab

$8.00

1

$8.00

PCB for ATmega644 Lab

$4.00

1

$4.00

12V Power Supply Owned

$0.00

1

$0.00

Passive Infra-Red Sensor Adafruit

$10.00

1

$10.00

SD card adapter Digikey

$2.67

1

$2.67

VS1011E-L breakout board Sparkfun

$19.95

1

$19.95

3.5mm audio jack Digikey

$1.41

1

$1.41

LP2950-33 3.3V voltage regulator Texas Instruments

Sample

1

$0.00

TXB0108 Texas Instruments

Sample

1

$0.00

DIP socket Lab

$0.50

1

$0.50

USB socket type B Lab

$0.00

1

$0.00

USB cable Owned

$0.00

1

$0.00

Push Buttons Lab

$0.00

3

$0.00

Solder Board Lab

$2.50

1

$2.50

Small Solder Board Lab

$1.00

1

$1.00

SIP/Header pins and sockets Lab

$0.05

95

$4.75

SOIC carriers Lab

$1.00

2

$2.00

Enclosure Salvage

$0.00

1

$0.00

1 Pin Jumper cables Lab

$1.00

6

$1.00

IR sensor circuits recycled from Lab 4 Lab

$0.00

1

$0.00

Zener Diodes 3.6 V Digikey

$0.54

2

$1.08

Total

$57.78

For more detail: Motion Sensing PowerPoint Controller Using Atmega644


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top