A.Khan asks:
“I am trying to use IR sensors to detect where someone is sitting in a room. The IR sensor would be placed on a rotating panel where it will send signals to the microprocessor about where it detects people sitting and the microprocessor can then plot in the 360 circle at which angles it received the input.
For this, what do you suggest is the best way to go? I was thinking more about getting IR body heat sensors premade components (~$6-$10) which give out high or low processed signals when they detect heat and sending it off to an arduino board. But it looks a bit on the expensive side. Is there anyway of creating this setup cheap?
Thanks.”
What a fun question!
I spent the past couple of days coming up with what I think would be viable solution to your problem. To start, Adafruit happens to offer a great little PIR that, as you suggested, responds with a high/low signal in correlation to a IR source crossing its path. Adafruit’s PIR also has a 120 degree viewing angle, which is a bit wide if you are trying to pinpoint a person in a room. Because the device relies on the “path” state to change between the two sides of the sensor and you want to pinpoint a heat source, you will have modify the sensor to limit the viewing angle. You can do this by removing the faceted Fresnel lens and attaching a small tube about 1″ long over the sensor or by covering a percentage of it with some non-transparent tape (this certainly would require some experimentation). Ladyada has a wicked tutorial about PIRs work and how to modify/use it.
The next problem is the fact that you want to view in 360 degrees. I came up with three solutions for this. First, which is the most costly, would be to make your circuitry wireless, relaying the data back to a server. This also poses the problem of powering the device. The second would be to keep the sensor tethered and sweep the device clockwise then counter clockwise. Finally, the third, would be to follow the attached diagram. I had the idea that if you used an 1/8″ stereo “headphone” plug & jack you could simulate a slip-ring (commonly found in wind turbines to transfer electrical energy from the generator in the rotating nacelle). This would allow you to isolate the PIR on a rotating platform and transfer signal/power to the device without interruption. You might want to add a little non-conducting grease to the interface to keep it from wearing out.
In order to make the device rotate, I would recommend using a stepper motor attached to a larger gear, which acts as a yaw bearing for the PIR platform. You can easily control the stepper using an H-bridge (for bipolar) or darlington array (for unipolar) to precisely cover your 360 degrees. Now you get to do the math to determine how many steps per rotation, decoding the PIR, etc.
I hope this answers your question! Up next is J.Miraldi with a question about creating a robotics program for their high school!
Don’t forget, everyone is invited to ask a question:
I work with slip rings. Only silver with silver/carbon brushes, gold rings with platinum brushes, or mercury pool rings are noise free. Every other moving connection will soon develop noise. Guaranteed. I highly recommend a “clock spring”. This is what the steering wheel to column connection is in modern cars, as cheap old slip rings led to horns not blowing and lawsuits. Just provide a slick surface disk with a 3-4 turn pancake of wire on it. You should be able to do back and forth 360s for years,noise free. (After all, car wheels do 2.5-3 turns for a decade or two!)
Woah, this solution does NOT allow you to determine the position of a person sitting in a room, it merely allows you to determine roughly the angular position of the person, with respect to the sensor turrett.
If you want to determine the position of a person with this system, you would have to use at least two turretts, at two angles of the room ; their combined info would allow you to pinpoint the location where the person is sitting.
If you do this, do NOT use slip rings, have the turrett rotate in one direction, and then the other, it’s a simpler solution.
This gives you the answer with two systems. It is probably still simpler to do as they do in parking lots: have a sensor above each place. However, it you absolutely cannot imagine to have a distributed system, then PIR is not your solution.
Any system to locate accurately something in 2D or 3D that’s not distributed is complicated, but the easiest I can imagine for your particular problem is an audiogoniometer. Take three microphones and mount them on the angles of an equilateral triangle with a 1 ft side, or so. Compare the output of each microphone with a reference threshold voltage, using operational amplifiers. Then, as soon as the person makes a sound louder than the background, you will have a voltage step on the output of each amplifier. The difference in the time where the step occurred on the three microphones will allow you to determine the location of the person with a 50cm accuracy (the sound travels 1ft per ms, roughly, but as you catch only the first sample, you have further errors due to the wavelenght of sound, which is typically in the 10cm range).
This requires the person to make one sound significantly louder than the backgound (e.g. clap her hands). You can also track the person by any sound she makes, which could be the sound she makes by simply sitting down, but this requires some serious signal processing.
Do you get the general idea? If I were you, I’d make a parking lot style implementation: it’s big and might seam like a dirty hack, but it’s simple, cheap and reliable.