Monday, January 19, 2009
4 Dimensional RepRap
No - we're not doing an open-source time machine. When we get round to that we will do it last year.
This is a more prosaic idea prompted by G Codes and the fact that several people are doing stepper-motor-driven extruders or ones using Zach's neat shaft encoder. I hope I haven't stolen it from Nophead and recycled it as my own idea...
Clearly if you have a stepper extruder there is a precise relationship between the length in mm of filament extruded and the number of steps (this ignores time delays, melt compression and so on - run with me on this). So, why not incorporate the number of mm of filament to extrude as a dimension on each movement? You'd have things like
G1 W50.0 X30.0 Y40.0 F560.0
Where the W coordinate is the number of mm of filament to extrude. This could either get bigger and bigger as a build progresses (we're not going to run out of floating point numbers...) or we could have a convention that zeros it before each move, so it's Pythagoras on the X and Y numbers.
With that we can then control the machine with a 4D Bressenham DDA, which is just as easy to write as the current 3D one and takes hardly any more microcontroller space.
We can then obviously play tricks to get more or less extrudate:
G1 W100.0 X30.0 Y40.0 F560.0
would make a fat splongy line and
G1 W25.0 X30.0 Y40.0 F560.0
would make a jejune one. You can run the extruder without moving to take up any slack:
G1 W10.0 F560.0
and of course you can move with it turned off by omitting the W value altogether.
I'm not sure if this is:
This is a more prosaic idea prompted by G Codes and the fact that several people are doing stepper-motor-driven extruders or ones using Zach's neat shaft encoder. I hope I haven't stolen it from Nophead and recycled it as my own idea...
Clearly if you have a stepper extruder there is a precise relationship between the length in mm of filament extruded and the number of steps (this ignores time delays, melt compression and so on - run with me on this). So, why not incorporate the number of mm of filament to extrude as a dimension on each movement? You'd have things like
G1 W50.0 X30.0 Y40.0 F560.0
Where the W coordinate is the number of mm of filament to extrude. This could either get bigger and bigger as a build progresses (we're not going to run out of floating point numbers...) or we could have a convention that zeros it before each move, so it's Pythagoras on the X and Y numbers.
With that we can then control the machine with a 4D Bressenham DDA, which is just as easy to write as the current 3D one and takes hardly any more microcontroller space.
We can then obviously play tricks to get more or less extrudate:
G1 W100.0 X30.0 Y40.0 F560.0
would make a fat splongy line and
G1 W25.0 X30.0 Y40.0 F560.0
would make a jejune one. You can run the extruder without moving to take up any slack:
G1 W10.0 F560.0
and of course you can move with it turned off by omitting the W value altogether.
I'm not sure if this is:
- Clever,
- Dumb,
- Obvious, or
- Useless.
Labels: Bressenham DDA, G Codes, microcontroller
Friday, June 13, 2008
PIC file release
I've just done release v1.2 of the PIC firmware. Get it here.
There are three files in this release:
reprap-firmware-fullstep-all-20080613.zip
reprap-firmware-halfstep-all-20080613.zip
reprap-firmware-halfstepXY-fullstepZ-20080613.zip
These do as they say - you can either half-step or full-step the
motors. Half stepping is more precise, but slower; full the opposite.
There is a problem with integer overflow for tall objects (> ~50mm) if
you half-step the Z motors. The third file allows precise XY, and
also allows Z to go to about 100 mm. Precision is not needed for Z as
it uses a screw drive anyway.
This version of the firmware will drive a solenoid valve in addition
to the heater, extruder motor and cooling fan.
THE FAN NOW WORKS OFF RB6, not the spare channel of the L298. That
channel is used to drive the solenoid.
To drive the fan, wire in a TIP110 to ALT 2 (or ALT 1), connect in the
end of the 220 ohm resistor that goes to the base of that transistor,
but connect the other end to hole 4 on the 7-hole connector by the
Max/Empty connector. This goes to RB6. It's probably a good idea to
wire a diode across connector P7 so that it's reverse biased (stripe
to the +12v line, in other words); that'll take care of any back EMF
from the fan motor.
The code is now compatible with the Arduino, and the latest Java host
software is set up to drive it too.
As we are now switching to the Arduino, this is probably the last PIC file release that we will do.
There are three files in this release:
reprap-firmware-fullstep-all-20080613.zip
reprap-firmware-halfstep-all-20080613.zip
reprap-firmware-halfstepXY-fullstepZ-20080613.zip
These do as they say - you can either half-step or full-step the
motors. Half stepping is more precise, but slower; full the opposite.
There is a problem with integer overflow for tall objects (> ~50mm) if
you half-step the Z motors. The third file allows precise XY, and
also allows Z to go to about 100 mm. Precision is not needed for Z as
it uses a screw drive anyway.
This version of the firmware will drive a solenoid valve in addition
to the heater, extruder motor and cooling fan.
THE FAN NOW WORKS OFF RB6, not the spare channel of the L298. That
channel is used to drive the solenoid.
To drive the fan, wire in a TIP110 to ALT 2 (or ALT 1), connect in the
end of the 220 ohm resistor that goes to the base of that transistor,
but connect the other end to hole 4 on the 7-hole connector by the
Max/Empty connector. This goes to RB6. It's probably a good idea to
wire a diode across connector P7 so that it's reverse biased (stripe
to the +12v line, in other words); that'll take care of any back EMF
from the fan motor.
The code is now compatible with the Arduino, and the latest Java host
software is set up to drive it too.
As we are now switching to the Arduino, this is probably the last PIC file release that we will do.
Labels: file release, microcontroller, PIC
Saturday, March 29, 2008
Arduino chosen for next stage of RepRap development

We have chosen the open-source Arduino microcontroller for the next stage of RepRap development. Zach has been working on this for a while, and it gives a number of advantages:
- Direct USB connection to the host computer, hence no significant communications delays
- Easy-to-use platform-independent software development environment
- Faster
- More memory
We shall do a release of the entire RepRap system (hardware, firmware, and software) shortly that will be a stable platform from which people can take the current PIC microcontrollers forward if they wish.
We will then do a subsequent release with identical host software, but with the Arduino electronics and firmware. This will form the basis of our next set of developments.
Labels: arduino, microcontroller, PIC