I have been planning out a project using a stationary foam statue which rotates to follows someone as they pass within a few feet, my biggest issue is, i am having a hard time finding a sensor or sensors which i can use to follow a target. It has been a while since i have been involved in programming, so i figured camera based tracking might be more then i want to handle, any ideas?
An array of PIR sensors, arranged so that each one only sees a narrow vertical band in front of it. The item then rotates to keep the detected motion in the central PIR.
Thanks for your, help. that was kind of the concept i had in mind.
Two PIR sensors, mounted on a servo.
Scan slowly to locate your target, once found you use the differential to continue tracking - which is smoother than repeatedly scanning back and forth over the target.
Note however that common PIR sensors are already differential, so you may need to selectively shade them to get them to give a directly proportional indication.
I appreciate the assistance, it helped me to put things into perspective. i recently came up with a different approach, avoiding the PIR concept all together. after some consideration of my intended location i have come to believe a range finder seems to be acceptable for my setup. It still has a few limitations i am working with. I am using the HC-SR04 As i would expect echo/no echo and false reads seems to be fairly common unless you take steps to fix it. i am happy to accept any suggestions.
Things i have found that someday someone might find useful.
I find it important to note that even the suppliers demo sketches max out at 2 meters but state 4m-4.5m max range. I seem to get a lot of no echo responses near 2m+ and i haven't seen a measurement over 356cm.
Air temp plays a part of your calculations if you are trying to be accurate, but it is not something i am overly concerned with for my application.
NewPing.h libary by Tim Eckel helped to reduce some of my issues and speeding up the sample rate without giving me much concern. i am more concerned with precision then accuracy.
i still get a few false reads but passing only an acceptable rate of change over 50 ms has helped but i feel there should be a better way to deal with this. IE a read of 180cm suddenly reads as 71cm.
I am still have an issue where i get no echo, Tim's library seems to handle this better then some i have seen, but the 0 cm reading still happens at least his lib does not cause a 1 second delay. the farther out the more often you get random groups of 0 range which causes a little ADD in the servo mounted head at the far edges of my range. It is kind of creepy to see it track and turn away only to track back again, i may leave it like this but i still want to see if i can reduce this effect more and then decide. i suspect i will create a loop to repeat samples to hold the position and continue when a distance is re acquired or reset back rest position after so many samples. i don't see averaging samples as a solution.
since i am months ahead of my plan i am considering adding some sounds effects. if i do this i am considering using a set of amplified PC speakers, i would appreciate some suggestions on a method or shield, if possible i would rather offload the audio playing, even if i have to firmata to PC to run audio files.
Tim Eckel's Demo code and library. http://code.google.com/p/arduino-new-ping/