Thursday, 25 June 2009

Machine/Firmware manual

RapMan O&M Manual

Machine Geometry.
Table Coordinates
It might be easier to view the print table as a a sheet of graph paper, and therefore, that each point of the table has an X,Y coordinate we can send the tool head to. The axes are set such that the centre of the table is the origin at X=0,Y=0.

Looking down on the table with (0,0) at the centre, a positive(+ve) move in X would be a move to the right of centre. A +ve move in Y is from the centre to the rear of the machine, exactly as the standard graph representation drawn on paper.

e.g.
If we pass the machine an instruction to go to point X50,Y50 if starting from the origin, the tool will be sent 50mm to the right in X and 50mm to the rear in Y

X-50,Y-50 would do the opposite and send the tool 50mm to the left in X and 50mm forward of centre in Y.

The four quadrants as follows.
X+,Y+ Rear, right hand 12 – 3 O clock
X+, Y- Front, right hand 3 – 6 O clock
X-,Y- Front left hand 6 – 9 O clock
X-, Y+ Rear left hand 9 – 12 O clock

We are also able to move the Machine in the Z axis, this being a straight line through the origin perpendicular to X and Y. For the RapMan we have defined Z = 0mm when the tool is just touching the top of the table (or work piece). A 10mm +ve move in Z will move the table down giving the tool an elevation of +10mm above the table. A -ve move in Z would move the tool into the table or work piece.

If we mount a 5mm thick work piece on the table and set Z=0 on top of it, this will enable us to use -ve Z values and machine down into the 5mm thick work piece.

On top of the table the maximum work area is:
X -135 to 130
Y -100 to 100
And in Z a range:
Z 0 to 230
Giving a maximum potential size of object at 265 x 200 x 230mm

When designing for Rapid prototyping we should aim to create an object that is equally spaced about the origin, in this way when it is printed on the RapMan the object is neatly printed in the centre of the table.

Stepper Motors
The RapMan uses stepper motors to move in each of the three axes, this is critical to the operation of the machine as these motors can be made to move in a very controlled manor.
Unlike other DC and AC motors that rotate when power is applied, the stepper motor is only able to move in discrete steps in either direction. The motors we use have 200 full steps per revolution, ie, issue the motor controller a single step and it turns the motor 1/200 of a revolution. The important thing to realise is the motor is held in each new position and while energised it does not move again unless it gets another step pulse.

It gets a little more complicated in that the stepper controllers are able to take the basic step resolution and deliver 1/16th step output, thus giving us the ability to move the motor in 200x16=3200 steps every revolution.

To turn the motor 180 degrees, we send it 1800 steps, if the diameter of the motor drive pulley is known, it is possible to calculate exactly how far this will be. The motor can be run at constant RPM by sending it a continuous stream of pulses at a fixed frequency, if the steps are counted it is possible to calculate exactly how many revs the motor has turned.

Knowing the circumference of the motor pulley and the number of pulses per revolution in X and Y we can show it requires 87.575steps/mm
In Z we have 2560steps/mm since we are turning a threaded rod with a small pitch.

Following on from the graph analogy the RapMan table is divided up into squares equating to a 1/16th step, this is the smallest discrete unit we can address.

87.575 steps in a mm this will give us 0.011mm resolution in X&Y with 0.0004mm in Z
These are theoretical maximums for the machine, realistic maximum is 0.1mm XY&Z.
Mainly due to restrictions of materials used.

Home
To ensure that we know where the tool is at any time, the machine is initialised to a known reference point, we call this the Home position.

The first action of the machine is always to confirm the position of the Home coordinate. It does this by running up to limit switches then moving back out very slowly until the switch resets. As each axes sets then re-sets the switch, it updates the processor with values defined for the back left hand corner of the machine.Home on the RapMan is at coordinate X = -135mm, Y = 100mm, Z = 0mm
The origin of the machine in the centre of the table is at coordinate 0,0 Measured from Home this is a "step" move of 135*steps/mm in X and -100*steps/mm in YRest Position.
At the front right hand side of the table there is another hole cut in the table, this is designated as a rest position. This is placed at the front of the machine to make access to the tool easier.
The rest position is at table coordinate X130, Y-100, Z is at the current height.

