TwinTeeth - How to use it
Safety First
TwinTeeth laser ToolHead uses three class 3B laser diodes: one is near to the ultraviolet wavelength (405nm), another is a red laser diode (650nm), an the last one is an infrared laser diode (780nm). Please, take note that the Infrared laser is not visible for the human eye.
All the laser diodes emit a low-power laser beam (less than 50mw) and with a very narrow focal length (1.6 mm). It means it is not as dangerous as other lasers types or laser pointers but anyway we recommend you to NEVER LOOK DIRECTLY AT THE LASER BEAM and to use at all times protection goggles appropriate to the laser wavelengths. For more information, see: Laser Safety.
Some electronic components (motor drivers, power supply regulators, etc. generate heat. They use an aluminium heat dissipater that can burn your skin. Be careful when you touch them and keep them away from flammable materials.
Although TwinTeeth uses low power stepper motors be careful with them when running because lead-screws and moving parts can hurt your fingers or hands.
Drilling ToolHead uses a mini-rotary tool and carving/drilling bits which can hurt you. Take care also please.
Solder Paste Dispenser Toolhead uses mechanical parts and lead-screws which can hurt your fingers and also uses needles which can pierce your skin.
3D Printer Toolhead uses mechanical parts and gears which can hurt your fingers. It has a hot-end which can reach high temperatures (more than 190ºC/374ºF) and can easily burn your skin if you touch it.
The robot is an electrical device, so take the necessary security measures to handle this kind of devices.
The Coordinate System
TwinTeeth uses a 3D coordinate system, so additionally to the X,Y axis it also has a Z axis.
The X,Y axis zero position is located at the centre of the fixture platform. The Z axis zero location is at the top (where the fixture platform almost touches the ToolHead tip installed). Positive Z axis values are below that position. This is because TwinTeeth uses an inverted delta configuration.
The Home location is approx. 60mm downwards from the Z zero location where the carriages touch the end-stop switches.
So it has a Z axis zero location at the top and a Home Position at the bottom.
Z axis zero location (top) can be different for each Toolhead because they can use different length tools. As we learned in previous chapters, TwinTeethMC allows you to set the zero position for each tool.
The long side of the platform (80mm) is the Y cartesian axis. The short side (70mm) is the X axis. And the vertical axis is the Z axis.
How to run and use TwinTeethMC
TwinTeeh is a versatile multi-functional robot and it can do a lot of things with the appropriate ToolHeads. It was designed mainly to make PCB prototypes but it can also make other things and also 3D prints.
All TwinTeeth operations are managed from TwinTeeth Management Console (TwinTeehMC). It was developed using Processing: a programming environment based on Java language.
Now we are going to learn how to run and use TwinTeethMC.
First, run Processing (clicking with your mouse on its windows icon)
Open the File menu. Select Sketchbook->TwinTeethMC
You will see a new window with the program code of TwinTeethMC. Something similar to this:
Now click on the button. This is the "Run Sketch" button.
Then you will see the TwinTeethMC Main Screen. It means TwinTeethMC is running.
TwinTeeth Management Console
TwinTeethMC main screen is compound of several functional areas: The Control Area, at the top-left (grey colour), the Message Area at the right (white) and the Simulation Area at the bottom (green). Below the Simulation Area you will see also an one-line window: The Status Window (white) and on its right The G-code Command Line (black) with the Send button.
The Control Area
The control area allows you to manage TwinTeeth and the current ToolHead. At the top side of the window you can see the ToolHead Menu Bar. When TwinTeethMC is disconnected it only shows the Pen Tool tab which is the default Toolhead, but once connected you will see there all the supported ToolHeads.
Under the ToolHead Menu Bar you can see the Main Menu Bar. It allows you to select the port, connect to TwinTeeth, load files, and Run/Stop or Pause the jobs.
Under the Main Menu is the Jogging KeyPad. it is the black rectangle you can see on the left side of the window. 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 square (which is in the middle of the lines) and drag it inside the black area 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 KeyPad 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). 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 right side of the pad you will see the Center X/Y button. As its name suggest it allows you to center the platform.
At the bottom, on your left, is the Home Button (the green house) and on your right, you can see the actual X,Y coordinates.
When homing, all the carriages will move down till the first of them hits the endstop switch. Then they will move downward again by turn, hitting the switches with more precision.
On the right side of the KeyPad is the Z Axis Motion Control. It allows you to move the platform up or down. If you go with the mouse over there, you will see that the arrows change indicating the number of millimetres that the platform will move when clicking.
At the right side of the Z axis Motion Control you will see two sliders to set the Seek Rate and below them the Emergency Button.
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.
The sliders above the Emergency Button allow you to set the seek rate of the axes. On your right is the Z Axis Seek Rate Control and on your left is the X/Y Axis Seek Rate Control.
Finally, on the right side of the Control Area you will see a picture of the current ToolHead and above it the Calibration Button. We already learned how to use this button in the Calibration Chapter. It basically allows you to show or hide the Calibration Control Set.
The Calibration Control Set is compound of the Z Min Slider Control (on your left) which 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 go 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.
The Set Program Zero button allows you to set the zero position for the current ToolHead or job, so it's specific to each ToolHead. You will use it to adjust the origin of the coordinate system because there could be small differences among ToolHeads. The (0,0,0) is at the centre of the PCB and on its surface when using a PCB. If the job does not use a PCB or other material (for example when 3D printing) then the Program Zero position is on the platform surface (the printing glass surface).
The Bed Auto-levelling button executes the auto-levelling calibration program. If you click on it you will see how the platform first goes home and then goes up to meet the probe. Once touched, the robot will start to move the platform up and down at different coordinates measuring the height. Finally it stores all the information in the EEPROM memory.
The Reset Tool button resets the EEPROM calibration data of the current ToolHead. It's useful if you want to start from scratch with a specific tool and calibrate it again.
Toolhead Control Area
Additionally to the controls we just described above, there are another set of controls which are specific to each ToolHead. They appear below the ToolHead Image (when you select the ToolHead at the top menu) and are different to each one of them. We will describe these controls when we will cover the ToolHead functionallity.
The Message Area
This window shows you all the information that TwinTeeth sends to the console. It includes the welcome message, error messages, warnings messages and the robot response to any g-code command you could manually execute. So, it is an important feedback mechanism to know what is happening at the robot side.
The Simulation Area
This is a 3D graphic window which allows you to see a representation of the postscript or g-code file just loaded for execution. It's very useful to check the file and the evolution of the job while the robot is working.
To see the image, first you have to connect to the printer, then load the file using the Load File button.
After a few seconds you will see the graphical representation of the file. It will be different depending on the ToolHead selected. For instance, if you select a postscript PCB file you will see the PCB design representation but if you select a 3D printing file you will see the 3D object to print.
The same applies for drilling, dispensing paste, plotting, etc.
You can manage the image in a 3D space using the following commands:
Move: click mouse left button over the Simulation Area and drag the image to the new place.
Zoom: move the mouse over the Simulation Area and use the mouse wheel to zoom in or out.
Rotate: press the keyboard shift key and click on the Simulation Area and the mouse left button at the same time. Then move the mouse up, down, left, right and the image will rotate.
If you click twice on the Simulation Area with the mouse left button you will be back to the original view after the file loading.
You can only use these commands when the robot is stopped. They are disabled while it is working because it could affect printing speed.
When it is working you will see how the image changes to blue colour showing the evolution of the job.
The Status Window
This one-line message window shows important messages which indicate you the state of TwinTeeth: e.g if it is connected or not, if it is printing or is stopped, error messages, etc. So, keep an eye on it.
The G-code Command Line
G-code, PostScript and HP-GL are the control languages which TwinTeeth supports. G-code was originally designed for CNC machines but now is widely used to control automated machines, robots and 3D printers. Basically it is a simple programming language in which you can tell the machine how to make or do something. For example, to home the platform you can click on the Home button of TiwnTeethMC but also use the G28 g-code command. In fact, when you click on the Home Button, TwinTeethMC sends the G28 g-code command to the robot.
G-code has two main command groups: G commands and M commands.
- G commands often tell the robot what kind of motion is wanted (e.g., rapid positioning, linear feed, homing, etc).
- M commands represent miscellaneous functions: action codes, auxiliary commands, setting variables, etc.
The following list shows main g-code commands used by TwinTeeth:
G Codes:
- G0 - Rapid positioning
- G1 - Linear interpolation
- G4 - Dwell
- G7 - Raster mode (Laser ToolHead only)
- G10 - Retract filament according to settings of M207
- G11 - Retract recover filament according to settings of M208
- G28 - Home all Axis
- G29 - Detailed Z-Probe, probes the bed at multiples points. <T > Test the autoleveling system
- G30 - Single Z Probe, probes bed at current XY location.
- G31 - Focus laser (Laser tool only) <O offset> <W width> <H height> <T test mode> - W and H measures in points not mm. O in mm.
- G32 - Init raster (Laser tool only) <D diode> <W width> <H height>
- G54 - Select active tool - G54 <P tool number>
- G90 - Use Absolute Coordinates
- G91 - Use Relative Coordinates
- G92 - Set current position to coordinates given
- G93 - Set program zero offset for active tool
- G94 - Reset config data for active tool or tool specified
M Codes:
- M0 - Unconditional stop
- M01 - Same as M0
- M03 - Set laser power (S Power) or Spindle rotation normal (S Speed)
- M05 - Set default laser and focus diode/Spindle off
- M06 - Turn laser on/Spindle on
- M07 - Test mode off/on use S[0 1]
- M17 - Enable/Power all stepper motors
- M18 - Disable all stepper motors; same as M84
- M82 - Set E codes absolute (default)
- M83 - Set E codes relative while in Absolute Coordinates (G90) mode
- M92 - Set axis_steps_per_unit - same syntax as G92
- M104 - Set extruder target temp
- M105 - Read current temp
- M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
- M114 - Output current position to serial port
- M119 - Output Endstop status to serial port
- M200 D<millimeters>- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
- M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
- M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
- M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
- M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
- M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
- M206 - Set additional homeing offset
- M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
- M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
- M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
- M220 - S<factor in percent>- set speed factor override percentage
- M221 - S<factor in percent>- set extrude factor override percentage
- M301 - Set PID parameters P I and D
- M302 - Allow cold extrudes, or set the minimum extrude S<temperature>.
- M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
- M304 - Set bed PID parameters P I and D
- M400 - Finish all moves
- M500 - stores parameters in EEPROM
- M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
- M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
- M503 - print the current settings (from memory not from eeprom)
- M504 - Read tool configuration from EEPROM
- M505 - Retrieve all tool configuration
- M506 - Reset tool config data
- M507 - print tool config data
- M508 - Set seek rate (rate for rapid movements with G0 command)
- M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
- M666 - set delta endstop adjustment
- M999 - Restart after being stopped by error
Don't panic: you don't need to remember and use these codes because TwinTeethMC executes them for you, but it is interesting to know they exist because sometimes they are useful.
To run g-code commands just click with the mouse on the G-code Command Line, then type the command you want to execute (including the parameters) and click on the Send Button.
Unfortunally teaching g-code programing is out of the scope of this tutorial If you are interested in g-code we suggest you to search at the internet. You will find a lot of information there e.g, at the RepRap site.
Connecting
Now we are going to connect to TwinTeeth.
Before connecting make sure that no other program is using the port.
Then select the COM port and click on the Connect button.
In the Message Window you will see the welcome message and at the Status Line: "Connected to Printer on COMX @ 1115200"
It means that TwinTeethMC is now connected to the TwinTeeth firmware.
You will see something like this:
Now that you are connected you can try to click on the ToolHead Menu to check the various ToolHeads supported and the specific controls.
Remember that every time you change from one ToolHead to another you have to home the platform. Otherwise you will not be able to move it and an error message appears on the Message Window. If you did not install any ToolHead on TwinTeeth then you can only use the Pen Toolhead.
Setting the Program Zero
We've already covered this functionallity when calibrating the robot but we are going to repeat it again just in case because it is very important.
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 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 then probably they will have different lengths, so you will need to set up the program zero before starting the job or changing the bit. Other tools like the Laser ToolHead do not change its length so frequently (or never), but anywhere you will have to point it to the centre of the PCB before starting to print.
Set Program Zero button will help you to calibrate all these things. You just have to move the platform to the position you want as the origin and click on it. From then on, that will be the (0,0,0) location for the current ToolHead, till you change it. It will remain so even if you turn off the power. All the platform movements will be relative to that position and If you want to delete the location, just click on the Reset Tool button.
The welcome message always shows you the configuration of each ToolHead at start-up but you can also use the M507 G-code command to obtain that information.
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 reset the current tool configuration. After that, set the Z min position for example to -0.3mm. This allows the Pen tip to touch the PCB to print with some pressure.
Now home the robot and install a piece of PCB or plywood on the platform, just to do testing on it.
Insert a real marker pen into the Pen ToolHead hexagon hole. It has to protrude below approx. 40mm. Check that the pen is perfectly vertical.
Move the platform up till the pen tip will almost touch the PCB surface. Check that it points towards the platform, just at the centre. Otherwise, move the X,Y axis to centre it. Then move the z up the last tenths of millimetres till the pen tip touches the PCB surface and finally click on the Set Program Zero button to set up that position as the coordinate's 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 pen tip.
Moving the robot manually
Using the Keypad try to move the robot manually and paint something with the pen on the PCB.
Change the seek rate of X/Y and Z axis and see how the robot changes its behaviour.
Centre the axis clicking on the Centre X/Y button and see what happens.
Click on the Emergency Button to familiarize with it. After stopped you have to Home the platform and start again.
Loading a file
Loading a file is very easy. Just click on the Load File button at the Main Menu.
Depending on the current ToolHead and configuration you can load a PostScript file or a g-code file. You can also load a .BMP file instead of a PostScript file.
The Laser ToolHead uses PostScript or BMP files when printing in rastering mode. The rest of the ToolHeads use g-code files. Note that the file content is specific to the Toolhead and you can not use for example a drilling file for 3D printing (obviously). You will not see any error if you do that, because TwinTeethMC does not know that you loaded the wrong file. The only thing you will see (in case you did it) is an empty simulation window or a wrong image on it.
Once the button was clicked a file selector will appear. Select the file you want to load and click OK.
You will see the representation of the file in the 3D Simulation Window.
Try the 3D control commands to modify the image and zoom it, rotate it, move it, etc.
You can load another file at any time (if the robot is not working). If it is working you will need to stop it first. The new image will just replace the last one loaded. Try to load a different file and see how it will replace the image on the screen.
Using the ToolHead Menu try with other ToolHeads and load specific files for each of them to see how the 3D representation is different.
Running the job
Warning: Once the file is loaded running it is so easy as click on the Run button, but don't try it yet because you need more specific training about each ToolHead behaviour. If you do it you could crash the platform on the ToolHead. We will cover this functionallity when we will cover specific Toolheads functionallity in following chapters.
Once you click on the Run button it will become the Stop button. If you click on Stop button the robot stops. It will do it when it finished the last g-code command buffered. Then it will move the platform down to an intermediate position. If you want to stop the robot immediately is better to click on the Emergency Button but the robot restarts.
To the right you have the Pause button which allows you to temporarily halt the execution of the job. Clicking on it, the Run button will become the Continue button and if you click on it the work will resume.
Disconnecting
To disconnect from TwinTeeth, just click on the Disconnect Button.
Diyouware Web Link
If you click on the Diyouware Logo, at the top right corner of the window, you will access this web server.
This is useful in case you need to access the tutorial while using the robot.
Exit from TwinTeethMC
When you finish to use TwinTeethMC just click on the cross at the top-right corner of the window and close it.
TwinTeethMC stores before quitting the current configuration on disk and you recover it when you will run it again.
How to use specific functionality
Now we will cover specific training about the functionality TwinTeeth supports and the corresponding ToolHeads used. We will show you the end-to-end process, from the designing to the end of the job, using different tools and of course TwinTeeth.
- Plotting PCBs using a marker pen
- Photoengraving PCBs using the Laser ToolHead
- Drilling vias and holes
- Dispensing Solder Paste
- 3D printing