Archive for the '3D Printing' Category

A Line-us Clone


I have been going to the monthly Amp Hour, Hardware Happy Hour meetup.  A lot of people bring something to show.  My projects are too big.  Also, you need to bring your own power.  The meetup standard seems to be running off a USB cord. I was brainstorming ideas, when I saw the Line-us project on Kickstarter. It looked like the perfect size and power. I also love the challenge of non linear kinematics.


I decided to make a clone of it.  I started by importing one if their drawings into CorelDRAW and scaling it up to 1:1.  I then added some measurements.  I rounded them up to 80mm for the pen arm and 30mm and 50mm for the linkages.


I looked into hobby servos and found that the “mini” size looked about right.  I ordered 4 of them from Amazon.  I made sure to get metal output shafts because I thought I might have to press them into the 3D printed arms.




I created a basic design in PTC CREO.  I added a lot of construction sketches for the linkages to help me with the kinematics later.  I downloaded a model of the servo from GrabCAD  to use while I waited the delivery.


I used 3mm bearings for all the joints.  These are pressed into the linkages.  This would allow me to firmly tighten the joints and not have to worry about slop in the joints.


When the servos arrived, there were slight differences in from the model.  The mounting holes we much smaller at about 2mm.  I had to reprint with some changes.

My concept was to press the arms onto the servo shafts.  This sort of worked, but after a few crashes, they loosened up.  I ended up using a drop of thick super glue to secure them.  They were able to stall the motor without slipping.  It is important to mount the arms at the precise angle.  I made an Arduino sketch to hold the servo in the precise position while attaching the arms at the angle I wanted.  Each servo has a 180° travel.  The upper arm travels from 135° to negative 45°.  The lower arm travels from 45° to 225°.


In order make the pen go where you want it to go, you have to figure out what angle to set the arms. This is not a simple linear equation. You have to solve a multi-step geometry problem for each new location. I’ll walk you through the basic process. I placed the axis of the two servos at XY 0,0 to simplify things. You know the desired Pen Tip location, so start working back towards the cranks.

  • Step1: Find the Pen A point. You know the lengths of the linkages between the 0,0 point and the pen tip. They are both 50mm. Each arm end has a set of points where it can exist that scribes a circle. If the desired pen point is within reach of the machine, the circles (green ones) will cross at two points. The solution is a well documented process. I used the C code from this page. So far, I found that using the location, of the two, with a higher Y value is the one to use.
  • Step 2: Find the Pen B point. Pen B is easy to find because you now know the slope of the Pen Arm. Multiply the X distance from the pen tip to the Pen A point by the ratio of the length of the pen arm (80mm) over the length of the arm from Pen Tip to Pen A (50mm) and add it to the pen tip. Do the same for the Y axis.
  • Step 3: Now that you know the Pen B location, you can do the intersecting circles (red ones) trick again. This time I used the left most point of the two.
  • Step 4: Find the angles. Use the X and Y distances of the crank tips and the atan function to get the angles. ( angle = atan(deltaY / deltaX) )

Another problem with non linear machines is that moving between two points will not be a straight line. The points will typically be connected with a slightly curved line. You need to constantly recalculate points along the way to keep it straight. If you break a line into smaller segments, the connecting curves also get smaller to the point where they are not notices.





Everything I chose was for prototyping ease and probably not the final solution. I used an Arduino UNO as the controller. I used a PCA9685 based servo motor controller for the servo. The Arduino could probably handle it on its own, but the wiring is so clean and simple with this. I used a breadboard power supply to power the servos. It had a handy switch to kill the power to the servos without killing the Arduino.




The Results

Here is a video of the machine running. The rectangle is hard coded via some for loops recalculating at 1mm increments. The results are shaky, but consistent with the Line-us results. The machine is quite rigid. Most of the shakiness comes from the servo motion. I also do not have the machine held down. If I get some magnets like Line-us, it might help.


Open Source (sorry)

