Ben's 2.x Laser Build

Post your build logs here

Re: Ben's 2.x Laser Build

Postby educa » Sat Aug 20, 2016 11:49 pm

Ben,

I actually have a question for you about linuxcnc ;)

I use your linuxcnc modifications to do ppi on linuxcnc on my 80w cutter.

Today I hooked up the parallel port to my logic analyzer and analyzed some cutting signals at 24MHz (to be sure I don't miss any pulses).

There I discovered something strange in the signal to set laser power. It is a PWM signal, but I actually had thought that this would be a fixed frequency signal with variable duty cycle.


But these are the signals I found produced by your config


100% POWER = ON 25µs / OFF 2.463ms / Duty Cycle 99% / Frequency 402Hz
90% POWER = ON 25µS / OFF 0.221ms / Duty Cycle 88.4% / Frequency 3.99kHz
80% POWER = ON 25µS / OFF 0.100ms / Duty Cycle 81.25% / Frequency 8.00kHz
70% POWER = ON 25µS / OFF 50µs / Duty Cycle 66.5% / Frequency 13.34kHz
60% POWER = ON 25µS / OFF 25µS / Duty Cycle 50% / Frequency 20kHz
etc....

The lower the power, the more off the results.

But that is not the most important. I was very confused. You seem to keep the ON pulse constant at around 25µS and the OFF periode is variable. By using this technique you actually vary the PWM Frequency from 402Hz at 100% power downto 20kHz at around 50% power. Because the ON time remains constant, but OFF time changes, the frequency also changes.

So..... is this a deliberate choice ? I would like to generate the power PWM signal on an arduino microcontroller and while it is possible to continuously change the frequency for other power levels, I always thought that it would be better to just have a fixed frequency of for example 20kHz or 25kHz and then change the duration of the ON and OFF time. For example at 20kHz 1 cycle is 50µS, so if you set the ON signal active for 25µS and OFF for 25µS, you get 50% duty cycle. If you then want 25% power, then you don't change frequency, but just set the ON time to 12.5µS and OFF time to 37.5µS for a 25% duty cycle.

Is this a bad way to do it ? Or is the system you use with a varying frequency the REAL PWM system and is the one I suggest (pwm with fixed frequency) another trick which might require additional circuitry like RC filters to function?

I hope you can help me a little with this, since I always thought I could just let the arduino generate a 20kHz pwm signal and then alter the duty cycle by varying the ON and OFF timing of the signal, while retaining ON+OFF=50µS (for 20kHz pwm in this case).


Kind regards,

Bart
educa
 
Posts: 239
Joined: Thu Dec 22, 2011 9:13 pm

Re: Ben's 2.x Laser Build

Postby BenJackson » Sun Aug 21, 2016 12:57 am

You want your PWM frequency to be high because it's going to be averaged by a very simple low-pass filter to get an analog control voltage. The PSU recommends 20kHz, as I recall. But you need to be able to control the pulses (decide to turn on or off) at frequency * resolution. So if you want 100 power steps, you need to be waking up at 20,000 * 100 = 2MHz to control your PWM output. This is easy for a microcontroller with dedicated PWM hardware, but basically impossible for a PC to drive on a parallel port. As I recall, my system only got to 37kHz. Based on your measurements, your system is configured for 40kHz (1/40kHz = 25us)

Instead, I set up linuxcnc to do pulse density modulation. So every tick it wakes up it just decides if it should be on or off to hit its running average goal. The result is that you get the highest possible frequency (that your parallel port can make) that has the average duty cycle you want. What you should actually be seeing is that the pulse trains are irregular. If you looked at a longer train of the signals you should see them averaging the right value over a longer time period. Which is really the best that a PC parallel port can do in this case.

If you use a 5i25 (one of the FPGA cards) you can just do ordinary PWM because the signal is being generated in HW.

You could also use the PC parallel port to talk some serial protocol to a DAC and generate a true analog control voltage.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

E5 door protection plan

Postby BenJackson » Sun Aug 21, 2016 3:29 am

Since the E5's open door protection is weak, I'm going with a hybrid plan:

  • The WP pin on the Laser PSU must be pulled low to fire
  • The open protect IN1 pin on the E5 must be pulled low to signal door open

So I've hooked the common pin on the door switch to GND, and when it is closed it pulls down Laser PSU WP (enabling laser) and when it is open it disables the laser power (instantly!) and activates E5's IN1, which causes it to stop moving and asking for laser firing.

The E5's ~100ms reaction time is probably fine for the act of opening the door. The real problem is if you do anything to start/resume a job with the door already open it would potentially try to fire the laser immediately, which besides being unsafe would destroy my aiming laser. This wiring scheme mean the E5 will try to run the job (start moving, start commanding laser firing), but it can't actually fire, which is good enough for me.

I had considered using the WP input of the E5 (which really stops firing the laser), but it's much harsher than the door open protection. It treats it like a very bad exception, which it is, unlike the door.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Bringing back 5V and the Relays

Postby BenJackson » Sun Aug 21, 2016 10:19 pm

Having removed Bart's interface board, I lost my ability to control the relays (that switch the outlets on the back) as well as a source of 5V.

I got the isolated 5V module from LightObject to use with the power meter, so I am going to use that for my aiming laser too.

The relay drivers are just super-overkill IRF 510 with a 10k pulldown on the gate. Relying on the body diode for flyback protection.

Made on a little project board and screwed to a 3D printed standoff:

relayboard.PNG


In case I'm visiting again in 5 years having forgotten what it does, that's +24/GND on the upper left, two NC, then two logic level relay IN. The right side is 5V/0V isolated and then two pairs, one for each relay (24V and a switched GND).
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Ben's 2.x Laser Build

Postby BenJackson » Mon Aug 22, 2016 1:49 am

Hooked up the exhaust (dust collector), the power meter, and finally connected the E5 to the actual laser controls.

Verified that my safety setup was good, and made some cuts! Couple of 1" squares of paper, and then I engraved a label on one of my focus sticks (cut long ago):

20160821_184649.jpg
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Ben's 2.x Laser Build

Postby BenJackson » Wed Aug 24, 2016 6:01 am

I've found every design file related to my cutter -- the back panel, the electronics bay, the pointer laser, the updated Z bracket, the wire clips, ... except the one for the front panel, which is the one I need to recut.

This led me to pull out the old LinuxCNC machine to see if it was on there (usually I designed things on a different PC and copied them over). And lo, the machine won't boot. Beeping seems to indicate bad RAM. Aha! Thank goodness I switched to DSP! So I go to pull the drive and read it elsewhere. Pull on the SATA cable. Pull harder. Stop just short of damaging it and remember: 6 years ago I got it for free from someone because they broke off the connector. So this SATA cable is soldered on. Whew, didn't break it off again! Managed to find my SATA-USB adapter! Mounted it!

Last LinuxCNC cut: Jun 18, 2013.

Still no sign of the front panel design. It will show up as soon as I remeasure, I'm sure.

(Hey, there's the file I engraved on the backup drive that got lost in the move... Good thing it was encrypted...)

Here's an image I did in LaserMAX for a friend after he bought his first motorcycle and restored it:
Attachments
motorcycle-95230.png
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Pretty for the first time

Postby BenJackson » Sat Aug 27, 2016 4:22 pm

My laser cutter has always looked a bit scruffy because some of the protective plastics were still on it. I kept the plastic on the front because it had cutting errors I needed to fix (I think Bart had the cutter break or slip back into the collet while cutting it). I kept the plastic on the right-top because I figured I would need another control cutout someday. And that day is yesterday!

So here it is, now with all holes repaired, scruffy alupanel edges smoothed, DSP controls installed, new front controls to match the new setup, all screws installed with the proper black washers, and all protective plastic removed!

20160827_090436_001.jpg


The big green arcade button is something I've had for a long time. I hooked it up to the "foot pedal" input of the E5, which basically makes it a start/pause button. I debated not putting it in because it might get hit accidentally, but I'm really glad I did, because it is super satisfying to start a job by hitting that giant green button.

Oh, and I finally figured out why I can't find the design files for the black control panel insert -- I think I ordered it from Bart originally. I probably just cut one more rectangle to get the power switch in.

I didn't bring the USB B extension out the front. I think I might bring it out the back. I had hoped to cut mostly with the USB thumbdrive, but I can't make it work.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Ben's 2.x Laser Build

Postby BenJackson » Sat Jan 20, 2018 11:09 pm

I finally made my laser cutter a dedicated stand. It had a dedicated table in my old house, but it has been hogging workbench space in my new garage for over a year. The stand has 3 drawers that can hold 12x24" wide stock (easy to break down from full sheets) with over-extension drawer slides so you can get them in and out. I'm using bookends in the bottom of the drawers to keep the sheets vertical. There's room on the left for water cooling, air pump, and storage of the exhaust fan. Plan is to actually drag the exhaust fan into the driveway in use. I got a 20' 4" PVC flex hose for that. There's just no good direction to vent out of my garage that wouldn't blow right back into the house.

I also made it a cover (or a "laser cutter cozy" as my wife insists on calling it) so it won't get super dusty in the garage. I would claim that I cleverly selected a sawdust-colored fabric, but I just happened to have 2 yards of 1000D cordura in "desert tan" which was just enough for this.

MVIMG_20180120_144616.jpg

MVIMG_20180120_144633.jpg

MVIMG_20180120_144527.jpg

IMG_20180120_144543.jpg
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Ben's 2.x Laser Build

Postby kbob » Sun Jan 21, 2018 2:32 am

That looks too nice to keep in the garage. (-:

Is the box rigid enough to control vibration when the laser is rastering?

Edit: Is that plastic tub your water reservoir?
Bob
"If you didn't code it, it will never own you." (-:
kbob
 
Posts: 151
Joined: Mon Jul 09, 2012 6:39 am
Location: Eugene, OR, US

Re: Ben's 2.x Laser Build

Postby BenJackson » Sun Jan 28, 2018 3:07 am

The box is pretty heavy even empty (it's about 1.5 sheets of 3/4 plywood and 1 sheet of 1/2) and the wheels lock really well. With all that stuff in the drawers it's by far the sturdiest thing I've ever put the laser on.

Yes, the plastic tub is my new reservoir. It was empty in that pic. It's a "waterproof" box. I drilled a hole in the lid to get the tubing/power through. There's some adhesive cable management clips stuck to the inside now so that the water coming out of the tube is visible re-entering the box.

Right now the water is siphoning partly back out of the laser when it's off and takes a few seconds on start to purge the bubbles again. I know I used to have setups (still with the reservoir below the laser, and with the same pump) where that didn't happen, but I'm not sure why. Maybe I need a big service loop to break the vacuum. Unfortunately my tubing is getting shorter and shorter! Probably time to replace it.

Can anyone recommend a water quick disconnect for a setup like this?
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

PreviousNext

Return to Build Logs

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 1 guest