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
Pypilot on old Cetrek autopilot
#1
Hi all

First of all thanks to Sean and to everyone else who is contributing to the pypilot initiative. I am a total newbie on electronics and programming, so please bear with me on the basic questions.

I am working on implementing Pypilot on an old (1980´s) Cetrek wheel pilot on a Northwith 38 Sailboat from 1985.

My setup is currently as follows

Raspberry pi 4+ with Openplotter and Opencpn
Sparkfun ICM-20948 IMU
Arduino Nano
IBT2 Motor controller
Cetrek motor W/clutch and chain drive (motor 12v 80W, clutch 12v 11.2W)
Cetrek rudder sensor with end-of-travel click switches

The idea is to control the whole thing through the Pypilot plugin in openplotter, at a second stage I plan on adding a remote or wired button pad, but that is for a next step.

After navigating different documents and forum threads I have started testing things and I got some results, but still many doubts for the final setup remain. Steps as follow:

- Loaded the latest motor.ino from github (august 2024) after uncommenting #define VNH2SP30 to the nano.
- IMU connection to RPI
- SDA-GPIO02 (Pin 3)
- SCL-GPIO03 (Pin 5)
- VIN-+3v3 (Pin 1)
- GND-GND (Pin 39)
- Nano connection to RPI
- For bench testing connected through USB things seemed to more or less work.
- After reading through formus, I understood that USB connection is not optimal so will opt for pin-2-pin connection, first doubts come here
- The following connections as in (https://www.youtube.com/watch?v=mKXof5mDKys)
- Nano-RPi
- D0 (RX)-GPIO14 (TX)
- D1 (TX)-GPIO15 (RX) Through a voltage divider with 2 x 330 Ohm resistors.
- VIN - +5v (Pin 4)
- GND - GND (pin 6)

FIRST DOUBT:  The use of optocouplers is mentioned as a necessary safety measure, can you please point to specific optocouplers that can be found in the market and how exactly to connect?

-Nano connection to IBT2 Motor controller (following https://forum.openmarine.net/showthread....388&page=2)

- Nano - IBT2
- D2 - RPWM
- D3 - LPWM
- D9 - R_EN
- D9 - L_EN
- GND - R_IS & L_IS by 200ohm+1k potentiometer
- +5V - VCC
- GND - GND

SECOND DOUBT: I do not really understand what is meant with by 200ohm+1k potentiometer, can anyone provide precise items and how to connect?

- IBT2 to Motor

- IBT2 - Motor
- M+ - +12V
- M- - GND

THIRD DOUBT: No idea what to do about clutch, so any help on how to connect will be appreciated.

- Rudder sensor to Nano: Rudder sensor is a 3 wire potentiometer

- Rudder sensor - Nano
- + - +5v
- - - GND
- Potentiometer Signal - A4 through a voltage divider 4kohm:1kohm to deliver 0-1V

FOURTH DOUBT: Is the resistance adequate? should I use other? (always respecting the 4:1 to end up with 0-1V)

- End of travel switches to Nano: End of travel switches are 3 wire, i asume that they will connect in a similar way as the ruder angle potentiometer

- End of travel - Nano
- + - 5V
- - - GND
- Switch on - D7, D8 (one to each side)

FIFTH DOUBT: Is this correct?, is there a need to add any intermediate components on the line that goes back to D7 & D8?

I thank you in advance for your replies and look forward on continuing working on the project.
Reply
#2
Please, anyone

Thank you!!
Reply
#3
Hi,

For the isolators, i've used the ADUM1201 module board
Ali-link to an ADUM1201

For the clutch, i've used a mosfet module board, also from Ali-express...

The other doubts you have, sorry cannot help you there..

regards,
Wouter
Reply
#4
You can also make it work without isolators. It might not be as reliable but can work.

clutch, end stops, and rudder feedback are all optional, dont worry about them if you dont have them.
If you cant get current feedback you will want at least one other method to detect end of travel.
Reply
#5
Thank you Wouter and Sean

The rudder feedback sensor has click end-of-travel switches so I can use those, they are 3 -wire, I asume a 5V in (coming from the nano), a GND and an out-Signal when the switch is pressed, therefore returning 5v to the nano. That is where my question goes, Is that ok or should I add some elements to reduce that current going back to the nano ports 7 & 8?

Thanks!!
Reply
#6
The current for end stop switch should be minimal. You could add a resistor but it should not matter. Normally they are 5v, but shorted to gnd when the switch is pressed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)