Advice on arduino pwm pin 11 and sinking voltage

Hi all

I made a quick sketch of my connections from uno running grbl to laser power supply, first i had problems with the arduino reseting when i engrave a picture because of the laser turning on and off very quickly i had pin 11 connected staight to the IN pin on power supply, i added the optocouplers and that fixed the problem of freezing but realized that the IN pin had 1.6v on it with nothing connected, that was what was causing my uno to freeze in the first place , now no more freezing but now i cant pull or sink that voltage down to 0v which means i cant engrave on less than 1.6v, the way i had it connected straight from pin 11 to IN pin work great(except for freezing) was the current the arduino pin needed to sink too much? Will it help if i add a inline 220ohm resistor?


What is that supply you talk about? Does is even expect a PWM?

Yes they say its TTL, its a MYJG 40w laser power supply, the in pin is the pin you use to control it with pwm or with a potentiometer use the 5v

Can't find a lot about the thing but one says you should be able to PWM the pin.

How do you measure the voltage? Because if you apply PWM you simply can't with a DMM.

Because you added an opto (which you don't show how you connected it.. So I assume emitter to IN) can only source current. No idea if the unit has a pull down. You can try to add a pull down (say, 1k).

OPs circuit;

Tom.. :slight_smile:

Your getting 1.6 volts between (ground and In) or (5v and In)?

If you remove the opto, what is the same reading for (5v and In)?

We’re you using the ground next to the In connector or the other ground when you were direct connecting to the Arduino?

Im measuring with a ddm, i am getting 1.6v between ground and IN when nothing is connected to the power supply, i was using the groung next to the IN pin when connecting directly, but both those ground are connected , so my laser supply has a problem can a arduino sink that 1.6v without freezing?

Read the part about a pull down?

Can you add pin numbers and resistor values to your circuit diagram please as well as the part number of the optos?

CHECK the pinout of the opto and the diagram in the instruction manual page 3.
CHECK the PWM spec on page 3, PWM freq >= 20kHz.

Thanks.. Tom.. :slight_smile: