Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Turning an X-Drive On/Off via MOSFET

Joined
Mar 27, 2015
Messages
5
Points
0
Hey guys,

I'll soon be purchasing a laser + X-Drive combination from our resident DTR. I asked him this same question, and was sent to ask over here, so I'll go ahead and do so.

I'm in the process of building a CNC machine via Arduino+GRBL. My primary tool for the machine will be a laser diode, which will be powered by one of DTR's X-Drives. The thing is, I would very much prefer the ability to power the laser on/off, in a TTL-style way, via GRBL's PWM support. To do this, my plan is to wire a MOSFET (likely an IRF3025) between the power source and the X-Drive, the gate being wired to the PWM pin. I would also have something like a 1N5408 (it is a 2.4A driver, after all) on the driver leads for extra protection. The setup would be nearly identical to this (clearly not driving a motor..): http://bildr.org/blog/wp-content/uploads/2012/03/rfp30n06le-arduino-solenoid.png

My question is what I should expect from this setup. For example, would the driver (or diode, more importantly) potentially suffer in any way from being constantly supplied with/deprived of power in this specific manor, be it slowly or rapidly (think PWM-based Raster-engraving)?

Any help, be it advice or alternative suggestions to any part of the design, would be greatly appreciated!

(Also, if I've managed to break any forum rules, hit me like a brick and I'll gladly fix the issue.)
 





Aleksa

0
Joined
Jan 21, 2014
Messages
118
Points
18
I had fun with GRBL. What program are u using to generate Raster type G code?
About the diode,your only concern is overshoot. I dont have experience with that driver,but it should work if designed correctly. If you have a oscilloscope,you can find out for your self :beer:
 
Joined
Mar 27, 2015
Messages
5
Points
0
I had fun with GRBL. What program are u using to generate Raster type G code?
About the diode,your only concern is overshoot. I dont have experience with that driver,but it should work if designed correctly. If you have a oscilloscope,you can find out for your self :beer:

Sadly I don't have many tools, this is my first electronics project. I've got the motors hooked up and calibrated (only to ~1mm so far, need to get a more accurate measuring tool so I can hone it in even more) and GRBL drives them perfectly, so the laser is the next step.

Regarding Raster generating, I haven't had the chance to test how well it works (since, you know, I don't have the laser yet), but I'll be testing "dmap2gcode" first. It takes a "depth map" (grayscale image) and maps the varying shades to certain Z-axis depths. I wrote my own program to take the output from dmap2gcode, and convert the Z-axis changes to feed-rate changes, since I don't have a Z-axis installed at this time (not to mention, you know, it's a laser..). I'll test the feed-rate changing first, then the PWM method and decide which works best. I may even write my own bitmap-to-gcode tool if dmap2gcode's generation seems inadequate, however so far it looks like it does a nice job. It's very adjustable.

On topic though, I'm sure the X-Drive will protect the diode, I'm just curious as to the effects on the X-Drive by turning it on/off constantly by the MOSFET. From my limited electronics knowledge and some research, I believe it will be fine, but that depends on the driver I suppose.
 
Last edited:

Aleksa

0
Joined
Jan 21, 2014
Messages
118
Points
18
What diode will you be using? Cooling the diode and keeping it in the safe current range is the key(sense the diode will be working for long periods of time).
I used a online program (shapeoko designer made it) to convert all Z commands to M3 and M4 commands for the laser. And also used ArtCam,which is great for 2D stuff,but not complicated designs,drawings,etc. It has some problems with vectors and stuff. I came across a Picengrave program that didn't work for me at all(trial version) dont know why.
 
Joined
Mar 27, 2015
Messages
5
Points
0
What diode will you be using? Cooling the diode and keeping it in the safe current range is the key(sense the diode will be working for long periods of time).
I used a online program (shapeoko designer made it) to convert all Z commands to M3 and M4 commands for the laser. And also used ArtCam,which is great for 2D stuff,but not complicated designs,drawings,etc. It has some problems with vectors and stuff. I came across a Picengrave program that didn't work for me at all(trial version) dont know why.

The plan is to use a Nichia NDB7875 with the 2.4A X-Drive, sold as a package by DTR. I'll make sure she stays cool, worst case I'll force a duty cycle if she can't handle long running times. I may downgrade on the laser/driver, but this is the current plan.
 

Aleksa

0
Joined
Jan 21, 2014
Messages
118
Points
18
Seems legit. Wait for someones actual experience with that driver to respond. Stay cool :)
 
