Email me at serendipity.synth@gmail.com with any questions or comments, or if you are interested in obtaining a device.
The Primary DFAM Thing documentation can be found here.
The DFAM Thing Quick Start guide can be found here.
Since the D-Thing has evolved quite alot over the last 3 years, there are a few different variations to account for in the firmware.
DFAM Thing 1.1
or DFAM Thing 1.1b
printed on the PCB.The easiest way to update the firmware of a Standalone D-Thing or the 8HP Eurorack Module is using a web browser that supports WebSerial, such as Chrome, Edge or Opera. (Unfortunately neither Safari nor Firefox support this technology at this time.)
The 12HP Eurorack module incorporates a completely different microcontroller, and has itself gone through 1 revision. It’s two firmware versions can only be uploaded on the command line (details are further below).
Earlier D-Things use an Arduino Nano running what is called the Old Bootloader, while recent ones all use the New Bootloader. For each firmware below there is a button that communicates with the nano in either way. There is no danger selecting the wrong option - the upload will simply fail.
Bootloader | Model A | Model B | Model C | Model D | 8HP Module |
(Original) | (Surface mount) | (OLED) | (Current) | (Eurorack) | |
New | |||||
Old |
Alternatively you can use avrdude on the command line to update the firmware, and at the moment this is the only option available for the 12HP D-Thing+ module.
Updating the firmware of the DFAM Thing requires the free command line program avrdude. Here are links to download the command line version for Mac, or Windows with the necessary configuration file (plus a single dll for the Windows version).
Download the latest firmware hex file for your particular model by right clicking the links below and selecting the Download Linked File As…/Save link as… option. Save the file in the same folder you have the avrdude program and configuration file (avrdude.conf).
For the standalone version, connect the DFAM Thing to a USB port on your computer, and toggle the small switch on the board so it is closest to the Nano. This disables the MIDI circuit, and allows avrdude to communicate with the Nano via its serial port. (Note: in some devices, the switch has a red actuator and needs to be switched away from the Nano to disable MIDI.)
For the Eurorack version, use a mini-USB cable to connect the Arduino Nano to your computer. Rack power is not needed.
Since avrdude is a command line program, you will need to open a terminal on mac, or a command prompt on Windows. Additionally, you will need to find the name of the serial port. On Windows you can use the Device Manager, and on a Mac you can run:
ls /dev/cu.usb*
An Arduino Nano contains a special program, called a Bootloader, for uploading code to the device. Recent D-Things made use the “new” bootloader, but many of the earlier ones use an older one. As a result, there are two possible versions of the update command, but there is no danger in using the wrong one – you will just see sync errors. The only difference is the baud rate.
If running on a Mac you get an error along the lines of This program hasn’t been verified by Apple, run the following command to make it happy again:
xattr -d com.apple.quarantine avrdude
Updating the D-Thing+ firmware via the command line has two steps. The first switches the Nano into programming mode, and the second uploads the firmware file.
On a Mac the commands will have the form:
stty -f /dev/<serial port> 1200
./avrdude
-Cavrdude.conf -v -V -patmega4809 -cjtag2updi -P/dev/<serial
port> -b115200 -e -D -Uflash:w:<hex file>
“-Ufuse2:w:0x01:m” “-Ufuse5:w:0xC9:m” “-Ufuse8:w:0x00:m”
{upload.extra_files}
and on Windows:
mode <com port>: BAUD=1200 parity=N data=8 stop=1
avrdude -Cavrdude.conf -v -V -patmega4809 -cjtag2updi -P
<com port> -b115200 -e -D -Uflash:w:<hex file>
“-Ufuse2:w:0x01:m” “-Ufuse5:w:0xC9:m” “-Ufuse8:w:0x00:m”
{upload.extra_files}
Note that you should have the second command ready to run right after the first, and that it needs to be entered as a single line.
The general format of the command to run on a Mac is:
./avrdude -c arduino -p m328p -C avrdude.conf -b57600 -P /dev/<serial port> -U flash:w:<hex file>:i
and on Windows is:
avrdude -c arduino -p m328p -C avrdude.conf -b57600 -P <com port> -U flash:w:<hex file>:i
The -b57600
option sets the correct baud rate for
the old bootloader.
Don’t forget to change the serial/com port to the value found
in Step 4, and change <hex file>
to the file
name for the hex file you wish to upload (including the extra path
details if it is not in the same directory).
For the new bootloader, the -b
option is not
required. So, the general format of the command to run on a Mac
is:
./avrdude -c arduino -p m328p -C avrdude.conf -P /dev/<serial port> -U flash:w:<hex file>:i
and on Windows is:
avrdude -c arduino -p m328p -C avrdude.conf -P <com port> -U flash:w:<hex file>:i
cu.usbserial-1430
, the command is./avrdude -c arduino -p m328p -C avrdude.conf -P /dev/cu.usbserial-1430 -U flash:w:DFAMEuro_1.4.hex:i
COM4
, the command isavrdude -c arduino -p m328p -C avrdude.conf -P COM4 -U flash:w:Latest/DFAM2_1.4_E4.hex:i
cu.usbserial-1430
with the old
bootloader, the command is./avrdude -c arduino -p m328p -C avrdude.conf -b57600 -P /dev/cu.usbserial-1430 -U flash:w:DFAM2_1.4_E4.hex:i
A successful update will see the program report reading, writing, and then re-reading the code on the Nano.
$ ./avrdude -c arduino -p m328p -C avrdude.conf -P /dev/cu.usbserial-1430 -U flash:w:DFAM.ino.hex:i
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "DFAM.ino.hex"
avrdude: writing flash (18482 bytes):
Writing | ################################################## | 100% 3.29s
avrdude: 18482 bytes of flash written
avrdude: verifying flash memory against DFAM.ino.hex:
avrdude: load data flash data from input file DFAM.ino.hex:
avrdude: input file DFAM.ino.hex contains 18482 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 2.46s
avrdude: verifying ...
avrdude: 18482 bytes of flash verified
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.
$
An unsuccessful run will generally fail with error messages like the below:
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfe
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfe
...
If you have trouble getting the update to proceed, try removing the Nano from the DFAM Thing to reprogram it, but be careful to put it back in the right orientation, and firmly in the sockets.
If you are updating a standalone device, flick the switch back on the DFAM Thing to re-enable MIDI.
Enjoy your updated DFAM Thing. :-)