This week I figured out what I needed to in order to send sensible gcode to my DIY cnc. I think the thing that I had been missing was the idea that you don’t really need a single consistent co-ordinate system and that actually you might have a few for different purposes. Eg you might light to manually move the tool to a point on your machine, then reset that to be 0,0,0 such that your gcode is interpreted relative to that point. In that way you can have your models centred around 0,0,0 and work with the easier than if you had to have them offset to some point that would be the middle of your machine.
So with that in mind I took my inkscape file of my website name ‘maker | geek’ not rendered in appropriate font, just typed in with regular font etc, just to get something quickly. I then imported it into pyCam, centered it around the 0,0 and offset negative z by the distance my rigged up pencil was above the bed.
Once I had homed the machine, then moved it back to somewhere near the centre, I stored the location by using the G28.1 code. In theory this means I can always return to this same point by homing, then entering g28.
Once there I reset grbl so that this became my 0,0,0 point.
Having duct-taped a pencil to the z-axis. I then positioned some paper on the bed, and kicked off a simple stream of the gcode to the arduino. And everything started to spring to life!
I quickly realised that I’d rather messed up the scale of my model, and made it way too small. so I was just getting odd little squiggles. I was fairly sure this also indicated that not all was well, I could tell the Y-axis was binding up and stalling. but I went back to pyCam, doubled the size, reset and set off again.
After a few minutes I was rewarded with this output:
Impressive huh? The more observant reader may say ‘wasn’t that supposed to say maker | geek’ to which I respond…well yes it was, and if you squint and look at the right angle and use your imgaination that is indeed what it says. However it was very apparent that the Y axis was just not moving reliably. However the approximate spacing of the ‘letters’ on the x axis did seem about right. That was all I had time to try on that occasion since it was an evening mid week. However I resolved to return to the garage this weekend, strip down the Y-axis and rebuild it.
Cue timelapse of me fixing the Y-axis….
Sadly most of the work wound up at the bench, and so not really in shot….
Basically the original design (throughout the whole machine) I had attempted to get fairly tight tolerances and holes lined up across the length of the axis. This was a bad plan since I failed to get a precise alignment this just caused binding issues. To fix it I basically widened all the holes, leaving just the coupling to the motor and a single ‘captured nut’ in a block attached to the Y carriage. The captured nut was set so that it could slid up and down, but not back and forth. This means the rod is free to wobble a little laterally to the turn, but the nut/carriage has no slack in the direction of travel. This seems to have improved things.
but still suffered some binding and stalls. So I dropped the rate of feed/seek down to 80mm/minute. I then also jumped the text up to fill more of the page. And then at last… success!! it plotted perfectly (well as perfectly as I have any right to expect)
Ok, yes its back to front. But that is just a minor issue with flipping the Y-Axis, but the actual plot worked! including where it returned at the end to fill in the centre of the ‘e’s and the a.
Emboldened by success I attached the rotary tool which you can see at the end of the timelapse. My intentionw as to carve the same text into a length of wood. and perform my first actual cutting pass.
However, as I was setting up the position I was suffering more binding on the X-axis. I think the alignment is out such that the closer it gets to the motor end, the more out of line it is and the harder the binding. Just as I was thinking about this,…disaster. The x-axis coupling sheered completely in two.
And so the end of the plotting test was forced upon me. I now have to wait until I can replace the coupler before I can continue. However I think it will just require a little fettling of the x-axis to avoid it doing this again. (hopefully) However on the plus side this shows I’m not lacking for torque in the motors. When reduced to a slower rate of travel, they were able to develop enough to sheer straight through the plastic lugs that held the two halves of the coupler together.
At the end of the day this was my first properly successful test of a DIY cnc router that I built from scratch, for less than £250 and I’m very happy with how things are going. Excuse me whilst I go feel just a little pleased with myself…
Today for the first time I attached all the motors to my cnc router. Below are a couple of time-lapse films of me tinkering with the system. At the moment the motors, particularly the x-axis are prone to stalling. a little encouragement by hand is enough to restart things but I suspect that I need to up the voltage to improve the torque. So far I’ve just used about 11V but I should in theory be able to take it up to 30V (though I don’t have a power supply that big right now)
Assuming I can overcome the stalling the next issue is the grbl config. I tested the homing cycle and it worked, however I don’t really understand it. The instructions seem to tally with what I’m seeing, I just don’t understand why it works that way. the homing cycle moves all the axis to their positive limit. for Z that means up and away from the workpiece which seems ok. Y pulls over to one side and X pushes to the front of the machine. All this is fine, but it leaves the machine at 0,0,0 with each access only able to move in the negative direction… but that is not how gcode comes out, it expects to move to positive points from 0,0,0 so I don’t really know why it doesn’t home to the negative limit. but I guess I’ll figure it out in time.
In all today was fun, I didn’t get as far as any real gcode test, I was just manually typing axis move commands enough to try and suss out what was working and how well. next time I will up the voltage and see if that stops the xaxis from stalling out. by then I’ll hopefully have figured out the homing thing, but failing that I can manually shift things to the right places to run some sample gcode.
After some considerable delay since I first started with the idea of building myself a cnc router, I am now working on the electronics in earnest.
Having decided to get an arduino to make my electronics easier, I then found out how much easier when I discovered Grbl, a gcode interpreter written for the atmega chip that is, among other things, used as the heart of an arduino.
That just left me needing to try sending some signals through. There is a very simply python script that is provided in the grbl source that can take a gcode file and stream it bit by bit over the usb/serial interface. Once setup the magic begins!
The next step on this adventure is to attempt to couple the motors to the various axis of my homemade cnc rig. I suspect this is where the real trouble will begin. its one thing to spin a motor with tape attached to it, and quite another to do so with an actual threaded rod and the weight of a cnc machine to move around.
One key component here is the pieces that actually couple the motor shaft to the threaded rod. Fortunately I have a friend with a 3d printer, and some ready made designs on thingiverse to use, so I have a coupler printed up and ready to try. However the shaft dimensions are not quite right, a combination of a slightly uncalibrated printer, and the fact that the model was designed for 8mm threaded rod, but I used 10mm. So I made a few adjustments on the pillar drill to make the holes the correct sizes. This worked well because it was a pretty solid print (obviously the part needs to be strong) so having adjusted the hole size I used some bathroom sealant to provide the silicone layer between the two halves of the coupler. This has set pretty hard so there is actually a little less flex than I expected. Hopefully I’ll be able to get a reasonable alignment and it won’t matter.
You can see it in the video above, at the moment it is not gripping the stepper shaft, for that I require some m3 bolts/machine screws to tighten up the coupling.
This are starting to look pretty real now, I have a few adjustments to make to my physical rig, and I’m still a little concerned about the sloppiness in the x-axis, I need to make sure I eliminate the side to side without making the friction bad. I have a few ideas about how to achieve that, we shall see how it goes. its quite exciting to finally be coming towards the stage of actually connecting motors and trying it all out for the first time.
I’m anticipating a considerable amount of fettling, and part of me suspects i may need to build a whole new rig with better materials, but I’m going to give it a damn good try.
So last week I wrote about starting to learn electronics. I was having some difficulty understanding what was going wrong with my circuit.
This week i got some probes for my oscilloscope, and that at least helped me see that indeed when the servo turned the best, the control signal looked most like a square wave. it didn’t tell me why I wasn’t getting that i nthe way I expected. but it is still cool to have the scope up and running.
The other thing I did was buy an arduino uno. This is kind of cheating. It makes everything much much easier. Part of that is being on a well trodden path. There are lots of people using arduino’s for lots of projects. and controlling a servo even has example code built right into the arduino ide. It was so absurdly simple to get a servo scanning back and forth that it does feel a little like cheating.
Today I moved on from servo, to stepper motor. I already had a sparkfun stepper driver (4.2) and I found a really helpful website that had a sample wiring and sample program to get things going.
Basically the boards mean I don’t have to worry too much about things at a resistor/capacitor level, and just make sure I wire up the right stuff to the right pins of the boards, then worry about the code.
Even that might turn out to be , if anything, too easy. There is already an opensource project for interpreting G-Code on an arduino uno. What does that mean? It means with a couple more stepper motors, and some setup and I can have a 3 axis cnc electronics all ready to go. Just waiting for me to wire it to something.
Some time ago I built what I hopped would be the 3 axis physical cnc part. I have some concern that it may be altogether too heavy and too poorly made to get good results from. but I figure I should at least attempt to couple my stepper to the main axis and see if I can drive it. If not then I’ll just build something smaller/ligher/better designed. but if I can push enough torque to move the main caridge, then the other axis’ should be much easier.
I just need to figure out how to couple the shaft of the stepper to the threaded rod in a way that is secure and doesn’t have much/any play in it. Also I think I probably need to move a few things on the original cnc to make everything run smoothly without pushing/pulling the frame apart.
I am a man of many interests. I generally feel there is not enough time to do and learn all the things I would like. What with work and other commitments. Sometimes I do a good job of reigning in my sudden interest in something new, reminding myself that I already have lots of hobbies and not enough time spent on them. Sometimes I get involved in an idea or a project, only for it to fall by the wayside amongst many other priorities.
Normally my wife likes to remind me of the other projects I’ve started and yet to finish when I’m talking about yet another. I always protest that it isn’t that I’ve forgotten, or abandoned those projects, just that they are on a back burner, for rather a long time. But I do intend to swing around to them in good time.
Sometimes this is due to monetary aspects of continuing a project. For instance my CNC router project. I started a long time ago, full of enthusiasm and built the physical gantry etc. But I didn’t get around to the electronics, mostly due to a lack of money to by the parts.
Some years ago I decided to build a pan and tilt webcam from scrap parts. as part of this I bought a bubnch of electronics bits and pieces and got briefly into playing. But basically I built my single project, using just barely enough knowledge to attach a parallel port to the logic pins of some darlington arrays, which in turn switched volatages around the input wires of a stepper motor (pan) and a worm drive (tilt). I cobbled it together, and for a while had fun remotely controlling the web cam in my lounge from the office.
Eventually the novelty wore off,the device got tidied away, and I had no other project in mind and so the electronics got packed away. I really didn’t learn that much, just a couple of simple things to make that specific project work. Since then I’ve done lots of workwork and woodturning projects, developed a mobile app, and I’m actually working on another now. But I always had it in mind to come back to electronics, maybe to meld together all these hobbies into some projects requiring a bit of everything.
But the problem is that if you don’t really know what you can do in an area, it is hard to envisage a project. When I watch stuff like the ben heck show, what is obvious is that he finds various projects easy, because he is just stitching together stuff he has lots of experience in. And so I decided that I should have some more directed learning and start playing with electronics to control motors/servos etc in some general ways. To build up a stock of components and experience so that I can open my mind to the possibilities of projects that would include these parts, just as I now have ideas that take turned components or need the bandsaw to make long straight cuts.
For christmas I asked for some components , a servo, a stepper motor, a stepper driver board etc, so now I have got the electronics out again. And so far what I’m realising is that I have no idea how electricity works in circuits. Well ok, that’s not strictly true. The problem is I’m pretty comfortable with a basic circuit, the kind that has a switch and a bulb, or a sensor and a buzzer. Where I get into trouble is with IC’s and servos, digital circuits that require pulse width modulation. I can go through some of the steps that I think *should* work. but when they don’t I lack the skills to figure out what is wrong. is the program totally wrong? is the circuit screwed up? Why do I get a voltage *here*? why does connecting +v *there* cause everything to stop?
I’m pretty lucky in that I happen to have an old oscilloscope in the cupboard (now on the right side of my desk above), it has no probes but I’ve ordered some now. The next challenge will be to figure out how to work this machine, it looks somewhat more complicated than a multimeter…I hope I can figure it out and it becomes a useful tool in my arsenal. Not least because I’ve had the thing sat around for a long time since I was given it, and it has drawn the odd ‘why on earth..?’ comment. So it would be good to find it a useful place in my hobbies.
My biggest question right now, is where do I go to get the education I need? So far a lot of what I find is either so basic as to be trivial, or completely unexplained (just copy this circuit and don’t ask why this arrangement of resistors/capacitors/diodes is the right one). On the one hand there is something to be said for just learning by copying and hopefully picking up experience. I certainly don’t want to drown in hard core physics. However I do want to get a much better understanding of how these things work together in a digital electronics circuit. It would be a start if my obvservations of a circuit matched up with my expectations. At the moment I am perfectly capable of building a circuit I think should work and see it do nothing, and similarly to build a circuit that I would never have guessed would work but none-the-less observe operating.
If anyone reading this happens to have any recommendations on books/on line resources etc, I would love to hear them. I am going to build at least some basic cnc machine. and I would like to really understand it, rather than just plug together big components like lego.
For the last couple of years my wife and I have introduced a tradition of making our gifts for each other. On the one hand it can be very hard to think of something worth making that the other will want, but obviously it is a much more personal gift and I enjoy the challenge of figuring out what I can make that will ‘fit’ into my wife’s life as a useful addition. Rather than be just something that she uses once and puts away.
This year that gift was what I am calling a ‘lap desk’ but I guess it just a freestanding mini desk that has a tilting top.
My wife often sits on the floor when she is working on projects, or writing in her notebooks, painting/drawing etc. But that tends to mean that she hunches over to use the floor and its not great for her back. So I came up with the idea of making her something that was low enough to work comfortably on whilst sitting on the floor, that she could drag into position, and set the angle that most suits whatever she is working on.
It’s not super portable, however it is reasonably easy to move around, and hopefully wherever she wants to have a surface to work on at a comfortable angle she should be able to use this little desk.
It is made from american white oak. This is a material used in basically all of my ‘furniture’ creations, the simple reason being that Jewson’s is my nearby supplier, I can drive there and collect what I want, and they basically have american white oak or meranti as hardwood options. When I built my first floor standing mirror I chose american white oak. From then on I’ve basically been keeping up with the theme. At this point I have 2 hallway mirrors, the floor standing mirror, a table for the end of the sofa, and now this desk. It is nice to have the consistency, and it also means I become relatively familiar with working on this wood. What finishes work, how the grain reacts, how well it works with a burning tool (not well, oak is actually hard to burn).
I started out, as I often do, sketching ideas in my maker notebook. I knew that I wanted it tilting at the top, and obviously someone needs to be able to have their legs underneath it, so those factors dictated a certain amount of the design. Originally I had intended to pivot the top on some how turned wooden pegs that would fix into either side of the frame and be inserted ‘loose’ into receiving holes in the top section. However as I got the material and glued up the top and started to feel the weight involved I decided that it was way too risky to try this. Firstly the two pegs would need to be very precisely aligned, and they would be bearing the whole weight of the top on two wooden joints. For the lid of a box that might have been ok. but my wife needs to be able to lean on this whilst she is working, so I decided to just use a pair of metal door hinges mounted on the front cross beam. I retained the idea of having the top cross bars protrude (that was originally their for the wooden dowels to go into) this means that the hinges are tucked underneath out of view, and the protruding ends mean nothing catches on the swinging front section of the desk.
Originally I also drew it as just 4 legs like a coffee table, but I realised that the natural thing with a desk like this is to push and pull it by the legs to slide it over your lap. I was worried that this would cause the legs to splay and straing against their joints at the top, so instead I added a bottom cross beam, so the whole things really slides on two runners. This makes each end much more rigid and hopefully makes sure that it will stay secure for many years of sliding around.
The one element of design that remained undecided the longest was (foolishly?) the actual mechanism to support the desk at the various working angles. I had the whole thing basically built and hinged before I settled on what I would do to support it. I had a bunch of different options, I have previously made a tilting document stand which has a single central pivoting ‘leg’ with a wide cross bar at the bottom that dropped into one of a set of slots on each side. That was fine for a narrow stand, but for something of this width I didn’t think it would work well. Another option was to put a central crossbeam in and have that with notches and have a similar centrally pivoting arm that notched in at different positions. However I really wanted the support to come at each edge rather than just the middle.
I toyed with the idea of having 3 or 4 pairs of pivoting arms of differing lengths, such that you could just swing out the length you wanted and they would rest against the back cross beam. I even sketched a version where these pairs swung up from the cross beam to rest on the back of the pivoting desk top. requing each pair to swing out at a different angle to meet the top at its various positions.
Ultimately I decided hinge a length of wood at each edge of the desk. Each of the lengths of wood would have a series of notches cut in, and a dowel protruding from the crossbeams would be where they rested. The hinges would allow the length of wood to hit at slightly different angles for each notch.
As indicated in the design section, it was in construction that some things changed, including the ‘final’ design for how the tilt would work. (more on that later)
I decided to make the joints as pretty chunky mortice and tenon type. With the main front and back cross beams with tenons into mortices on the legs. Where I had side cross beams across the top of the legs I actually ended up cutting the tenon so that it was half in the leg and half in the side beam. so that the front and back beams would sit lower than the side height, enough that when the desk top was on top of those supports, it would rest flat with the sides.
For further support of the top cross beams I drilled holes for a dowel connection just behind the mortice hole. This means the sides that joined the front/back leg dropped down onto the dowels, and in doing so formed the full mortice hole that the front/back beams tenon’d into.
The beam that joined the front/back leg at the bottom was a straight forward mortice/tenon. Though I ended up doing the tenon the full heigh of the wood. This means that along the bottom you can see the joint. In retrospect I wish I’d made the tenon joint shorted so that the bottom would be ‘cleaner’ but it doesn’t really matter, no one is going to be looking at the bottom.
The top is glued together from 4 lengths of a plank. This was basically dictated by what Jewson had available. I knew the dimensions I wanted to achieve, and I would rather have had fewer joins. However the wider board lengths would have required me to buy a lot of extra to make what I needed. So I wound up with slightly narrower board and more joins. This just meant more glueing, and a lot more sanding to try to get the top surface as flat as possible. It was doing this that made me realise I should really get myself a hand held belt sander if I want to do this kind of thing more often.
Lastly the pivot mechanism… I made up the wooden pieces complete with notches, and set the turned oak pegs into the side beams for them to notch into. And I was positioning everything to work out where I would want to screw the hinges…When I realised that then hinges were not required. the wooden lengths just naturally rotate around to present a flat to the underside of the desk for support. It’s not quite perfect, as the last couple of notch positions cause the end of the piece to hit the back cross beam, so it doesn’t quite contact the underside of the desk flat. But it is enough to provide support and it is only the steepest angles that have that issue.
This simplified things since attaching the hinges provided the risk of not mounting them quite evenly etc. It also saved me the time of doing that. So I could move on to finishing the piece.
To finish I sanded everything down to 320, then applied some clear matt varnish. I then cut back the first coat with 400 grit, then applied another coat.
What I like about the finish is it still feels pretty natural. but does a nice job of protecting the desk and should stand up to heavy use.
Here are a bunch of pictures of the finished item from various angles. Usually I take pictures of a project throughout, but since this was a gift, and a surprise, I didn’t want to take a bunch of pictures whilst i was making it.
I recently bought myself a dremel 4000 at the d&m tool show, and since having it have been playing around with the various attachments.
One thing I decided to play with was glass engraving, using the flexible shaft and a diamond bit.
This is the result of my playing
My first attempt was this pint glass and a maker | geek engraved on it.
My second attempt was this wine glass
I’m pretty happy with it, it’s not perfect, but it is pretty good and I think it came out better than the first attempt. In case you’re wondering, the Chinese says ‘wine’ not terribly original I know. I thought about just engraving WINE in English, but thought it would be more interesting to attempt something in Chinese. Since I don’t speak or read Chinese I figured that if I made a mess of it, it would show up less than it would with a badly engrave ‘wine’, at least to my eyes.
I have shown it to a Chinese colleague and he confirms it does say wine, and is legible, so that’s a relief.
Ultimately though there was little doubt that the dremel would be able to engrave glass, the biggest concern being that I might be heavy handed and smash it accidentally. More interesting was the process I decided to try to make the engraving.
For the pint glass I followed a suggestion I found on line about simply printing off what you want to engrave, and popping the print out inside the glass, just let the part you want press up against the glass where you want to engrave, then just follow by eye. This was ok, and perhaps for something more abstract it would have been fine, but I felt it lacked a little for rendering something with this detail. The letters are a little more wavery than I wanted. It looks ok at a distance, but I realised I would want a better method for future attempts.
So I hit upon the idea of masking, much like you would when stenciling something, I decided to cover the area with electrical tape (it’s quite thick) then stick the template onto of the tape. From here I then used a craft knife to slice the template out of the underlying tape, and then carefully lifted the cut sections away. This was a little tricky because if you didn’t cut perfectly around then the stray places where it remained connected wanted to pull the template out of shape. It also meant my hands wound up covered with little pieces of sticky tape.
However after about 30 mins of careful cutting, I arrived at this:
From here I just needed to carefully engrave within the lines, since the tape is quite thick, even where I wobbled a little it resisted me just engraving into the glass and gave me a little room for error. I carefully worked my way around engraving in the lines, checking I’d got reasonably even engraving over the whole pattern, then peeled away the template to reveal the finished glass.
This worked MUCH better than attempting direct free hand, but was obviously commensurately more hassle to set up. just printing something and popping the paper in the glass is very fast. taping and carefully cutting out a template is really not fast. Though obviously that depends a little on the complexity of the pattern. I guess if you were engraving something with dense textures and patterns you would have to go with the through the glass technique, but for relatively simple shapes and lettering etc this seems like the way to go.
My next challenge is to try something a little more geometric, which will really show up if I can’t get good clean edges