Shop OBEX P1 Docs P2 Docs Learn Events
Monitoring/Controlling Stepper output for Laser Engraver — Parallax Forums

Monitoring/Controlling Stepper output for Laser Engraver

Jim FouchJim Fouch Posts: 395
edited 2010-01-21 20:35 in Propeller 1
I bought a laser engraver about 5 months ago and can't leave it well enough alone...

I want to be able to see the exact position of the laser head. Similar to how most CNC machines do. Right now you have to eyeball where you are going to start a job. I want to use the propeller to monitor the signals going to the stepper motor controller for each of the 3 axis. There are two outputs for each, Direction & Step. It looks like the fastest it send steps is about 15 microseconds.

My thoughts are to place a propeller in line between the embedded system and the stepper motor controllers. I think I should have plenty of time·using pasm to read the inputs, calculate position, and send outputs to the controllers when I just·want to monitor. Then when I want to control the steppers myself, I will·simply ignore the inputs from the embedded system and create my one.

Some may ask why in the world·would I want to dig into a perfectly working system this way.... Well I want to create a system for measuring objects. A laser engraver is thought of as only an output device. But with the other hardware there, a measurement system could easily be made. My thoughts are to place a small camera on the laser head and use a Propeller backpack to place a cross hair in the center of the video and position information. As the user moves from position to position the location of each reference point can be precisely calculated.

My machine has a working area of ~ 27" x 14" x 8" so a full size laptop could be placed inside and measured.

One neat thing I've found out is the device is USB based and is located about 15 feet away from the PC I use to control it. They have a USB dongle that the PC software needs to see to operate. Without the dongle, the whole laser is pretty much a boat anchor. So, instead of keeping the dongle in the PC, I placed a usb hub inside the laser and plugged the dongle & the laser into the hub. Now when I put a USB Prop Proto board for this project, I'm able to program & open a terminal with the Prop Board without removing it from the laser. cool.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jim Fouch

FOUCH SOFTWARE

