Questions on how to cerrectly wire a rechargeable battery to a laser pointer

Hi everyone, I have a question on how to wire a laser pointer to a rechargeable battery. Is there any way to wire this laser pointer in the picture to the battery and avoid and problems when I plug the battery in to charge?

One idea that I had was to just wire a switch into the negative of the laser but my concern with this scenario is that if the switch is left closed when the charger is plugged in, I could damage the laser.

I know I can do it with a microcontroller but I’m trying to keep the cost extremely low and I need to keep the final size as small as possible. Even an arduino nano or mini would be a little too large.

Any suggestions?

I’ve attached a picture of the components that I’m working with.

Thanks in advance!

I have read that laser pointers use the internal resistance of the battery to limit the current to the laser diode. IF that is how yours operates, using a different battery may cause the laser diode to over heat and stop working.

Paul

Thanks Paul, does this seem like a project that would require a microcontroller and if, is there any ultra compact board you could recommend?

Bluenick2100: Thanks Paul, does this seem like a project that would require a microcontroller and if, is there any ultra compact board you could recommend?

It just needs a resistor to limit the current to the laser diode.

Paul

awesome, thanks