Friday, 15 July 2016

DuetWifi Thermal Testing

The DuetWifi is our new advanced 3d printing electronics board based on the Duet 0.8.5 but completely redesigned with David Crocker (DC42 on the reprap forums). We are currently running a pre-order which is due to end 17 Jul 2016 with the first boards delivered in the first week of August. We have also had a batch of pre-production beta boards made which are with beta testers right now. We put one of the boards through thermal testing by Andy Hingston (who was part of the Duet 0.6 design team). This blog post will deal with the thermal testing, I have future posts planned to detail the hardware design of the DuetWifi.

The main concern for heat generation on the board are the stepper driver chips. The TMC2660s are rated to 2.8A RMS, however we have limited them in firmware to 2A for now. What our testing has shown is that the TMCs drivers, coupled with the board design mean these drivers will run cool in most "normal" desktop size 3d printers (~1A motor current) and have the capacity to scale for significantly larger printers comfortably (~2A motor current).

In order to do a comprehensive test we decided to test the TMCs with 1A, 1.5A and 2A (RMS) of stepper motor current in three conditions:

  1. With the motors held in a "half step": in this condition there is 100% of the current flowing through half of the stepper driver with 0% through the other half.
  2. With the motors held in a "full step": in this condition there is 1/Sqrt(2) of the current ~70.7% of the maximum current flowing through both halves of the driver.
  3. In a normal microstepping mode with a step frequency of 8000 steps/min at 16 microsteps, interpolated by the drivers to 256 microsteps.
In all cases we allowed the temperature to stabilise for 20 mins from an ambient temperature of ~25C

The results: in summary the drivers and heatsinking design on the board have performed really well. At 2A RMS in the "half step" condition (the worst case) we saw the temperature rise to 87.7C (a 62.7C rise from ambient). In the actual use case of the normal stepping at 2A it was a rise to 71C (a 46C rise from ambient). All these tests were performed powering X,Y and Z drivers on the board at the same time so that the Y driver had hot drivers on either side of it. We expected it to get the hottest but actually Z was generally the hottest by about a degree indicating the importance of the PCB to dissipate the heat.

The thermal camera output is below; click on the pictures for larger images.

1A Half Step hold
DuetWifi Thermal Test 1A Half Step Hold - 48.7C

1.5A Half Step hold
DuetWifi Thermal Test 1.5A Half Step Hold - 62.1C

2A Half Step hold
DuetWifi Thermal Test 2A Half Step Hold - 87.7C - Front View
This view of the back of the board shows just how effective the heatsinking on the back layer is.
DuetWifi Thermal Test 2A Half Step Hold - 71.0C - Back View

1A Full Step hold
DuetWifi Thermal Test 1A Full Step Hold - 51.0C

1.5A Full Step hold
DuetWifi Thermal Test 1.5A Full Step Hold - 62.1C

2A Full Step hold
DuetWifi Thermal Test 2A Full Step Hold - 79.8C

1A Normal Stepping
DuetWifi Thermal Test 1A Normal Stepping - 41.8C

1.5A Normal Stepping

DuetWifi Thermal Test 1.5A Normal Stepping - 55.5C

2A Normal Stepping

DuetWifi Thermal Test 2A Normal Stepping - 71.0C

The other area of interest as far as power dissipation on the bard was the heated bed MOSFET and associated power traces. We wanted to carry at least 15A so I increased the width of the trace and doubled it up (both front and back). With 15A on constantly we saw a stable temperature of 88.5C at the hottest point.

DuetWifi Thermal Test 15A Bed MOSFET - 85.3C on Front power (-) trace, 81.9C on MOSFET

DuetWifi Thermal Test 15A Bed MOSFET - 88.5C on Back power (+) trace

Tuesday, 8 March 2016

Updating RepRapFirmware and PanelDue firmware using Mac OS X as a host

