Monday, July 4, 2011

Still alive.

Well, there has not been much to talk about. The progress is pretty slow. Some has not been as quick to implement as I had hoped, some looks promising. I have also been spending a lot of time waiting for stuff to ship to me. I picked up a bulk package of bearings, some glue, a drill bit. That kind of stuff. I have also been waiting on my little milling machine that has been on backorder from Harbor Freight for a couple months.

I have been doing a bit of hardware stuff and a bit of software.

Hardware first.

I have been probably over thinking the linear bearings but there have been some things that bothered me. I prefer to make the rails out of aluminum but I don't like running hardened steel bearing races on aluminum. My current solution is to make some wheels for the bearings. I have a few small sheets of UHMW polyethelene and used that. I cut out a bunch of little squares of the UHMW and drilled out holes for the bearings with a 22mm Forstner bit. Then I took them to the lathe and cut them down to final diameter. It sounds a lot easier than it was. I had to figure out how to cut them out concentrically. The final solution was to make a plug mandrel that I could press fit the pieces on and then a small face plate on the lathe to press them against.  I pinched them between the face plate and the mandrel with the tailstock and let them spin a bit on the live center while tightening. As they tightened, they centered themselves. I made enough for the entire router and a handful of extras.  They are a snap fit on the bearings and seem to stay on well enough. I did get some 3M 90 adhesive that was supposed to stick to the polyethelene but it was pretty much a waste. It was messy and after a day of drying, it was still possible to pop off the wheels. It didn't stick to the steel well enough to bother with. I might as well just run a bead of epoxy, CA, or just paint on each side of the wheel to make a wall to keep the wheel from sliding off.  If the UHMW wheel doesn't stay on the bearing, I can make some replacements with something else that glues better. The carriages will be much like the ones from cncrouterparts.com:

Linear Bearing Carriages from cncrouterparts.com

The difference will be that I am going to make mine in wood and in two parts. I have a set of theirs and they are really nice if you are going with steel rails. They would eat up an aluminum rail really quickly.



On the software side:

I already have the g-code interpreter on the Arduino and have had it running the motors for quite a while with the grblShield. I really like the board. The software, not so much. Actually, it is some of the most well written code I have ever seen. I just don't like how it is designed. Basically, you just dump g-code at it and it works.

Here are my main gripes about it:


  • At present, it doesn't run on anything but a plain Arduino with a ATMega328 which doesn't leave a lot of room to do what I want. Little memory and few free pins. I would prefer to run it on an Arduino Mega with a lot more input and output capability and more memory.
  • All the code resides on the Arduino. There is no reason to put all of that stuff there. It doesn't need to do all the settings. It doesn't need to do all the unit conversions. All I need to do on the Arduino is to run the steppers and set and retrieve info from the pins.
  • There is no flow control to do things like zeroing, emergency stop, or spindle control. The have some preliminary stuff there to implement limit switches but that is about it.
  • It implements a subset of g-code. No variables, subroutines and such. 
  • There is no flow control to handle things like bit changes, jogging, or pausing.
  • It uses an older tool chain for development which I just don't like. 


I looked at the alternatives. The closest one was Firmata. It works similar to the MIDI protocol but when I started working with it, I found it really lacking. All the client libraries I found do not implement the protocol well enough to use it. Specifically, they are missing the sysex messages and the string passing. By the time I would implement that, it would be a lot more work than just creating my own protocol. It is just serial communication, it is not that hard.

All I need on the controller board is absolute positioning with a subset of g-code, reading and setting outputs on the other pins, and to be able to set an emergency state to stop the machine when things go really wrong. On the controlling computer, all the unit conversion, settings and calibrations, g-code interpretation, zeroing, spindle control, limit switches, jogging, and such can be handled. It also allows the possibility to switch either component. I could go with a faster controller with more memory like the Netduino. I could also write a more sophisticated host software to run everything.

Now, here is the question for readers here:

Do you want for me to get into the coding part as well here on this blog or do you want me to just focus on the hardware and machine design?

1 comment:

  1. Hi! well, I don't think that hardware and software are a separate thing in this case. You are trying to create software that will work with the specific hardware setup you end up building, so I think it's really a good thing you keep them together.

    If you were building a separate electronics platform designed to run on a variable number of hardware setups, spliting the software in a project would be the way to go.

    Regards

    ReplyDelete