I don’t think it is fair to the Line-us folks to release any files at this time. I think there are plenty of resources in this blog post if you want to clone it yourself. So far I only have about 5-6 hours into the project, so it is pretty a pretty easy project.

The real Line-us looks very polished and they are selling it at a good price. I am sure a lot of the work they did was on the UI, which I did not replicate at all.

Next Steps

I need a way to stream drawing data to the machine. I would like to use g-code. It also needs a UI and I thought Easel might be best. For the gcode I might try hacking Grbl. I would just add a timer that reads the current location at about 5hz, send it through the math and set the servos. Any value above Z 0 would be pen up.

For Easel, I could create a template that shows the usable work area. You would then just click Carve.



Here is the firmware I used.  It is a quick and dirty port of my PSoC port of Grbl. I cannot give support for this. Only experienced PSoC programmers will be able to install and use this.

Grbl Line-us PSoC Firmware

CAD File

Here is my STEP file of the design. This contains all of the printed parts and some of the hardware.  You will need to figure out a few things on your own.

Line-us Clone STEP File







Camera Slider Controller Hack


I have been having fun with my camera slider controller.  It is a cool, little, general purpose motion and camera controller that will soon to go on sale at Inventables. Taking a picture is very easy.  You just plug the camera into it and run the takePicture() function.  It has a lot of spare I/O pins that can be used for some cool hacks.

I always thought it would be cool to take a time lapse movie of a 3D print, but do it exactly one layer per frame and have the picture be taken at the exact same location every time so the print appears to grow out of thin air.  I know people have done this before, and I could probably hack the circuit right onto the printer controller, but camera slider controller was ready to go with the circuit and connectors all ready to go.  With less than ten minutes of coding and making a cable, I was ready to go.

GCode Hacking

The first task was hacking the GCode to output a a signal I could read remotely.  Kisslicer has a feature where you can add a few lines of Gcode every “N” layers.  I added the following GCode.  Note the “1” in the layers box.  This means do it every layer.




G1 X0 Y0 means move to 0,0

G4 P500 means dwell for 500 milliseconds.  This was added because the next command was happening before the move completed.  I think this has to do with the way commands are buffered.  I think there is a more elegant fix for this, but adding a little delay here was a quick fix.

M42 P11 S255 means set I/O pin 11 to full on (255  is max).  Pin 11 is the first of the “servo” pins on my RAMPS controller.  This three pin connector would map directly to the servo connector on the camera controller.

G4 P1000 is a 1 second delay.  I had my DSLR on “auto” so it would need to focus for each shot, so I gave a little extra time.

M42 P11 S0 turns pin 11 off.

I ran a few test layers with my volt meter hooked up to the connector and it looked great.

Camera Slider Controller Hacking

The controller has 2 servo connectors that are intended to be used for hobby servos in a pan and tilt arrangement.  The signal pin on the connector can also be used as and input.  The code is simply going to watch for that pin to go high.  When it does it will display the next layer number and take the picture


Arduino Code

In the setup() section you need to make the PIN_SERVO_1 pin an input because that is connected to the printer controller.

pinMode(PIN_SERVO_1, INPUT);

The loop() section looks for the PIN_SERVO_1 pin to go high. When it does the layer number is incrememented the picture is taken and the LCD is updated. The camSignalRead flag is set so we don’t go read the same pulse more than once. The flag is cleared as soon as the signal

