Lighting the Laser Rifle

As fas as I can understand, the prop has six LEDs (unknown colour and wattage) located on both sides of the rifle. What the user (as fas as I know, and added some artistic liberties) needs are:

1) LEDs sequence from Left to Right (of Right to Left) when powering up. Done
2) LEDs go to "zero" voltage when the Laser Rifle is being fired. Done
3) LEDs "recharge" back to full voltage after it is fired. Done
4) Rifle does "something" after 8 seconds of non-discharge. Artistic Liberties

On paper, lighting up the LEDs look very simple until you start to realise the tremendous amount of electronic components to achieve this. And of course, the wiring concerned. It would be a mess in there, even if you designed a proper printed circuit board. Not only that, this circuit would also shorten the battery's lifespan considerably. Oh, and did I mention the long development time?

So, in today's fast-paced World, the only solution would be to use the current technology available; the microprocessor. The advantages over "old school" electronics and method are:

1) The only difficult part is to build the circuit in the first place, say, using a prototype breadboard.
2) The longest development time would be to program the microprocessor chip. Since I hate programming, I used an alternative software which really cut down on my development time further. This prototype in the video took me about less than five hours. Then because I was bored, I used up another six hours to make the program more interesting, such as putting a screensaver sequence in there.
3) Component count is 30 since it is converting 12 volts DC to 5 volts DC:
1x microprocessor
12x LEDs
12x current limiting resistors for the LEDs
2x push-button switches
2x resistors for the switches
1x 5 volt Voltage regulator

4) But if I used 3 volts DC (i.e. 2x AA battries), the component count is reduced to 17:
1x microprocessor
12x LEDs
2x push-button switches
2x resistors for the switches
This is because the output of the microprocessor can sink 25mA, which is ideal for a LED.

5) Because its a microprocessor, you can program and reprogram the LEDs sequence to your heart's desire. You can even program a few chips to demonstrate to your customer the different solutions too.

But the disadvantages is also worth considering:
1) You need to buy a microprocessor programmer
2) You need to learn its programming language
3) If not, you need to spend more to get a "layman" programming software

No comments: