Have PWM informations of the Pixhawk 2 on an arduino card

I know this is a very old discussion but I’m planning to try and build an interface to the torqeedo 1003c motor hopefully using the RS-485 interface.

I’ve found some slightly old information about the RS-485 interface from Zhi Li’s “Design of a Robust Autonomous Surface Craft for Deployment in Harsh Ocean Environment” although they are using a Torqeedo Travel 801. Hopefully the interface is similar.

I think that it should be possible using a RS-485 to Serial converter like this Pmod RS485 board or maybe this Sparkfun Transceiver Breakout - RS-485 board.

The motor hasn’t been delivered yet so I’m a little unsure how to access the RS-485 port on the motor but I suspect there is a 5 or 8 pin connector to connect the “TorqTrac” or “Remote Throttle”

If anyone has any useful information, all feedback is very welcome!

Again, this is a very old thread but I’ve managed to control a Torqeedo 1003c motor from ArduPilot using a serial<->RS-485 converter. The Pull Request is here and I hope to enhance it further to decode more messages from the motor as I figure out their meaning.

If anybody is willing to help test it that would be greatly appreciated although no pressure of course.

Hi @rmackay9 , We are just trying to control 2 Travel 1103, but it looks that something change on motor protocol, we are not able to control it with ardupilot. We port your software to a ESP32 micro and we were able to control both motors, but sometimes we lost sync and motor stops. Did you have any document that explain actual protocol?

Thanks

@alejomejia1,

You’ll need to contact Torqeedo directly to get the details of the protocol. They sadly require people to sign an NDA before they give it out.

I suspect the issue is too much current is being drawn and the motor is shutting down. The motor provides error codes which inform the pilot what the cause of the issue is (and the AP_Torqeedo driver handles this).

Are you porting the driver to the ESP32 (and presumably enhancing it) just so you can control 2 motors? I have been planning to extend AP_Torqeedo to control two motors if that would help.

EDIT: are you saying that Rover-4.2 installed from MP (or downloaded directly from firmware.ardupilot.org) installed on an autopilot supported by AP cannot control a Torqeedo motor? If this is the case then I will need to re-test my mapping boat. It worked up until a few months ago though.

Hi @rmackay9 thanks for your answer. In fact I already been able to move both motors, we use the Torqeedo class structure you implemented, but add a protected variable to store a motor number (1 or 2) that in reality indicate which hardware Serial output we will use for each motor. Taking advantage of the fact that ESP32 has 3 HW serial ports, what I’m doing is using Serial port 0 for programming and monitoring ESP32, Serial1 for left motor and Serial2 for right motor, then we instantiate 2 objects, one for leftMotor and the second for rightMotor, each object has its own HW Serial port, then you can control both motors at same time

Still I have problems, I expect to solve it today.

You can see some videos and images here:

https://drive.google.com/drive/folders/1ZULBwbi0ChA7Dk5HGm3dI6q-4ioE8u24?usp=sharing

1 Like

You can find ESP32 ported version, based completelly on yours!.

1 Like

My biggest problem is at start, sometimes motor did not sync at begginining. After both motor start to receiving orders they did not fail. I need to make a threshold for complete stop

@alejomejia1,

nice videos. It’s really great to see the Torqeedo motor driver (or a ported version of it at least) being used. I was planning a similar method to add dual torqeedo support - e.g. a couple new parameters to allow the user to specify which motor output (or perhaps which SERVOx_FUNCTION - Throttle, ThrottleLeft or ThrottleRight) is the source for the output to the motor.

1 Like

Hi @rmackay9 , a big update!! we test our boat today, remote controlled with our self designed PCB board. Everything works properly. We add SBUS decoding and connected X8R receiver directly to our PCB. But now it is time to integrate Ardupilot in order to been able to make autonomous sailing with waypoints! We plan to use PixHawk 4 as “flight” controller, Could you give me a short explanation about how Ardupilot generate orders to motors when waypoint navigation is selected?

By the way, we found a RS485 module with auto RTS management (no need to use software RTS control) , very cheap and easy to use!!!.

You can see our boat sailing here:
https://drive.google.com/file/d/1ZVBZ90Rn1akwAgyWh-BT0MYI-g4JQkTW/view?usp=sharing

There was a firearms range nearby… that’s why the shots!

1 Like