As promised in my previous post, I have uploaded the gerbers, schematic, and bill of materials for the 3D Printer Stellaris Launchpad Booster Pack. I have also uploaded the firmware to Github for others to use. The firmware is released under a GPLV3 license and is available here: http://www.github.com/mroy/stellarap

Above you can see a couple of prints that I have done on my printer. The first is a scripted vase and the second two are a couple of My Little Pony models (Pinky Pie and Rainbow Dash). All of the above models are from thingiverse, a great source for printables. Note that the pony models were fairly time consuming because of the complex supports required for the tail, hair and wings.





Hardware

stepper_schematic.pdf

stellarap.rar

stellarap_bom.xls

The RAR file above includes the following files:

stepper.apr – Aperature Library for GERBERS (you probably wont need this)

stepper.GBL – Bottom Layer Gerber

stepper.GBO – Bottom Layer Silkscreen

stepper.GBP – Bottom Layer Solder Paste

stepper.GBS – Bottom Layer Solder Mask

stepper.GM1 – Mechanical Layer 1 (connector/component outlines)

stepper.GM13 – Mechanical Layer 13 (connector/component outlines)

stepper.GM15 – Mechanical Layer 15 (component courtyards)

stepper.GTL – Top Layer Gerber

stepper.GTO – Top Layer Silkscreen

stepper.GTP – Top Layer Solder Paste

stepper.GTS – Top Layer Solder Mask

stepper_round_holes.drl – NC Drill file

Note that I forgot to include an outline on one of the mechanical layers, but it shouldnt be too hard to figure out from the outline of the polygons on the top/bottom layers.

Also note that this board design is designed for DIY PCBs. There are no hidden vias which makes it possible to stitch vias with a piece of wire and not having to worry about putting an IC on top of a solder blob. Also, note that the driver ICs do not have the greatest thermal pads because I was restricted to not using any thermal vias beneath them and since I was also soldering this by hand, I had to include a thermal relief connection to the pad beneath each driver IC. This allows them to be soldered by tinning the bottom pad of the chip, tinning the pad beneath the chip, applying lots of flux, and then heating up the entire thermal pad with a soldering iron tip while the chip is on the pad. This seems to work OK, but I have also added a large chipset heatsink from an old mother board that sits on top of all four driver chips with a bit of thermal compound. The heatsinking seems to work fine for keeping them cool at the currents that I am running them.

If you are going to have this board manufactured properly, I would highly suggest adding thermal vias beneath the driver ICs and removing the thermal reliefs. This should eliminate the need for a heatsink entirely. Also use 2oz copper if you can.

The hardware also includes a 3.3V regulator that is meant to provide power to the Launchpad. For this reason, you should remove the jumper on the LaunchPad that connects the USB power to the onboard regulator and make sure that the switch is set for device power.

Notes on the Bill of Materials:

The BOM lists the driver chip as A4984, but the A4982 should be used instead as it has better microstepping.

The connectors J2,J3,J6,J7,J8 are Molex right angle .1″ pitch connectors such as the 0705550004 (WM4167-ND on DigiKey), but in a pinch any 0.1″ pitch connector should be usable.

C12 and C23 are 100uF aluminum electrolytic capacitors. Anything ~100uF or larger that seems to fit in the hole spacing and has at least a 12V voltage rating should be suitable for these.

Also, take a look at the schematic and you will need to tune the current with two resistors for each stepper. Do not run them with too much current or you will risk overheating your steppers. I think I am running mine at around 800 – 1000mA. I have the extruder and z axis a bit higher than the X and Y. Also, in the firmware I may have switched around which axis is which for the drivers on the board.

Firmware

As mentioned in the summary, the firmware is available here:

http://www.github.com/mroy/stellarap

The README.md file from the repository is copied here for your reference:

Stellarap http://www.stellarcore.com/ This is a firmware for a stellaris launchpad based controller for a 3D printer. License: The Stellarap code is licensed under the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007. The license is available here http://www.gnu.org/licenses/gpl-3.0.txt and is also provided in the accompanying LICENSE file. This License MUST be included in all distributed versions of this code. All of this software is provided AS-IS with no implied warranty or liability under sections 15, and 16 of the GPL V3. If your printer burns down your house, it’s not my fault. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Pre-requisites: ARM Cortex-M4 toolchain such as: GCC Arm Embedded https://launchpad.net/gcc-arm-embedded CodeSourcery Lite GCC EABI for ARM http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite Stellarisware Software Package (since renamed to TivaWare): This software library includes functions and libraries for many of the on-board peripherals used in the chip.

