1 / 44

ROOM OCCUPANCY INDICATOR

ROOM OCCUPANCY INDICATOR. SUNIL KALWANI, KWANWOO LEE, RAKESH PATEL TEAM 9 | ECE 445 | 5/1/09. INTRODUCTION. Our senior design project aims to create a functional system where the number of people in a room can be determined based on tabulating people entering and exiting a room. . OBJECTIVE.

navid
Download Presentation

ROOM OCCUPANCY INDICATOR

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. ROOM OCCUPANCY INDICATOR SUNIL KALWANI, KWANWOO LEE, RAKESH PATEL TEAM 9 | ECE 445 | 5/1/09

  2. INTRODUCTION Our senior design project aims to create a functional system where the number of people in a room can be determined based on tabulating people entering and exiting a room.

  3. OBJECTIVE Accurately sense whether or not someone enters or exits a room through ultrasonic sensors Keep/Update count value in the microcontroller Transmit and receive the count value wirelessly Convert count value so a computer can understand it using MAX-232/RS-232 Display count value on the computer through LabView

  4. BENEFITS & FEATURES Low overall cost Easy to use Wireless transmission of occupancy data Ability to toggle between two counting modes Mode I: keeps track of total number of people in room (adds if people enter, subtracts if people leave) Mode II: keeps track of highest count (adds if people enter, does not subtract if people leave)

  5. REVIEW ORIGINAL DESIGN

  6. ORIGINAL DESIGN Room A5 people Channel 0 5 people Room A Wireless Communication Room B4 people Channel 1 4 people Master Room Room B Sensors -> Pic -> Transmitter -> Receiver -> Pic -> MAX -> RS -> Display

  7. PROJECT BUILD AND FUNCTIONAL TESTS Ultrasonic Sensors Microcontroller Wireless system MAX-232/RS-232 Display through LabView

  8. BLOCK DIAGRAM TX MODULE RX MODULE SENSOR #1 MICROCRONTROLLER PERSON DISPLAY MAX-232 RS-232 WIRELESS RECEIVER WIRELESS TRANSMITTER SENSOR #2

  9. 1/3 OF DEVICE voltage regulator transmitter oscillator microcontroller Ultrasonic Sensor

  10. 2/3 OF DEVICE RS232 voltage regulator receiver MAX232

  11. 3/3 OF DEVICE count display

  12. ULTRASONIC SENSORS • Send out an 8 cycle burst of ultrasound at 40khz • Raise its echo line high (or trigger line in mode 2). • Listens for an echo, then lowers it • Echo line pulse width proportional to distance of object • Range up to 4 meters

  13. PRELIMINARY TEST DATA FOR SENSORS 3 in (minimum) 10 in 18 in 43 in 32 in

  14. ENTER AND EXIT PATTERN A B Enter: A on first, then B on Exit: A on first, then B on Exit Enter

  15. STATE MACHINE 00/11 ENTRY (ADD 1) STATE 0 (START) 01 (S1 on 1st) 10 (S2 on 1st) 00/11/01 00/11/10 EXIT (SUBTRACT 1) 10 (S2 on 2nd) 11 01 (S1 on 2nd) STATE 1 STATE 2 TRANSITION STATE unconditional unconditional 00/10/01

  16. STATE 1 DETAILS ENTRY (ADD 1) STATE 0 (START) 01 E=1 11 E=0 STATE 1 00/11/01 01/10 E=1 STATE 1 STATE 1B STATE 1A E=0

  17. MICROCONTROLLER Master Clear/ PIC Reset LED Output – For Testing LED Output – For Testing LED Output– For Testing LED Output – For Testing LED Output– For Testing LED Output – For Testing LED Output – For Testing LED Output – For Testing (5V) (GRND) (5V) (GRND) 4 MHz oscillator Count transmitted to wireless circuit Input – Sensor 1 Switch Input – Mode Type of Count Switch Input – Count Reset Input – Sensor 2

  18. 1 HZ OSCILLATOR (PIC) • In order to avoid referencing the sensors through the function generator, we created an oscillator through the PIC • Timing delays were set such that the PIC obtained a 13% duty cycle for a 1 Hz signal • Delay time for high and low PIC outputs were determined through trial and error by measuring the results on a oscilloscope • For future production of this circuit, a 555 Timer would be a more cost effective choice as an in-circuit oscillator PIC FUNCTION GENERATOR

  19. PROBLEMS WITH HIGH FREQUENCIES

  20. WIRELESS SYSTEM LINX TXM-900-HP3 transmitter LINX RXM-900-HP3 receiver Occupancy count sent through channel 0 902.62 MHz

  21. TRANSMITTER Vcc

  22. RECEIVER Vcc Vcc

  23. PRELIMINARY TEST DATA FOR TX/RX Function generator into TX data pin Output from RX data pin Sent thru channel 0

  24. SENT DATA FOR TX/RX 0101010001 TRANSMITTED 0101010001 RECEIVED Value of 21 (00010101) was sent Start bit = 1, stop bit = 0 1000101010 is inverted and sent, with LSB sent last Thus 0101010001 is seen on the oscilloscope

  25. Max232 and RS-232 1 CD Carrier Detect 2 RXD Receive Data 3 TXD Transmit Data 4 DTR Data Terminal Ready 5 GND Ground 6 DSR Data Set Ready 7 RTS Request to Send 8 CTS Clear To Send 9 RI Ring Indicator No Handshaking

  26. MAX-232/RS-232 INTERFACE

  27. Total Data Being Tx/Rx Signal on RS-232 Line Signal that Enters/Leaves PIC

  28. Testing • Shorted pins 2 and 3 • Wrote code to echo character pressed in hyperterminal using the PIC • Probed stages in the circuit

  29. Results on Oscilloscope Data is transmitted from Hyperterminal The data sent to PIC

  30. HYPERTERMINAL TESTING ‘a’ is pressed ‘a’ is echoed count in ASCII

  31. DISPLAY THROUGH LABVIEW

  32. SUCCESSES Correctly keeps track of the count value Wireless system works Correctly takes count data from the microcontroller and sends it to the receiver Receiver has the same data as the transmitted data Data is correctly displayed on computer

  33. CHALLENGES Main source of problems was existence of jitter in sensor outputs Led to few glitches in count values Microcontroller code not immune to speed at which people enter/exit

  34. OTHER TESTS Wireless range distance 10.77m – distance across room Distance between the two sensors Sensor range

  35. SENSOR DISTANCE & RANGE x = ? x = ? 22° 22° 22° 22° y = ? y = ? wall wall NOT PREFERRED PREFERRED tan 22° = 0.4 ≥ x/(2y)  x/y ≥ 0.8

  36. TRIAL AND ERROR I DATA Sensor/Wall Distance kept constant *used Mode 1

  37. TRIAL AND ERROR I GRAPH jitter Efficiency (%) Sensor/Sensor Distance (in.)

  38. TRIAL AND ERROR II DATA Sensor/Sensor Distance kept constant *used Mode 1

  39. TRIAL AND ERROR II GRAPH jitter Efficiency (%) Sensor/Wall Distance (in.)

  40. ETHICAL ISSUES Whether or not count value should be made public or private Information sent/received wirelessly should be efficiently sent so as to not consume too much of the RF spectrum/network

  41. RECOMMENDATIONS Optimize code for converting sensor output data to count data, perhaps by increasing the input oscillator’s frequency Include usage of infrared sensors to make sure humans are detected as opposed to inanimate objects Rather than having a reset for the PIC and a switch to reset the clock after the next clock cycle, the circuit could make use of an interrupt switch for reset. This would create an instantaneous reset of the count

  42. SUMMARY • Project worked! • Jitter in the sensor readings made the occupancy readings inconsistent at times • Focused on the system of capturing data from the sensors and passing that along • Worked on both hardware and software and successfully implemented both

  43. CREDITS Nigel Goodwin Mike Stracey Ethan Miller Wally Smith Tony Mangognia Gary Swenson

  44. Questions?

More Related