This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autopilot Errors: no motor controller!
I have a raspberry pi4 running openplotter, connected to one of Sean's IMU sensor modules, which is connected to the motor controller, also purchased from Sean.   I'm guessing I'm missing something simple, but I can't get Pypilot to sense that the motor controller is connected.   There is one red LED on on the motor controller, if that makes a difference. Also the IMU appears to be working, providing relatively accurate heading data, and pitch and roll.

In the web interface for pypilot I see:

pypilot Server: Connected
Servo Flags:
Autopilot Errors: no motor controller!
Web Server Latency: 4 ms

Any ideas what I might be missing?   

I figured it out, it was a simple setting. I needed to enable the Serial Port in the Raspberry Pi Configuration application in the preferences menu. Then I had to add the /dev/ttyAMA0 device to pypilot.
I have the same setup, having received the motor controller today. I follow the Pypilot workbook step 14 but I am not having much luck, only confusion. I seem to have messed up somewhere, I attach a screenshot. I am not able to run pypilot in the terminal; fails and exits. The guide in the workbook covers an older version of the motor controller. I think I need a bit of help here beacause I am stuck. Thanks

Attached Files Image(s)
Now I run the console correctly, having stopped the service first. I get this error:
serial exception ('/dev/ttyS0', 38400) nmea0 [Errno 13] could not open port /dev/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'
I have also changed compass sensor to LSM9DS1 to see if that makes a difference, but no.
You cannot use /dev/ttyS0, must use /dev/ttyAMA0 by disabling bluetooth in boot.conf
(2021-04-16, 02:44 AM)seandepagnier Wrote: You cannot use /dev/ttyS0, must use /dev/ttyAMA0 by disabling bluetooth in boot.conf

Thanks. You are right. I changed that back and forth to see the difference and then got confused and forgot it wasn't disabled. So now I got that working.

Now I get this in the GUI and this in the console. Am I on the right track? It still doesn't seem to detect the motor controller. I have checked and triple-checked that the serial connctions go to the right headers on the Pi, by the use of my multi-instrument.

One thing is that I am getting confused over the talk of Arduinos and their LEDs in the motor controller. Obviously there is no discrete Arduino unit in your current controller, so should I still expect the same blinking?

Attached Files Image(s)
Just checking: you wired tx to rx and vice versa?
can you show a picture of your hardware and wiring?

My motor controller functions as an arduino.
(2021-04-16, 07:33 AM)ironman Wrote: Just checking: you wired tx to rx and vice versa?

I'm making some progress now. The cable colours are different in the two parts of the serial cable so it really confuses me. I switched the tx and rx cables and now I see some blinking LEDs. But still no great success with the overall functioning. I am using a breadboard for connections whick might be a bad idea, so now I will do some soldering. I will get back later with more updates.

(2021-04-16, 08:06 AM)seandepagnier Wrote: can you show a picture of your hardware and wiring?

My motor controller functions as an arduino.
Not too proud of these connections, but it's only for lab use. At least the LEDs are blinking, whatever that means.

I am wondering quite a bit over the correct way to set up things in Serial and PyPilot in Openplotter. Port numbers 20220, 38400 and 4800 are being mentioned in the terminal output, but I have no idea how to set to any of these port. Also, I am asked to assign the alias to either NMEA2000, NMEA0183 or SignalK. What is this about? Now I have NMEA0183 since it was the only one that would allow adding to Pypilot being pressed.

Attached Files Image(s)
I really think you just wired it wrong. Please read:

You have combination #3 the third column of serial data connections

This combinations is the most confusing because black is 3v3 and blue is gnd. You can see this from the wires on the motor controller itself.

Forum Jump:

Users browsing this thread: 1 Guest(s)