The following are a cut and paste from my personal log on the milestones as I got the CNC working. I figured I’d paste them here since rewriting them wasn’t going to be much more interesting than their content as they stood.
A few notes though:
- Seb is my friend who is also an active maintainer of LinuxCNC. I’ve learned most of what I know about LinuxCNC from him, and he’s been invaluable in helping me understand problems that I had no words to plug into Google for.
- Jim is a friend who has a Shapeoko2 close to my design, so most of his config files and design helped me understand more of what I was attempting to do
- Lee is another friend, who provided me the circuit board he laid out and designed for his CNC, which like Jim’s is very close in many aspects to how I decided to build mine.
- Without these three friends, I would have not embarked on building my own, I needed quite a bit of knowledge that they all freely shared.
- The “gold brick” is my term of endearment for an industrial PC that my friend Brent gave me. It was an ASUS Aaeon Intel Core2 Duo packed into a U shaped aluminum cavity that serves as the fanless heatsink for the whole thing. It happens to be anodized to a gold color, is compact and it weighs a fair amount, thus the term “gold brick”. This is one seriously awesome PC. I was hoping to use it because it was an industrial PC, and being fanless could withstand the dust that it would be living in.
A very cold week of negative temps prompted me to find a propane fired heater for the garage. Unfortunately, Home Depot and Lowe’s both were sold out, as it’s seasonal and that’s all they were shipped. OK, I get that it’s a seasonal item, but seriously, I live in an area of the country that’s cold during the winter, and you only had 5 heaters? And you won’t get any more for the entire year? It’s not May, it’s January! There’s at least three more months of cold. Sheesh, you brick and mortar stores don’t want to lose business to online retailers, but you refuse to restock, then I have no choice. ACE and other stores in the area likewise were out. OK, a visit to Amazon later and it was on it’s way. Prime is an awesome thing, and today I unpacked and fired up the propane heater. Aaaaaah. Very nice. Just need to make sure to keep vented.
First movement! Got the right signal out on Z-axis step. It only moves in one direction though, which makes me think that the z-direction isn’t being toggled. I’m using the “Test this axis” in stepconf, so it jogs it back and forth. Also in AXIS gui, trying to jog the z axis doesn’t go but one way.
Spoke with Seb about it (Seb is my friend that is one of the active developers of LinuxCNC). Learned a few new things about LinuxCNC, and the halcmd shell that allows you to toggle stuff. Also about HalScope and HalMeter. He definitely agrees that it needs to be scoped out from the PC down. Looks like that’s the next step because there’s no other way to tell. Good thing I have a scope… Also spoke about the weird power issues. Turns out it might not be the right pin being toggled for the Amplifier Enable pin.
Tonight I used the scope and traced the signal for Z-axis direction out to the driver. The steps are making it through, but the direction isn’t. Well, you can plainly see on the scope, the signal goes into the optocoupler chip, but not out. It’s a fried channel on the optocoupler. Dunno if it’s from rough ESD treatment or just plain failure, but it’s needing to be replaced. Hello Mouser, here I come again. Sucks to pay shipping on a $0.70 part, and it sucks that a $0.70 part is hanging up the show. Oh well, I have other things I can test out.
In my friend Jim’s config, I noticed that he didn’t slave the A axis to the Y, he just set the Y pins (step and dir, inverted for dir) to Y’s nets. So that’s what I’ll do too.
Also changed pin 1 to be Amplifier Enable like Jim’s config has. That seems to solve some of the strange power control issues.
Got X-axis to move. I don’t know why the pins aren’t changing for pin 8 and 9 which is what I also have Y-axis step and dir mapped to. The pins off the port aren’t changing, so it’s not an issue with the board.
Working with the “gold brick” Asus Aaeon industrial PC, installing a SATA drive and putting LinuxCNC 2.6 on it. Wifi issues abound. As it turns out, through the various machinations, it’s somehow a problem of interference between the Parallel port card that was installed and the wifi card. I don’t know if it’s a PCI conflict, since the parallel and mini-pci wifi cards are both on the PCI bus, or what, but every time I pull the Parallel card it works, and when it’s reinserted, it doesn’t. Who the F knows. Ordered a PCIe wifi card tonight to avoid having a USB dongle hanging off of it, to give it a bit more mechanical stability. It needs the duck antenna if it’s going to be out in the garage, the little USB plug that I tried from Edimax loses packets because there’s too much interference.
Wireless PCIe card arrived, installed it. No problems connecting. Must have been a PCI conflict of some kind, possibly both slots shared the same electrical connections. Also installed the new optocoupler chip into the driver carrier board. No dice. things still not working the way they fully should. I need to spend some more time on it, but don’t have it tonight. Got the internet connection up, so I’m happy about that at least. Now comes the tough part of getting the board debugged.
Wahooooo! All three axis are moving, all four motors! The transistor for the z-dir pin optocoupler was disconnected. No connection even though the trace is there. Some sort of defect keeps it from being connected. A bit of wire wrap wire and some solder got it working. So I didn’t need a new optocoupler chip afterall, but whatever. I didn’t expect the trace to not be connected. Also, Stepconf wizard doesn’t understand sending the same signal (y-step and y-dir) to two sets of pins, so it only moved one motor not the two of the Y axis gantry. After getting the config written, AxisGui had no problem with the signal going to two motor controllers.
Used Pololu current setting document to setup drivers. Drivers running much cooler now. Each driver will measure at 0.70 of what they really are pulling, so when you want to find out what current they’re really at, you need to multiply by 1/0.70, or 1.4 of what’s showing on the current meter. Set trimpots and got the three axes on the right current. Drivers and motors both happier now.
Built small fan shroud out of strips of scrap ABS plastic. Smaller fan now blows directly across the heatsinks of the drivers and in the right orientation. Drivers are warm, but never burn-your-fingers hot now, due to this and the current adjustments. Now the biggest frustration lies in making it accurate. It doesn’t step right.
Found out that the switches that were installed on my control panel are wired correctly, it’s just that the 48v power supply that I bought has a ground fault in it (as evidenced by having only ground and hot hooked up, and it still tripping the GFCI). Every time power is applied to it, it trips the GFCI. Ordered a new one.
Wired up the new 48v spindle power supply, tested with the spindle and the motor controller. All in that chain work well. Got the control panel wired up with the new power switches, and all the wiring tidied up and looking good. Used a new step-down powersupply to drop 24v down to the 6v that my fans require. They’re 12v fans, but I wanted them to be quieter. I used a 6v power brick, but it means that it’s switched on and off different than when the motor drivers are. It’s easier that if they get turned on, so do the fans at the same time.
Got it to step smoothly. It’s now needing to have it’s carving space defined so that it can run programs. Might need to ask for help on that, but I’m also taking apart Jim’s files to see if there’s something there that could clue me in. Need to start coming up with artwork or at least some designs that I can run through a CAM program and generate some ngc files.
Update – got it to trace out the sample LinuxCNC ngc file it comes with. I still need to do work on scaling it so it can be accurate, and getting the Z-axis right. I’m not sure what I’m going to do, it needs to know where it’s home is, and I think I need a switch that is actually on the top for home, with the bottom being limit. Otherwise, I’m not sure it will carve right.
Early morning, got out to the CNC machine and tried more configuration now that I had used Seb’s G54 knowledge. Messing about with configs, I was able to get it accurate, for the most part. But now I need to get it tuned, because it’s close, but not enough. Z-axis remains a pain in my ass. I need to get it’s soft limits set in.
Problem now exists where it’s skipping steps or stalling on Z. While it works, it doesn’t work well for Z. Start looking into SMI and other possible reasons for stalling or skipped steps.
(Turns out, the gold brick just wasn’t awesome for this application, it had a horrible latency histogram, as found by the latency-histogram tool. This is part of what I’m referring to in the comment about SMI above. I won’t explain that here, it’s better explained in the LinuxCNC docs. I eventually had to go back to the HP Pentium4 desktop PC I was using before I obtained the gold brick.)
Installed new USB wifi dongle, it works. Continuing with removal of PCIe wifi card and inserting a PCIe video card. Tried several from the stash, settling on one that supposedly doesn’t do too much better than the Intel G945 one that’s built in. Ha! Launched and played around with Axis GUI and it’s fluid. FLUID. Not this chunky crap that the Intel one had. OK, it stays in.
Spent time rebuilding the gold brick. Long story short: nouveau driver works, but is broken. Predictably broken, but annoyingly so. It’s workable. What isn’t is the nVidia drivers. Because of a problem with a GPL symbol, the driver wouldn’t compile. and left the system in a crippled state. Had to copy off my crap and rebuild to get it back. Not happy. Tried again, but it had the same effect. Finally reverted back to nouveau, and sticking with it. Wasted too damn much time on it.
Talked with Seb, he thinks that latency issues aren’t to blame for the z-axis missed step/stalling. he thinks it’s an issue with the threaded rod possibly. This was something he mentioned after I mentioned that the noise was coming from the center of the carriage rather than the motor. Sooooo, time to take a critical look at the entire axis and see if it’s got mechanical issues.
After getting the Z-axis re-aligned again, I was able to see a correlation I hadn’t seen before: when the Z motor was jogged when the Axis gui was set to a high jog rate, it seized. I always had to drop the jog rate because it would just go too fast. I discovered that slowing down the velocity and acceleration for the Z-axis significantly allowed it to move the axis without seizing and losing steps. In other words, the acceleration and velocity were set too high for the motor to handle it, and so it wasn’t a latency issue, it was that the motor just couldn’t move fast enough. once those values were turned down, the axis didn’t lose a step. After this, I was able to get the system using a sharpie without ramming it into the bed. Of course, I also had to learn that the LinuxCNC sample gcode has the 0 for the z set at 2mm above where it puts the tip as it’s moving. When I accounted for that, I got the right results. I also created a spring loaded pen/pencil/marker holder so that I can use pencils in the CNC. Works like a charm. I set it to move on 5mm increments, and it does. It’s now fairly accurate. Next step is getting some Gcode put together and attaching a spindle. I might use my dremel tool to start, so that I can see how it goes before putting my more expensive spindle in harms way.
Z axis is driving me nuts. Damn thing can’t move faster than 632mm/min without seizing and stalling. And what’s worse is it seems every CAM program doesn’t get that on evac out of a cut, the Z can’t move that fast and needs to go slower. I’ve tried editing the gcode, to limited success. I took time to figure out how to adjust that with Cut2d, and CamBam.
Installed the T-Nuts and got the wasteboard zipped down to the frame using 10mm M4 BHCS and drop in nuts. Used the Forstner bit and went 7mm deep, leaving 5mm of it to grab onto. Now I need to cut some hold down pieces to use with the T-nuts.
Tore down the Z-axis in anticipation of replacing the screw drive. I had thought it was bent by the way it wobbled, but it turns out it wasn’t. It was how it was fastened together. Only by tearing down the Z could I also figure out (now that I had something to drive the motors, unlike I did when first installing it) that the high jog rate would stall the motor even without the load of the carriage and the screw drive. Implemented a much better limit switch solution, got it so the carriage can now travel the full negative z. This gives me a z axis length of 57.5 mm.
CAM is a nightmare. I’ve tried many of the different packages, free and commercial demos. it’s a nightmare to get a usable piece of software, but it’s also a format nightmare. Even when you get a usable piece of software that isn’t cryptic, it may have issues not being able to read the drawing files you need to hand it. Some allow you to route “on the line” instead of to the inside or outside of it. Others won’t, and if you want to it’s an “engrave” operation. Oy.
My selection criteria are:
- needs to be easy enough to learn on my own by poking around and knowing basic terminology
- the workflow needs to be uncomplicated
- the more complex features need to be present even if I don’t need them for everything I do. I need to be able to start simple and grow into the program
- It needs to work, on what I feed it for 2d as well as STL files for 3d.
- Getting an evaluation license can’t be a pain
- It can’t cost an arm and a leg. I get that it’s a tool that people have spent time on, and being a software engineer myself, I don’t expect to get all of my software for free. But it has to be accessible to the hobbyist, and that means I’m not dropping $15k on a SolidCAM license.
Ones I’ve tried:
- vectric cut2d
- dolphin cam
What I’ve used to draw with:
I’ve learned that DXF isn’t always a DXF that is compatible. Apparently, as my friend who works for a CAD vendor said, “welcome to the hell of CAD file formats”.
(I finally settled on CamBam. I’ll probably do a post purely on that, there’s much to cover. It’s $149, it does all of the simple and all of the complex stuff that I’ve thrown at it. And above all, the guy that wrote it allows you 40 free unrestricted uses, which helped me while I was attempting to get things working and not have to worry about plunking down the full money for it until I did. If you’re looking for a CAM solution, I highly recommend CamBam.)
I was able to get the SVG to DXF script to work, and was able to get my daughter’s request (“LOVE” drawn out) done with pink marker. She was happy, but so was I: finally able to get inkscape SVG drawings into CamBam. So this looks doable. As for 3D? None of them seem to be easy to get a 3D STL file mapped out, except for MeshCAM. I would be willing to spend the $250, if and only if it made it easier to do 2D and 2.5D CAM, but it doesn’t seem to. Since the majority of what I’ll be doing is 2.5D, CamBam is more appealing as it is easy to get paths laid out. It does 3d too, but i haven’t had much luck with it yet, and can give it time since that’s not the primary focus of my CAM experience.
Tonight’s the first cut! Started with a 1/8″ end mill, in the spindle with about half the speed it can go, and did some cutting using manual jog. I was attempting to use it to cut the side of a pinewood derby car, since my daughter wants an ice cream sandwich for a car and I needed to cut down the side of one. After failing at this miserably, I decided to get a piece of 1/4″ MDF cut to the right size, and give the good old LinuxCNC logo a try. Set to a height off the surface of 1.5mm, this meant it would (should) cut .5mm deep, since it plunges 2mm on that program. It finished without an issue. WOOOOT!