Yes, the last board you pictured above will work fine. All you need is 5 volts at about 40 mA for the LASER LED.There is difficulty in getting a through hole AMS1117-5 component.
i'm starting to think of getting a dc-dc converter board which has the ams1117 board on it like i posted above. Just add a 47R resistor in series with the laser.
![]()
Description:
Input: 6V~12V DC (input voltage must not drop below 6V).
Output: 5.0V 800mA (load current must not exceed 800mA)
Can be directly soldered on to PCBs using the pre soldered pins.
PCB size: 2.5cm x 1.1cm
Comes with onboard power indicator LED (red).