Electronics.
The electronics offer a basic UI to control the machine. This is achieved by use of push buttons and a small OLED screen to display updates of machine status.
The control board also contains the interface for an SD Card and an array of four stepper motor driver chips.

Along the top of the board we have motor connection terminals Fan and AUX header.
On the left we have the tool header, on the right our power and USB ports.
Alongside the screen you will find the PICKit2 programming header.
At the heart of the board is the main processor the Microchip PIC32 running at 80MHz. This is one of the latest high performance 32bit devices and it controls all aspects of the RapMan.
Details of the connections to the board are covered by the build manual. Please use this to ensure it is connected exactly as stated.

Tool Header
The RapMan identifies the type of tool fitted by checking the voltage dropped across a reference resistor, values as follows:

Description Resistor A/D
976 Ohm resistor for PEN 1K (90)
4.7K Ohm resistor for Extruder 4K7 (320)
9.9K Ohm resistor for Extruder2 10K (500)
22K Ohm resistor for Not Defined 22K (700)
47K to 100K Ohm resistor for Router 47K to 100K (840 to 920)
1M Ohm resistor for No Tool 1M to open circuit(1010 to 1024)

At Ver1.0.5 the Extruder, Pen and Router have been defined in firmware.

AUX header.
Top left of the board is a two way screw terminal used to power any auxiliary equipment fitted to the RapMan. This port is driven by a FET feeding 12VDC to the terminals. Power is limited only by the size of the PSU supplied with the RapMan. If you need several Amps from this port then please change the main PSU and add in the extra capacity.

The RapMan uses 12V 5Amp supply.

SD Card
The control board has an indicator LED for card detect, no card the LED is OFF, card correctly installed the LED is ON.

The RapMan uses an SD or MMC card up to Maximum 2GB
The card should be formatted to FAT16 or 32
Files on the card should reside in the root directory and be in the form of G-Code text files as generated by Skienforge. File size is not limited and can run to several Megabytes.
Valid file extensions are *.gco and *.bfb any other file extension is rejected as invalid

Firmware
V1.0.5
On power up the firmware offers the following Menu
1)Run File
2)Manual Move
3)Tool Setup
4)Home Tool head

Move up or down through the menu items using the Y+ and Y- buttons, press X+ to select the option

1)Run File
This checks to see the tool type fitted and enables you to choose the file you want to run.
The file offered as the first choice is the last one added to the card.
At this time use the Y+ button to move to the previous file and Y- to go to the next file.

You can see confirmation of the file number at the bottom of the screen.
Selection of the file is made by pressing the X+ button on the right.
If you wish to return back to the start menu press “Esc” button at the bottom left of the screen.
Once the file has been selected the machine confirms the home coordinate and proceeds to run the file.

During the print it is possible to pause the process by pressing the Esc button. In this event the machine halts at the end of the current instruction and runs over to the rest position where the heater and extruder motor are turned off.

The message on the screen reflects the status of the machine and offers return to print by pressing the escape button again.

It is possible to make adjustment to the machine settings during a print.
The axis buttons are all redefined to change the three main parameters.
X buttons change extruder speed up and down
Y buttons change the temperature up and down
Z buttons change the tool speed up and down.

Note the changes are made at the end of the current g_code instruction to prevent corruption of the print.
At the end of the print you are given option to return to the main menu.

Screen output:
You should always be able to see the Firmware version number at the top of the screen.
Below this is confirmation of the file name that is open.

The current G_Code line number
The Tool Head speed in mm/s
The Extrusion rate in mm/s

The next two lines are status indicators.
Top is the print progress, this runs left to right and is updated regularly throughout the print.
The print is complete when the solid bar reaches the right hand side of the screen.

The next line of the screen shows the status of the step buffer. This is another progress bar running left to right. No indication is buffer empty, a full bar across the screen is buffer full.
The status is reported at the end of each G-code instruction, after the following line has been read in and is ready to go. If there is content left in the buffer at the end of each line of code then we have no segment pausing. It is normal for this line to be very animated.

