Welcome! Log In Create A New Profile

Advanced

Source current from D9 negative?

Posted by lukec53 
Source current from D9 negative?
August 11, 2017 06:48AM
Hey everyone. I searched all night last night, can't find an answer. So I made an account and here I am.

Short version:
Can D9's negative lead source current without damaging anything? Meaning can I hook the negative lead of a ~1A load straight to a spare ground port on my power supply, then hook it's positive lead to D9's "negative" lead, and turn that device on using the M107 command?

Full version:
I am currently building a hybrid machine (currently just 3D print and laser). My laser runs on 12V and an analogue 5V input to control intensity. So I wired up 12V to the D9 output, and then used one of the servo outputs for the 5V signal. Seems easy enough; M106 enables the laser, and intensity is controlled by M42 commands.

Next I go to test it's functionality so I plug it all in with both ports set to 0V and to my surprise a LED turns on on my laser driver board, and the cooling fan starts spooling up. I quickly unplug the system. Double checked both voltages and they both measure 0V... Hmm I wonder.... Check each pin against ground on my power supply, and sure enough both leads of D9 read 12V. Send a M106 command, the negative of D9 goes to 0V. Ok. So we have switched 12V, but not the way I need.

It appears as though the laser driver board shares ground between its 12V and 5V systems. This means that I need a switched 12V output that will give me 0V on both pins when turned off, and 12V on one pin when turned on. Which brings me to my question. Could I just hook up the positive lead to D9's negative, and the the negative lead to ground, then use M107 to enable the laser and M106 to disable it? Am I going to ruin anything by moving current the opposite way it was designed?

Thanks in advance everyone!
Re: Source current from D9 negative?
August 11, 2017 08:18AM
The way you describe wont work.

D9 negative is connected to the drain of the D9 FET which sources D9 - to ground.
D9+ is conncted to +12 volt
You could connect the laser +12v wire to D9+, and the laser negative wire to D9-

Then the laser will be switch via the D9 FET with the M107/M106 commands.
Intesity can the be controlled vis a servo o/p and gnd.
Re: Source current from D9 negative?
August 11, 2017 12:30PM
Thanks for the quick reply!

I see what you're saying. So its an N-type MOSFET that controls D9. Which means if I tried my weird method I would be pulling my laser current through the body diode of the MOSFET and/or a pullup resistor, correct?

Unfortunately the solution you describe is what I tried originally. Here is my theory on why it didn't work:
If the laser driver uses a common ground between it's 12V and 5V systems, then when it is connected to both D9 and a servo output, the current can travel from the D9+ to the driver, turn the board on, and flow to ground through the arduino (servo) ground. The D9- would also be pulled low in this case, dropping 12V over D9-'s pullup resistor since it is now also connected to the servo ground. This would also explain why when I plugged the 12V plug in the board stayed off, but as soon as I plugged into the servo pins the driver board turned on.

Feel free to let me know if I'm missing something.



This train of thought is leading me to believe that the only way to get 0V to both leads of the laser when switched off, and then have the positive lead go high when switched on is to use a P-type MOSFET or a 5V actuated 12V relay connected to a second servo pin. Not quite the plug-and-play I was hoping for but I guess it would work. Any other ideas are appreciated!
Sorry, only registered users may post in this forum.

Click here to login