Arduino based Laser Control

A forum for the Arduino based Mach4/Darwin Laser Control Panel
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:

  Doesnt work that way.. Pin 9  is a PWM signal, so if its set to 50% you should read 2.5volts or so.. if set to 90% you should see abotu 5 volts.  Changing the pot would do nothing to the voltage. 100meg or 100K..doesnt matter, it just tells the  arduino what timing for the PWM to use. So while a scope is what should be used to look at pin9, you can use voltage , just consider it a voltage of 0 - 5 volts in 100 increments of the power pot ( in the case of diags mode when firing..).

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

Re: Arduino based Laser Control

Post by DanL »

ok there is something wrong then, the 2.5 - 3v is with darwin set at m3 s100 and pot at 100% the arduino scope I am using does have volts and pwm I will check again just to be sure I am correct
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:

    In Diags mode, at 100% and CW selected as count, ( constant wave), you should get between 4-5vc measured on pin9.. a pwm of 200us in period, and with no fire command you should see about 1us pulses, that go to about 190us pulses at full power..

  Generally though, if you see the voltage go up quite a bit when you press fire, then its probably working fine..

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

Re: Arduino based Laser Control

Post by DanL »

cool will look soon
User avatar
tweakie
Site Admin
Posts: 171
Joined: Wed Dec 01, 2010 11:58 am

Re: Arduino based Laser Control

Post by tweakie »

Hi Art,

Well I fell at the first hurdle (installed Mach4-2138 and Darwin-2138 and reloaded Arduino with latest sketch).

1) Set to Diags, set count to 1000, ( 1/5th second).

Set to Diags and Pulses set to 1000 - OK

2) Run button LED should now flash ( if box has one..  )

Fire button now flashing - OK

3) Pressing fire should count down , PWM should go to power set by the pot.. 100% for test

Nothing ? no countdown

4) did laser fire during count?

Nothing ? laser did not fire

Its all bit of a mystery ? I will go back and check my Mach4 / Darwin set-up and also check my Arduino wiring etc. and see if I can find what I have missed.

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

Re: Arduino based Laser Control

Post by DanL »

art I will test the full new code here since test and engrave work properly on my set up to see if it from all the yun stuff probably not but cant hurt to check
DanL
Site Admin
Posts: 357
Joined: Thu Sep 11, 2014 12:35 am

Re: Arduino based Laser Control

Post by DanL »

the code works fine here diag switching to pwm ok, engrave ok, diag fine

diag and engraving works fine pwm not so much it runs at half of what engrave does so engrave at 4.5 to 5v max at s100, f400 power at 100%.
pwm running about 3v at m3s100g1x50f400 the scope is not that all that good so I put in a led its bright as in diag and engrave mode
just glowing in pwm mode.

I will need to do some more testing in pwm to see if I can get it working better
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 Guys:

  Sorry for delay, I didnt get notification on this thread for some reason..

Tweakie.. Sounds like perhaps we need to add a display code for fire button being pressed,
sounds like something is messed up there. Yell if youd liek a hand getting a diags message
on that.. Im betting when we find that bug things will begin to run..

Dan, Ensure you use the latest laser code I posted a couple messages back, it fixes a bug where the
CNC Mode was doubleing the S power, so an S40 would give 80% ... last post fixed that ( small typo
on my part.. ).
  Sounds like yours is runnign well Dan.. any idea how to get your laser to fire with the signals?
The LED was a good idea, PWM does make an LED glow brighter or dimmer depending..

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

Re: Arduino based Laser Control

Post by DanL »

I am using everything that is new I will be testing some more tomorrow I will try a do a screen shot so you can what I am meaning if I can`t get it working better
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:

  Cool. Explain an issue and Ill do all I can to fix it up. th eLED is a very good idea for testing though, it will
glow brightly for hi and dimly for low power. BUT , be aware that in engraving mode, it may vary quite a bit as in engraving mode  the fire is limited to 1 shot per step of  a motor....

Art
Post Reply