PIR (Passive Infrared Sensor)
PIR's are cheap little things that combined with a little chip (PIR Sensor Control IC) and possible a Fresnel Lens will tell you if there is motion in font of it. Especially that of a human body, as it is reacting on Infra Red.
No, you can not use a PIR for anything but on something that stands still, to detect something else that moves.
No, you cannot use a PIR to make a robot follow you. The PIR only detects changes. A moving robot (even turning it's head) would be one constant "alarm" of "changes" - not possible to tell what is what.
If you want to make a robot follow you, you either have to use a camera and some serious calculations, or something like the devantech Thermopile array sensors or hack an Infrared thermometer (often refered to as a Laser thermometer asthey often come with a guiding laser-beam).. or something else :D
PIR's can only detect changes! A moving robot will detect changes all the time!


Robot guard dog!
hahahahahha
haha, yes it would be nice
haha, yes it would be nice not having the robot going berserk on one self :-D.
You might be able to...
Scanning
It sounds like there are some active components in Frit's sensor that you've removed. I understood that there was only and output it whatever was in front of the sensor "changed".
I hope you're right. A scanning (YDM-style) PIR head would be something else. I'm hoping that the voltage you're seeing is proportional to the heat of the subject.
Please persue this aggressively, and keep us posted at every turn!
Will do!
I have two of the alarm systems. One I tore apart for the sensor (it looks like the one pictured above but without any text). And the other one still works as it should, apply 12V if it sees something is opens a relay. The boards have an amplifier and 4 comparitors. Part NO. LM358M and LM339M. I am going to play with the still working one as I can easily get to the amplifided signal.
The funny part is the sensor runs off 5V not 12V. It is regulated on the board. That makes it easier to use with a microcontroller.
I need to find a better amplifier as the signal from the sensor it self is extreamly small, 0.55v-0.62V about. With the transistors I got it to go from 0-5V but it is not that great. I will post more when I know more.
Justin
EDIT: See http://www.youtube.com/watch?v=8ahlIXnmqbQ for a sample of it's output.
http://www.coilgunpower.com
I don't know about plastics,
Plastic Works
As I am trying to tell
As I am trying to tell everybody, the PIR's are only good for detecting changes.
Every motion detector out there has fresnel lenses over them for that very reason; To get as much attention to changes as possible, because the PIR is actually a quite dumb little thing, and needs lots of amplification, and dual-runs etc.
These fresnels are made specially to have lots of focus areas, and not as what is else wise known as a fresnel: a "flat magnifying glass". The ones used for PIR's are made to amplify changes:
...but
But our friend seems to have stripped teh IR sensor out of the PIR sensor. I'm hoping that he signal he's seeing is proportional to the heat in front of the sensor. What he has is no longer a PIR. Perhaps it will only see "heat" or "no heat" but either way, a scanning head would be able to say "Oh, there's heat. Now it's gone. Oh, there it is again. It's moved a bit."
Even if the PIR was used and it only detected changes, I don't see why the scanning head couldn't say "Oh, there's a change. Oh, there's another one in a different place."
Surely that's what the ultrasonic scanning head does? Sure, it measures distance, but it would work just as well by detecting the "edge" change between a near object and a far object.
I'm keeping my mind open and my fingers crossed.
These things come in
These things come in housings with usually 2 or more thingeys, so that difference is easier to detect by letting the signals cancel each other out, and then note that one made a jump before the other.
However, you CAN also get them in "singles", and yes, you can also strip all away, and so "measure heat" on distance. BUT.. All sorts of other things will have a saying in the equation, you will need "something to compare with", or .. arh - too hard to explain in english for me :) Go ahead, I send a case of beer to the first one who can make a robot follow / track a person / measure heat (without other means of making reference) using a PIR!
Challenge
I would of had it...
I started to make it track my hand but then I found out my ATmega644 was defective... Porta does not work. The other one I ordered is just a toaster, it gets extreamly hot if any power is applied. I have two more comming. I did just desolder a Atmega32 from a dead robot. I'll give it a try.
My sensor is still in the three pin case. I don't see why you say it can only detect changes. As you can see in the video if my hand is to the right the voltage drops while if it is at the left it becomes higher. The sensor uses two PIR elements that counter each other. If say the right one sees more IR then the signal goes higher but if the left sees more then it goes lower. That way it stays the same if the temperature changes.
Sorry but you won't be able to measure temperature. These sensors are made to detect differences in temperature not the actual temperature.
Justin
Success!
OK. I know it is not perfect but it is a start. The PIR sensor tracks my hand! It would be a lot better but the way the sensor is it gives an output from something like 650mv to 700mv that is then amplified by an op amp. The signal seems to drift, but only by a few mv. That drift is amplified enomously. It can be trimed out but the potentiometer in my setup is extreamly sensitive. The code assumes that when it sees nothing the value is 2v but as it drifts it will sometimes lock on to the side of your hand and not the center.
It has a ways to go but it is a start. I am uploading a video now to youtube. I think I will try a good DAC to use as refrence. That will allow the ATmega to compensate for the drift. An auto calibration feature. :)
Justin
Come see it
Nice work.. But still I see
OK,OK I am working on it
I can adjust for the drift by feading the opamp an offset voltage. I am currently doing that with a potentiometer. Last night I ordered a 12bit DAC to do the job for me. I was thinking of having one of the sides of the servo covered so the PIR sensor could be blocked and automationcaly calibrated every X seconds or miniuts.
When I manage to get it calibrated right (you can't even turn the potentiometer just slight taps changes it a lot!) it can detect me on the other side of the room. I have not built a robot yet so I could not actually have it follow me. I am planing on making a "smart" sensor to acomidate for the drifting. Then I will make a robot.
The drifting could acturally be the potentiometer as when ever I even touch my desk it jumps a little, extreamly sensitive. Hopefully a 12bit DAC is percise enough.
I also ordered a better opamp. In the secutiry system that I stole the PIR sensor from I think they used a capacitor to filter out the drift by only letting changes through. The analog output from it is much different then my circuit if you put your hand near it the voltage rises then quickly drops and then levels out. Mine it stays high untill you move your hand.
Another problem that you can see in the video is this sensor takes a long time to react. That is why it does not stay pointed at my hand it kinda moves back and forth. If I slow the servo more then it works better.
Justin
Well I can only say that it
Well I can only say that it would be way cool if you manage! It is a big dream to make a robot track & follow humans, and this way would be very cheap and simple compared to using more advanced methods.
I tried to do what you are doing without luck, but I am not as skilled as you, so perhaps you will do better than me :) Good luck.
I just though of a big
I just though of a big problem when trying to track humans. You will NOT be able to do it with the PIR alone. The PIR is good for saying "There is someone to the left" but not good for saying "they are 3 feet away". You could guess the distance with poor accuracy but it would have to be used with a Sharp IR sensor or ultrasonic to get the distance. It would help it pick out the human amont the other obstacles.
Would this still count if the micro used the PIR to find the human and sonar to detect the distance so it would not run into the person?
Fritsl what exactly did you try? What was your setup? You probably have a lot more experience then me with robots. I am now just making my first robot. I have done a lot of work with microcontrollers but things like handheld devices, or LED cubes.
The DAC I order was a sample from Microchip. They say it takes 2-3 weeks to get. I don't think I can wait that long. Maybe an order to Digikey. :)
No problem using a SRF05 or
No problem using a SRF05 or similar together.
Problem over all is that you will not continuasly be able to read "There is a human". You ask for my setup. My setups are a mess, I work on intuition, have no fine gear. I read how they work, understand, test cornerstones, burn something, conclude. Would take for ever to backtrack, sorry :)
I repeat myself: They can be used to detect changes!
By strange setups not plausable you WILL be able to measure temperature at a distance, even when you say this cannot be done. But you will need constant calibration / knowledge of the thing you are pointing at.
As I see it, what you have now is the illusion that made me go and spoil a couple of perfectly fine alarms etc. It looks like it can be done, but you will need a steady "this from that" to use it to track (together with a distance sensor) and that is never what you get, only "difference between this and that" (= changes). Unless you keep calibrating which is not very smart to have in a robot :)
It can be done. I am sure of
It can be done. I am sure of it. I don't know what you mean when you say "difference between this and that", the ouput I am getting easily detects my hand.
For the robot to calibrat the sensor it just has to know that it is not looking at anything.
I don't think you could read temperature with a PIR with two elements like the one I have because they cancel each other out
When I said you need a distance sensor that is to keep the robot from running into the person. The PIR could tell it which direction to go but not how far.
Why do you say you will not continuously be able to tell where the person is? I would not describe my PIR output as "change" but rather a difference between the two sensors. As long as it sees more IR from one direction it will continue to output the difference.
I'll order a DAC today and try out my new setup as soon as I can.
Check out another video. A little better tracking. I added some resistors to help lower the sensitivity of the trimmer pot.
http://youtube.com/watch?v=aThHsVxAE6s
Justin
New and Improved!
I made a lot of changes to make this thing work better. First the major change. AUTOCALIBRATION! Yay!! No more messing with potentiometers. The sensor simply looks away and adjusts. I have never tried this but in my dispair for a DAC I made a simple one with a PWM signal and a RC filter. There were also some tracking fixes that made it better. Check out the video!
http://www.youtube.com/watch?v=_gUGGN0TqyA
Tomarrow I will pick up a larger resistor to incerase the gain of the opamp. I am using a little over 1mega ohm now. Going for 10M ohm. The sensor now can see me standing at about 2-3 feet. I hope with more gain I can increase the range. Next video will be it tracking me!
Justin
Exciting! :)
Buying these things
Hey guys! I notice it's been a while since you've been talking about this, but I was wondering if anyone knows how to buy these passive infrared sensors under $2. I only need a range of a few inches, actually, so I figure there's gotta be someone out there that makes these weak ones for a smaller price.
Let me know! Thank you very much
You can buy them from All
You can buy them from All Electronics for $3.95. Not too bad, but more then $2.
http://www.allelectronics.com/make-a-store/item/IRD-10/INFRARED-DETECTOR-MODULE/-/1.html
Justin