(Guest post by Michael Hackney, and

Recently, I worked out the process for updating Duet and PanelDue using a Macintosh computer as a host. Once you have the right tools and information, it's quite simple. I've tested this on Mac OS X Yosemite and El Capitan.

Firmware updates for both the Duet and PanelDue are performed via USB. Before we can update that firmware though, we need to install the right tool. This tool is called BOSSA and is an Open Source flash programmer for the Atmel SAM microcontroller used on both the Duet and PanelDue. Unfortunately, there are many different versions of BOSSA, including both command line (BOSSAC) and GUI versions, but only a few of them will actually work! Not to worry, I'll make sure you get a workable version.

You can get the BOSSAC command line utility with the Arduino IDE 1.6.1 release. This release is no longer supported but since you can install multiple versions of Arduino IDE on OS X, it isn't an issue to install it. Another option is to find a copy of the BOSSAC utility and use that. I've extracted BOSSAC from the Arduino 1.6.1 IDE and made it available on my Google drive: BOSSAC for Mac OS X.

2) Get the new firmware
Once you have the BOSSAC utility, you need to download the firmware you are planning to install. These are found on David Crocker's GitHub here:

PanelDue firmware

I like to keep the BOSSAC utility and the firmware versions all in one place in a single folder for convenience.

3) Find the Duet's or PanelDue's port number
This is the most finicky step in the process but this should make it a little easier. The tricky part is that the device we need is not available until you press the Erase and Reset buttons on the Duet or PanelDue. But, there already may be devices with similar names so it isn't obvious which one to use. So, I look in the device directory (/dev) first, then Erase-Reset the board and then look in the device directory again to see what's new!

  • Launch the Terminal application and type "cd /dev" and press [return] (without the quotes). /dev is the directory where Mac OS X keeps all of its device files.
  • There are lots of devices in the directory but we are only interested in a particular type. You can see everything by issuing the "ls" command. But to narrow it down to the USB device we need, run "ls | grep tty.usbmodem". 
  • Now hook up the USB cable to your Duet or PanelDue and press the Erase button and then the Reset button. 
  • Run "ls | grep tty.usbmodem" again and watch the output for the new device that should be found. It will look something like tty.usbmodem14444421 but most likely with a different number sequence.
Now we're ready to flash the new firmware. I'll show two ways of doing this depending on if you are using the Arduino IDE BOSSAC or the "naked" BOSSAC. In both cases you run BOSSAC from a Terminal window, so launch Terminal if needed. Then, "cd" into the folder where you keep your firmware .bin files to make it easier.

4a) Running BOSSAC from the Arduino IDE
Type the following command into the Terminal window but replace the YOUR_PORT_# with the port number you found in step 3 and the firmware version you are uploading. Note that this assumes several things: 1) that you installed the Arduino 1.6.1 IDE in your Applications folder and that you have "cd" into the folder that contains the firmware. Make sure you type it exactly and don't forget the "-R" at the end:
/Applications/ --port=tty.YOUR_PORT_# -U true -e -w -v -b RepRapFirmware-1.09o-dc42.bin -R

4b) Running BOSSAC directly
This example assumes that you have placed the bossac utility in the same folder with your firmware .bin file and you have "cd" into the folder in a Terminal window. Make sure you type it exactly and don't forget the "-R" at the end:

./bossac --port=tty.YOUR_PORT_# -U true -e -w -v -b RepRapFirmware-1.09o-dc42.bin -R

Here is an example of what you should from bossac as it runs:
./bossac --port=tty.usbmodem1444431 -U true -e -w -v -b RepRapFirmware-CHTest-3.bin -RErase flashWrite 309308 bytes to flash[==============================] 100% (1209/1209 pages)Verify 309308 bytes of flash[==============================] 100% (1209/1209 pages)Verify successfulSet boot flash trueCPU reset.
When bossac finishes, it resets the board and you are ready to go.

Friday, 26 February 2016

How to compile RepRapFirmware-dc42 for Duet on Mac OS X

