Upgrading Ember's Motor Board and Front Panel

by cappiep in Workshop > 3D Printing

3091 Views, 9 Favorites, 0 Comments

Upgrading Ember's Motor Board and Front Panel

temp_-107785554.jpg

In addition to the microprocessor that's running the main system (the one you can upgrade by clicking upgrade firmware), there are two smaller chips called AVRs or ATmegas that control the motors and the front panel display. For early builds of the Ember these controllers haven't been configured to be software upgradeable, so they will need to be programmed with what's called an In System Programmer (ISP) initially. ISP just means that chip is programmed while it is installed on the circuit board as opposed to other methods where it has to be removed (like High Voltage Parallel Programming).

Get AVR Programmer and Download Avrdude

avr.jpg

For the upgrade, you'll need an AVR ISP. (An example is pictured above). This Instructable uses the USBTiny which is available from Sparkfun here https://www.sparkfun.com/products/9825 You can use your preferred programmer if you like you'll just have to head the avrdude -c option to name your programmer.

To update these chips we need something called avrdude that reads the program and communicates with the AVR and tells it what to do. Basically, avrdude just overwrites whatever is on the chip memory with a new file. For Mac the installation is pretty straight forward. For Mac download the latest Crosspack for AVR (at this link https://www.obdev.at/products/crosspack/download.... ) and run the .dmg. For Windows download the latest WinAVR (found here https://www.obdev.at/products/crosspack/download.... ) and run the .exe. avrdude is a command line tool so there wont be an icon or anything you'll be running it inside of the Terminal or Command Prompt.

On Windows only you'll need to install drivers for the USBTiny. Adafruit has the instructions for that!

https://learn.adafruit.com/usbtinyisp/drivers

The driver download is here

https://learn.adafruit.com/usbtinyisp/download

Program the Motor Board AVR

MBISP.png
20150515_142820.jpg
Screen Shot 2015-06-11 at 2.18.40 PM.png

Before you begin, make sure you are running firmware version 1.2 or later. You can check the firmware by holding the left button on the front panel. If you don't have the latest firmware update your printer by following these directions https://support.ember.autodesk.com/hc/en-us/articles/203661179-How-to-update-firmware

The USBTiny is an ISP all it does is translate what avrdude is telling it over USB into a language that the AVR can understand. You'll need to remove the front cover of the Ember to gain access to the ISP pins if you need help doing that see Step 2 in this other Instructable https://www.instructables.com/id/Supercharge-Your-... The motor controller AVR's ISP pins are on the left side and near the center of the printer (circled in green). There are six pins in two columns of three the USBTiny's will slide over these with the ribbon cable facing left towards the outside of the printer. Make sure you get all the pins in the plug! Once the USBTiny is plugged into the ISP pins and your computer you should download the twiboot.hex file and open a Terminal (or Command Prompt in Windows). In the Terminal you'll navigate to the directory where you downloaded the file then use avrdude to program the AVR. On a Mac the commands will looks something like this

cd /FOLDER/CONTAINING/TWIBOOT.HEX

avrdude -p m328p -u -U flash:w:twiboot.hex -c usbtiny

On Windows it will be the same except for you will use backslashes instead of forward slashes and you'll likely have to specify the disk.

cd is Change Directory so it just changes what folder the terminal is looking at, so if you downloaded twiboot.hex to your Downloads folder and your username is cappie the first command would look something like this on Mac

cd /Users/cappie/Downloads 

or this on Windows

cd C:\Users\cappie\Downloads

avrdude should program away and eventually give you a confirmation message then you can unplug the USBTiny from the ISP header pins. An example of successful output is above.

Downloads

Program the Front Panel Display

FPscrew.png
FPISP.png
temp_-188540346.jpg

Now you'll program the second AVR which is on the front panel. You'll need to remove the two screws holding the front panel display mount with a phillips screw driver (circled in blue). There is a cable connecting the front panel to the main board so don't just pull it out, it's long enough to leave attached. On the back, you'll see the same two columns of three pins which are the ISP header pins (circled in red). When you plug the USBTiny in the ribbon cable should be pointing to the left, don't miss any pins! Then the process is the same as programming the motor board even the file to upload is the same, open a Terminal and enter:

cd /FOLDER/CONTAINING/TWIBOOT.HEX 

avrdude -p m328p -u -U flash:w:twiboot.hex -c usbtiny

Reboot and Verify

Once you've finished uploading the firmware reboot your Ember and check that the LEDs on the front panel start spinning in a circle, this means that the new firmware is successfully installed. Happy printing!