The bottom line of the screen reflects the extruder status.
The first number on the left is the target temperature setting for the extruder.
The asterisk shows heater status, when showing the heater is on, not showing the heater is off.
Immediately to the right of this is the current temperature of the extruder, this number shows the temperature reported by the thermistor on the heater barrel, the value fluctuates as the heater is switched in and out.

If the temperature drops 5C or more from the set value then the fan is turned off, if the temperature drops 10C or more the motor is turned off for protection.

2)Manual Move
Select this option to move the machine manually. The information on the screen reflects the current position in XY and Z. This function is most useful to move the machine round during setup, especially in finding the home position for Z.

3)Tool Setup
The machine moves over to the rest position for this mode. In this way any extrudate can discharge through the hole provided in the table.

Below the firmware version number, the screen shows the tool attached to the RapMan.
In the case of a Pen this screen is redundant as there is no set up to be done.

In the case of the extruder the screen gives a message at the top if the temperature is lower than 100 DegC. This is just a reminder that the motor will not run if the temperature is too low. As soon as the temperature is above this figure the message is removed.

On the next line is the current setting for the extrusion rate in mm/s, when you first enter the screen this value shows 0.7mm/s as the Extruder is set at 1rpm. The extruder minimum value is 1, below this is off, above 1 starts the motor (if Temp >100C)

The next line is the heater status On or off.
The bottom line of the screen reflects the extruder status.
The first number on the left is the target temperature setting for the extruder.
The asterisk shows heater status, when showing the heater is on, not showing the heater is off.
Immediately to the right of this is the current temperature of the extruder, this number shows the temperature reported by the thermistor on the heater barrel, the value fluctuates as the heater is switched in and out.

X+/- adjust the extrusion rate up and down
Y+/- adjust the temperature setting up and down
Z+/- do not have any effect.

This mode is most useful in setting the machine to run new materials and in when checking the extruder function.

4)Home Tool head
Does only as it suggests. Re confirms the home position from any point on the table.
Use in conjunction with the manual moves to set Z=0.

G-Code instruction
In addition to the control offered by the menu we also have special instruction codes that can be put into the G-Code, these items are Modal commands for switching in or out machine functions.
Listing of all special commands follows,

M_Code_M101 Turn extruder on.
M_Code_M103 Turn extruder off.
These two codes frequently work together in the G-Code to flag when the extruder is, or is not, required. This usually occurs at the end of a printed thread while the tool moves to the start of the next thread. The RapMan default is to continue to run the extruder during this time and use the M103 flag to initiate a rapid move then return to normal print speed after M101.
If you require the motor to stop during these moves then you can use the M225 command below, this flag stops the motor during rapid moves. M224 returns the system to default.

M_Code_M104 M104 S145.0 Set temperature to 145.0 C.
Used to make a change in temperature. The machine is instructed over to the rest position while the change takes place, after this it returns to the print and continues.

M_Code_M106 M106 Turn fan on.
M_Code_M107 Turn fan off.
M106 and 7 set a flag to enable or disable fan control.
M_Code_M108 M108 S210 Set extruder speed to 21.0RPM

BFB codes
M_Code_M220 Turn off AUX
M_Code_M221 Turn on AUX
M220 and 221 directly switch the Aux port on or off

M_Code_M222 M122 S500 Set speed of fast XY moves
M_Code_M223 M123 S500 Set speed of fast Z moves
500fast – 2000slow
M222 and 223 set the speeds used for the fast moves initiated by M103, Machine default is set at 500
Settings up to 1000 all work well, the larger the number the slower the speed and as a consequence the hairs get thicker. The benefit of slower speeds is that it is very much kinder to the machine.
(I use 768 for both values)

M_Code_M224 Enable extruder motor during fast move
M_Code_M225 Disable extruder motor during fast move
These flags set and re-set the extruder enable during fast moves. Enabled you run the motor during the move.

2 comments:

Bogdan said...

Wow, this took some time to assemble - thanks for the manual.

Is this the announcement of the 1.0.5-final or ?

Bogdan

ff said...

>Steppers Motors
>To turn the motor 180 degrees, we send it 1800 steps,

Shouldn't it be 1600?
Jean-Louis Bourdon

Post a Comment