(Guest post by Michael Hackney, and

As RepRapFirmware gains momentum, more users will want to contribute to its development. There are some good resources for setting up a development environment for Windows computers but very few resources for developing on Mac OS X. I tried for several months to setup my environment and wasn't able to, so I pushed forward and started with a clean slate and documented every step along the way.  Now that it's done, I can install the development environment from scratch in about 15 minutes.

As I discovered, one of the more significant challenges I confronted was the interdependence of specific versions of the various tools and even the operating system. I worked through each of these with the goal of using the most up-to-date version for each component possible, starting with the operating system. Please pay particular attention to these versions as you work through the setup process - they are highlighted in bold. I highly recommend starting with the specific versions I used and once you have your environment running, update components one at a time if necessary. And if you do that successfully, please leave a comment here so others can benefit.

The reference date for this process is 2/14/2016.

Start with your Macintosh updated to Mac OS X: El Capitan 10.11.3 I have not attempted this on earlier versions of OS X so if you are successful, please leave a comment. I'll also leave comments when new versions of OS X come out.

1) Get the tools and setup the basic environment

The first step is to download the development tools. This development environment is based on the Open Source Eclipse IDE. However, a special plug-in to integrate the Arduino tools is required. Putting together this environment was a big challenge but now there is a pre-built Arduino Eclipse  IDE that eliminates the grunge work. A big thanks goes out to Jantje for this work!
Create a folder to use for the root of everything. Please note, once you start this process you can not change the path later. Eclipse is very finicky about installation path so pick something you can live with. Also, DO NOT include spaces in the pathname. NONE!  I created a folder named "Development" on my desktop and will use that for this document. My path looks like:


Now copy the Eclipse tar file and Arduino file into Development and unpackage them (on OS X you can simply double-click the tar file to untar it). You can delete the tar file once you've unpackaged it.

Next, open the package (by control-clicking it's icon) and navigate to /Contents/Resources/Java
  • Copy the /libraries and /hardware folders into your Development folder.
At this point, your Development folder should look like:
  • Create a folder named workspace inside the eclipseArduino folder.
2) Configuring Eclipse

Now you can launch he Eclipse application - called eclipseArduinoIDE in the eclipseArduino folder. When Eclipse asks you for the workspace, click [Browse...] and navigate to your Development/eclipseArduino/workspace folder and click the [Open] button. Check the "Use this as default" box and click [OK].

Click the EclipseArduinoIDE menu and choose "Preferences..." then select the Arduino tab in the list on the left. 
  • Set the "Arduino IDE path" to your
  • Set the "Private Library path" to the library folder you copied to your Development folder
  • Set the "Private Hardware path" to the hardware folder you copied to your Development folder
  • Click Apply then [OK] (choose [OK] for the dialogs that tell you Arduino is newer than the plugin)
Here's what the dialog should look like (with your Development path substituted of course) when you are done:

Next, click the Arduino menu and select New Sketch. Set the project name to RepRapFirmware and then make sure sam/boards.txt is selected. Select Arduino Due (Native USB Port) for board. You can set the COM port now also but if you don't know it, it can be set later.

Quit Eclipse.

3) Setup the RepRapFirmware

Download the latest version of dc42 dev branch of RepRapFirmware: (Click the [Download ZIP] button at the upper right). At this writing version 1.09r-dc4 is the latest). Copy all of the files to the RepRapFirmware folder in your workspace folder.

Copy the patched libraries out of RepRapFirmware/ArduinoCorePatches into the package. The path is Use the "Merge" option and "Apply to All" when the copy dialog asks what to do. Remove the ArduinoCorePatches folder from the RepRapFirmware folder (you can delete it).

Launch EclipseArduinoIDE and setup the project like this:
  • Remove the RepRapFirmware.ino file from the RepRapFirmware Project list on the left - this will delete it from the filesystem too.
  • Select the RepRapFirmware project in the Project Explorer and control-click and select Refresh. All of the source files should appear in the list.
  • Select the RepRapFirmware project in the Project Explorer and control-click and select Index->Rebuild. 
