I have been using GRBL software on arduino board for quite a while now, however the only issue I have is that the CO2 laser PSU kind of passes a small current back to the Arduino from its control pins, enough to dimly light one of its leds. This prevents the correct communication between PC and Arduino if the laser PSU is turned on first. Being a pwm pin, I dont know how to avoid this current feedback.
closed as unclear what you're asking by Chris Stratton, laptop2d, RoyC, Edgar Brown, Elliot Alderson Jan 10 at 23:46
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You haven't provided many electrical details, but this sounds like a good application for an optoisolator. Connect the Arduino's PWM output to the optoisolator's LED anode through an appropriate resistor and connect the LED's cathode to the Arduino ground. Choose an optoisolator with an NPN transistor output and connect the transistor's collector to the power supply PWM input, probably adding a pullup resistor to the PS logic '1' level. The transistor's emitter connects to the power supply's ground.
Note that there is no connection between the ground of the Arduino and the ground of the power supply. Also, the optoisolator will invert the PWM signal so the programmed duty cycle will need to be changed accordingly.
I'm only guessing here but with enough experience to suggest that the following may be the cause of your problem:
Disconnect the PWM control connection between the Arduino and the power supply. Now measure the voltage and current from the power supply control voltage lead to power supply ground. I suspect there is a voltage somewhat less than 5 Vdc with perhaps one or two mA current.
If so, this sneak current is enough to stop the AVR chip in the Arduino board from getting a proper Power-UP Reset signal.
There are a couple of things to try. The easiest is to also power the Arduino board from the low-voltage output of the laser power supply. There may not be a 5 Vdc rail available from the power supply but there will certainly be either 12V or 24V available. Use a simple linear regulator to drop that voltage down to the 5 Vdc that the Arduino wants to see.
The other option is to use an opto-isolator as suggested by Elliot Alderson. Note that you may want to wire the opto such that the output transistor pulls the PWM line into the power supply LOW and wire the input LED (+) from the Arduino +5V rail and the input LED (-) to the PWM output pin of the Arduino. Be sure to include the appropriate current limit resistor for the opto LED. Wiring the opto in this fashion keeps the polarity the same as if the opto was not in circuit.
Personally, I'd first try powering the Arduino from the laser internal power supply. That may be all that you need.