The library has also been compiled and optimized in the ROM that is available on the chip itself, meaning that library calls to TivaWare functions cost no program memory. It also includes some special initialization stuff that is needed for the particular ARM core in the chip. http://www.ti.com/tool/sw-tm4c C Libraries I have used my own compiled version of Newlib to provide libc.a and libm.a which provides some standard C functions as well as math functions. It is likely that you will be able to find a pre-compiled version of newlib or even use the version that is included with the toolchain (above). http://sourceware.org/newlibhttp://eehusky.wordpress.com/2012/12/17/using-gcc-with-the-ti-stellaris-launchpad-newlib/ Recommended Software: OpenOCD compiled with support for the TI Link This is a great software that I use to debug with the Stellaris Launchpad. It allows you to use the built in TI Link that is on the development board with the GDB included in the GCC toolchain. Instructions for building/using the Stellaris Launchpad with OpenOCD are here:http://processors.wiki.ti.com/index.php/Stellaris_Launchpad_with_OpenOCD_and_Linux Build Instructions: Set your path to include your compiler toolchain. $make clean $make Flash/Debug Instructions: Start OpenOCD with the stellaris connected through the development USB connector. $./openocd & $arm-none-eabi-gdb main.axf target extended-remote :3333 monitor reset halt load monitor reset init run Acknowledgements: Great thanks to the folks in irc.freenode.net/#reprap for the help to understand 3D printing and for helping me to understand what the firmware should be doing. Special thanks to Kliment for his help explaining the Marlin firmware, which my firmware may bare a striking resemblance to.

A brief description of the files included in the repository:

104JL1A REV NONE (R-T Table).xls – this is an Excel file for one of the thermistors I have used. This was used to generate a table in the firmware

B57540.pdf – this is a PDF datasheet for another thermistor that I have used.

B57540G0104F000.xls another excel for the second thermistor (I should probably remove these from the repository, but maybe later)

LICENSE – a copy of the GPLV3

LM4F.ld – A public domain linker script written by Elias Onal for Thumb2 Newlib Toolchain projects

LM4F_startup.c – Some startup code for the processor. Written by Mauro Scomparin (license included in the source)

Makefile – a makefile for compiling the project based on one from Mauro Scomparin (license included). May need slight modification for paths to stellarisware and newlib binaries.

createTemperatureLookup.py – A python script based off of http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html Modified to generate a table in the form that my firmware uses.

delay.c / delay.h – A method to provide accurate delays based on a timer ISR.

endstops.c / endstops.h – Methods to debounce and handle an endstop ISR.

heaters.c / heaters.c – Methods to PI control the heatbed and hotend heaters. heaters.c includes the thermistor tables to use as well as the proportional and integral gain constants. Note that there currently is no derivative gain, but this has very little effect on the heaters which are already incredibly slow to react to changes, so there should be no real need for it. PI gains have been experimentally found to work reasonably well with my current setup. Your milage may vary and you will likely want to play with these a bit.

interpreter.c / interpreter.h – This is where the GCODE is interpreted. Current implemented commands include: G0,G1,G4,G21,G22,G28,G90,G91,G92,M0,M1,M17,M18,M84,M82,M83,M104,M140,M105,M110,M112,M999 (heater test). It also supports the N line number and checksums that are standard in most firmwares.

planner.c/planner.h – This is where the magic of block planning happens. When the interpreter needs the machine to move, it calls the planner with coordinates and the planner translates this into a block for the queue with steps/directions. Planner.c includes the axis steps/mm and maximum speeds. Also includes a special routine for homing.

stepper_control.c / stepper_control.h – This is where the stepper control is done and the block queue is processed by a timer ISR. stepper_control.h contains block_queue_size, max step rate, min step rate, maximum accelerations, and maximum jerk settings. Also includes axis settings that control the direction of each axis stepper motor.

main.c – The main program. It initializes a bunch of stuff and then starts an infinite loop waiting for commands. Note that all commands are expected to come in via the debug UART at this time. In the future it would be good to update the firmware to use it’s own USB connection for this.

Finally, I would like to mention that if you would like to try out the firmware without actually building a machine and you have a Stellaris Launchpad kicking around, you can build and program the firmware and it will emulate a printer with the three RGB led, each colour corresponding to the X,Y, or Z axis.