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.
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.
To make the end effector you need to get the Polycaprolactam into its malleable state.
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 mechanical part should now be completed.
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.
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: