OpenMarine
Motor runs full speed in one direction - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: Motor runs full speed in one direction (/showthread.php?tid=1921)



Motor runs full speed in one direction - jamos.tan@gmail.com - 2019-08-01

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-rs485-interface-rpi-usb-rs485-p242783.html?PROVID=2788&wt_gnla=47102298677_225984971002&PROVID=2788&gclid=CjwKCAjwm4rqBRBUEiwAwaWjjFxT_dDdu3QFbZOKmjS32C2mOtGuhkUwYvWOlq-jmlgMDXF-QeZJzhoCrs8QAvD_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!


RE: Motor runs full speed in one direction - jim321 - 2019-08-01

" 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/commit/0a974486a5ef731c7592fbb50a7d3b25e7bb52c7

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


RE: Motor runs full speed in one direction - sideluxe - 2019-08-02

or take a look here:

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

The latest drawing from FMJ should explain a lot.

Ahoi


RE: Motor runs full speed in one direction - jamos.tan@gmail.com - 2019-08-02

That's some very helpfull comments jim321 and sideluxe, thanks! I'll order the needed parts and get started on it.


RE: Motor runs full speed in one direction - jim321 - 2019-08-02

[Image: fetch.php?w=600&tok=3ec101&media=pypilot_diagram.png]

https://pypilot.org/wiki/doku.php