void loop() {

   if (digitalRead(PIN_SERVO_1) == HIGH) {
     if (!camSignalRead) { // make sure we read once per pulse
       camSignalRead = true; // 

       lcd.cursorTo(2, 0);
       sprintf(sVal, "Layer %d", layerNumber);


   else {
     camSignalRead = false; //reset this. the pulse is over 



Simply connect the signal pin (D11) on the servo 1 connector of the printer controller to the signal pin on the servo 1 (J7) connector of the camera slider controller. You also need to connect together a ground pin on each controller.






Camera Setup

I setup my DSLR on fully automatic and disabled the flash. I am sure the movie would have been better if I manually focused and locked the speed and aperture settings, but I just wanted a quick result. The controller first sends a focus signal and then a shutter signal. The focus signal acts like the half button push you do to focus most cameras.

The Print

The printing was done on the Quantum Delta printer.  I used my CNC Ninja Squirrel as the test print. It was scaled to 50mm tall. At at 0.25mm layer height, that gave 200 layers. The print took about 45 minutes with the added delays. It was run in a busy room at Pumping Station One so there was a lot of activity in the background and some light level changes.



The Result

Click here if the video is not displayed below.


CNC Translator for BeagleBone

The Rosseta Bone is a “universal” CNC translator for BeagleBone Black.

Rosetta Bone

The BeagleBone is awesome little controller.  It is a lot like the Raspberry Pi, but it has one special feature that makes it viable for CNC.  It is the PRU.  This is Programmable Realtime Unit.  This a part of the CPU that runs separately from the OS and gives it the critical timing required for smooth stepper motor control.  People have tapped into this and LinuxCNC to make a real embedded version of LinuxCNC.  Add in all the other capabilities like HDMI, keyboard, mouse networking, etc and things get amazing really fast.


I bought the BeagleBone Black which is the second generation BeagleBone.  It has more features than the original “white” version and actually costs less.  There are several CNC capes for the BeagleBone, like the BeBoPr or Replicape, but they are expensive, can be hard to get and some have issues with pinout changes that came with the BeagleBone Black.

BeagleBone CNC

Continue reading ‘CNC Translator for BeagleBone’

Web Page G-code Viewer

Try this Web Page G-code Viewer

I met programmer and maker, Joe Walnes, through a few local Chicago maker groups.  He  showed me a really cool web based G-code viewer he wrote to preview his 3D printer G-code.   It used WebGL for super smooth motion of the model.  It also allowed you to drag and drop your own files right into the page.  It worked great, but really only worked with 3D printer G-code.  He posted the code on GitHub.

I have a couple programming projects in the works that need a G-code viewer, so I decided to update his program to handle more types of programs.  Joe had a really nice UI and design pattern for the code, so I left that  alone.  He also helped me out with a few issues as I worked.

G-code Parser

A parser is a bit of code that breaks down text into tokens, or the basic grammer of the G-code.  He was working with very well formatted G-code so his parser was pretty simple.

G1 X5 Y5 Z6 E0.124

I was dealing with really Fugly lines of G-Code like this, so I needed to totally rewrite the parser.


Graphics Generation

Reprap 3D printers basically use G1 (straight moves) for everything.   I needed to add the code to handle G2 and G3 (arc moves).  This was a little tricky because there are no arcs in WebGL.  I had to break them into small line segments.   Joe also treated each Z level as a separate layer.  That is nice for printers, but not for general G-code.  I changed that and the way the color of the lines worked.

A Work in Progress.

It works on all my CAM generated 3D printer and CNC router G-code, but I want to add code to deal with more advanced features that are often hand coded like incremental moves, machine offsets, parameters, math functions and subroutines.

I will post the source code soon.


You need a WebGL capable browser like Chrome, Opera or Firefox.  I hard to turn on WebGL  in my Firefox.  I got it to run on my Android phone in Opera, but could not spin/zoom the model with the screen controls.

To view your own files, just drag and drop the G-code into the browser.  It will use the zoom settings for the previous model, so if you drop something that is a different size or offset to the side you may need to zoom around to find it.


Filament Extruder Competition – $40K!

Inventables announced a filament extruder competition the GE Garage at Maker Faire on 5/19/2012.  The contest is to design a machine to extrude ABS or PLA filament from pellets to 1.75mm using less than $250 worth of materials.  The extruder must be able to add the colorant as well.  The first person to upload a solution wins.  Inventables plans make pellets and colorant available to people to play with.

The prize is $40,000 and a desktop fabrication lab.  The lab consists of a laser cutter, 3D print and a ShapeOko CNC router.  The details are at

Filament is running about $40-$50 dollars.  That is about 5-10 times the cost of raw pellets.  This would be a great resource for a MakerSpace, HackerSpace, club or school.



ORD Bots on Sale at

Inventables is now taking pre-orders for Hadron ORD Bots.  I will not be shipping anymore kits and Inventables  is now the official, authorized distributor of the kits.  Go here to get on the list for one of the units.  The Inventables kits will also have the following improvements.

Bright Dipped Finish

  The previous version looked great, but the matt finish quickly gets dirty and scuffs often looked like sceatches.  Bright dipping is a chemical polishing that is done before the anodizing process.  The goal is to get the finish quality of a Mag Light.

Open Ended Wiring Holes.

A well wired ORD Bot is a thing of beauty, but once wired some of the parts are trapped by the wiring.

By adding open ended wiring holes, the wires can escape out the sides.  This will allow you to completely side off thing like the gantry without removing any connectors.

Wider Extruder Platform.

Deep extruders like some of the Wade’s family of extruders previously had to overhang the front a bit.  This adds more depth and an extra hole pattern to give you more options.

Loop Belts

With loop belts you will not have to measure and cut from open ended stock.  They will be a lot easier to install and will have twice the grab in the belt clamps.

Build Platform Changes.

  • Added holes for the ORD Bot heated build platform.
  • Increased spacing between the wheels.  This improves rigidity, reduces the sensitivity and cleans up the busy center area where the clamp and switches. fit.

Electronics Plate Changes

The Electronics plate will now have hole patterns for the RAMPS, ORDuino and Azteez controllers.

The Quantum ORD Bot Gets a Big Brother

There has been a lot of interest in an ORD Bot with a bigger build area. This is the Quantum’s larger brother. This uses the MK1/MK2 heated built platform which is about 214mm x 214mm. You can go larger, but you are on your own.

The name is not yet determined. I wanted something similar to Quantum that conveyed a larger volume. A search of units of volume reminded of one of my favorite units “The Firkin”. Not only does Firkin sound cool, it is part of the FFF (Furlong/Firkin/Fortnight) unit system and it is a measure of beer. The other suggestions was Hadron, which is very similar to Quantum but larger and means thick or stout in greek. Firkin is cool, but Hadron is more family friendly.

They share all parts except the MakerSlide length, the handle and the build platform.

ORD Bot Debut at PS1 HackerSpace

The ORD Bot made its debut at the Chicago HackerSpace, Pumping Station One. They host a monthly DIY CNC night that is open to the general public. I have been going for about 6 months and it is always a lot of fun and you meet some great people. Last night’s event was very well attended with about 30-40 people. Many of the people were there for the first time and found out about it via the Hackaday blog post. They usually have a 15-20 minute presentation and then everyone starts breaks away to work on projects or discuss ideas.

I was drafted into the presentation role to present the ORD Bot. It was received very well. Everyone liked the simplicity and clean look to it. Just about everyone picked it up to hold it in their hands. You don’t see people just spontaneously pick up someone else’s 3D printer very often. I guess when it is small, cute and has a handle, it is just asking to be picked up.

Up until then, the ORD Bot had never actually tried to do a full print. I had a lot of trouble getting the PLA filament. I had some get lost in shipping and two orders canceled due to lack of stock. I had some scraps of ABS that I used to test the extruder and I had run all the axis motors. I had done all my testing on a desktop PC at home and brought my laptop to the HackerSpace without all the software. I hooked into the PS1 Wifi and got the nessesary software.

This is the software “stack” I ran. Sprinter was already loaded on the Arduino. I used Slic3r to create the G-Code. I used Printrun (Pronterface) to interface with the printrer. Jeremy from tinymachineshop had a similar setup on his Makerbot and had Slic3r setup in about 3 minutes with the settings I needed. He also donated a length of black PLA

I decide to run the 20mm calibration cube STL that comes with RelicatorG. Slic3r generated the code in about 1 second. We spend about 5 minutes running PLA through to clear out the old ABS. The first attempt immediatly had a problem with the Y axis. I releazed that the set screw was never tighten on the pulley and it was just running on shaft friction. I tightened the set screw and the print ran great. I probably could play with the retract a little.

We were amazed how quiet the machine ran. You can compare it to the background voices in the video. There is even a Makerbot in the background about 10 feet away you can hear. I am not sure why it is so quiet. I think it might be because there is really nothing to resonate. All the flat parts are pretty small and pretty well bolted down.

The completed part measure about 20.015mm square. The layering looked quite even. There were several 3D printer owners in the room and they all commented that it took many hours of trial and error to get the quality I got on the first try. I am sure the tools have evolved a lot since they started and they helped by giving me the good Slic3r settings.

I took a bunch of pictures, but I left my camera at home. I will post more soon. Here is a picture of the part I took later.  If anyone else has some pictures, please send me a link.


The Quantum ORD bot

ORD Bot 3D Printer

Update:  This is now available at

I was invited to this really cool event called ORD Camp. ORD Camp is unique, yearly event put on by Inventables and Google in Chicago. It brings together 200 people with a far range of interests. The common thread is a exceptional passion for what you do.

You are encouraged to bring a “creation /invention” you are working on. I did not want to bring the 2.x laser because it is hard to move around, it takes up a lot of space, and is not real conducive to just operating in the middle of a room. I will probably bring the camera slider, but I really felt like using the opportunity to create something new and cool with the MakerSlide material.

I was recently inspired by this Kickstarter Printrbot 3D printer. It seemed like a real ‘outside the box’ look at 3D printers. Brook of printrbot contacted me recently about collaborating with some of the people he is working with on some projects which got me more inspired. I decided to try a similar concept using Makerslide.

MakerSlide has these main features. It is a linear bearing. It is a structural element. It is accurate and it is cheap. The concept is, if you keep some of this laying around and have access to a few tools, you can quickly brainstorm an idea and fabricate it right away. This project was hashed out in about 3 hours, fabricated in about 2 hours and assmebled in about 2 hours. That includes cutting all the custom parts.

The result is the ORD Bot 3D printer platform. The structure and linear bearings are 100% MakerSlide. The motion is smooth, ridged and accurate . The parts are cheap. This uses less than $60 dollars worth of MakerSlide rail, wheels and idler pulleys. The rest are off the shelf items or fabricated by CNC router, laser cutter, 3D printer or other means.

A huge feature of this design is the scalability. It can scale in X,Y, Z or any combination by simply using different lengths of MakerSlide. All brackets stay the same. You might need to change belt lengths, but all the belts are open ended belts, so you don’t need the exact length, just some belt stock. The lead screws also need to change if the Z changes, but that is standard cut threaded rod. The version I built is probably as small as you would ever want to go, so I called it the Quantum ORD Bot. The build area is slightly larger than a standard MakerBot.

The frame is extremely ridged. Cut squareness does not matter very much. Every parts has multiple adjustable points and does not rely on the quality of any cuts. Parts can be aligned with a square and bolted down.


I initially had some screw on leveler feet in the design, but after some design tweaks, extra bracket were going to be needed to mount them. I made these feet out of HDPE. They are soft and will not scratch any surface. I added the holes at the bottom to get a little spring to them, but I also think it brought in a nice design element. The rounded end and three point contact make them self leveling. The rear feet also act as a secondary brace for the Z axis.


The handel is not required, but adds a lot of strength, can be used to mount electronics and also serves as a gauge for alighning the uprights. If you use a handle and scale the X axis you would need a hew handle. An alternative is to use a standard 20×20 t-slot piece across the top.


Here is the build area increased by 100mm in each direction. I put a 20×20 extrusion across the top instead of the handle. I just did it as an example to show a more easily scaled version. This cost would be $4 higher for the MakerSlide about $3-$4 more from Misumi, about $2 more for longer lead screws and about $5 more for the longer belts. You would also need a bigger build platform (not shown). The total increase is easily less than $20. The increase in Z weight is about 4 ounces (0.1kg). At very large widths you might want to add a second Y axis extrusion, but that would just be a repeat of the existing one.


The pictures above are mostly renderings.  Here are some real pictures of the prototype.  I cut all the parts on my CNC router.  I could have used my laser cutter, but I wanted to make a few counter bores for some screw.  I don’t think that is needed, but it looks cool.  I also used some optional non laser cuttable materials like carbon fiber and HDPE.

I came up with this idea about 6 days before the ORD Camp date, so I was a little rushed.  The biggest problem was lack of motors.  I also was so busy that I really could only allocate about 6 hours to the project.  I let the delivery time of the motors set the schedule so only worked an hour or so a day over the week.

This design is very strong.  I could stand on it or hang from it without damaging it.  It is quite light at about 6.25 lbs.  I am very happy with it and hope to get some good feedback at ORD Camp.




Where Are The Wires?


The element I really liked when I did some initial renderings was the clean look. I knew it would quickly turn into a RepRap hair ball as I wired it, so I decided to take advantage of the built in passage ways in the MakerSlide. I drilled some holes into the faces in some areas to pass the wires from extrusion to extrusion. The wires to the gantry had to be exposed because they move with the gantry.  I put the wires into an extrension spring.  This is a 1/4 O.D. 0.018 wire springs.  If you stretch a spring the diameter reduces.  I used this feature to mount the spring.  I drilled holes slightly less than 1/4″ and stretched the spring through the holes.  When I released the spring the diameter expanded to fit snugly in the holes.  I tried to find a tap that matched a spring pitch so I could just thread the spring in, but couldn’t find a match.  This mod falls into the “its not worth doing, unless you overdue it” category.  I also wanted to reinforce the extreme rigidity look, by using carbon fiber parts, but the budget limited me to just the small thin parts. Again, this was overkill and just for fun.

What is Next?

If there is any interest, I might add this as a kit to the Makerslide store.  I would like to quote all the carriages and brackets in aluminum, so I don’t have to fabricate much.  I would probably need a 50 piece buy to justify the work and cost.


Edit (2/11/2012)

You can get the source files at Here.

Here is the ORD Bot running at 160mm/sec, but the current print speeds are exceeding 400mm/sec with 1000mm/sec rapids. The limiting factor right now is the extruder, but we have preliminary prints close to 500mm/sec.

Pololu Compatible Relay Driver

I just got my production boards for my Pololu compatible relay driver. This is a little plug in module that can be used to drive off board relays. It uses the signals that are normally used for step and direction to control two relays with the voltage that is normally used to power motors.

Pololu stepper drivers are great little items.  They are inexpensive and very easy to use.  You only need a step and direction signal to control them.  If you use them in sockets, as I show here, they are portable between projects and experiments.  If you accidentally smoke one, you only need to replace the single driver.

There are a lot of carrier boards for these.  There are Arduino shields and many other applications.  Often, it would be nice to be able to drive a larger external load like a spindle or blower.  You can then use the existing step and direction signals to drive the relays.  It uses the voltage normally used to drive the motors for the coil voltage.  The only wiring required is two wires to the relay.

I chose to put the relays off board because the real estate was pretty limited and I wanted to provide the voltage isolation for AC powered devices. I am also a big fan of DIN rail mounted relays. They are very reliable and inexpensive. They are easy to swap around and have some nice features. The relays shown have a LED indicator and also a manually test button that moves the contacts. The relays shown are about $10 each, including the DIN rail sockets.

I got the boards from Gold Phoenix in 2 sheets of 50. They were not cut out, only V scored. Fortunately I have access to a depanelizer at work and was able to easily separate them. I probably could have snapped them apart too. The depanelizer looks similar to this one. Two slowly spinning sharp disks chop them apart.

The boards have all the components required to drive the relay including a supression diode. I am using a pretty hefty transistor here, but you could substitute a smaller one.

Schematic (PDF)

Gerber Files