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.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Motor runs full speed in one direction
#1
Hi Sean / and the community! I’m almost successful in connecting my Autohelm ST4000 motor directly to a servo motor controller, however there are some issues I need help with.

Issues:

-         The motor just keeps running full speed, doesn’t know how to stop
-         Only one RX / TX connection works, so the motor only spins one direction

I have the following setup:

-         Openplotter 1.2.0 Alpha
-         Raspberry pi 3B+
-         USB – RS485 with one RX and one TX (https://www.reichelt.nl/raspberry-pi-usb...D_BwE&&r=1)
-         Joy-IT motor controller (https://www.conrad.nl/p/joy-it-1573541)
-         IMU STM LSM9DS1 (magnetic comass, gyro, accellero, temperature, etc.)

What I configured in Openplotter:

-         Serial tab: USB to RS485 à Pypilot
-         Pypilot tab: Basic autopilot
-         Upgrade Pypilot from the newest GIT source just to be sure

Symptoms:

-         Directly after powering up the raspberry, while the RX TX is connected, the motor will start spinning. Pypilot program is not yet running. There are some times that the motor will stop, and pulse a few times during Raspbian boot.
-         Pypilot software is connected correctly from OpenCPN, Openplotter and the webapp.
-         All apps display magnetic heading properly, and I can select GPS also.
-         When activating autopilot, it doesn’t make any difference in the RX TX voltage readings

What I tried:

-         Serial tab: Unassigning the pypilot and change the USB RS485 to NONE
o  Motor stops
o  Assigning it again, motor will run full speed in only one direction
§ Changing the polarity will run full speed in the other direction

What I think:

-         Faulty RS485 device?
o  If so, which one do you recommend?
-         Do I need to change motor.ino?
o  I’ve tried searching for the file, but cannot find it. Maybe this has something to do with that I have a raspberry and not and Arduino.
o  What do I need to change in the code, if this is the case?
 
Hope you can help!
  Reply
#2
" I have a raspberry and not and Arduino."
you need both

"motor.ino? I’ve tried searching for the file, but cannot find it."

https://github.com/pypilot/pypilot/commi...25e7bb52c7

the arduino nano has the ino installed the motor controller connects to the arduino. then the arduino connects to the pi with usb or serial, opto isolated preferred
then look in the serial tab in op for the arduino and assign it to pypilot.
no one has used that motor controller its an l298n its only rated for 2 amps.
i don't know if that imu is supported either there is a list of compatible imu's somewhere.

"Faulty RS485 device?
If so, which one do you recommend?"
not needed

a members ST4000 setup
http://forum.openmarine.net/showthread.php?tid=1840
mare liberum
  Reply
#3
or take a look here:

http://forum.openmarine.net/showthread.php?tid=1708

The latest drawing from FMJ should explain a lot.

Ahoi
  Reply
#4
That's some very helpfull comments jim321 and sideluxe, thanks! I'll order the needed parts and get started on it.
  Reply
#5
[Image: fetch.php?w=600&tok=3ec101&media=pypilot_diagram.png]

https://pypilot.org/wiki/doku.php
mare liberum
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)