Updating the FSR Endstop Controller Firmware

The FSR Endstop Controller board is built so you can flash new firmware onto the board, and I’m providing pre-built hex files on Github, which you can find here: https://github.com/JohnSL/FSR_Endstop/tree/master/Hex%20Files

In this post I’ll describe how to download one of those hex files to your FSR board.

What you’ll need

Before you get started, you’ll need the following:

  • USB programmer. You can find more information about programmers on AVR Tutorial: Choosing a Programmer. I’m using a Pocket AVR Programmer. Both Sparkfun and Adafruit both have other programmers. In any event, you’ll need one that has a cable with a 6-pin connector
  • Arduino. I installed Arduino 1.0.5-r2. Even though you won’t be using this directly, you’ll be using the avrdude program included with the installation
  • Six-Pin Header

Adding the programming header

Solder in either a 2 by 3 pin header, or two rows of 3 pins as shown below. You’ll be connecting the programmer to these pins, and the board will also receive power from the programmer.

P5021907 Cropped_400

Connect the programmer

Plug your programmer into your computer, and then connect the cable between the programmer and the FSR board as shown. Note the direction of the cable coming away from the FSR board

WP_20140504_10_14_37_Pro_600_2

Also notice that the green power-on LED is on once the programmer is attached, as the FSR board receives power from the programmer.

Running avrdude

The final step is to send the new firmware to the board. The instructions below are for Windows. You can find more information about using avrdude here: Starting out with avrdude. First, locate where you have Arduino installed.  The avrdude program will be in a folder under that location: hardware\tools\avr\bin\avrdude.exe. Copy this full location.

Open a command prompt and navigate to the location where you’ve downloaded one of the hex files. Then run this command (all on one line):

C:\Users\John\Downloads\Arduino\arduino-1.0.5-r2\hardware\tools\avr\bin\avrdude.exe -p t861 -c usbtiny -U flash:w:"FSR_Detector 1.3.hex"

You’ll want to substitute your actual path to avrdude for the one here, and you’ll want to use the actual name of the hex file. You should see progress information from avrdude while it’s downloading and then verifying the firmware. While the firmware is downloading, the green LED on the FSR board will be dark. It will come back on once the firmware starts running again.

Comments