With the basic plan for the flashlight complete, I now had to decide on exactly what parts to use, as well as figure out the wiring of the system. I spent a while looking through all sorts of electronics stores until I finally completed a list of all the components I needed. One of the hardest parts was actually figuring out what microcontroller to use. After figuring out that I’d need about 12 I/O pins (thus, a 14-pin MCU), I found the PIC 16F684 microcontroller fit my needs pretty nicely. It had nice peripherals, such as ADCs (analog-to-digital converter), PWM (pulse-width modulation), and 2K memory. Decent enough for my needs.
Here’s a (probably non-comprehensive) listing of these items:
Electronics
|
Casing
Misc.
Tools
|
Now that I figured out what components to use, how would I wire everything up? It actually turned out to be fairly easy, using the MCU as the heart of the whole system. As it turned out, only some pins could be used for PWM, while some others worked with ADC. I could narrow down which pins went to which “modules” of the flashlight.
From pin 1 through 14, the destinations were: positive supply, backlight system, switch input pin, IR LED, main Cree Q5 White LED, blue status light, green status light, red status light, LED temperature probe, speaker output, IR receiver input, flashing RGB LED, UV LED, and ground. With that done, it was not too difficult to design the circuit.
At first glance, it looks a little bit complicated, but really, it’s just 12 or so modules stuck together to the appropriate MCU pin. As always, it’s very well colored (for no reason, except readability – colors make it easier to distinguish similar objects, and partially gives a better understanding of what the component does).
After completing the schematic diagram, I could also work on yet another PCB. As I had done before, I completed the PCB layout in PowerPoint, except this time, the PCB had to accommodate SMD-sized components.