OpenMarine

Full Version: Pypilot motor controller communication settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
My setup consist of:
A Pi 3b+
A USB GPS dongle (Globalsat BU-353S4)
mpu9255 inertial sensor plus a motor controller (powered by a fully charged 12V car battery), delivered as a package, including optically isolated communication.
A 12V wind shield wiper motor (connected to/powered by the motor controller). The functionallity of the motor has been verified by running it straight of the battery.

I've tried to find information through various forums and Youtube, but also through the OpenPlotter documentation of course.

I've managed to calibrate the sensors (accelerometers, alignment, compass), get the GPS readings presented in OpenCPN and the GPS mode available in the Pypilot plugin (in OP 1.2) so that the direction pointer pointed at the active waypoint of the activated route. In the same plugin it unfortenatly stated "No connection" (or similar). No voltage can be measured on the output to the wiper motor when moving the MPU. I can see that the "P, I, D"-parameters are affected in the Pypilot control-

In OP 2.0 I yet again manage to get the Compass and GPS modes to be activated in Pypilot App/Autopilot Control, but it  states "none", "Disengaged", "0" and "none" at the upper part of the Autopilot Control window.

Runnning pypilot_servo spews out "nmea got flag for process pipe: 17"

My problems could be due to not underdstanding how to configure the system correct. Or might I have a HW issue?
I think it would be great if there was a "for Dummies" section under Pypilot. Smile
 
What configurations are neccesary with regards to the motor controller?
1) Serial App
- How shall the UART be configured?
/ Devices
- What device is the motor controller?
- What data format should be set?
/ Connections
- What should be connected (Signal K / Pypilot / GPSD), and with what connection settings (Auto / Manual (speed?))?
2) Pypilot App
- Any specific Device/Connection settings here?
3) OCPN/Options/Connections
- TCP / UDP, 11010, In / Out?
- TCP / UDP, 22020, In / Out?
4) Other
- Signal K?
- ...?

Regards,
Fredrik
Hey Fredrik,

There should not be any configuration of UART's needed; the pypilot should talk to the motor controller out of the box. On the arduino there should be 2 LEDs flickering: one for received data, one for transmitted data. If there is no LED activity seen, check electrical connections.

Now there is one thing that seems to be nowhere explicitly mentioned: you should connect TxD of the Pi to RxD of the arduino, and vice versa. Crosswise, so to speak. For some this might sound weird, for others this knowledge was spoonfed to them as a baby. Just tell me you did it this way and what the leds do.

Cheers,

-
It sounds like both a hardware problem (uart not wired) as well as software (pypilot_servo trying to run while other pypilot service is already running)

If you could give exact details on your hardware connections as well as post the full log file of pypilot. Check for pypilot processes with "ps aux | grep pypilot" to ensure none are running. Ensure hardware serial port is enabled in openplotter and /dev/serial0 should link to /dev/ttyAMA0. This port should be assigned to pypilot in the openplotter serial settings.

In openplotter 2 it should be possible to get pypilot service logs from journalctl