I have been searching through the forums for some microprocessor switch with some safety features and I happen to see Everett's lasr lock system
. That system is similar to Wicked Lasers Smart Switch where a code is required to switch the laser on. I was talking to him
on BLF about it and he is willing to make the code open source. Instead of posting the link to the source code in the thread, I will be making a new thread for it. All credits belongs to Everett.
The Laser Lock system would increase the safety of the device. The system uses a PIC 10F206 microcontroller and 4 other components to create a system that controls whether the laser driver gets power from the battery. The tailcap switch now forms a safety switch, and a side clicky (momentary switch) and an LED is used to interact with the Laser Lock. Laser Lock requires an access code based on a short series of presses and clicks in order to arm the laser. It uses the LED to give the user feedback, indicating the events: safety off, incorrect code, unlocking, armed, and firing. The system also implements a momentary and a constant mode, and an automatic shutdown in constant mode. Here's a video
that goes over the operation. Below are all Everett's documentation of the system as well as a design for a PCB that can be made at home using the toner transfer method.
The code for the system can be found here
. It is written in PIC assembly and fairly well commented. The whole code is about 260 instructions only.