open-ephys / commutator-docs

Documentation for Open Ephys Commutators
https://open-ephys.github.io/commutator-docs/
Creative Commons Attribution Share Alike 4.0 International
3 stars 1 forks source link

Firmware update instructions #18

Open jonnew opened 4 weeks ago

jonnew commented 4 weeks ago

Add a page with latest compiled firmware and instructions on how update the commutator with it.

ChucklesOnGitHub commented 3 weeks ago

@aacuevas gave me the following instructions to find out the commutator fw version. Is this the method that we are going to propose to users?

  1. Find the COM port of the commutator
  2. Download PuTTY from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
  3. Run putty.exe
  4. Configure as follows:

image image

  1. Run command {print:}
  2. Inform the result of the operation
jonnew commented 2 weeks ago

I think we should probably use the Arduino serial monitor because that's going to be needed to update the firmware anyway (well not needed but I think it's the fastest way)

For Teensy-based commutators

  1. Download the Arduino IDE
  2. Install it and open the program.
  3. Go to File -> Preferences and add https://www.pjrc.com/teensy/package_teensy_index.json to the Additional Board Mangager URLs: image
  4. Install Teensy board support int eh Board Manager tab of the IDE image
  5. Plug your commutator in and wait for the red light to stop flashing (charging internal battery, can take up to 30 seconds)
  6. Select the Teensy from the Board dropdown menu image
  7. Go to Tools -> Serial Monitor to open a serial connection to the commutator image
  8. Type {print:} into the serial monitor prompt and press enter, this will tell you the firmware version of the commutator. Make sure to note the (1) Commutator type, (2) Firmware Version and (3) Teensy Type. image
  9. Open the most recent firmware in the IDE
  10. Adjust the definitions at the top of the file to match your Teensy and commutator type (look at the results of the `{print:} command above image
  11. Press the Upload Button to compile and flash the latest firmware. image
  12. Repeat step 8 to confirm the firmware has been updated: image
bruno-f-cruz commented 2 weeks ago

Heya, A small piece of feedback after updating one of your commutators. The updating procedure itself is easy and didn't have any problem (I used the arduino IDE and followed the instructions in https://www.pjrc.com/teensy/td_download.html). However, one thing that did throw me off a bit were the defaults that the firmware ships with. It took me a while to realize why the {print:} command returned sensible information but the turn command did not drive any movement of the motor. Turns out I had to first set the RPMs and Acc parameters. For future people that go through this process (assuming that there is no reason to do otherwise?) I would suggest changing the defaults to something that can actually drive the motors after sending a turn command.

ChucklesOnGitHub commented 2 weeks ago

I think this content should expand the one already here, with an explicit command that can be used for testing.

This might not require a separate Firmware update page, however, I would suggest we do keep the table such as the ones here with the firmware version and date of release, and separate for each hardware version.

fw v1.6 can be used on commutators with SN after 0124 (Teensy LC) - and will not work on others fw v1.5 is needed on commutators with SN before 0124 (Teensy 3.2)

SN: 77590124zzzz (Jan 2024)

ChucklesOnGitHub commented 2 weeks ago

For users attempting to do it with the library versions out now, there is a compilation error because ArduinoJson 7 changed thins with respect to ArduinoJson 5.

Compilation error: StaticJsonBuffer is a class from ArduinoJson 5. Please see https://arduinojson.org/v7/upgrade-from-v5/ to learn how to upgrade to ArduinoJson 7

jonnew commented 2 weeks ago

They need to use the old library. They can select an old version in the arduino package manager

ChucklesOnGitHub commented 2 weeks ago
ChucklesOnGitHub commented 1 week ago

fw v1.6 can be used on commutators with SN after 0124 (Teensy LC) - and will not work on others fw v1.5 is needed on commutators with SN before 0124 (Teensy 3.2)

SN: 77590124zzzz (Jan 2024) we discussed providing users with the .hex used in production for ease of library management

Here they are until we can make this docs page properly: coaxial_commutator_firmware_hex.zip

I guess the original files used for v1.6 and v1.5.1 should be tagged as releases.