2024-09-20, 01:02 PM
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.
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.