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
Setup Pypilot motor controller with MacArthur HAT
#11
Look at the point "Serial Data Connection": https://pypilot.org/schematics/hbridge_datasheet.htm

Colors may vary but this should be the map for Raspberry UART0:

Pypilot tx -> RPi rx (GPIO15, pin 10)
Pypilot rx -> RPi tx (GPIO14, pin 8)
Pypilot GND -> RPi GND (any pin marked as GND)
Pypilot Vcc -> RPi 3.3V (pin 1 or pin 17)

Maybe you could use a GPIO header extender to get longer pins. A workaround could be to use the Rj45 connector because it is directly connected to UART0, but ATTENTION, there is 12V there, you need to connect only UART0 tx and rx cables and take GND and 3.3V from the 1-wire connector. Ugly, but it will work until we find a solution.
Reply
#12
(2024-05-07, 07:48 PM)Sailoog Wrote: Look at the point "Serial Data Connection": https://pypilot.org/schematics/hbridge_datasheet.htm

Colors may vary but this should be the map for Raspberry UART0:

Pypilot tx -> RPi rx (GPIO15, pin 10)
Pypilot rx -> RPi tx (GPIO14, pin 8)
Pypilot GND -> RPi GND (any pin marked as GND)
Pypilot Vcc -> RPi 3.3V (pin 1 or pin 17)

Maybe you could use a GPIO header extender to get longer pins. A workaround could be to use the Rj45 connector because it is directly connected to UART0, but ATTENTION, there is 12V there, you need to connect only UART0 tx and rx cables and take GND and 3.3V from the 1-wire connector. Ugly, but it will work until we find a solution.

Oooh I like the rj45 connector idea as I am not planning to use the Maiana AIS system. Is there a pinout diagram of what is what on that? I can probably find 12v with my multimeter (to avoid) but any help on which other wires I would be connecting would be helpful! If I assume a t568b RJ45 end ? 

Thanks!
Reply
#13
I have the same setup but I used:

Pypilot TX Blue    > Pi5 RX GPIO1, Pin 28
Pypilot RX Green > Pi5 TX GPIO0, Pin 27
Pypilot GND Black > Pi5 Pin 6
Pypilot Vcc Red > Pi5 Pin 1

This uses UART1

This way I can use the Maiana

I will have the Motor controller 3mts away from the Pi5, near the motor/drive, so I will run 4 core to the Pi5.

You need 12v to the motor controller Power +ve & -ve.

The Motor A & B go to your motor.

The clutch of your drive must be connected between the +12V and the clutch output of the controller board, terminals side by side.
The clutch output is "Clutch -" and "Power +" so the clutch output is like a switch to "Power -" when engaged. +ve should go to +12v power source and -ve should go to -clutch terminal on board.
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Reply
#14
(2024-05-07, 10:19 PM)Lazzz Wrote: I have the same setup but I used:

Pypilot TX Blue     > Pi5 RX GPIO1, Pin 28
Pypilot RX Green  > Pi5 TX GPIO0, Pin 27
Pypilot GND Black > Pi5 Pin 6
Pypilot Vcc Red    > Pi5 Pin 1

This uses UART1

This way I can use the Maiana

I will have the Motor controller 3mts away from the Pi5, near the motor, so I will run 4 core to the Pi5. You need 12v to the motor controller Power +ve & -ve.

The Motor A & B go to your motor.

The clutch of your drive must be connected between the +12V and the clutch output of the controller board, terminals side by side.
The clutch output is "Clutch -" and "Power +" so the clutch output is like a switch to "Power -" when engaged. +ve should go to +12v power source and -ve should go to -clutch terminal on board.

How did you go about connecting to those pins? Any pictures Smile ! 

Thanks for the info. 

Still interested though how one would connect to the RJ45 port with the blue and green wires...
Reply
#15
(2024-05-07, 10:26 PM)braydengirard Wrote: How did you go about connecting to those pins? Any pictures Smile ! 

Thanks for the info. 

Still interested though how one would connect to the RJ45 port with the blue and green wires...


Keep in mind that this is just a "mock-up" at home for testing - I'm stuck at home with a leg in plaster for 6 weeks!!

I use one of these pin connectors for all my connections to the Pi5 such as the Motor controller, relays, PIR sensor etc. On the boat they are soldered & have heat shrink!! Before the MacArthur the 1wire & I2C were connected via this as well.

   
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Reply
#16
(2024-05-07, 10:44 PM)Lazzz Wrote:
(2024-05-07, 10:26 PM)braydengirard Wrote: How did you go about connecting to those pins? Any pictures Smile ! 

Thanks for the info. 

Still interested though how one would connect to the RJ45 port with the blue and green wires...


Keep in mind that this is just a "mock-up" at home for testing - I'm stuck at home with a leg in plaster for 6 weeks!!

I use one of these pin connectors for all my connections to the Pi5 such as the Motor controller, relays, PIR sensor etc. On the boat they are soldered & have heat shrink!! Before the MacArthur the 1wire & I2C were connected via this as well.

Awesome this makes sense, thank you. Hope you heal quick!

I ended up finding the pinout for the RJ45 in the MacArthur Hat Github repo for anyone else looking. Connected up the TX and RX for UART0 to the RX and TX on the motor controller, left the 3v (red) in the 1Wire 3V and the ground (black) in the 1Wire grnd.

All works well now after setting UART0 on OpenPlotter as an NMEA0183 Serial connection and assigning to PyPilot. Motor spins in both directions based on the heading!

Thanks all for the support here and hope this may help others using the MacArthur Hat with the Pi5 and a Pypilot motor controller.
Reply
#17
Glad you found the RJ45 pinout. Both solutions seem functional, but we will soon propose a more reliable one.

Lazzz, is UART1 working right with pypilot?

For the record:

GPIO0 and GPIO1 (pin 27 and 28) are UART1 in Rpi5 but UART2 in Rpi4.
Reply
#18
(2024-05-08, 04:14 PM)Sailoog Wrote: Glad you found the RJ45 pinout. Both solutions seem functional, but we will soon propose a more reliable one.

Lazzz, is UART1 working right with pypilot?

For the record:

GPIO0 and GPIO1 (pin 27 and 28) are UART1 in Rpi5 but UART2 in Rpi4.

In testing on the workbench I have noticed that if I change the heading by 10+ degrees sometimes the AP disengages. I am wondering if this has to do with the motor spinning but the heading not adjusting and then a safety kicking into disengage.

At first I was loosing connection to the PyPilot server randomly, this has seemed to stop but now the disengage still occurs sometimes.
Reply
#19
I remember seeing the same effect.
Reply
#20
(2024-05-08, 04:14 PM)Sailoog Wrote: Lazzz, is UART1 working right with pypilot?

UART1 seems to be working as it should with Pypilot.

I haven't got a motor connected, yet, but LEDs on the motor controller flash after an input from "Control" & "Web Control".

Just haven't worked out the SK Path for KIP yet!!
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)