PWM Controlled Laser Diode
-
Hello,
I would like to install a laser diode, that has two wires and a requirements of 5V and 25mA (https://thepihut.com/products/line-laser-diode-5mw-650nm-red), on my Duet 2 Ethernet card.
My plan was to control this laser diode using the PWM fan2 outputs. The PWM are fed with Vin=24V because I need to use them for fans.
Is there a way to control the output voltage and set it to 5V so I can control and power the laser diode?
My initial code as I followed through the documentation will be like:
M950 P0 C"fan2" Q500 ; Define the PWM output on fan0 M42 P0 S0.5 ; Turn the PWM output on with a 50% duty cycle . .. ... M42 P0 S0 ; Turn the PWM output off
Can I just use the M42 command to set the PWM percentage at the corresponding value to the voltage I need? do I need to use other codes?
Sorry but I am new to these stuff and any suggestion or recommendation will be highly appreciated. Thanks!
-
@Muhammed connect the diode between the OUT_NEG pin of the fan port and +5V which you can pick up from the PanelDue port.
-
@dc42 said in PWM Controlled Laser Diode:
@Muhammed connect the diode between the OUT_NEG pin of the fan port and +5V which you can pick up from the PanelDue port.
So the +5V will come from the PanelDue port and the other wire will be on the ( FAN- )negative of the PWM fan port and I will still use the same code to control it through the PWM port. I hope that I understood right? will the current be enough in this case?
Thanks alot
-
@Muhammed correct. the paneldue port can provide more current than required for your diode
-
@jay_s_uk said in PWM Controlled Laser Diode:
@Muhammed correct. the paneldue port can provide more current than required for your diode
Great!. Thank you, I will give it a try