Select the RepRapFirmware project in the Project Explorer and control-click and select Properties... at the bottom of the menu.
    • Find the C/C++ General/Paths and Symbols page. Now you need to add each of the library folders in the workspace/RepRapFirmware/Libraries folder to the GNU C list. Do this by clicking the [Add...] button. Then check the Add to all languages box and click the [File system...] button to navigate to the workspace/RepRapFirmware/Libraries/EMAC (the first folder library to add). Do this for each of the folders in the Libraries folder. It's a little tedious but gets the job done. 
    • You also have to explicitly add SD_HSMC/utility the same way.
    • You also have to add hardware/arduino/sam/system/libsam/include (this is the hardware folder you copied to your Development folder)
    • Then click [Apply] and click [Yes] to rebuild the indexes.
    When you are finished, your list should look like this:
    • Next click the C/C++ Build/Environment tab on the left list. 
      • Set JANTE.EXTRA.C.COMPILE to -std=gnu99 
      • Set JANTJE.EXTRA.CPP.COMPILE to -std=gnu++11
      • Find the A.BUILD.USB FLAGS variable and remove the manufacturer and product part - it looks like this: 
      • Now find all occurances of the compiler flag "-Os" and change them to "-O2". This is in:
      • Remove the '-w' option in A.COMPILER.C.FLAGS and A.COMPILER.CPP.FLAGS
      • Click the [Apply] button and click [OK] to exit the dialog
    That's It!

    It might seem a little tedious but you'll be rewarded with a RepRapFirmware development environment when you are done. I've successfully installed on four different Mac computers.

    If you have any questions, comments or additions please post a comment.

    Sunday, 25 October 2015

    Mini Kossel: Think3dPrint3d Release 3

    Think3dPrint3d Mini Kossel Release 3

    We have been selling our version of the Mini Kossel delta 3d printer for 15 months now. As is the nature of RepRap projects it has evolved along the way. We have marked these tweaks and upgrades and improvements as different versions of our kit and we are now ready to release our 3rd version - the Think3dPrint3d Mini Kossel Release 3. Though it builds on our other upgrades it is by far the most significant revision yet.

    More detail is set out below but in summary we are switching to 32 Bit Duet Electronics, 20x20 extrusions, IR probing for true autocalibration, as well as some other more minor improvements to the usability or ease of assembly of the printer. Of these the single biggest change is using the Duet electronics with David Crocker's improved RepRap Firmware which allows for segmentation free delta printing and easy autocalibration.

    Since David implemented delta support in the RepRap Firmware we have had many enquiries about buying the kits with the Duet (and some customers chose to help out as unofficial beta testers). It has taken until now for us to bring everything together into a kit form, including thdetailed documentation, to ensure builders will get the same great experience assembling this version as the previous ones.

    Improvements in detail


    The Duet is a high powered 32 bit ARM-Cortex-M3-based 3D printing electronics solution which runs the powerful RepRap Firmware; more on this and the web interface later. With our kits in mind we designed a new 5-channel version of the Duet board with all the connectors, switches and power LEDs along one side. This allows for the electronics to be neatly mounted in the base of the printer with the USB, Ethernet, SD card, switches and power LEDs still fully accessible:

    Duet 0.85 mounted in the Mini Kossel base showing accessibility

    The new Duet V0.8.5 also has 2 extruder channels and so allows an easy upgrade path to dual extruders without an extension board, like the RAMPS in previous versions of the Mini Kossel, but unlike previous 4-channel Duets.

    RepRap Firmware and Web Interface

    David Crocker's RepRap Firmware takes advantage of the ARM chip's 32-bit processing power to provide true segmentation-free delta movement for improved smoothness and accuracy. Unlike most 8-bit firmware like Marlin, RepRap Firmware is precompiled and there is not normally any reason to modify or recompile it. The firmware is easy to configure with all the settings controlled through Gcodes in simple text configuration files. David has documented the setup of the configuration files in some detail on the RepRap wiki, for Cartesian printers, Delta printers and CoreXY printers.

    The Ethernet support allows direct connection to a network or ethernet port on a laptop, or connection via Wifi. The web interface by Christian Hammacher is simple yet powerful and can be run on any device that is on the same network as the printer.

    RepRapFirmware Web Interface running on Duet 0.8.5

    I have taken to using my phone to control my printers:

    RepRap Firmware Web interface on an Android Phone

    20x20mm extrusions

    These provide increased frame stiffness and allow the use of T-slot nuts which can simply be dropped into the extrusion channels when required, making assembly much easier.

    Mini Kossel part way through assembly showing 20x20 extrusions

    Frame assembly is greatly simplified with T-slot nuts

    Differential IR Probe

    David Crocker also developed a really great mini IR probe which, when combined with the functions within RepRap firmware allows for quick and accurate printer setup and calibration.

    Hot end assembly showing DC42's differential IR probe mounted next to the E3D V6 heater block.

    Below is a video showing the probe in action:

    Other Improvements

    To further simplify the printer wiring we designed an effector wiring breakout PCB
    Effector breakout PCB
    Breakout PCB connected to hotend, IR probe, fans and wiring loom

    The extruder and E3D V6 hot-end are preassembled and tested. 

    Assembled and tested extruder
    Assembled E3D V6

    While the majority of our customers have had no issues since we switched from the JHead to the V6 in Release 2, a few have struggled with the V6 assembly. As this kit is designed for hassle free assembly we want to eliminate all the potential issues. The V6 is assembled, heated to 290C and the nozzle tightened in accordance with E3D's recommendations.

    We have included a top mounted spool holder for some time now, along with other tweaks and improvements suggested by our customers. For a full specification of the kit see our website.

    Open Source Hardware.

    As with everything we do the changes to the printed parts are available on our Github.

    More to come!

    We are also finalising the design and kit contents, and working on the documentation for a much larger Kossel, based to a large extent on David Crocker's supersized Kossel. It will optionally have a E3D Cyclops/Chimera dual extrusion hotend, 24V power and a massive 300mm diameter by ~480mm high print area. If you are interested in getting your hands on a Beta Kit then feel free to email us! Update 17 November 2015 - all 10 beta test slots have now been taken.

    Friday, 7 August 2015

    New Duet Electronics - Version 0.8.5

    RepRap 3D printers with multiple extruders are becoming increasingly common however the majority tend to have dual extruders rather than 3 or more. Released in December 2013, the Duet 0.6 is now an established 32bit 3d printing electronics solution that has proven to be popular and versatile. With this in mind we decided to extend the Duet 0.6 to support two extruders on one board and developed the Duet 0.8.5.

    The new features are highlighted below and importantly it features the same expansion header as the Duet 0.6 so it supports a Duex4 expansion boardA Duet 0.8.5 + a Duex4 gives support for 6 extruders. That's 9 stepper channels and 7 heater channels including the heated bed!

    Duet V0.8.5 (picture updated 20160111 to show polarised pin headers)

    We should thank David Crocker (DC42 on the RepRap forums) upfront for his helpful advice in the development of the Duet 0.8.5.

    New Features in Duet 0.85

    • A second extruder channel (E1).
    • A second PWM fan output.
    • E1 motor current controlled by the SAM3X8E DAC0 channel. Thanks to David Crocker for this idea.
    • Two "always on" fan pins.
    • Dedicated header for the PanelDue.
    • Dedicated probe header, supports many different probes including David Crocker's mini IR probe.
    • Additional pins accessed on the SAM3X8E processor to enable the new features.

    Improvements from 0.6

    • Lower noise components and circuit layout used for the 5V BUCK circuit.
    • Complete ground plane - reduce noise and potential ground loops.
    • Switches and power indication LEDS moved to the same edge as the SD/USB/Ethernet for simpler access and indication.
    • VSSA now present on the expansion header. This combined with the changes to the Duex4 0.2a mean that analogue ground is now used for all 7 temperature measurement channels.

    Other Changes

    Not necessarily improvements but changes to simplify the board or reduce component count:
    • USB is now a simple USB 2.0 device, rather than a Host/Device as before. This was never used on the 0.6 and removing it reduces component count.
    • Removed the IDC headers for the heatbed and motor/hotend wiring loom. The footprints took up valuable board space and I am not aware of a printer that used a complex loom terminated in a single IDC.
    • The FAN MOSFETs are now PMV40UN2R FETs which are lower power but more than adequate for fans and other lower current devices. They also don't use a second mosfet to increase turn on voltage, like in the 0.6 design, as that was overkill. This means they are inverting (use M106 I1 to change)
    • Extruder thermistor headers and fan headers moved towards the middle of the board to allow for the same board size as the Duet 0.6 to be used.
    • In order to support a 7th heater channel (Extruder 6) along with two PWM fans the PWM pin had to be shared. This means that you can't run 6 extruders AND 2 PWM fans at the same time.

    Board Connections

    Duet 0.8.5 Connections

    The expansion header pins have changed slightly as shown in the picture below:

    Duet 0.8.5 Expansion header pins back view
    The pins on the Duex 0.6 that went to the extruder E1 on the Duex4 have been diverted to E1 on the Duet 0.8.5. New pins now go to E5 in place of E1 on the Duex4

    Opensource Hardware

    In the same manner as the Duet 0.6 the Duet is based on the Arduino Due, and the KiCAD source files are released under the CERN OHL 1.2 license, which means you are free to modify them and distribute products based on them, as long as you share your modifications under the same license. We believe this is a much more appropriate license for Open Hardware than a Creative Commons/GPL or other licence based around copyright.

    The Duet 0.8.5 source files are available on GitHub so feel free to fork the project and modify away!

    Duet 0.8.5 developed with the Open Source KiCAD EDA suite

    KiCAD has continued to improve since I started to develop hardware over 2 years ago. It is a powerful, Open Source design suite which means that the source files for the Duet are open for anyone to use and so is the software needed to modify them.

    Firmware & Webinterface

    The Duet 0.8.5 runs RepRapFirmware, the linked github page has the Think3dPrint3d latest version based on David Crocker's fork. I have made the changes required to support the additional pins, extruder multiple PWM fans and hopefully this will be merged into David's fork shortly.

    The firmware has also improved substantially since the Duet 0.6. The majority of these improvements Think3dprint3d can take no credit for as they are the work of the RepRap community.

    David Crocker has done excellent work in optimising the firmware and implementing segmentation free support for Delta printers. Old-style firmwares rely on segmentation to calculate movement but this can add printing artefacts. On David's fork the delta transform is calculated for each step, i.e. it's segmentation free, and thus the quality is higher. This is only possible due to the higher processing speed of 32 bit electronics.

    Christian Hammacher (on the RepRap forums as zombiepantslol) has done a fantastic job continuing to improve the web interface:

    Updated RepRapFirmware Web Interface with 6 extruders - Large Screen (PC) view
    I am now also using the webinterface from my mobile, here are a couple of screenshots of that:

    RepRapFirmware Web Interface on Mobile

    RepRapFirmware Web Interface on Mobile - Print page

    Production & Availability

    The Duet 0.8.5 boards are being produced for us in the UK by a local electronics manufacturer. The first batch is finished and available on our website:

    Also available as a bundle with the Duex4, and I will be very excited to see someone using all 6 extruders!

    Sunday, 12 April 2015

    Duex4 V0.2a - Minor Updates

    I have made a slight revision to the Duex4 v0.2 4 extruder expansion board for the Duet 3d printing electronics, the revised design is the Duex4 v0.2aThe revision is to add analogue GND to the expansion board input header connected by either a fly lead (Duet v0.6) or directly (later Duet versions).

    Analogue GND should have been used from the beginning but I left it out by mistake. This omission lead to noisier temperature readings on the expansion board than on the Duet (as documented, with a fix, by David Crocker). This was annoying but I did not see a drop in performance as the thermal mass of the hotends was enough to cancel out any temperature swings commanded by this noise. None the less it needed to be fixed, but in a way that allowed the Duex4s to still be compatible with the Duet 0.6 expansion header.

    In the schematic you can see that pin 39 of the expansion header how connects to a jumper, and then on to VSSA (analogue GND) within the expansion board.

    AD 12 used to be on pin 39 however it will be used later Duet versions for the probe input on a header on the main duet board.

    This allows for analogue GND to be fed in via pin 2 of the header on a Duet v0.6 or for a jumper to be used on later duet boards.The pictures below show the Duet v0.6 and Duex4 v0.2a with the analogue GND fly lead connected to the heated bed thermistor GND.

    This fly lead can also be connected to the hotend thermistor ground screw terminal:

    or VSSA Pin 38 on the 40 pin motor loom header:

    All V0.2a Duex4s will be supplied with the necessary fly-lead for hooking up the analogue GND as described above.

    The updated KiCAD source files are available on our Github, licensed under the CERN OHL v1.2