I am planning to build a device able to detect and tell a server via Wi-Fi if a chair is occupied. How would you do it? And how cheap do you think the device could be?
Oh wow, so many ways you could do this. To start, get an arduino with a wifi shield to transmit and read data. Familiarize yourself with how the arduino works with the shield, and how to read it on the other end. Then it's time to look at sensors you could use. Here's a couple ideas, I would recommend using more than one and cross-checking:
- Force sensor on base of chair: Can tell you how much weight is on a chair (Sparkfun SEN-09376)
- IR or sonic sensor on back of chair to detect distance (example)
- Vibration/shock sensor to detect if someone has sit down (example)
- Load sensor: literally a scale in a sensor. (Sparkfun SEN-10245)
The optimal solution if you had the cash would be to put all of them on the chair and use the arduino to compute all of the sensor values into one boolean. However, if you only could have one sensor I would recommend the load sensor which would definitely be the most reliable of all the examples I gave.
For a soft seat you could sense occupancy with an LED and photo-sensor at opposite ends of a short somewhat flexible tube that gets flexed when the cushion compresses, interrupting the light. That or a microswitch would have to be the cheapest means of sensing.
Getting from there to the server depends a little on how much work you're willing to do, from rolling your own micro-controller+WiFi PCB to purchasing off the shelf parts, which may in turn, depend on whether you need to monitor one chair or a whole auditorium.
I'm not going to answer this directly, because then you wouldn't learn anything! However, here are a few suggestions:
- Use a pressure sensor on the seat of the chair or
- Put a distance sensor (IR or ultrasonic) pointing at the chair.
- Use the official Arduino WiFi shield.
You could use the awesome CapSense-Library. Additionally to the Library you only need a thin piece of conducting material e.g. aluminium foil and two pins on your arduino. The only thing you have to do is experiment with different resistors to reliably distinguish between someone sitting on the chair or not. Advantages of this method are:
- virtually no costs at all
- easy to implement
- not subject to wear and tear
- should work with any kind of chair independent of material e.g.
hard or soft surface
- consumes next to no power (I assume the whole device runs on battery since it's attached to a movable chair)
- could even sense a person in the process of seating her-/himself and enable you to start the music faster (my stereo for example takes a second or so to start up)
You could use Electric Field Sensing, it allows you to detect the presence and position of conductive objects even if the sensor is covered by an opaque object. The technology is used in cars to detect if someone is sitting in a seat so the car can beep at you to put your seat-belt on. However, if all you want to do is detect presence then this is no better than using CapSense.
To communicate with a server over WiFi you could use the Arduino WiFi shield, the Arduino Yun (which has on-board WiFi) or buy a ethernet WiFi adapter and use it with an Arduino board which has ethernet.
http://arduino.cc/en/Main/ArduinoBoardYun (Arduino board with on-board WiFi)
conductive foam as sensor. it chg resistance when compressed.
or use image from camera to determine if seat is occupied. only one source for all data.