Comments

  • BradCBradC Posts: 2,601
    edited 2010-01-19 14:37
    Very cool. Can you attach it to a shark?

    I've always wanted to play with a Laser Engraver. Team it up with a good rasteriser and you could go into interesting architecture.
    "See this block of concrete? Well we'll turn it into an apartment block". "And then the residents pass down this corridor, through the rotating knives"..

    Using the device for point scanning would be a great application if you could do it without slicing your laptop into tiny pieces. Far more accurate than the ball-contact scanners conventionally used in converted X-Y tables.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-19 14:54
    I had thoughts of gutting a mouse (Calm down PETA, Not a real mouse) and putting in on an XY device and using the prop to monitor the mouse position. It would be simpler that the laser engraver idea, but not as cool.·Current mice have a resolution of 1000+ DPI, way more then actually needed.

    The laser should be even better, and with out the chance of loosing position.

    Yeah, with·an output of 50W, it could do a real job on laptop. I'll have to be more·careful not to run the·head into an object·and scratching it.

    Some people use these to·engrave pictures/artwork into their·electronic devices like laptops and iPhones. One of the reasons, I really want to position the·head·prior to running a job. Having a design·an 1/8" off on a $400 cell·phone·can make for a bad day... freaked.gif




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-01-19 15:44
    Mice have excellent resolution but poor accuracy, they give about 1000 dpi +/- quite a bit depending on the surface. I did some tests on mice, placed the mouse over a turn table, rotate a turn one way rotate back and the positions were not even close. The mouse must also not be rotated during the process.

    A simple digitizer for a flat surfaces is an arm with two joints and two encoders, easy on the propeller.

    I like the idea of hacking the laser cutter, I have one at work and would definitely consider it.

    Graham
  • hover1hover1 Posts: 1,929
    edited 2010-01-19 15:44
    Jim,
    Could you use a drill press laser pointer to find the start of your job?
    http://www.woodcraft.com/Product/2005475/16259/Drill-Press-Laser.aspx
    You could always use the Propeller to turn it off/on tongue.gif
    Jim
    Jim Fouch said...


    Right now you have to eyeball where you are going to start a job. I want to use the prop

  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-19 15:57
    Jim,

    It already has one, but it's not very accurate. When you raise/lower the table it moves the red dot laser. Also when you're cutting a clear material, it's hard to see the actual location.

    My idea is to have the camera in a fixed location in reference to the actual laser. This offset can be programmed into the software to offset the job. This way you will always be certain where the job will begin to cut.

    I'll try to upload some pictures of the project·tonight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-01-19 16:08
    That is exactly how the pick and place machine in my garage does it. (it's a long story, PM me anyone who wants to buy it [noparse];)[/noparse] )

    Graham
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-01-19 16:10
    Ah the drill press laser is neat and avoids the height issue by using two lines, still has the transparent material problem though. You can also get beam combiners to add a laser pointer that is concentric with beam, expensive and similar issues.

    I also use the electrical tape and a quick zap method of alignment [noparse]:)[/noparse]

    Graham
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-19 17:58
    Jim Fouch said...
    When you raise/lower the table it moves the red dot laser.
    Is yours an Epilog? I just got an Epilog Zing and have noticed the same thing. It's only a problem if I'm doing a job that combines focused and unfocused cutting and engraving, since the iimage is slightly misaligned between the two. Epilog's tech support told me I had to realign the mirrors to fix it, but I'm more afraid of making the problem worse. In any event, mixed focus jobs are too rare for it to matter that much.

    I haven't found any issues with getting a job precisely aligned using the red dot pointer. I always set up the print driver to align the job to the top-left corner of the page. If I'm engraving on, say, a 6" x 6" tile, I'll make sure to include an outline of it in the drawing, but invisible so it doesn't cut. That way I can set the red dot to where the X and Y stops intersect and slide the tile against them. With that method, I get perfect alignment every time.

    -Phil
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-19 19:14
    Mine is a 50W 3060H from a company in China called ArtCut. Here is a link that is close to what I have.

    For $6K it's a lot cheaper than others on the market. So far I'm pretty happy with it. I'm sure I'd get better service/support if it was one from the US, but I can only budget so much for this kind of thing.

    I saw the Epilogs when I was CES last year and that's where I got the idea of getting a laser engraver. It's the most useful tool I have ever bought. Great for making brackets and enclosures. I've been working with cutting different rubber products. Most people buy these for an engraving business. I'm using it more for prototyping of products and such. I'm soon to enlist the help of the wife to start running the machine. So far she doesn't like it much because it stinks up the house.....lol (Yes I have an exhaust fan installed to blow most of the stink at the neighbors. lol.gif )

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-19 20:11
    Jim,

    What kind of material are you using to make things like brackets? Is it something you can bend into shape, or do you join multiple pieces? If the latter, how do you join them?

    Ditto the smell. With the exhaust fan running, everything is fine until you open the lid; then, peeeww! I guess, if I weren't so impatient, I could wait to open the lid until the fumes have been evacuated...

    Like you, I don't know how I survived so long without one of these machines!

    -Phil
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-19 20:33
    Phil,

    I'm mostly using Acrylic that I can heat and bend. It cuts so nicely with a laser. I've tried some fiber reinforced plastic, but it soots up a bit too much. I've got some delrin, but haven't cut it yet.

    I'm controlling the exhaust fan with the propeller (pun intended, lol) so it comes on when a job starts and runs for a minute or so to clear the smoke. The way the machine was build, the exhaust runs all the time. I'm also going to use the prop to display the coolant temp.

    The prop is so well suited for this kind of thing. I will use one of Rays 4.3" touch screen to make a control/display for the system. The default UI that came with the unit leaves a lot to be desired.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-19 21:34
    Jim,

    Delrin cuts very nicely. I was hoping to be able to score thin sheets of it with the laser so I could bend them cold; but that didn't pan out, since they tend to crack along the score. Ditto the laminates. I've tried both glass-filled epoxy and paper-filled phenolic. They both ash up rather badly.

    I assume you've been warned against cutting PVC or any other chlorinated materials, right? The fumes are not only extremely toxic, but highly corrosive. Epilog voids their warranty if the machine has been used on PVC.

    -Phil
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-19 21:47
    Yep, PVC=BAD.... lol

    I found a good deal on some magnetic sheets, and tried to cut it today and that doesn't work too well. It creates a dust that magically sticks to all the metal/steel parts...lol

    I've use Santoprene rubber with very good results. I've found. I bought 4-5 different kinds of rubber sheets for making my own gaskets and rubber washers.

    For the acrylic, I use a solvent to weld the parts together and it works very quickly and make a pretty strong part. It dries 100% clear. Only problem with acrylic is it is somewhat brittle and can't be used for a high stress part. I make robotic camera mounts and this laser will work great for making the small parts for that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-19 22:11
    Jim Fouch said...
    I make robotic camera mounts and this laser will work great for making the small parts for that.
    LOL! We're certainly on the same page app-wise: http://forums.parallax.com/showthread.php?p=873340

    The Santoprene tip is a good one. Thanks!

    -Phil
  • David CarrierDavid Carrier Posts: 294
    edited 2010-01-20 02:13
    Jim,
    To echo what Graham was talking about, automated manufacturing equipment, like SMT pick and place machines, often uses a fiducial camera to determine the position of a board within the machine. The board would have two or more fiducial markings, or fiducials, in known locations at opposite sides of the board. The fiducials are designed to be easy to find the center of by analyzing the image with software. They are usually a reflective disk inside a larger non-reflective disk. The camera is attached to the head and has a known offset from the functional part of the head. (e.g. the laser or a pick and place nozzle)

    Using a fair amount of trigonometry, you can measure the position of the fiducials relative to the working area of the machine, and determine the location and rotation of the board within the work area. This makes it so that all of the operations are repeatable, and you can take a half-finished board out of the machine, then load it back in later to finish it. The hardest part would be the machine vision software to recognize the fiducials. I know the Propeller can handle it, and I think Phil has done some other neat machine vision examples that would be worth looking at.

    The pick and place machine that we have takes an 8-bit gray-scale image of the fiducial, then converts it to a 2-bit image based on a user-settable threshold, to classify every pixel as reflective or non-reflective. It then removes all clusters of pixels under a specified size and fills in any gaps of pixels under another specified size. This means that if the threshold was set to five, any pixel will only be considered reflective if it is part of a contiguous group of five or more pixels that are also reflective. It then finds the center of the remaining reflective pixels, and considers that the center of the fiducial. The center is the point where a quarter of the reflective pixels are up and to the left, a quarter are up and to the right, a quarter are below and to the left, and a quarter are below and to the right. It works quite reliably, especially if you can control the lighting to get the best contrast possible.

    We have an older pick and place machine that has stepper motors instead of brushless servos. Even though it could count steps to measure the position of the head, it uses a linear glass encoder to be absolutely sure the readings are accurate. It also uses the encoder to double check the position that the motor should be at to detect motor errors. The screw or belt that drives the axis can also have irregularities that wouldn't show up if it only counted steps.

    These machines are ridiculously accurate though, so counting the steps may be more than enough accuracy for your needs. I have used our pick and place machine's fiducial camera to measure ultra-fine pitched pad sizes on circuit boards that we were evaluating. If you do want a second opinion on the position of the head, you can add an encoder to the motor shaft for more accuracy.

    Keep us up to date on your project, it looks really interesting.

    -- David Carrier

    P.S. I bought a Ninja 250R in October, and I really enjoy it.
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-20 13:40
    Here are a few pictures of my laser engraver project.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
    1024 x 768 - 180K
    1024 x 768 - 192K
    768 x 1024 - 193K
    1024 x 768 - 173K
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-20 13:42
    A few more pictures...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
    1024 x 768 - 167K
    1024 x 768 - 171K
    1024 x 768 - 193K
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-20 14:12
    from looking at the pics, it looks like the positioning pulses from the controller to the servo drivers are output at the 3 headers located below the black serial(?) connector at the bottom rt hand side of the board. i also noticed it looks like those signals are tapped into at the servo drivers and fed back into the controller board, (the 2 red, 2 white, 2 green wires), maybe for the controller or error check the pulses, error checking of somesort added aftermarket maybe? what are the part numbers of the 2 18 pin dips just to the right of the aforementioned black connector? thinking the may be driver/optoisolator chips. you may be able to tap into the existing outputs/feedback lines there and get your signals from that. though i would first check with a volt meter to determine what the voltage is, then if it's within a safe range for an o-scope, verify the pulses with an o-scope. if you determine it is the positioning pulses for the servo driver, (which i believe it is), then feed those signals into some optoisolators to generate the positioning pulses for the prop.
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-20 14:18
    I've already tapped into the signals that goto to the drivers. Strange thing is the DIR signal is a 5V signal and the PULSE is a 3V signal. I found the specs on the drivers and they call for 5V signals. Also the minimum pulse width is 2 microseconds, so I should have plenty of time to monitor and keep track of the position. The fastest I saw when running a sample job was 32 microseconds, but the machine may be able to go faster so I'll shoot for getting my readings in less than 2 micro seconds.

    For now, I'm going to write the driver to simply send the position back to the PC using a serial terminal. Later I'll add an LCD display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-20 14:23
    P.S.
    after further thought, how accurate has this engraver been for you? the reason i ask is that those red, green and white wires coming back into the side of the controller board, im just wondering if those were intended for encoder inputs, tied directly to the mechanics of the x, y and z of the equipment. seeing that and the way they were wired up, makes me think that the encoders were removed and the feedback pulses are just taken from the output of the controller. yes it would work, but what happens if the belt jumps a tooth or somesuch?
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-20 14:27
    Cool, keep us informed on how it works out, very interesting project!
  • Paul RowntreePaul Rowntree Posts: 49
    edited 2010-01-20 14:31
    Jim, the CNC woodworking guys often add a bristle-ringed 'shoe' to the router head that is attached to a shop-vac hose. It avoids getting cuttings and dust everywhere, while letting the head move without entanglement. Would this help with the dust/smoke/particle problem?

    What is the accuracy of this cutter in the XY plane?

    Cheers!
    paul rowntree
  • Jim FouchJim Fouch Posts: 395
    edited 2010-01-20 15:27
    kf4ixm,

    Yes, there are no encoders. It simply HOPES that everything works. It's been pretty accurate. The samples that I cut have been with with .01" and since the laser is about .01", I'd say it's pretty good. On a CNC machine feed back is way more important because you're touching the material and encountering resistance. The laser is never touching the material and as long as you don't overpower the steppers, you *SHOULD* always be where you think you are. Could be one of the reasons this is $6K and other 50W lasers are $12K-$15K.

    Paul,

    I'd have to look up the specs say .0004", but the laser is .01" wide so it's hard to say. Also remember depending on the material, there is some melting involved. So .0004" would be hard to prove. They normally rate them at .001", which is somewhat misleading.

    I also have a small CNC router that I use, but Haven't turned it on since I got the laser about 5 months ago.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • fullspecengfullspeceng Posts: 76
    edited 2010-01-21 20:35
    If anyone is interested, we sell CO2 laser engravers that are directly driveable with the Propeller.
    www.fullspectrumengineering.com/co2laser.html

    We use a digital isolator that can take 5v or 3.3v inputs·and even include a 40pin socket for the Propeller on our control board.

    We're coming out with a full blown Propeller Windows driver but still some time before it's done that allows you to directly print from Windows.

    ·
Sign In or Register to comment.