HiTechnic have released a new product; the HiTechnic Passive Infrared (PIR) sensor. With this sensor you can detect movement of warm bodies, such as pets and people.
How does it work? All warm bodies, such as people and pets emit a certain amount of heat, which is Infrared radiation. This particular sensor keeps track of changes in the amount of IR radiation that it detects. If the change is too great then it assumes that it must be because something is moving in front of it. This sensor works best detecting objects that are between 30 and 50C, since human bodies tend to be around 37C, that works out well.
The HT PIR divides the area in front of it into two zones. If the object is to the left of the sensor, the values returned by the sensor will range between 0 and 127. An object to the right of the sensor will cause it to return values between 0 and –128. This makes it super easy to use this sensor as a part of an elaborate alarm system for your room or a even a heat seeking shooter bot. No longer will your cat be able to simply jump on the counter and feast on the snacks you’ve accidentally left there.
You can read more about this cool (or should that be hot?) sensor here: [LINK].
Excellent. Up until now I have been using my older passive IR sensors from Technostuff that were purchased as extensions to my LEGO Mindstorms RIS sets. This new HiTechnic sensor now gives us an updated passive IR sensor with the added ability of sensing from left to right. Awesome.
Hi, but to work correctly the robot must stop running? For example, if the robot is walking through the room and I walk in front of it, it will detect me?
Thanks!
I am not sure, to be honest. I will find out when I get one 🙂
My experience is limited to the Techno-stuff’s Passive IR detector which had a roughly 180 degree forward view and was not split into detection left or right. Using that detector on an RCX based robot did not at anytime require that the robot be stopped to detect an IR transmitting body. In fact, I used it to detect and follow a person by allowing the deter or to sweep an area and move in the direction of the strongest signal.
It would seem to me that HiTechnics Passive IR detector would only be different in that it can also sense a body to the left or right making it even easier to set up a “body follower” without having to sweep once it the body is detected.
I have also not experienced any significant lag time in detection from these types of sensors that was significantly noticeable.
By the way, reading the description provided by HiTechnicpretty much confirms using the PIR detector as part of a sweeping detector similar to what I have described in the RCX description. It does point out though, if the sensor and the radiating body are statically placed such that no movement occurs to deminish or increase a signal with the radiating body constant, the signal will fade from detection. PIR sensors generate a signal that is proportional to the change in IR detected and not the IR value itself.
Cool! I wish I could afford one, the possibilities are endless!
The HiTechnic response of my question:
“Yes the PIR sensor will work while moving and it actually can help the
performance of the sensor if it is moving.”
Is there a way to write a pragma statement for the HTPIR sensor without using it as a sensorI2CCustom? I’m working on a follower bot and I need the values in the debugger window.
Dman,
There isn’t. When you use an internal driver, the bus pretty much becomes owned by ROBOTC’s driver and starts polling it. If you then try to do the same from inside my driver, it really messes things up. The best you could do is use writeDebugStreamLine and simply put the data in the debug stream. That is how I usually do this sort of thing.
I believe, though I could be wrong, that user programs can write to the sensors array.
i.e. sensor[myPIRSensor]=HTPIRreadSensor(myPIRSensor);
You can write to it, but what is the point? Who knows what kind of garbage that will produce. I have never tried it but I wouldn’t recommend it.
It worked, but it was not very accurate.
Look here: http://www.robotc.net/support/nxt/MindstormsWebHelp/index.htm#page=nxt_functions/Sensors_Digital/Sensor%20Digital.htm
“In implementing a device driver, it is better to start up a task that continually sends I2C messages to periodically poll the sensor and stores the results. Within the user application it should simply retrieve the last polled value – i.e. no delay – rather than do an inline I2C read to get the sensor value. ROBOTC makes this very easy to achieve by allowing user programs to write as well as read the internal “SensorValue” array. The “SensorValue” array is used to retrieve the value of a sensor from the internal device drivers.”
You’re welcome to use the functions from my driver suite to create a background task to poll the sensors and update those SensorValue arrays. Keep in mind that it would not work for sensors that return more than one value, such as a 3D accelerometer, IR Seeker field strengths and many others.
How would that be implemented into the code? I tried to use it, but it does not work.