In this chapter we are going to power up and calibrate the robot. Please read the next safety advice before.
Some electronic components used by TwinTeeth (motor drivers, Mosfet drivers, power supply regulators, etc.) generate heat. Some of them use an aluminium radiator that can burn your skin when you touch it. Please, take care and keep them away from flammable materials.
You must also take care when the robot is running because lead-screws and moving parts can hurt your hands.
The robot is an electrical equipment so take also the necessary safety measures to handle this kind of devices.
The Coordinate System
Although TwinTeeth is a delta robot, it has three axis (X,Y,Z) like traditional 3D cartesian robots.
When we assembled the robot in previous chapters, we named the three linear guides and pillars with the X,Y,Z letters, but really these are only axes from the firmware point of view. From now on we will call "axes" the 3D Cartesian axes of the working area, and we will call "linear guide" to the X,Y,Z guides.
If you look at the robot with the X linear guide on your left and the Y linear guide on your right then the platform will be in front of you with the long side pointing to the Z linear guide, which is at the background. The long side of the platform (80mm) is the Y cartesian axis. The short side (70 mm) from left to right, is the X axis. And the vertical axis is the Z axis. The origin (0,0) of the X,Y axes is at the centre of the platform, where the two lines meet.
Before calibrating the robot you have to draw some alignment marks on the platform.
Disconnect the spring cable, loosen the three clamp screws of the effector and remove the platform from it.
Use a rule and a thin permanent marker pen to draw some marks at half way of each side (see next picture). The lines should cross at the centre of the platform. Mark there a tiny cross. After calibrating the robot you can remove all these marks with acetone or alcohol if you want to.
Install the platform again and point the longer side (Y axis) to the acme screw at the background (Z). Don't forget to connect the spring cable.
As TwinTeeth uses a inverted delta configuration, the origin of the Z axis is at the top. Positive Z axis coordinates extends approx. 60mm down below that position. At the bottom of the robot is the Home Position. So we have a Zero Position at the top and a Home Position at the bottom.
Zero Position (top) can be different for each ToolHead because they can use different length tips or bits. Max working area depends on the ToolHead installed but it is approx. 70x80x60mm (X,Y,Z)
We are going to power up the robot, but before we have to adjust the motor drivers.
They have a small potentiometer to do it (we saw them in previous chapters). These potentiometers control the current which the stepper motors receive. Clockwise increases the current which will make the motor and driver run hotter and counterclockwise reduces it which will cool it down. The potentiometers have less than 360 degrees of rotation. Take care not to force the stop (a tiny little tab of metal).
As a starting point, set the stepper driver potentiometers to 25% from the start on its left (see next picture)
Please verify now the following check-out list:
- Ramps firmly seated on Arduino.
- Stepper drivers correctly installed on it.
- Stepper driver potentiometers to 25% from the start.
- All connectors are in their positions, firmly seated, clams screws tight.
- The endstops and probe are properly connected to the Ramps
- Power: 12V connected to Ramps, connection oriented correctly, 5V connected to the wires which connect to the DB15
- USB cable is connected to the Arduino
- Firmware is uploaded
- No ToolHead installed
Now, run Processing. Open TwinTeethMC sketch and click on the Run icon. You will see the following screen:
Turn on TwinTeeth's power supply. Nothing will happen, this is OK. But if the motors start to move, quickly disconnect the power supply because something is wrong.
Select the port on TwinTeethMC and press the Connect button. If you get connected to TwinTeeth then we are going well.
You will see a big emergency red button in the centre. Don’t doubt to click there to stop the robot if you see that something is wrong. This is a software reset so there is no guarantee that it will always stop the robot, but you can also stop it disconnecting the power supply or pressing the Arduino reset button.
If you can not connect, disconnect the USB cable, reconnect it and try again.
Basic operation of TwinTeethMC
Now we are going to learn some basic operations of TwinTeethMC.
You already know how to select the COM port and connect with the robot. At the top side of the screen you can also see the menu bar. On your left you will see the COM selector and the Connect Button.
Once connected, the menu bar will change and some new buttons will appear above with the labels of the ToolHeads supported (see next picture).
To disconnect from the robot just press the Disconnect button.
The ToolHead bar allows you to select the tool you want to use. For the moment we will only use the Pentool.
At the centre of the screen you will see the following controls:
Above he Emergency button you have two slider controls. Their mission is to set the seek rate of the axes. On your right is the Z axis seek rate control. Set it to approx. 1000 mm/min as a starting point. On your left is the X/Y seek rate control. Set it to approx 1500 mm/min.
On the left of the Emergency button is the Z axis motion control. It allows you to move the platform up or down. If you go with the mouse over it (don't click yet), you will see that the arrows change indicating the number of millimetres that the platform will move when clicking it. If you click now on any of those buttons you will see that the robot does not move. Also the following message will appear in the window on your right): “Error: Printer stopped after being calibrated. Home axes (G28) before continue.”
It means that you can not move the axes till you home the robot. You will see this message every time you try to move it after powering up, when selecting other tool or after calibrating the robot.
Homing the axes
The home button is represented by a green house (see next picture)
When homing, all the carriages will move down till the first of them hits an endstop switch. Then they will move up and down again by turn, hitting the switches with more precision.
If any of the axis does not move or stop when hitting the switch, or moves up instead of down, then quickly press the Emergency button because something is wrong.
Now click on the Home button and watch what happens.
If any axis (or all of them) did not move, stop the operation, turn the power off and check the potentiometer of the drivers. Move them a little clockwise to increase the current. Check also that the springs of the carriages are correctly set not blocking the leadscrews.
If any of them did not stop when hitting the switch, then check if the switch is correctly installed.
If any axis (or all of them) went up instead of down then it means that the motor connectors are in the wrong position. Turn the power off, disconnect them and reconnect in the right position.
Once the axes went home you can move the platform.
Click on the Z axis control to move the platform up and down and familiarize yourself with the Z axis motion control.
If you move the Z axis several times up, you will reach the top limit and you won’t be able to go beyond. There is a general top limit for the robot and particular top limits for each tool because all of them have different lengths. We will adjust them later.
Tuning the Stepper Drivers
Although the robot moves, you still need to tune the stepper drivers because the initial adjustment is not enough.
There are several ways to do it. One is calculating and measuring a reference voltage with a multi-meter. The other is an empirical method which involves moving the axis up and down and adjusting the driver’s potentiometers. We will describe this last one.
You will need a small screwdriver, preferably a ceramic adjusting screwdriver.
Turn TwinTeeth down to have better access to the drivers.
Note that the potentiometer is very sensible and small movements cause big changes.
First we are going to find the limits. Do the following on each motor driver:
Move the platform up (now down) several times. While the robot is moving move the potentiometer counterclockwise till the motor stops. This is the low current limit. When reaching it, the motor doesn’t receive enough current and it lose steps or stops. Take note of this potentiometer position. Move the potentiometer to the initial position (approx 25%) and home the axes again.
Now move the platform up/down again and continue moving the potentiometer clockwise till the motor starts to stutter, just to check the limit. When it sttuters or stops it means that the A4988 is too hot and it disconnects itself to protect the electronics. Then turn it counterclockwise more or less to the half-way between the point when it started to run well and the point when it started to stutter. Move the platform up/down again and check carefully with your finger the temperature of the radiator. If it is hot then move a little counterclockwise. If it’s cool then a little clockwise till gets warm.
Try several times moving the platform up/down and repeat these steps with all the drivers till they are tuned.
Installing the Camera
We recommend you to install the camera before starting the calibration process because it will help you to do it with precision.
The camera is fundamental to print high-density PCBs because it is difficult to appreciate its details at a glance. It helps in a variety of tasks: calibrating the robot, determining precisely the init position of each tool, inspecting in detail the quality of the jobs, seeing how they evolve during the process, etc.
We designed three built-in camera anchoring in the top triangle but really they are not very useful. A better solution is to install the camera below the top triangle using a piece of stick-on Velcro band. It is a more "flexible" solution because the camera can be easily moved. Also if accidentally the platform hits the camera it will separate from the velcro without damaging it.
The camera we choose for TwinTeeh is a CMOS camera of 50 Megapixeles and 6 white LEDs which you can control with a dimmer switch. It also has a built-in microphone.
You will need the following materials:
- 1 x USB Camera
- 1 x Camera Plate 3D Part
- 1 x Camera Hinge 3D Part
- 1 x Camera Fork 3D Part
- 1 x Camera Tulip 3D Part
- 1 x M3 - 8mm screw
- 1 x M3 - 12mm screw
- 1 x M3 - 25mm screw
- 2 x M3 Nuts
- 1 x M3 Nylock Nut
- 1 x M3 Washer
- 1 x Piece 20x20mm Stick on Velcro band
- 3 x zip-tie 10mm x 100mm
- Some drops of cyanoacrylate glue
First, using the soldering iron insert a M3 nut in the Hinge 3D part.
Insert another M3 nut in the Tulip part.
Glue the 20x20mm Velcro band to the tulip.
Insert the M3x12mm screw through the hole of the Fork 3D part
Check that the Hinge and the Fork fit well. Insert the M3x25mm screw and check the hinge mechanism, then remove the screw.
Attach the Fork to the Tulip with the M3x12mm bolt.
Then insert the M3x8mm screw and a M3 washer through the centre hole of the Camera Plate. Put a drop of cyanoacrylate on the screw and washer to glue it to the plastic.
Using a round file, go inside the microphone housing. Take the camera and carefully insert the microphone into the housing. Bolt the Hinge to the Camera Plate.
Slide the camera cable through the slot on the right side of the Plate. Insert a zip-tie through the rectangular holes.
Paste a piece of adhesive tape on the back side of the camera PCB (to hold the cables and protect it) and slide it into the side slots of the Plate.
Tighten the zip-tie and cut the reminder.
Attach the Hinge to the Fork using a M3x25mm screw and a nylock nut. Tighten the nut till there is drag between the pieces.
You've finished the job. The camera and the support will look like this:
Now we are going to install it on TwinTeeth.
Glue the other piece of the Velcro band below the top triangle. We recommend you to put it on the Y vertex, at the front side of the robot (See next picture).
Now you only have to paste there the Tulip.
Point the lens towards the tool tip (or laser beam) just where it touches the platform surface. Make sure that the camera does not surpass below the platform limit, otherwise the platform will hit it.
Using two zip tie attach the camera cable to the alu. pillar.
The cable has a built-in dimmer. You can use it to regulate the LEDS intensity or turn them off.
At the end of the cable you will find two connectors: one USB connector and one jack connector. Connect the USB connector to your computer.
The jack connector is the audio output. Connect it to the audio input of your computer (optional).
If your computer did not detect the camera probably you will need to install the driver. You can download it from here.
Now run on your computer the camera program. Focus the lens rotating it with your finger.
The camera is ready.
Calibrating the robot
If you followed well the instructions, you used the proper materials and recommended measures, or purchased the kits from our shop then the calibration process will be as easy as tuning the endstops screws, aligning and levelling the platform, checking that the robot moves with precision and setting up the limit position of each tool. If you changed something on the design you will need to adjust some parameters of the firmware, compile it and upload it again.
Our recommendations are: build the robot as accurately as you can. The most important is getting the three linear guides equally spaced. 3D print with accuracy the vertex guarantees this. The actual spacing is less important than having equal spacing of the guides because we can correct it later in the firmware. Next, the six diagonal rods must be as equally matched in length as possible. Again, the exact length is less important than getting the rods equal in length.
First we are going to test the probe.
Testing the probe
Install the Pen ToolHead with the auto-levelling probe. The probe must surpass the bottom hexagon surface approx. 40mm.
Check that it is vertical and clamp the crocodile clip to the probe wire.
Now we are going to move the Z axis up several times till the platform hits the probe tip.
Click several times on the 10mm Z axis control button. In the last centimetre move the Z axis one-by-one millimetre and last millimetre 0.1-by-0.1mm to avoid breaking the probe (in case it does not work). Finally hit the probe and check that the robot stops.
You will see in the TwinTeethMC window (on your right) a message saying that you hit the endstop (the probe).
If the robot did not stop or you can not see the message, then something is wrong. Try to touch the platform with the crocodile clip and check if the problem is in the probe or in the wiring. Once the problem is solved try again.
Now you will learn how to execute G-code commands manually. You can do it using the command line at the bottom right of the window.
It is easy, just type the G-code command and click on the Send button.
For example, type G28 which is the homing G-code command (same that clicking on the Home icon) and click on Send. The robot will init the homing sequence.
Resetting the EEPROM
TwinTeeth configuration parameters are stored in EEPROM memory. It means that they will remain there after turning the power off.
If you uploaded the firmware on the Arduino for first the time the EEPROM will contain the defaults settings and you don't have to reset it. But maybe this is not your first calibration. If so you should reset the EEPROM and start from scratch.
There are two parameter groups in the EEPROM: general parameter group and tool parameter group. The first one is related to the general behaviour of the robot. The second one includes specific configuration parameters for each ToolHead and includes also the auto-levelling data. TwinTeeth has some useful G-code commands for managing the EEPROM:
- M503 - Print the current general settings (from memory not from eeprom)
- M506 - Reset tool config. data
- M507 - Print tool config. data
Another useful G-code command is the M114 command which prints the current coodinates.
Familiarize yourself with these commands and be sure to reset the EEPROM Tool Config parameters with the M506 command.
Tuning the endstops
The endstop adjustment screws allow you to adjust the initial height of each carriage at the home position. This obviously affects the platform and its levelling.TwinTeeth has a platform auto-levelling system (that we will see later) but it is important that before using it you manually adjust the platform as well as possible because the robot will work better.
To do it, move the platform to the top and adjust the three endstop screws about halfway, loosen the nut allowing adjustability in both directions. You will need a very small flat screwdriver because there isn't much room and the screw is small. You can instead use thin nose pliers with care not to break the screw housing.
Click on the Home button.
Now clicking on the Z axis motion control move the platform up till it will be approx. 5mm from the probe tip.
Type G90 at the G-code command line. It means Absolute Positioning. All coordinates from now on are absolute relative to the origin of the machine.
Now we will position the probe on four specific locations on the building platform. Three locations are on a triangle centered on the platform and immediately in the opposite side of each of the three linear guides. The fourth is the actual centre of the platform.
Let’s call the four locations: X-Pos, Y-Pos, Z-Pos, and the center C-Pos.
The G-code command for each location is:
X-Pos G0 X33 Y20.20
Y-Pos G0 X-33 Y20.20
Z-Pos G0 X0 Y-38
C-Pos G0 X0 Y0
Decoded: G0 is a move to an absolute location and X,Y are followed by the corresponding coordinates in the 3D Cartesian space.
Warning: Don't use the Goto Zero button yet because it will move the robot to the (0,0,0) position and you will hit the probe.
Take a piece of cardboard and put it between the probe tip and the platform surface.
Using the Z axis control, move up the platform 0.1mm by 0.1mm till the cardboard slides between the platform surface and the tip with only slight drag.
Now type the X-Pos command and click the Send button. The platform should move to a point in front of the X linear axis.The proper height should be just above the platform surface, with clearance space for the cardboard to slide between.
Adjust if necessary the end-stop screw only for X axis carriage, then press home and repeat the test again. Repeat until the cardboard slides between the platform surface and the tip with only slight drag.
With X linear axis adjusted, move on to Y-Pos, and then to Z-Pos. When Z-pos is adjusted, you should be able to go back and successfully repeat the test on the other axis without having to readjust. In latest tests you can use the command C-Pos to go to the Center, check that cardboard slides well and then go to the other points without making Home. But if you adjust any of the screws you have to go home again.
Once you have checked that all the axes are correctly adjusted, tighten the nuts of the screws to avoid they move.
Aligning the Platform
In adition to "be leveled", the platform has to be perfectly aligned with the rest of the robot. For that reason it can turn left or right on the Effector.
We are going to align it, but first we have to learn how to move the platform with the Jogging Keypad on the X,Y axes.
The Jogging Keypad is the rectangle you have on the left side of the window. It includes the Z-Axis Control, the Center X/Y button and the Home Button that you already know. The rectangle itself is the X/Y Pad. You can click anywhere on it and move the platform to that position. You can also click on the green rectangle, which is in the middle of the lines, and drag it where you want. It represents the actual position of the tool tip. Finally you can also move the platform clicking on the arrows at the pad sides. In this case the platform will move the millimetres shown on the top-left corner of the pad. If you click there you will see that you can change that number to 0.1,1,10 and 40 millimetres.
Note that it seems the controls are reversed. For example, if you click on the right arrow the platform moves to the left. This is ok, because as the robot is inverted really you are moving the tool tip to the direction you want (to the right) instead the platform. Also note that you can not move the platform when it is at the Home position because the carriages will hit the endstop switches and the robot will stop. To move it freely, the platform must be at a certain height from the Home position.
The Goto Zero button, at the top of the pad, moves the robot to the (0,0,0) location. This is the init position where the robot starts to print or work and it can be different for each tool, as we said before. Warning: do not use it before calibrating the zero position of the tool because you can hit the tool with the platform.
At the bottom, on your right, you can see the X,Y coordinates.
To align the platform follow the next steps:
Loosen the screws that hold the platform to the effector (if they are tight)
Press the Home button.
Move the platform up till it is 1mm from the tip of the probe, at the centre of the platform.
Set the motion length to 10mm and using the top/down arrows of the jogging keypad, move the platform along the marks which you did on the Y axis. If the tip does not match the line at the ends turn the platform on the Effector until it does.
Try this several times. Once the platform is aligned in the Y axis, click "Center X/Y" to center the platform and then repeat on the X axis, also from end to end. Again, turn the platform to align it with the X axis if necessary. Finally verify again that both axis X/Y are aligned and the platform flat on the effector. Then lighty tighten the effector bolts to clamp the platform to it.
Levelling the Platform
TwinTeeth firmware includes an auto bed levelling algorithm which maintains the platform flat while the robot is moving. This algorithm uses some data obtained with the probe when running the auto-bed levelling command. Basically it measure the height to the platform surface in a matrix of X,Y coordinates and store in the EEPROM the data obtained for future use.
To run the auto-levelling command first click on the Calibrate button which is above the picture representing the current tool. This button allows you to show or hide the calibration controls. If you click on it the following will appears:
On your left, the Z Min slider control allows you to set the Z min position beyond the zero limits. You will need it for example when drilling PCBs to let the drill bit goes beyond the Z axis zero limit position. Otherwise the robot will stop at Z zero, which is at the PCB surface. This setting is particular to each ToolHead so you can have different Z min positions for each one.
Set Program Zero button allows you to set the zero position for the current ToolHead or job, so it's particular for each ToolHead. You will use it to adjust the origin of the coordinate system for each ToolHead or job, because there could be small differences. Usually the (0,0,0) is at the centre of the PCB and on its surface. If the job does not need PCB or other material (for example when 3D printing) then the Program Zero position is on the platform surface or on the printing glass bed surface.
Bed Auto-levelling button executes the auto-levelling calibration sequence. If you click on it you will see how the platform first goes home and then go up to meet the probe. Once touched, the robot will start to move the platform up and down at different coordinates measuring the height of it to the probe tip. Finally it stores all the information in the EEPROM memory.
Reset Tool button resets the EEPROM calibration data of the current tool. It's useful if you want to be start from scratch with a particular tool and calibrate it again.
Now we are going to use the Bed Auto-levelling button. Check that the crocodrile clip is clamped to the probe wire and Click on the button. The robot will start to move.
As the robot moves the window on your right will show you the measures taken.
Once finished it prints the complete auto-levelling matrix with all the data, then you can click on the Calibrate button to hide the controls again.
You can test the auto-levelling system using the G-code command G29 T. It will repeat the probing sequence but this time while the robot levelling the platform, so you can see the diference before and after.
Checking Correct Dimensions
At this point the robot probably moves and prints but you have to be sure they do it dimensionally right. You can do it in different ways: using the probe tip, printing with a marker pen on a piece of paper, 3D printing an object, etc.
Basically you have to check that if you order the robot to move 80mm it really moves exactly 80mm. Otherwise you have to correct some parameters in the firmware. In theory you don't need to do that if the robot was correctly assembled, but just in case.
Calibrate the Z dimension with precision is only needed if you want to 3D print. To do it you have to 3D printing an object. It is usually a 20mm x 20mm x 20mm cube. You have to check the accuracy measuring the printed object and comparing it to the size in the design. Then adjust it in the firmware.
If the length of the measure (or 3D object dimension) is above 0.1mm from the original then you have to adjust two firmware parameters:
- Steps per mm - which controls X and Y movement, and Z height
- DELTA_DIAGONAL_ROD - center-to-center distance of the holes in the delta rods, which controls X and Y dimensional accuracy.
Tune the values in that order.
Open the Arduino IDE and the TwinTeethFirmware.pde file, click on the Configuration.h tab to edit the file.
First check the steps per mm of X, Y, Z axis. The parameter you have to tune (if needed) is XYZ_TRANSMISSION_PITCH, the pitch of the Acme screws. If you bought the Framework Kit from our shop it includes 3mm picth Acme screws. Using those screws, the tuned value for this parameter is 3.04mm. If you use different screws sure you will need to tune them.
Then tune DELTA_DIAGONAL_ROD parameter. It represents the length of the delta rods. They must have a length of 170mm from hole to hole. The firmware default value is 167.5mm but change it if needed.
To calculate the new value use the next formula:
DELTA_DIAGONAL_ROD = 100/measured_length * original DELTA_DIAGONAL_ROD
Finally, save, compile and re-upload the firmware. Then print and measure again. Once the dimensions are OK then the robot is printing accurately to size and is fully calibrated.
There is another important parameter in the firmware configuration called DELTA_RADIUS. It controls the platform "flatness" and you will need to tune it, just in case you found difficulties while tuning the endstops.
Setting the Program Zero
As we said before, the (0,0,0) location is at the centre of the platform and on the surface of the PCB or material you want to process.
This is the origin of the cartesian coordinates and can be different for each ToolHead, even for each job. For example, if you use different drill bits with the rotary tool, them probably they will have diferent length so you will need to set up the program zero before start the job. Other tools like the Laser ToolHead does not change its length so frequently, but anywhere you will have precisely to point it to the centre of the PCB before start to print.
Set Program Zero button will help you to calibrate all this things. You just have to move the platform to the position you want as the origin of the job (or tool) and click on it. From then on, that will be the (0,0,0) location for the current tool/job. And all the platform movements will be relative to that position. If you want to delete the configuration, just click on the Reset Tool button.
Using the G-code command M507 you can obtain the offset from the real origin for each tool, also information about the current tool and the auto-levelling status.
Now we are going to set up the program zero just for the Pen ToolHead.
Select the Pen tool (if not selected) by clicking on the top left tab of the window. Click on the Calibrate Button and the reset the current tool configuration. Set also the Z min position for example to -0.3mm.
Now home the robot.
Remove the crocodille clip from the probe and also the probe itself from the Pen Hexagon. Insert a real marker pen into the hexagon hole. It has to protrude below it approx. 40mm. Check that the pen is perfectly vertical.
Move the platform up till the pen tip will almost touch the platform surface. Check that it point to the platform just in the tiny mark you did at the centre. If not, move the X,Y axis to centre it. Then move the z up the last tenths of millimetres till the pen tip touch the platform surface and finally click on the Set Program Zero button to set up that position as the coordinates origin.
Home the platform again and click on Calibrate Button to hide the calibration controls.
Now that you have set up the tool origin you can use the "Goto Zero" button to move the platform to that position. Click on it and you will see how the platform will move up and it precisely stops at the marker pen tip.
We will see in more detail how to set up the program zero location for each ToolHead when we describe them in next chapters.
Diyouware Web Link
Finally: If you click on the Diyouware Logo at the top right corner of the window, you will access to this web server.
This is useful in case you need to consult the tutorial while calibrating the robot.
In next chapters we will describe how to assemble and calibrate the various ToolHeads which the robot supports.
Previous chapter Assembly Index Home Next chapter