Alright, after completely dropping this project before, I decided to get back to it
For now I dropped the idea of dimming the LEDs and I'll get to that when it is working the way I want it to.
So I want the steps to be lit one after the other with a small delay in between each of them and then turn off the same way when you get off the stairs.
Since I know C and Assembly Language now, I started programming it in C for an Atmel Atmega8515 uC. I worked with that chip before and it has 35 I/O pins so I could use it on pretty big staircases too. I ran into some problems concerning the input though.
I would need sensors on the top and bottom of the stairs. I was thinking about IR sensors but I'm not sure if they would work the way I want.
Since I already thought about all the errors I could get if there are 2 people going down the stairs or 1 going up and then another one going down at the same time, I thought about using 2 sensors on the top and 2 sensors on the bottom. Depending which of the sensors is activated first, I would know which direction a person is going and therefore eliminate all the errors that could occur.
From the research I did it looks like IR sensors are not really focused on a specific point, so I thought about using 2 lasers for this instead. For the lasers I'm not too sure about what kind of receiver I would need though. I couldn't find much on that. In a video I saw that a guy was using a laserpointer and an IR receiver. Would that work? I guess it would depend on the wavelength right?
So with this setup I could constantly check the 4 inputs and depending on which one of them goes high, due to a broken beam, I could turn the lights on or off. I just have to figure out now how exactly to handle the inputs in the program but that shouldn't be a problem.
So what do you guys think? Any ideas on the sensors?
For now I dropped the idea of dimming the LEDs and I'll get to that when it is working the way I want it to.
So I want the steps to be lit one after the other with a small delay in between each of them and then turn off the same way when you get off the stairs.
Since I know C and Assembly Language now, I started programming it in C for an Atmel Atmega8515 uC. I worked with that chip before and it has 35 I/O pins so I could use it on pretty big staircases too. I ran into some problems concerning the input though.
I would need sensors on the top and bottom of the stairs. I was thinking about IR sensors but I'm not sure if they would work the way I want.
Since I already thought about all the errors I could get if there are 2 people going down the stairs or 1 going up and then another one going down at the same time, I thought about using 2 sensors on the top and 2 sensors on the bottom. Depending which of the sensors is activated first, I would know which direction a person is going and therefore eliminate all the errors that could occur.
From the research I did it looks like IR sensors are not really focused on a specific point, so I thought about using 2 lasers for this instead. For the lasers I'm not too sure about what kind of receiver I would need though. I couldn't find much on that. In a video I saw that a guy was using a laserpointer and an IR receiver. Would that work? I guess it would depend on the wavelength right?
So with this setup I could constantly check the 4 inputs and depending on which one of them goes high, due to a broken beam, I could turn the lights on or off. I just have to figure out now how exactly to handle the inputs in the program but that shouldn't be a problem.
So what do you guys think? Any ideas on the sensors?