3D Print:      Blog   ·   1   ·   2   ·   3   ·   4   ·   «5»   ·   6   ·   7



Thoughts on Firmware

To create a 3D object, the printer will have to follow complex command sequences. The Arduino is great, but not powerful enough to read stl or 3ds files. For that, we will have a host software that outputs a file to SD card. Pwdr will read this file from the card and execute the commands given.

The firmware then has to be able to read FAT32 file systems files byte by byte and interprete the commands as they come in.

The firmware also needs to allow the user to do some basic setups, fill powder into the hopper, empty the hooper, home the axes, and, of course, select a file from the SD card.


List of Firmware Commands

I have a rough idea of the commands that the fimrware needs to support.

  • minimal command set:
    • move x, y, z1, and z2 relative
    • fire nozzle pattern (currently 1..12)
    • rotate spreader
  • simple automatization
    • home x, y, z1, z2 (store steps required in register for later use)
    • absolute positioning of all axes
  • simple user interface
    • echo text to display
    • wait for OK button
  • simple programming
    • registers and simple math
    • if-then-else
    • repeat command
  • extended automatization
    • read machine condition if available (print head temp, ink level, powder collector level)
    • more sensors: lid open, vacuum, temperature, ink levels, etc.
  • extended user interface
    • manage choices, lists and menu selections
    • assign jump vectors to buttons
  • extended programming
    • function calls
    • local variables
    • interrupt vectors for buttons and conditions
    • predefined functions for machine type (add powder, change print head, ... )


List of Firmware Functions

Again, this is just acollection of spontaneous ideas of what the machine should be able to do at different levels:

  • level 0
    • test all motors and sensors
    • firmware knows machine configuration (hopper size, step widths on all axes, ink system)
  • level 1 (SD card, one button needed)
    • wait for SD card
    • interprete script from file "run.pdr" as soon as the card is found
    • stop/abort button
  • level 2 (more buttons)
    • user can move hoppers individually up and down
    • trigger a powder spread (manual home position)
  • level 3 (end stops needed)
    • find absolute position of all axes
    • restore hopper positions
    • store hopper positions in non-volatile RAM
  • level 4 (better SD card support, buttons, display)
    • choose file from SD card via display
    • test patterns, roller tests, powder tests, etc.
    • update firmware from SD card


List of Software Functions

It is impossible to have the Arduino slice large STL or 3DS files. A PC software needs to do that and generate the pdr file. Here are some features that come to mind:

  • supported file formats
    • .stl (industry standard, but monchrome)
    • .3ds (ages old and easily read, but quite limited, full color, but textures not inside the file!)
    • .vrml (as old as 3ds, a bit less limited, textures can be part of file)
    • .dae (Collada, well supported, few limitations, extendable, hard to read)
  • slicer
    • create slices for binder distribution
    • add color information as an outside shell if required
    • handle non-manifold objects gracefully
    • find problematic locations (thin walls, non-manifold bodies, overlaps) and show to user
  • database
    • maintain a database of available machines and their features
    • maintain a database of powder/binder combinations and their requirements for the perfect print
    • combining both databases should create the best possible results for a machine/powder/binder setup
  • generate test patterns (but also see firmware!)
    • pattern to find thinnest and thickest layer heights for powder
    • pattern to find best binder amount for powder
    • pattern to align colors
    • strategical patterns: reduce bleeding, reduce warping, support structures, etc.


Apr. 8th, 2013: Firmware Command List

This is the list of binary commands.

# Command Note
frequently used commands (1 byte)
0 no operation does nothing, can be used to align bytes or mark the end of strings
1 fire pattern fire a pattern from the binder cartridge and advance to the next firing position
2 cFire pattern the next fire command will also fire this pattern on cyan
3 mFire pattern the next fire command will also fire this pattern on magenta
4 yFire pattern the next fire command will also fire this pattern on yellow
5 bFire pattern the next fire command will also fire this pattern on black
less often used commands (2 bytes)
128 new line formatting helper: start a new line in the source code
129 annotation text add an annotation in the source code
130 debug text output debugging information through the terminal
131 cls clear display
132 cln lineNo clear a line in the display
133 display text display a line of text in the display
134 displayAt x, y, text display text in the display (0, 0 is top left)
135 print text print some text at the current position using the black ink cartridge
136 motorOff motormap switch one or more motors off (stepper driver goes into sleep mode)
137 motorOn motormap switch one or more motors on; if any was off, this causes a delay
138 fireNozzle cartridge, nozzle fire a single nozzle on the specified cartridge
139 beep freq, duration give an audible warning
140 blip give a short audible warning
motor movement
144 xGoto absPos move x to an absolute position
145 xMove relsteps move x by a positive or negative number of steps
146 xHome maxsteps move x to the endstop and reset counter
147 yGoto absPos move y to an absolute position
148 yMove relsteps move y by a positive or negative number of steps
149 yHome maxsteps move y to the endstop and reset counter
150 z1Goto absPos move z1 to an absolute position
151 z1Move relsteps move z1 by a positive or negative number of steps
152 z1Home maxsteps move z1 to the endstop and reset counter
153 z2Goto absPos move z2 to an absolute position
154 z2Move relsteps move z2 by a positive or negative number of steps
155 z2Home maxsteps move z2 to the endstop and reset counter
156 rStart speed start the roller at the specified speed
157 rStop stop the roller
flow control
160 delay mSec delay execution by n milli seconds
161 repeat n repeat the next fire command n times
162 seek pos move execution of this file to a new position
163 waitForButton buttonmap don't do anything until a button is pressed
164 onButtonSeek button, pos if the given button was pressed during the last wait, skip to that program position
settings
192 setFireRepeat n sets the number of ink drops per fire command per nozzle
193 setFireAdvance n sets the number of steps that the head advances in y after firing
194 setXSpeed n set the speed for the next x motion commands
195 setYSpeed n set the speed for the next y motion commands
196 setZ1Speed n set the speed for the next z1 motion commands
197 setZ2Speed n set the speed for the next z2 motion commands
complex commands
1024 spreadPowder layerHeight spread one layer of powder, advancing z1, but not z2
1025 writeConfig write machine configuration to SD card

  • motormap: 1 = x axis, 2 = y axis, 4 = z1, 8 = z2, 16 = roller
  • buttonmap: 1 = ??


Comments (0)