Arduino based Laser Control

A forum for the Arduino based Mach4/Darwin Laser Control Panel
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

art engrave and diag work fine it switches from diag to pwm ok.

pwm does not work at all

I have pwm set at 50 Hz it keeps going to 12 Hz if I toggle pwm in pwm mode it does nothing if I toggle in engrave its fine.

also for some reason the pot will only go to 65% on arduino screen

I have tried having the pwm on the G540 and MB-06 makes no differences its set up correct. so I don't have a clue what's wrong

as long as engrave work its not a problem to I get a bigger laser
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Hi Dan:

>>art engrave and diag work fine it switches from diag to pwm ok.

  Good. Does the unit automatically switch from Diags to CNCMode when you turn on a PWM spindle in Mach4?

>>pwm does not work at all
>>I have pwm set at 50 Hz it keeps going to 12 Hz if I toggle pwm in pwm mode it does nothing if I toggle in engrave >>its fine.

The frequency should read 25 inside darwin when its a 50hz PWM signal. This is for technical reasons. Setup a spindle output signal. Done worry about the frequency of it, Darwins plugin will set it up when you turn on the spindle with a M3. Toggling the signal inside Darwins config doesnt do much, it has no reference speed to set the pwm to. Only test the PWM output by using an M3 or pressing the spindle on button in Mach4.

>>also for some reason the pot will only go to 65% on arduino screen

  This can only be a bad pot, or a bad connection. OR.. the 5 volts powering the board is pulling down to a lower voltage due to current restrictions. Measure the voltage at pin 4 to ground, it should go from 0 to 5 volts or very close. See if its limiting to a lower voltage... like 3.5volts.. 65% woudl be pretty low so Im suspecting a bad connection or pot..

>>I have tried having the pwm on the G540 and MB-06 makes no differenc es its set up correct. so I don't have a >>clue what's wrong
>>as long as engrave work its not a problem to I get a bigger laser

  Im not really sure where your at at this point. Does the Laser Pin9 PWM now work properly and adjust when your in NGrave mode and running M4? Is it just PWM nonlaser mode that dosnt work now?

Art
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

ArtF wrote: Hi Dan:

>>art engrave and diag work fine it switches from diag to pwm ok.

  --Good. Does the unit automatically switch from Diags to CNCMode when you turn on a PWM spindle in Mach4?
yes

>>pwm does not work at all
>>I have pwm set at 50 Hz it keeps going to 12 Hz if I toggle pwm in pwm mode it does nothing if I toggle in engrave >>its fine.

--The frequency should read 25 inside darwin when its a 50hz PWM signal. This is for technical reasons. Setup a spindle output signal. Done worry ----about the frequency of it, Darwins plugin will set it up when you turn on the spindle with a M3. Toggling the signal inside Darwins config doesnt do ---much, it has no reference speed to set the pwm to. Only test the PWM output by using an M3 or pressing the spindle on button in Mach4.

ok

>>also for some reason the pot will only go to 65% on arduino screen

  --This can only be a bad pot, or a bad connection. OR.. the 5 volts powering the board is pulling down to a lower voltage due to current restrictions. --Measure the voltage at pin 4 to ground, it should go from 0 to 5 volts or very close. See if its limiting to a lower voltage... like 3.5volts.. 65% -------woudl be pretty low so Im suspecting a bad connection or pot..

will do


>>I have tried having the pwm on the G540 and MB-06 makes no differenc es its set up correct. so I don't have a >>clue what's wrong
>>as long as engrave work its not a problem to I get a bigger laser

  -- Im not really sure where your at at this point. Does the Laser Pin9 PWM now work properly and adjust when your in NGrave mode and running ------M4? Is it just PWM nonlaser mode that dosnt work now?

pin 9 works as it should
it just pwm that does not work

Art
I will test all connections I am powering it of my laptop it could be the laptop its stuffed
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Dan:

Probably the laptop cant provide enough current. You coudl use much higher resistance values on all resistors and the pot.. but probably better to use a 5 volt wall wart or something.. the arduino actually uses a fair bit. I tried powering mine off the breakout boards 5vdc .. and it wasnt enough so I used a CPU 5vdc supply..

Art
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

the pot was bad its getting 5v under logging its come up as a step and direction spindle
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

pwm mode no work at all done everything properly tried all sorts of things nothing worked.

when in engrave mode it work perfect pot changes pwm value instantly.

diag perfect

diag change to pwm when turning spindle on every time

its getting enough power.

it could be the same problem when I had a spindle on the machine I had to have it set to 0 - 15000 to get 5000 rpm 

other than that I don't know what's going wrong
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Dan:

  Well, on the good side, Engrave mode will do everything he CNC Mode does.. it just uses the power word instead of the PWM Spindle.

If you have Darwin setup properly in its Daigs menu, then you should see the report
"Spindle Output PWM detected." in the error log if you aloso turn on debug mode in Darwin.
Do you get that message?

Art
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

with turning spindle on with button, spindle output pwm detected comes up under it has pwm set 0.00%,count2

useing mdi m3s100 it comes up  spindle output pwm detected under it it has pwm set 0.95% count 3167
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Dan:

  Yes, that sounds correct. With no spindle speed your getting a PWM of 0%, with S100, your getting 95%.
Its programmed that way because the PWM will limit to 95%, usually laser makers recommend you dont run at 100%, it slowly degrades the lasers power.. so the pwm actually goes from 0 - .95 ( or 95%). 

SO it looks like Darwin is properly sending out the PWM, so if the laser box is in Diags mode, and you press the spindle button, the box shoudl auto switch to CNC mode. The REM: in the upper right will display the power of the spindle , for example REM:50 is 50% is being sent via PWM. This means the biox will actually send 50% of the power dialup up by the pot. So if you have adjusted the pot to 50%, and Darwin sends .5 ( 50%), the REM:50 will display inthe upper right of the laser display, and your PWM out on pin 9 will put out 25% of lasers max power. ( Mach4 requesting 50% of the dialup up 50% max from the pot. ).

  So the REM: display will tell you if the power is getting through...

Art
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

its doing everything its meet to do its just not sending a pwm output in pwm mode it just does the tickle pules

I might try tomorrow to set the spindle range to 0 to 1000 to see if it is the same problem I had when I had a spindle on the machine

engrave mode works fine so I wont worry about it I haven't got a laser yet anyway so it no problem for me
Post Reply