• And now for something completely different: A little robotics project for the weekend.

    The described robot can be build entirely from model making supplies and materials from the hardware store.
    Also only very few tools are needed. A metal saw, a drill press, a vice and optionally a tap will suffice.

    From the model making store you need:

    • 3 Servos  with M3 thread in the axis  (e.g. HX12K)
    • 12 ball joints with M3 threads and 3mm holes in the sphere (e.g.  Kavan Maxi Ball links 1405)
    • about 4grams of Polycaprolactone (Sold under names like ShapeLock or Friendly Plastic)

    Form the hardware store you need:

    • 850mm of M3 threaded rod (sometimes also available for model making)
    • 27 M3 screw nuts
    • 3 M3 screws 5mm long
    • 3 M3 screws 15mm long
    • 400 mm of 10mm square hollow aluminum profile (1mm wall thickness)
    • 150x150mm metal oder wooden plate for mounting

    (To control the robot you need a microcontroller of your choice.)

    The first step is to divide the aluminium profile in three pieces of 100mm length and three pieces of 30mm length.
    Then 4 holes are drilled and tapped in each of the pieces according to the following drawings.

    Drawing of 100mm lever

    Drawing of 100mm lever

    Drawing of End Effector Part

    Drawing of End Effector Part

    Next the threaded rod is divided into six pieces of 100mm length an six pieces of 40mm length.

    The 40mm pieces are screwed in the aluminium profile, centered and secured with one M3 nut on both sides.
    Two ball joints are screwed on each 100mm pieces of threaded rod and aligned.

    The 100mm aluminum profiles are then screwed to the servoaxis with the short M3 screws. All servos should be in the same extreme position.

    Now the servos can be fixed to the groundplate. I used hot glue but you can use screws as well. The exact alignment of the servos is important.
    To get it right without much measuring I printed out the drawing of the baseplate.  Then the shape of the servos was cut out and the paper taped to the groundplate. The servos were placed at the right position and glued there.

    When the glue has hardened you can attach the ball joints to the servo levers and secure them with one nut on every side.

    Ball Joints attached to lever

    Ball Joints attached to lever

    To make the end effector you need to get the Polycaprolactam into its malleable state.

    End Effector center piece

    End Effector center piece

    Therefore it is placed in a small cup with some water and heated in the microwave or on the stove until it gets transparent.
    Then carefully pour the hot water away and get the plastic out. It should be touchable without burning your skin.
    Now shape it into a three-edged star (see image) and slide a 30mm aluminium profile over each end.
    Try to fill the profile as tight as possible and about 5mm behind the holes.

    Before the plastic has cooled down completely align the three profiles in 120 degree angles.
    When it has cooled down you can drill through the holes in the profile, put the three long M3 screws in and secure them with nuts.

    Now place the ball joints on the threaded rod pieces of the end effector and secure them, too.

    The completed end effector

    The completed end effector

    The mechanical part should now be completed.

    Isometric view of the delta robot

    Isometric view of the delta robot

    Next step is to control the servos with a microcontroller. Servos need a PWM signal with a period of 20ms and a high time from 1ms to 2ms,  depending on desired position.
    This can easily be generated with timers, which are available in almost every µC. To control multiple servos with only two timers and without using to much processing power a clever tactic is needed.

    One timer is used to generate an interrupt every 20ms / number_of_servos. On each of those interrupts one servosignal is switched on and a second timer is started. This timer is set to overflow after 1-2ms according to the desired position of the servo. When the overflow interrupt of the second timer occurs, all servosignals are switched off. This way you do not a variable to save the current servo, because only one servos is active at a time anyway. On the next interrupt of the first timer the process repeats with the next servo. The desired positions can be saved in an array.

    With this method up to 10 servos can be controlled with only two timers and very short interrupt service routines. This way there is much remaining processing power left for other calculations such as receiving and decoding commands via the UART or I²C. Maybe you can even fit the inverse kinematics into the µC.

    Servo Timing diagram

    Servo Timing diagram

    The IK formulas and some explanation can be found here.

    A simple servo controller using the described method can be downloaded here. (AVRStudio project with C-Code).
    A quick and dirty Delphi 5 Project which sends commands to the ATmega and does the IK calculations can be downloaded here. (Contains source and executable).

    And here you can see what you can get:

    Tags: , , , , ,

  • The previous version of the gravitational simulation produced rather abstract results. The lists of coordinates did not say much and the import for 3DsMax was not very handy.

    To overcome this problem I looked into openGL and found it quite easy to integrate.
    The glut-Package for DevC++ includes all necessary files and an example project.

    The whole initzalizing stuff was just copied from the example and the code from the earlier version adapted to produce the coordinates in the corrent form.

    All the objects are stored in a linked list. For each frame the list is traversed and the new coordinates displayed.

    Gravitational Simulation 3D

    Gravitational Simulation 3D

    I also added a linked list to each object that stores all past coordinates. When this list ist used to plot lines between each two adjacent points the trace of the object is displayed. Currently only the trace of 2 selected objects can be displayed at a time. Those two objects also get marked with little triangles and a 3d-crosshair. Their parameters are displayed in the upper left edge of the screen, along with some additional info. To visualize the forces, accelerations and velocities the corresponding vectors can be displayed.

    Velocity- and forcevectors displayed

    Velocity- and forcevectors displayed

    Code can be downloaded here (Executable included).

    Rotating the view is done by holding a mousbutton down and moving the cursor.

    Other commands:
    i    Toggle  Info
    x   Calculate Step
    z   Reset viewcenter to [0,0,0]
    o   Center blue object
    k   Center yellow object
    t   Toggle trace
    p  Select blue object
    L    Select yellow object

    f    Toggle force vectors
    b   Toggle acceleration vectors
    v   Toggle velocity and force vectors

    +-  Increase / decrease step size

    n   Reset world and generate 50 new objects randomly

    */  Increase / decrease gravitational constant

    5 and 0  zoom in and out

    Numblock to move viewcenter

    Tags: , , ,

  • Another update on the CNC.

    The interfaceboards are etched, soldered and tested.

    IO / Control Boards

    IO / Control Boards

    Step- and directionsignals are generated by an ATmega32 which is controlled over RS232.
    This is only for testing purpose. In the final version a PC will control the movement.

    Tags: , , , ,

  • Two years ago I started coding a small program in C++ to simulate gravitational forces between masspoints. After seeing a video of a simulation of matter clustering under gravitation in my astrophysics lecture I decided to continue and improve the code.

    I wanted the simulation to be easily extentable, so I made a class for the objects, which holds their parameters and some I/O-functions, and a class for the world, which contains all objects in a list and the functions to calculate their interactions.

    The algorithm is quite simple. For each calculation step the world goes through all objects and calculates the forces excerted on it by every other object. It then calculates the acceleration of the object and subsequently its new velocity and position.

    For visualisation of the results the coordinates of each object are written to a file after each step. (This part isn’t working correctly yet. There seems to be some problem with the fstream.)
    These coordinates are then read by a 3ds-max script to keyframe coordinates of spheres or alternatively to pointcoordinates of splines.

    I also wrote a similar algorithm in Delphi, which only computes the movement of two masspoints, but directly visualises the result by drawing to lines. The linewidth varies with the absolute value of the z-position and the hue represents the speed at this point.

    A more detailed description of the mathematical background can be found here.

    Download sourcecode

    Tags: , ,

  • Mechanics 24.09.2008 No Comments
    CNC with notchplate

    CNC with notchplate

    Another part for the CNC router arrived today. I never expected it to be delivered so fast. I ordered it friday afternoon and payed saturday. I was not at home when the package arrived, but fortunately the DPD employee decided to give it to my neighbours instead of taking it back with him. Might have something to do with the weight of the package (ca. 9kg) ….

    And another order arrived today: 136 neodymium magnet spheres of 5mm diameter. They are so much fun to play with and even have educational value! You can visualise some basic materialsciences principles such as close-packing of spheres and edge dislocations.

    Even platonic solids can be constructed. Unfortunately I only have enough spheres for two pentagonal dodecahedrons (made of twelve pentagonal faces) and one decagonal dodecahedron made of twelve decagonal faces.

    Decagonal Dodecaeder

    Decagonal Dodecahedrons

    Pentagonal Dodecaeders

    Pentagonal Dodecahedrons

    Tags: ,

  • While the mechanics are nearly complete, the wiring has just started.

    CNC Wiring (Z-Axis)

    CNC Wiring (Z-Axis)

    The light barriers are now all mounted but the metal sheets to trigger them need to be cut and attached.

    CNC Cabling (Z-Axis)

    CNC Cabling (Z-Axis)

    To shield the cableconnections from metal filings and such i placed a small plastic housing at the Y and X axis near the motor. All cables go into those housings through sealed holes. Inside they are connected by luster terminals.

    There will be 3 cables going to the z-axis. One for the motor, one for the 220V socket and one for lightbarriers and 12V supply. These cables are guided by a cable drag chain to prevent tangling.

    Next thing to do after the cabling is complete is to order the notch-plate and etch the interface boards.

    The coupling-problems are nearly solved. The 12mm holes for the motorshafts were misaligned, but the new holes look good. Maybe the holes in the frame for the couplings to go trough need some filing.

    Tags: , ,

  • Solving stuff in other stuff can be exhausting. I first discovered this problem when making the PVA slime. The pva-flakes did not dissolve completely when stirred by hand. So i looked up magnetic stirrers on eBay and immediately decided to go for plan B: build one myself.

    Magnetic stirrer

    Magnetic stirrer

    I previously had bought some strong neodymium magnets and just needed something rotating to attach them to. The first thing i found was an old 8cm fan. I had concerns on wether the magnets would interfere with normal motor operation, but they proved to be needless.

    To magnets were glued on top of the rotor with opposite poles facing upwards. I used double-sided adhesive tape and superglue and another layer of tape on top.

    For the stirrer itself i used a small cylindrical magnet. To protect it from aggressive solutions i stuck it in PVC tube and sealed the ends by melting the pvc.

    Then i tested wich distance from the rotor was best to achieve good rotation of the stirrer and place a piece of plexiglass over the rotor in that height. (Fortunately i had screws that fit perfectly).

    As you can see in the picture, it worked quite well.

    If you want heating too, you can just place a peltier-element between the stirrer and jar.

    Tags: , , ,

  • CNC

    About a year ago, i decided to build a cnc router. First drafts were made in 3dsmax and the final drawings in CATIA.

    As I wanted to fabricate as many parts as possible by myself, i had to find a shop with adequate machinery which i could use. Fortunately there is a public shop with all the tools i needed in Munich. They offer use of their machines for 5€/h, but students only pay half of that.

    Raw aluminum parts

    Aluminium parts

    One of their employees recommended a firm where i could buy the raw aluminiumparts quite cheap.
    All parts i could not manufacture myself where bought from eBay. There are many shops which concentrate on cnc-parts, so i quickly found what i needed.

    At first i had planned to buy steppermotors and make the control- and driverboards myself. I already had ordered the H-bridges and layed out the boards, when i met a guy at the shop who had build a very big cnc-router in his basement and offered my to give me motors and controlboards for free.

    Motors and boards (a nice 19″ rack with slide-in cards) are from dismantled photomachines. The motors are, in contrast to the steppermotors you find in printers/scanners, 5-phase steppermotors.

    Control circuits

    Control circuits

    Two of them are 1.4Nm and one is 0.9Nm. The weaker one will drive the z-axis, which has a 1:2 transmission. The other two drive y- and x-axis. All axes have 14×4 trapezoidal screws and nylatron nuts.

    The z-axis is guided by four linear ballbearings on two 12mm steelshafts. 12mm might proof to be a bit sparse, but i think i can fit in 16mm shafts without major redesigns.

    The y-axis is also guided by four linear ballbearings, but on two 20mm steelshafts.

    The x-axis sits on four linear-rail wagons which run on two rails.

    The frame is made from aluminium profiles and everything is held together by steel screws.

    Due to exams in September/October 2007 and February/August 2008 (and my laziness) the progress was very slow.
    At the moment the mechanics are almost ready (only the couplings between the motors and the spindles are missing). Some of the limitswitches (light barriers) are mounted and the steelframe for the powersupplys and controlboards is nearly complete.

    Limitswitch at the x-Axis

    Limitswitch at the x-Axis

    The next step is to etch the interfaceboards, which distribute the signals from the parallelport to the motordrivers, and connect all the cables.

    I will try to post regular updates on the progress from now on.

    Tags: , , ,