5v laser and other questions
February 02, 2021 03:40PM
I have a couple home built CNC machines. I would like to add a 12v/5v laser(like this [a.aliexpress.com]) to a SKR 1.4 board. I cant really figure out how to do this exactly. After a bunch of research I am thinking that i will use the fan0 for the pwm. Now i want to be able to use fan speed 255 as full power so I think that i have to go into the PWM fan scaling in adv. am I correct that a value of 106 should give me about 5v for the fan?
Since im not using a heated bed how do I use the bed1 outputs to power the 12v?

I was expecting the find the laser enable pin in pinsbtttskr14 of pinsbttcommon but I dont see it in either file. Everywhere i look online says its there but i dont see it.

What wires are the pulldown resistor suppose to be wired to?

Im using a btt tft 35v3 screen for a 2400mm machine and i only have the ability to jog 10mm how can i add 100mm to the menu?

Even if you pointed me to the right threads ive been searching everywhere for days.
VDX
Re: 5v laser and other questions
February 02, 2021 04:53PM
... have you already seen the laser-sub-forum? -- [reprap.org]


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: 5v laser and other questions
February 08, 2021 10:25PM
There is a 5V TTL signal that drives the transistor that switches 12V for the fan. Use that as the TTL input to the laser.

Do not use PWM to approximate 5V.... this will generate a 0-12V square wave which will probably destroy the TTL circuitry in the laser.

FWIW, I have an AliExpress "5500mW" laser. It will run at full power for maybe 5 minutes of normal on/off use. After that it intermittently stops emitting. For continuous use, I have to run it at about 40% power. So, practically speaking, it's really only a 2000mW laser.

Software I use on a Windows PC is called LaserGRBL. I believe it can also talk to Marlin on the printer, but I have it talking to GRBL.

And, yes, go to the Lasercutting sub-forum. smiling smiley
VDX
Re: 5v laser and other questions
February 09, 2021 01:18AM
... I'm using the E-step signal for pulsing the lasers -- it's calculated and emitted synchronous to pulses/mm, so won't scorch line-ends winking smiley

The power is defined by pulse-length - so 0-5V analogue input to my drivers "set power"-input will result in pulse-lengths from 5 to 500 Milliseconds ,,,


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: 5v laser and other questions
February 09, 2021 05:51PM
Quote
VDX
.The power is defined by pulse-length - so 0-5V analogue input to my drivers "set power"-input will result in pulse-lengths from 5 to 500 Milliseconds ,,,

The input isn't analogue in the voltage domain. It's digital (TTL)... 0 or 5V. The analogue aspect is, as you say, in the time domain (PWM). The OP was talking about generating a 5V signal by using PWM to modulate the 12V fan output at 106/255 or less duty cycle. Which won't work because

(a) more than likely it would result in a 12V output (capable of multi-amperes) connecting for 2-200 milliseconds at a time to an input only rated for 5V. And that's only going to end badly.
(b) if you use some capacitors and resistors to smooth it out, you'll get an analogue signal, not digital. At best it would only work for a small range of duty cycles
(c) the smoothing would delay the signal, so the laser would switch on/off later than it should, when the carriage is in the wrong position.

Better would be to use a pair of resistors to divide the 12V down to a 5V output. But you would want large vales (e.g. 8.2M, 5.6M), otherwise there would be large currents when the signal was at 12V.
e.g.

0/12V fan output ----- 8.2M --+--5.6M----- GND
                              |
                              |
                            0/5V to laser

But best would be to use a 0/5V signal in the first place.

Disclaimer: I am not an electrical or electronic engineer.
VDX
Re: 5v laser and other questions
February 09, 2021 06:22PM
... my own laserdiode-drivers are "real analogue" (OpAmps used for constant current regulating by comparing the analogue input to the voltage drop at the shunts).

And works pretty good with the "PWM-analogue" output of an Arduino Nano, where a cap is "averaging" or smoothing the pulses smoking smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: 5v laser and other questions
February 09, 2021 10:23PM
OK... I'm at the limit of my electronic knowledge here. I don't know what kind of laser diode drivers these cheap Chinese laser modules have. But I do know that the one I bought (and they all appear to be the same) described the 5V input as "TTL". And I do know what that means.

Just trying to save the OP from destroying his device.
VDX
Re: 5v laser and other questions
February 10, 2021 01:12AM
... I'll suggest to replace the chinese drivers by a "known" type (with proper datasheets or DIY) ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: 5v laser and other questions
February 20, 2021 09:45PM
Quote
frankvdh
Quote
VDX
.The power is defined by pulse-length - so 0-5V analogue input to my drivers "set power"-input will result in pulse-lengths from 5 to 500 Milliseconds ,,,

The input isn't analogue in the voltage domain. It's digital (TTL)... 0 or 5V. The analogue aspect is, as you say, in the time domain (PWM). The OP was talking about generating a 5V signal by using PWM to modulate the 12V fan output at 106/255 or less duty cycle. Which won't work because

(a) more than likely it would result in a 12V output (capable of multi-amperes) connecting for 2-200 milliseconds at a time to an input only rated for 5V. And that's only going to end badly.
(b) if you use some capacitors and resistors to smooth it out, you'll get an analogue signal, not digital. At best it would only work for a small range of duty cycles
(c) the smoothing would delay the signal, so the laser would switch on/off later than it should, when the carriage is in the wrong position.

Better would be to use a pair of resistors to divide the 12V down to a 5V output. But you would want large vales (e.g. 8.2M, 5.6M), otherwise there would be large currents when the signal was at 12V.
e.g.

0/12V fan output ----- 8.2M --+--5.6M----- GND
                              |
                              |
                            0/5V to laser

But best would be to use a 0/5V signal in the first place.

Disclaimer: I am not an electrical or electronic engineer.
This was my very first thought on how to do this. I dont have those resistors but I am getting a bunch in the next days to weeks depending on china. I am getting some 1 million and some 680K. By my calculations that would give me a max V of 4.85. Should be good enough.

So then I would just assign my Fan0 as my SPINDLE_LASER_PWM_PIN in the pin.ramps.h file.(Took me forever to figure out where this was.) What pin do I use for SPINDLE_LASER_ENA_PIN ?


Thank you all for the help. The laser forum seemed dead and i went thru a bunch of old posts that didnt really help.
Sorry, only registered users may post in this forum.

Click here to login