Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Flashing an Arduino bootloader on Totumduino (via ICSP)
This guide is focused to upgrading Totumduino v1 at FABlin firmware 184.108.40.206, after installing Colibri i was not able to communicate with the Totumduino and also i was not able to upgrade to a newer firmware, so i've decided to try to reinstall the Arduino bootloader using ICSP method.
Tested with Raspberry Pi 1 and 3, with success.
If you connect something wrong, you can fry your Totumduino. The author of this wiki (Alessio Cavalieri) assumes no responsibility for any damage caused by the failure of the procedure, and consequent damages to things and persons, FLASH AT YOUR OWN RISK!
If you not disconnect the fans (as explained in steps 3 and 4) the flashing may fail because the PC must feed the Totumduino and also the fans.
If you not reconect the fans (as exaplained in steps 13 and 14) you risk to fry the Allegro A4988 stepper drivers due to overheat.
Double check all disconnections / reconnections.
- USBASP programmer (official web site: http://www.fischl.de/usbasp/ ), on Linux and Mac it works out of the box, in Windows require a driver, refer to the offical web site for installation - it cost 1 to 5€
- ATMEL ICSP adapter from 10 to 6 pin (called also USBASP 10 to 6 Pin Adapter ISP 51 for ATMEL AVR USB Programmer for Arduino) - it cost 1 to 3€, generally in bundle with an USBASP it's cheap
- avrdude installed on your PC (official web site: http://www.nongnu.org/avrdude/ ) - in this guide i use it on Ubuntu 16.04 operating system, you can easily install avrdude on Ubuntu via command line with
# sudo apt-get install avrdude
- an internet connection for downloading the bootloader from Arduino official Github repository
- Poweroff the FABtotum via FABui
- Turn off the power switch and disconnect the mains cable
- Remove the Raspberry Pi, disconnect the Raspi connector from Totumduino connector
- Disconnect the Totumduino cooling fan (big fan)
- Disconnect the electronic vane fan (small fan)
- Connect the USBASP ICSP programmer to the ICSP port on the Totumduino !!! WARNING RESPECT DIRECTION !!! the pin 1 of the programmer must correspond to pin 1 of the totumduino (click to on image to get larger version)
- connect the USBASP to a USB port of a PC, the Totumduino will beep, it will be powered via USBASP
- make a backup of the actual firmware of the Totumduino
# mkdir flash_totumduino # cd flash_totumduino # sudo avrdude -p m1280 -cusbasp -v -U flash:r:original_flash.hex:i
This commands make a copy of the flash of the Totumduino in the file original_flash.hex
- download from Arduino's Github official repository the official Arduino bootloader for the Atmel atMega1280 microcontroller
# wget https://raw.githubusercontent.com/arduino/Arduino/master/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex
- flash the original bootloader on the Totumduino
# sudo avrdude -c usbasp -p m1280 -U flash:w:ATmegaBOOT_168_atmega1280.hex
- If all goes ok, a green led on the Totumduino will flash (this is the standard Arduino blink sketch behaviour)
- Disconnect the USBASP from the USB port of a PC
- Disconnect the USBASP ICSP programmer from the ICSP port on the Totumduino
- Reconnect the electronic vane fan (small fan)
- !!! VERY IMPORTANT!!! reconnect the Totumduino cooling fan (big fan) !!! This fan cool the Allegro A4988 stepper motor drivers !!!
- Reconnect the Raspberry Pi
- Power on the Fabtotum
- Wait 2 minutes, no ambilight are powered on (alone in the dark) and no beeps because there is no firmware on Totumduino.
- Connect to the FABui web interface
- Go on Maintenance -> Firmware -> Firmware 220.127.116.11 (Download) -> click on Flash Firmware blue button
- If all goes right, you can enjoy the latest software upgrades on a V0 FABtotum
P.s.: The USBASP programmer is a my old friend :) https://itink.it/wiki/doku.php?id=en:tinkering:microcontrollers:miniusbdiggerjoystick