Yesterday, I flashed some LEDs for the first time with a microcontroller. Now, I want to do something a little more useful, hopefully completed and in a case with in a week.
The idea is for an IR detector (proximity), flash a red and blue LED like police strobe for 10-15 seconds, and reset. Wanted to add a siren, but think that might be a little much for me to program at this time, and an external unit would kill a 9v battery quick.
I've got everything I need for parts and materials, just need a little help putting all together.
For the power, it'll be a 9v battery. I've got the Tiny13v, which can go as low as 1.8 volts, but slower clock. Thought about using 3 AAs, but figured it would take more space, wanted to keep this small. So, I'll be using a 7805 regulator for the Tiny13 and the IR reciever module. I've got 2 choices in regulators the large 1 amp to-220(?), and a 100 mA little transitor looking thing, to-92. Would like to try the smaller ones (got a bunch, shouldn't need 100mA), but there is no heatsink.
Th IR reciever is 5v and 38khz. Digital out, so shouldn't be a problem to program. The IR emitter might be the biggest problem of this whole project. I have several choices, but have no experience yet. The tiny13 can directly drive 20 mA LEDs, but how do I get it to flash close to 38Khz. I have 2 PWM channels, one Timer/Counter with pre-scaler, and of course software to choose from. Hoping to use the internal clock, not real sure how this all relates or works just yet. From what I understand about the reciever, the 38khz is a center frequency, but the unit will function correctly if the emitter is close or varies slightly, so it's perfect for me (not the precision king). Close enough, is good enough...
The blue and red LEDS are the easiest part, could do that in a couple of minutes. Kind of what inspired this whole project. I was re-programming the Tiny13 for a different sequencing pattern, and there was a cop doing a traffic stop outside my house. Thought about how our maintence guy at work had his toolbox broken into... Anyway, haven't decided if I will go with single 5mms directly off the Tiny13, or go with a transistor switch and drive some 70mA Pirahnas off the battery (better if I use the 100 mA regulator).
From what I did yesterday, don't think I'll have any programming problems, other than getting the IR emitter to flash close to 38khz. Will hit the datasheet after posting this. Not sure what kind of range to expect, hoping for about 6 inches (15 cm in british?), of course if its a foot or so, that's even better, but beyond that it might get some false triggers.
Plan on attaching this to a rare earth magnet from an old hardrive, so it should stick solid to the toolbox. Wonder if the magnet will mess up the microcontroller... Anybody have any such experience? Pretty sure its not covered in the datasheet.
The idea is for an IR detector (proximity), flash a red and blue LED like police strobe for 10-15 seconds, and reset. Wanted to add a siren, but think that might be a little much for me to program at this time, and an external unit would kill a 9v battery quick.
I've got everything I need for parts and materials, just need a little help putting all together.
For the power, it'll be a 9v battery. I've got the Tiny13v, which can go as low as 1.8 volts, but slower clock. Thought about using 3 AAs, but figured it would take more space, wanted to keep this small. So, I'll be using a 7805 regulator for the Tiny13 and the IR reciever module. I've got 2 choices in regulators the large 1 amp to-220(?), and a 100 mA little transitor looking thing, to-92. Would like to try the smaller ones (got a bunch, shouldn't need 100mA), but there is no heatsink.
Th IR reciever is 5v and 38khz. Digital out, so shouldn't be a problem to program. The IR emitter might be the biggest problem of this whole project. I have several choices, but have no experience yet. The tiny13 can directly drive 20 mA LEDs, but how do I get it to flash close to 38Khz. I have 2 PWM channels, one Timer/Counter with pre-scaler, and of course software to choose from. Hoping to use the internal clock, not real sure how this all relates or works just yet. From what I understand about the reciever, the 38khz is a center frequency, but the unit will function correctly if the emitter is close or varies slightly, so it's perfect for me (not the precision king). Close enough, is good enough...
The blue and red LEDS are the easiest part, could do that in a couple of minutes. Kind of what inspired this whole project. I was re-programming the Tiny13 for a different sequencing pattern, and there was a cop doing a traffic stop outside my house. Thought about how our maintence guy at work had his toolbox broken into... Anyway, haven't decided if I will go with single 5mms directly off the Tiny13, or go with a transistor switch and drive some 70mA Pirahnas off the battery (better if I use the 100 mA regulator).
From what I did yesterday, don't think I'll have any programming problems, other than getting the IR emitter to flash close to 38khz. Will hit the datasheet after posting this. Not sure what kind of range to expect, hoping for about 6 inches (15 cm in british?), of course if its a foot or so, that's even better, but beyond that it might get some false triggers.
Plan on attaching this to a rare earth magnet from an old hardrive, so it should stick solid to the toolbox. Wonder if the magnet will mess up the microcontroller... Anybody have any such experience? Pretty sure its not covered in the datasheet.