1 / 13

Motion Detecting Workstation

Motion Detecting Workstation. Theodore Shinners Kevin Schmitz University of Iowa: Embedded Systems Spring 2011. Hardware Overview. Four Motion Control Sensors Three Solid State Relays spliced in extension cords. Zilog ZMOTION Detectors. Zilog ZMOTION Detectors Cont. Pins 1,8 are GND

kuri
Télécharger la présentation

Motion Detecting Workstation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Motion Detecting Workstation Theodore Shinners Kevin Schmitz University of Iowa: Embedded Systems Spring 2011

  2. Hardware Overview • Four Motion Control Sensors • Three Solid State Relays spliced in extension cords

  3. Zilog ZMOTION Detectors

  4. Zilog ZMOTION Detectors Cont • Pins 1,8 are GND • Pins 2,7 are Vcc: Device Uses 3.3V. • Required a simple step down from the 5V output • Used a Sharp voltage regulator • Pin 6 is not used, set to Vcc • Pin 5 is the output, pulled low with motion • Pin 4 is analog input for sensitivity, set to 1.4 V for medium sensitivity • Pin 3 is analog input delay, set to .2V for a 5 sec signal

  5. Solid State Relay

  6. SSR Continued • SSR has 5V control and 5A 240 VAC/VDC load • Standard 3 wire extension cords were cut apart • Relay was soldered on the live wire • Output from circuit above wired to control • When the MCU output pin for associated relay goes high whatever is plugged into the extension cord is turned on

  7. Software Overview • Four motion sensors inputs to MCU • All pulled up, when one goes low: • Determine what sensor was tripped • Look for any patterns • Determine the current output state of associated relay output • Change the output accordingly • Constant Sampling for motion, delays once found

  8. Software Example • pin = PINC;    pin = pin & 0b00001111; //read in inputs    if(pin != 0b00001111){ //if a sensor is low        //Sensor 1        if(pin == 0b00001110){ //if it is the first sensor        _delay_ms(2000); //wait and look for the         pin = PINC; //”all on” condition         pin = pin & 0b00001111;  if(pin == 0b00000000){      temp2 = 0b00111000; //three output pins will be on        }       

  9. Software Example Cont. • else{        temp = out & 0b00001000; //otherwise only deal with the 1st relay            if(temp == 0b00001000){                temp2 = out & 0b00110000;         //if on turn off               }            if(temp == 0b00000000){                temp2 = out | 0b00001000;         //if off turn on            }        }        out = temp2; //send the output        PORTB = out;        _delay_ms(5700); //wait for delay to run out            } //end sensor 1

  10. Motion Description • 4 Motion Detectors Placed Horizontally across a board with line of sight focused with a physical shield • Detectors 1-3 individually control output hardware • 4th detector controls output hardware components 2 and 3 • 1st motion is to simply wave your hand over a sensor • One pass over the sensor will turn the component on • The next will turn it off

  11. Possible Motions • 2nd motion is to wave your hand from left to right across all 4 sensors. • This will turn on all 3 output hardware components • 3rd motion is to wave your hand in the opposite direction across all 4 sensors. • This will turn those same components off

  12. Real World Applications • Reduction of Power Consumption • Lighting Control • Limited Mobility Assistance • Personal Use, plug in anything • User Interfacing, motion control on desktop PCs, etc

  13. Possible Improvements • Program More Motion Patterns • ie (3,2,1,4 makes all devices blink on and off) • Improve Software to avoid problems with long delays from motion controls • Additional output hardware • Workstation can control anything powered by an outlet

More Related