Arduino based Laser Control

A forum for the Arduino based Mach4/Darwin Laser Control Panel
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Hi:

  I should add one more thing.. the labels for the button names are wrong in the schematic, I just relaised
I used an old napkin sketch and cant find my final layout paper, so Ill have to trace the code to see what
button is actually which in their respective groups.

Art
Richard Cullin
Old Timer
Posts: 152
Joined: Sat Jun 02, 2012 5:45 am

Re: Arduino based Laser Control

Post by Richard Cullin »

art
my concern is that the analog input pins are essentially floating until a button is pressed . floating pins are very subject to noise
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Richard:

  In this case I turned on the internal pullup resistor with a digitalwrite to that analogue pin, it keeps it pulled high until a button is pressed, that seems to make it resistive enough to noise .. or at least on the buttons I haven't seen any..

Art
Richard Cullin
Old Timer
Posts: 152
Joined: Sat Jun 02, 2012 5:45 am

Re: Arduino based Laser Control

Post by Richard Cullin »

art
I'm mainly thinking of others making this , where the buttons may have longer cables attached  and or  high voltage laser supplies may be employed , the internal rpu (pullup resistor) can be as high as 50 k .  a lower impedence wont affect the readings and will give greater noise immunity.
just a thought , great project though
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Richard:

Very good point. I hadn't considered the folks with high voltage supplies.
I will change the documentation to show 47K's as the resistors. Your quite
right that there really shouldn't be any downside to it, though Ill wait till
I hear from someone with higher values before making it official.
  Im sure over time many such changes will take place , as this is my first
arduino project Im happy to hear such suggestions for change. So long as the
same values are used for all of the resistors the code should remain valid.

Thx
Art
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Arduino based Laser Control

Post by DanL »

Hi art it looks like your code works with any of the ATmega32u4 boards what's quite good as some one could make a very small controller using a Micro board.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

DanL:

Yes, very true. Also, for those that dont want the capability of having the control panel itself, it woudnt
be difficult to modify the code to always be in NGrave mode with no buttons or LCD required. It
would  need modification though to send a pulse count and frequency if one wants better cutting modes
which I haven't gone into as yet, its all been about photos so far.

  While the pulse count is always left at 1 for photo engraving, this is because its high speed, where at most
1 pulse is used per step. I havent mentioned the low speed cutting where you increase the pulse count
so that multiple shots are fired per pexel at various frequencies, you can design the shot count and frequency
in a way to minimize charring and burning on various materials.

  Its one of the reasons I started this project. In my shop laser,  ( a mornstar) I cant do 3d sculpting because
it cannot handle varying power in a sweep, the panel can, and more importantly when I do a cut I cannot control
the frequency, though I can control the power. In most chinese lasers the power and speed is variable which is great
but the frequency is an important component of cutting without burning. When you allow a laser to rest, even for one
pulse, its power on the next pulse is a bit higher due to plasma cooling, and the material cools a bit as well,
which is another benefit of the panel approach.

  SO now that I can do engraving, Im going to try focusing on 3d sculpting or texturing of material. I want to try
using one of Gearotic Celtic knot grey scale outputs to see if its possible to sculpt it by using the proper combination
of frequency, power and speed.  Originally I used the YUN not only because I wanted wireless to program with, but I envisioned
using the SD card in the unix side to send the image data to, but the Arduino side is way too slow to get the data, so I went
serial com with Darwin instead. But since the SD card isnt needed and the wireless isnt required unless your like me
and experimenting with various techniques, any micro 32u4 would work fine, and I think you can get those for a few dollars on
ebay.

  As I said though, eventually the external hardware can replace all of this if they wish, so whatever we do at least leads
the way for folks in the Pokeys , SmoothStepper and other external hardware  camps to emulate our code and theories as we
find better ways to do things.. 

Art
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Hi Guys

Playing with 3d sculpting.. first try with a single pass of a celtic knot output.
Weird looking, looks ghostly..

Art
Attachments
3dlaser.jpg
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Arduino based Laser Control

Post by DanL »

I will do it like you have done I will use a Leonardo to do it with I will more than likely have a remote screen and buttons and stick the Leonardo inside the computer.
also some cleaver person could change the code so it works with one of the screens that use two wires with the Leonardo as it has more Interrupt pins.
it will be good if this controller gets changed so it can be stuck on any machine I think that wont be to hard to do just need a G code generator like how you did it with Darwin.
It could be a very good add-on for gerotic.
(just ideas for the improvement of your bank balances as I think you deserve it)
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

>>lso some cleaver person could change the code so it works with one of the screens that use two wires with the Leonardo as it has more Interrupt pin

  I originally had a 2 wire lcd on it, but I was concerned for interrupt time, its not the number of interrupts so much as the interrupt processing time and how it can interfere with the serial or step traffic. I did in the end make enough changes so that using a 2 wire would probably work now, but
in the beginning I had an interrupt for XStep, one for YStep and another for PWM.. and with 4 total going I was concerned about using another for lcd's.. but now it might work fine as Darwin now combines all the step interrupts to one pin..

Art
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Arduino based Laser Control

Post by DanL »

I might try using one of the screens with buttons have to look into it a bit more first my programming skill are quite ruff.
also I was thinking of seeing if one of the TI boards will work to as you can just use a chip with a couple bits added to get them working and they are cheaper
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Dan:

  You could use a TI, Ive looked at launchpads, they look good. You just need to know more programming is all. For my next project Ill probably move to a much more powerfull
micro.. but the arduino is working well for the laser so Ill stick with it for that..but I had
so much fun with it that I'm already planning a new project for after this development season..

Art
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Arduino based Laser Control

Post by DanL »

I am not surprised you have something else up your sleeve your wife must be glad that you are always busy.
I am playing at the moment I have to port over some .H and .CPP files first I am using there ccs program it shows where the problems are I used it to port over modbus last year
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Arduino based Laser Control

Post by ArtF »

Hi Guys:

Just a note, in the source code when I mention you need to comment out the original core interrupt vectors, the path of the Winterrupts.c file is at ..\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c

  You have to comment out the interrupt vectors as shown because I addressed them directly to make them faster.

Thx
Art
SkyMoBot
Old Timer
Posts: 52
Joined: Sat Oct 08, 2011 8:12 pm

Re: Arduino based Laser Control

Post by SkyMoBot »

In my version of the ardunio progamming package, they were in there several times for different hardware configs, so you might have search and comment out the ones for the hardware you are using.

I just commented out all of them and that worked fine for me.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests