Title: Seat Monitoring Device
1Seat Monitoring Device
- Michael Ding
- Edwin Lee
- Tim Yung
2Objectives
- Design a wireless seat sensor that will be able
to detect if a person is sitting in a seat - Use temperature and pressure sensors
- Connect to a server that will have the ability to
determine which seats are full and display this
information onto a website to be viewed
3Benefits and Features
- Benefits
- Low overall cost
- Easy and efficient to use
- Time-saver
- Easy maintenance
- Convenience
- Features
- Non-intrusive
- Wireless transmission of seat availability data
- End users can check seat availability data
wherever there is internet access - Online website features a layout that is easy to
follow - Can be modified for a variety of different
applications (lecture hall, library, movie
theater, airplane)
4Block Diagram
5Transmitter Schematic
6Receiver Schematic
7Sensors
- Two Types
- Temperature Sensor
- Pressure Sensor
- When both are triggered, a person is occupying
the seat (Boolean AND)
8Thermistors
- Thermally-sensitive resistor
- Advantages
- Low Power Consumption
- Speed
- Simple two-wire connection
- Ruggedness
- High Sensitivity to Low Temp Changes
- Low Cost
9Thermistors
- Two Types of Thermistors
- Negative Temperature Coefficient (NTC)
- Decrease in Resistance with Temp Increases
- Suited for temperature measurements because it
exhibits steep resistance change as temperature
increases - Positive Temperature Coefficient (PTC)
- Increase in Resistance with Temp Increases
NTC Curve
PTC Curve
10Quality Thermistor (QTLCA-14A3)
- 10kO Thermistor (room temp)
- Excellent NTC Value
- Very Accurate
- /- 1C (OC to 70 C)
11Wheatstone Bridge Configuration
- Measuring instrument used to determine an unknown
resistance value when three other resistance
values are known.
12Steinhart-Hart Equation
- Relationship between R and T.
- RT Resistance at Temperature T (O)
- A, B, C, D are constants given by manufacturer
- T Temperature in Kelvin
13Testing Temperature Sensor
- Connected three 10kO resistors in a wheatstone
bridge configuration with the 10kO thermistor. - R1 R2 R3 10kO
- R4 RT
- Vin 5V
14Testing Temperature Sensor
- Placed finger on sensor and Measured Vout with
Oscilloscope
Vout 2.812 V
15Testing Temperature Sensor
- R3 10kO
- Vin 5V
- Vout 2.812V
- Solve for RT
RT 7780.94O
16Testing Temperature Sensor
- Solved for T using Steinhart-hart equation
RT 7780.94O
T 303.96 K 273.15 30.81C
17Success!
- Very good results because the temperature was
32.6C when I placed my finger on a digital
thermometer for 30 seconds.
18Temperature Threshold Calculation
- 2 Equations
- Stein-hart Hart Equation
- Wheatstone Voltage Divider
19Thermistor Noise Issue
- V 0.0542 (V/K)T -13.66V
- Actual /- ?V .220V/2.11V
- ?T Actual ?V / slope of graph
- ?T 0.11V/0.0542V 2.03K
- Therefore Error /- 2 C
20Pressure Sensor
- Mechanical Switch
- Four Springs (50 pounds)
- Seat Cushion
21Testing Pressure Sensor
- Input a 5V voltage
- Do not trigger switch
- Open-Circuit when someone is not sitting in the
seat - Outputs constant 5V voltage
22Testing Pressure Sensor
- Input 5V Voltage
- Trigger the switch
- Closed-circuit when someone is sitting in the
seat - Output 0V Voltage
23Sensor Integration to PIC
- Take output of sensors and send into Pin 2 in
the PIC
24Transmitter Module
25(No Transcript)
26Oscillator
Without Capacitor
- Our oscillator is outputting an approximate
square wave at 4MHz - We used a capacitor (10 µF) from the output to
ground in order to make the square wave more
ideal.
With Capacitor
27ADC conversion
- The Analog signal inputted to the PIC will be
referenced by the power of the PIC. The PIC has
a resolution of 10 bits. Which means if the
reference voltage is 5V. The measured accuracy
is 5V/1024 4.8mV - EXAMPLE
- If the temperature sensor is outputting 2.7V with
a reference of 5V. The value the PIC reads will
be (2.7V1024)/5V 553
28Byte sending
- With the help of RS232 and the putc function we
can send byte at a 9600 baud rate. - Will send 4 Bytes
- 11111111 (start byte)
- 01010101(Chair 1)
- 00110111(Chair 2)
- 01100110(ON)
- 10000000(OFF)
- 00000001(Stop byte)
29Waking up the PIC after sleep mode
- The PIC only wakes up either on an interrupt or a
watchdog timer. - Watchdog timer resets at a maximum of 24 seconds
- Turn off ADC to tell the PIC that ADC is
completed and enable the interrupt of ADC
completion at the beginning of the code
30How Bytes are Being Sent
- Send it 5 times before PIC powers transmitter
down and goes to sleep for 20 seconds to ensure
signal is sent. - Randomize intervals with prime numbers from
400-800 We did this so that we do not create
interference with the other transmitter.
31(No Transcript)
32Receiver Module
- The PIC powers the receiver by supplying the PD
pin with voltage. The PIC will select the
channel for the receiver which will be the same
as the transmitters channel.(000, 903.37Hz) - The transmitted asynchronous data will be
continuously read by the receiver in which it
will send to the PIC in order for it to send to
the MAX 232 Chip to the Laptop (interface).
33(No Transcript)
34(No Transcript)
35MAX232CPE
- To transfer the data from the PIC to the
computer, the voltage levels need to be converted
from 0V 5V to /-12V used MAX232CPE from
MAXIM - Connected the converted signal to the Serial Port
of the computer using a female DE-9 connector - Since we were only sending data one way, we used
Pins 2 and 5 (Rx and Ground)
36Serial Port
- Created a program (using Visual Basic) to read
the data from the serial port - The streamed data was stored on a buffer where
the program popped the bytes off one by one - Using predetermined protocol the code checked for
Start byte (0xFF) and Stop byte (0x01) - Middle 2 bytes of frame corresponded to the
Device ID and whether the device was on or off - Data was stored to a database based on Device ID
37Serial Port interface program
38Testing the Serial Port with RS-232 data
- Programmed a PIC to send data to the computer
using RS-232 protocol (9600 baud, 10bit frame
8bits per data byte, start bit, stop bit) - PIC sent 10101010 to the PC and the PC read the
data into decimal as 170
39Testing a valid data frame
- We expect 4 bytes to come into the serial port
- First (0xFF) byte and fourth (0x01) byte are
checked to determine a valid frame
40Testing the Website
- Sent data through the PIC to the Serial Port and
had it store into the database - We put a time stamp to each database entry and
displayed that on the website - Refreshing the page would query the database for
the most recent data
41Transmitter PCB
42Receiver PCB
43Challenges
44Challenge 1 Change temperature sensor design
- The LM235Z temp sensor operates as a 2-terminal
Zener diode - Voltage change was not significant enough
45Challenge 2 - Change Pressure Sensor Design
- MSI FX1901-0001-50L (50 lbf)
- Could not trigger the sensor
46Challenge 3 How to connect the sensors and PIC
- We first decided to connect all the components in
parallel but when someone is sitting on the
chair, no current will be outputted on the PIC
and Transmitter (This is in our original review) - The circuit below takes care of the and case by
just putting in the voltage of the temp sensor
into one ADC pin on the PIC.
47Challenge 4 Connecting the Database
- Understanding multiple programming languages used
(HTML, Visual Basic, CSS, JavaScript) - Issue getting the data from the database to
display correctly - Solution Connected the database to an object in
html, converted that data to text using visual
basic, and displayed the data using CSS and
JavaScript based on mouse events
48Ethical Consideration
- Since the signals from the transmitter will be
sent wirelessly to the receiver through the
public RF network, the transmitter/receiver will
be programmed to transmit/receive data as
efficiently as possible so it does not consume
the public resources. This way other devices that
require the RF spectrum will have a chance to use
the network. - Solution Use sleep mode on the PIC