Powering laser module from Arduino

I have a small laser module which I want to control from Arduino. I am interested in it being as bright as possible.
I noticed that when I plug it to GND and 5V of arduino it is much brighter then when it is plugged to GND and in my case A3 pin.
Why is that.
I thought that I can use MOSFET transistor to still power the laser from 5V and control it by changing the signal at the gate connected to A3. But this does not work. When HIGH signal appears at A3 the Arduino restarts.
I am sure I am doing something stupid. Electronics is not my stonger suits:)
Please see a rough sketch of what I tried.

Measure the current the module draws from a solid 5V supply

I/O pins are strictly limited to the current that they can provide. Exceeding those limits can damage the Arduino.

The 5V output is also limited. For the details, tell us which Arduino you have.

it is a microCONTROLLER. it controls, only. you do not power devices through it. you power devices alongside it.

ArduinoNano

With the Nano (classic) do not exceed 20 mA current draw from any digital pin, or 50 to 100 mA from the 5V output.

So basicaly I should use external 5V power suply to power it . Break that ciruit with the MOSFET and connect Arduino pin to the gate . That would work , right and potentially the laster would be even brighter, right?

For any high current device. Here is a typical MOSFET circuit for motors, lasers, etc. You MUST use a logic level MOSFET. D1 and C1 are required for motors.

Thank you. In the past I connected similar circutis but I did not use capacitor and a diode that you have in your diagram. What is the function of those two components

The diode D1 is essential to protect the MOSFET from destruction by high voltage "inductive kicks" from the motor windings, and C1 reduces radio frequency interference generated by the motor brushes and radiated by the motor leads.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.