I am going to deploy corridors with leds. Led effect follows person's location.
I guess i can make use of IR sensor array.
Each corridor is around 10 meter (10000mm). For every 500mm, there is one sensor so that i know there is a person pass it. There is 1903 led together with sensor so that when person passes, led turns on at that segment.
The project is about sensor and locating person then turn on led. Turn on 1903 led is simple but i struggling at how to local person.
It's not very clear what exactly you're trying to accomplish or what specific problem you're having. Post a schematic and program so we can try to help you. If I understand correctly, you have sectors of half a meter and you want only these LEDs to light up when there is a person in a given sector. If so, you can use smart LEDs like WS2812, but keep in mind that you will need a microcontroller with a lot of memory - 3 bytes per LED ie. about 5.7kB just for the LED data. It might be better to divide the LEDs (non smart) also into sectors of half a meter each and control them with a relay or FET - I personally prefer FET.
Hi, thanks for your reply.
For driving LEDs, i used to adopt fastled library which is stable and easy to use. I adopted mega256 and therefore memory is not a concern.
Instead of driving LEDs, I am seeking solution on how to get signals from 20 Infrared sensors. Most of sensors only have three pins - VCC / GND / signal (High when object detected while low when no object)
One of the feasible way may be: each IR sensor can output signal & address in the same bus like I2C. Controller acts as a master while sensors work as slave. When sensor gets detection, it acknowledges controller.
So far, i cannot find any IR sensor can output I2C with programmable output address.
See if any one has idea on how to handle so many IR sensor in the same bus.
I assume you mean ATmega2560. Yes, there is memory, but it also depends on what else you will be doing. Why should the sensors all be on one bus? This microcontroller also has a lot of pins and you need to use 20 of them to monitor the sensors. I don't see a problem with that unless there is something else you haven't told us.
I can see you did not actually test your project with a single sensor to determine how quickly a person is sensed and how quickly that sensed person goes away. A person's IR temperature is the temperature of the air surrounding that person. When that person moves, the warm air is still there for some period of time until that air mixes with the surrounding air and the IR from the air diminishes. Have you seen television of an IR video of a moving person. There is always a trail of images following the person and they slowly fade away. You have created the same scene with your project.
For 20 sensors along a line at around 10M, it may not be good to route all those sensors with signals line back to MCU, those wire will take much place.
Instead, it will be good to implement by a common bus to save space.
Thanks for your sharing on IR temperature sensor. I guess instead of IR temperature type, i can make use of IR reflection type (i.e. transmit & receive as a pair in a module) like the one shown by jim-p.
ok but is the project for the Arduino to know the position of the person or is the project to just turn on a led when the person is in front of the sensor? If just to turn on the LED, there is no need for an Arduino, just add a circuit to turn on the LED while a person is sensed by the IR reflection.