Firmware

The latest firmware for both the AirRx and PTRx is available here: Firmware

You will also need a cable from Pololu: Programmer Cable

The receiver doesn’t need to be removed from the locomotive to be upgraded as long as you can get the programmer cable plugged in and the board powered up. This image shows the proper orientation of the programmer plug. The USB cable is powering this board since it’s just sitting on the bench.

The programmer should have a green led if everything is fine, plus two yellow leds that flash in sequence.

Download and unzip the PTRx26.zip file. Version 2.6 is the latest release as of August 2021. This version fixes a (rather severe) bug in the ESC physics code if the watchdog is enabled. DCC functionality was not affected.

It’s best to put this file on your desktop. When you unzip the contents of the file, you should see a list like this one. We are mostly interested in the prog.bat file.

The following instructions assume a Windows 10 machine and use the command line interface to perform the update. You can bring up a command window using the WINDOWS+R keys to get to the run option, then type in cmd to open a command prompt window. If you placed the unzipped folder on your desktop, cd into Desktop and then cd into the PTRx22 folder.

There is only one line in the batch file and only one parameter we are interested in changing. This is the last one, the one that specifies which port the Pololu Programmer is on. (note that this image references the last version, 2.2. Be sure to use the current version here.

To find out which port the Programmer is on, we need to run the device manager. Press the window key and type in Device Manager. You should see this window come up. Look for the ‘Ports’ entry in the list and expand it. You should see the Pololu Programmer. We want the COM value for the Programming Port. In this case it’s COM18. If this value on your computer is COM9 or lower, you won’t need the next step but I’m including it for those that may.

I have a USB hub plugged into my computer, so I am getting a very high COM number. The actual programming tool, AVRDUDE, doesn’t seem to like anything over single digits for the COM number. So I will have to change mine. If yours is COM9 or less, you should not need to do this.

I have to go back to the Device Manager window and double click on the Pololu Programmer Port Entry. It should bring up a box like this image. At the top, click the ‘Port Settings’ tab. There is an ‘Advanced’ button in the second half of the display box, click that and at the bottom, select a new COM port. I chose COM8. Exit all the way out of this and then reboot your computer. I am not sure why I have to reboot but it suspect it has to pick up the new COM port and restart the programmer drivers.

After the reboot, I open up a new command window, move to the correct directory and execute the command. It only takes a few seconds and should give you some nice info about everything.