OpenMarine

Full Version: How to update motor controller arduino
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I noticed you have made changes to the arduino code for the motor controller in github. And the latest pypilot changes seem to require those updates to work.

Do you have a recommended procedure for updating the arduino in the motor controller? Preferably step-by-step? I did find the steps to update the pypilot from github in your wiki.

I need to have everything working in a couple of weeks and I would like all the latest fixes.
Thanks,
Do you mean the new changes use 16bit rudder stop resolution on the controller and also support rudder feedback with reversed polarity (voltage decreases as rudder moves to starboard)?

If you don't update the motor controller, it will still fully support this including both polarities, but the end of travel from rudder position logic will be handled in python only. Updating the motor controller will also perform this logic on the controller itself which has a faster reaction time, and slightly safer in case the raspberry with pypilot resets while the motor is still moving, it might not time out before stalling the motor in some cases.

In practice if the drive can move more than 2 degrees past the rudder feedback stops without reaching the maximum travel and stalling the motor, then it will be fine even in the worst case with only python logic, so I don't think it is very important to update the controller.

You can of course upload the new version by typing "make upload" in pypilot/arduino/motor
(2019-10-04, 01:35 AM)seandepagnier Wrote: [ -> ]You can of course upload the new version by typing "make upload" in pypilot/arduino/motor

Will it update over the isolated serial link? Can I simply ssh into the tinypilot and type this?

Or do I open the controller, connect USB to the nano, and to a system that has a keyboard and display and the code in order to "type make upload"?
(2019-10-04, 05:03 PM)svkatielee Wrote: [ -> ]
(2019-10-04, 01:35 AM)seandepagnier Wrote: [ -> ]You can of course upload the new version by typing "make upload" in pypilot/arduino/motor

Will it update over the isolated serial link? Can I simply ssh into the tinypilot and type this?

Or do I open the controller, connect USB to the nano, and to a system that has a keyboard and display and the code in order to "type make upload"?

It will update over the isolated link but you need to apply power to the controller just as you upload, or press reset button right at upload.   You can also wire a usb uart adaptor to the isolated serial link.

Otherwise, it's possible to use the usb port of the nano, the controller should not be powered.

You can type the command 'make upload' from the directory at least on openplotter.   I don't have the avr toolchain installed on tinypilot.  Maybe in the future it will, but for now it's better to use a linux system with avr-gcc and avrdude to update the controller