Joined
Dec 11, 2011
Messages
4,364
Points
83
If you wire it like they have the solenoid in the image it should be fine. You don't need the flywheel diode across the load (solenoid in that case, where it IS needed) as the diode driver is not an inductive load and produces no back-EMF.

Note that the mosfet used needs to be Nchannel Enhancement mode, and needs to have a Vgs saturation of less than the output voltage from your PWM line (5V in the case of the arduino). Generally 10V is the rule of thumb saturation point but some fets saturate at much lower voltages, and the saturation point varies with the current through the drain. If you find a "Logic Level" fet, it will saturate guaranteed at 5V. Just choose one with as low as possible of RdsON and a greater Ids (drain current) than your driver requires.
 

Hiemal

0
Joined
Dec 27, 2011
Messages
1,443
Points
63
I may potentially have something that could work for this, actually.

The diode savior board uses a P-channel mosfet and two passive components to produce a soft start for whatever you've got it connected to, but I also think it may work as a PWM switch. I haven't had the chance to try and see how well it performs, though.
 

rhd

0
Joined
Dec 7, 2010
Messages
8,475
Points
0
It strikes me that a much better approach would be to find the PWM/EN pin on the IC and control that, rather than killing overall driver power constantly.

It should be relatively easy to identify, even if you don't know the IC, just by continuity testing with a DMM. chances are the pin is tied to V+ and by a smaller trace than the VCC pin. If you can desolder the chip, bend that pin slightly upwards, and resolder the chip to the board, you can attach a wire to it, and have a proper PWM/EN line.
 
Last edited:
Joined
Mar 27, 2015
Messages
5
Points
0
It strikes me that a much better approach would be to find the PWM/EN pin on the IC and control that, rather than killing overall driver power constantly.

It should be relatively easy to identify, even if you don't know the IC, just by continuity testing with a DMM. chances are the pin is tied to V+ and by a smaller trace than the VCC pin. If you can desolder the chip, bend that pin slightly upwards, and resolder the chip to the board, you can attach a wire to it, and have a proper PWM/EN line.



Pardon my ignorance, but which IC are you referring to? I'd rather confirm than assume a fool out of myself.
 

rhd

0
Joined
Dec 7, 2010
Messages
8,475
Points
0
Pardon my ignorance, but which IC are you referring to? I'd rather confirm than assume a fool out of myself.

I don't know...that's the point of what I was saying - it would require a little bit of logical deduction to find the PWM/EN pin since you don't know the IC, but it should be doable.
 

Aleksa

0
Joined
Jan 21, 2014
Messages
118
Points
18
The chip on the X drive. If it has a pwm enable pin,that could be used.
 
Joined
Mar 27, 2015
Messages
5
Points
0
I don't know...that's the point of what I was saying - it would require a little bit of logical deduction to find the PWM/EN pin since you don't know the IC, but it should be doable.

Ah, I presumed you were suggesting I test around on a specific IC, and simply saying I probably wouldn't know the IC model. Just to be clear (bear in mind my electronic ignorance and forgive it if possible), you're suggesting I check around pins on the X-Drive board, and you're assuming it has a PWM/EN pin somewhere on it? From talks with DTR, that doesn't sound like its the case..

EDIT:
The chip on the X drive. If it has a pwm enable pin,that could be used.

See above.
 
Last edited:

rhd

0
Joined
Dec 7, 2010
Messages
8,475
Points
0
Ah, I presumed you were suggesting I test around on a specific IC, and simply saying I probably wouldn't know the IC model. Just to be clear (bear in mind my electronic ignorance and forgive it if possible), you're suggesting I check around pins on the X-Drive board, and you're assuming it has a PWM/EN pin somewhere on it? From talks with DTR, that doesn't sound like its the case..

That's the route I would go. Although maybe that's over complicating things if you're not comfortable modifying your driver.

The driver itself doesn't expose the EN/PWM pin, but I'm almost certain that the IC itself would have one.

EDIT: In fact, that's exactly the route I did go with my photino RGB, except that I built the 3x channel driver from the ground up instead of modding an existing one. But each IC is being controlled by an Attiny signal to the EN/PWM pin.
http://laserpointerforums.com/f42/photino-rgb-91517-3.html#post1334837
 
Last edited:





Top