A Line-us Clone

image1

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.

8d65c4576042e58c834aa36d1098ceb6_original

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.

measurements

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.

mini_servo

 

Design

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.

design2

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.

Assembly

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°.

Kinematics

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.

 

 

kin2

Electronics.

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.

pca9685-16-channel-12-bit-pwm-servo-driver_1

PowerMBV21

 

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.

image2

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.

 

Firmware

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

 

 

 

 

 

 

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

12 Responses to “A Line-us Clone”


  1. A Line-us Clone 2.0: The beginnings – Audrey Yeoh's Project logs

    […] In full disclosure, one clone has already been made by Barton Dring. You can see his very comprehensive build logs here: http://www.buildlog.net/blog/2017/02/a-line-us-clone/ […]

  2. Erwin Meyvaert

    Fantastic project
    Can I have the stl files please

    Kind regards

  3. Erwin Meyvaert

    Hai,

    I search for a programma for the line us clone , can you help me please

    Kind regards

  4. Anthony

    Hi,

    Thank you for sharing.

    I’m confused about this part:

    Each servo has a 180° travel. The upper arm travels from 135° to negative 45°. The lower arm travels from 45° to 225°.

    What are those angles in relation too?

    I have watched videos of the movement and I cant see how the lower arm travels from 45° to 225° or what that is in relation too.

    Also for the upper arm do I have to assume the angles for an upside POV?

    Hope you can throw some light on this for me if you get some time.

    Thank you.

    Anthony

  5. Anthony

    Oh, it must be Angles on the Coordinate Plane?

    That would make sense what with circle equations and getting the line angles.

    Need to get my head round that. Slowly getting there.

    Great project, thanks again.

    Anthony.

  6. bdring

    The angles in the kinematics are relative to a normal Cartesian coordinate plane. The conversion to what that means to the servos are done on the fly in the firmware.

  7. Anthony

    Hi,

    Understood, that all makes sense.

    Thank you for the reply.

    Best regards,

    Anthony

  8. Anthony
  9. anuj garg

    how does g code should be changed for work on non linear 2 d printer

  10. bdring

    My code for this will not work. It uses hobby servos, which are not accurate enough fro 3D printing.

    I would suggest looking at how Marlin Firmware works with delta printers. Some printers like the Polar3D printers use a raspberry pi to convert the g-code before it gets to the printer controller. You can look at other posts I have done on pre-processing gcode.

  11. Anthony

    Hi,

    would you have any tips for getting better servo angle accuracy; I can draw now but its not at the quality of yours or Line-Us.

    I have done all the usual calibration techniques but am still not getting good enough angle accuracy.

    I have also tried a look up table with a PWM entry for every 10° and then interpolate in between, it has helped somewhat.

    I need to experiment more but I think my servos are at fault -one is worse than the other, so there is that..

    I just though I would ask.

    Thank you,

    Anthony

  12. Anthony

*