This is a 100mW green DPSS laser pointer I built that has instrumentation and safety features. It's a small form-factor laser with realtime measurement of current, voltage, power, and temperature, has a graphical RGB display, and is rechargeable via USB type C. The laser is built into a 3d-printed housing that measures 42x34x16mm.
It has adjustable laser output power with a linear constant-current driver and includes a password to unlock high power mode making it relatively safe.This project started when i came across my old wicked lasers pointer from many years ago, which I removed the diode and optics from. After measuring the stock driver's output current at 600mA, I started building a new linear constant-current driver that could have output current adjustable via firmware.
This is done by forming a linear constant current sink with an N-channel FET, a current sense resistor, and an opamp. The positive reference for the opamp which sets the current setpoint is generated via resistor divider from a PWM signal. Capacitors are added for negative feedback and to filter the PWM to DC. The microcontroller that runs this is a PIC18F26K40.
Also connected to the microcontroller are two momentary switches for user input, and two thermistor-based voltage dividers for measuring laser diode and heatsink temperatures. The high sides of the thermistors are powered via an output pin so that they can be powered off in standby.
The display is a small 160x80 pixel IPS RGB display with an ST7735 controller, which is driven via SPI from the microcontroller.
Charging is done with a USB-C input jack and an LTC4054 lithium battery charger, which also provides a charge status signal to the microcontroller.
The current and voltage on the lithium ion cell are monitored with an INA219 power monitor and a current sense resistor, and that device communicates via I2C.
I built the driver on some copper clad blank pcb cut by hand and included a piece of half-millimeter copper sheet connected to the MOSFET drain to act as a heatsink, since the FET will dissipate significant heat at high current.
The battery is a 300mAh lipo with protection circuit. The display is soldered to one of my custom general-purpose display boards which is essentially a microcontroller breakout with solder pads for the FFC on the display.
With all the major components established I 3D-modeled all the parts and worked out a fairly compact layout. Here you can see the laser optics, driver, battery, display, USB jack, switches, and lithium protection circuit.
Then I designed the housing around them. The housing is printed in 3 parts - the front is solvent-welded on after some of the components were installed, and the back is a friction fit that can be removed for access to the programming connector. The button caps are printed separately in green.
I built up most of the electronics on top of the battery, and then insulated everything with kapton.
The display breakout board with the INA219 went on top of that.
Then I started installing hardware into the housing, starting with the laser optics and USB jack, then switches, and then the battery with all the rest attached to it.
I designed the user interface for this so that it could easily be used as a normal laser pointer at a safe power level, by simply pressing a button from standby. This wakes up the microcontroller and it starts outputting 5mW as long as the button is held.
At all times the display shows operating mode, labels for the actions of the two buttons, a live laser diode current readout, the laser power setting, and then the temperatures of the laser diode and heatsink, the battery voltage, and the battery charge level. After a few seconds of inactivity in safe mode, it will go back to sleep.
For higher power, it needs to be unlocked with a password. the password is just a sequence of 5 presses of up and down - not very secure obviously with only 32 possible passwords, but this at least prevents unintended high power outputs and makes it relatively safe around kids or people who don't know what it is.
In armed mode there's a countdown bar for when it will automatically re-lock and shut off after a period of inactivity. While armed, there is an adjustment page where you can pick any power level from 5 to 100mW.
The firmware monitors the temperatures of the driver heatsink and laser diode continuously and will force a cooldown by reducing the power level if they exceed 50C. The laser can be recharged with a USB-c cable, and that will wake it up to display the charge status and current.
Here is a video that demonstrates the entire UI:
This is done by forming a linear constant current sink with an N-channel FET, a current sense resistor, and an opamp. The positive reference for the opamp which sets the current setpoint is generated via resistor divider from a PWM signal. Capacitors are added for negative feedback and to filter the PWM to DC. The microcontroller that runs this is a PIC18F26K40.
Also connected to the microcontroller are two momentary switches for user input, and two thermistor-based voltage dividers for measuring laser diode and heatsink temperatures. The high sides of the thermistors are powered via an output pin so that they can be powered off in standby.
The display is a small 160x80 pixel IPS RGB display with an ST7735 controller, which is driven via SPI from the microcontroller.
Charging is done with a USB-C input jack and an LTC4054 lithium battery charger, which also provides a charge status signal to the microcontroller.
The current and voltage on the lithium ion cell are monitored with an INA219 power monitor and a current sense resistor, and that device communicates via I2C.
I built the driver on some copper clad blank pcb cut by hand and included a piece of half-millimeter copper sheet connected to the MOSFET drain to act as a heatsink, since the FET will dissipate significant heat at high current.
The battery is a 300mAh lipo with protection circuit. The display is soldered to one of my custom general-purpose display boards which is essentially a microcontroller breakout with solder pads for the FFC on the display.
With all the major components established I 3D-modeled all the parts and worked out a fairly compact layout. Here you can see the laser optics, driver, battery, display, USB jack, switches, and lithium protection circuit.
Then I designed the housing around them. The housing is printed in 3 parts - the front is solvent-welded on after some of the components were installed, and the back is a friction fit that can be removed for access to the programming connector. The button caps are printed separately in green.
I built up most of the electronics on top of the battery, and then insulated everything with kapton.
The display breakout board with the INA219 went on top of that.
Then I started installing hardware into the housing, starting with the laser optics and USB jack, then switches, and then the battery with all the rest attached to it.
I also broke out the programming connections to a small .05 female header so I could work on the firmware after it was fully assembled.
I designed the user interface for this so that it could easily be used as a normal laser pointer at a safe power level, by simply pressing a button from standby. This wakes up the microcontroller and it starts outputting 5mW as long as the button is held.
At all times the display shows operating mode, labels for the actions of the two buttons, a live laser diode current readout, the laser power setting, and then the temperatures of the laser diode and heatsink, the battery voltage, and the battery charge level. After a few seconds of inactivity in safe mode, it will go back to sleep.
For higher power, it needs to be unlocked with a password. the password is just a sequence of 5 presses of up and down - not very secure obviously with only 32 possible passwords, but this at least prevents unintended high power outputs and makes it relatively safe around kids or people who don't know what it is.
In armed mode there's a countdown bar for when it will automatically re-lock and shut off after a period of inactivity. While armed, there is an adjustment page where you can pick any power level from 5 to 100mW.
The firmware monitors the temperatures of the driver heatsink and laser diode continuously and will force a cooldown by reducing the power level if they exceed 50C. The laser can be recharged with a USB-c cable, and that will wake it up to display the charge status and current.
Here is a video that demonstrates the entire UI:
Very nice project indeed..
ReplyDelete