Setup Pypilot motor controller with MacArthur HAT - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: MacArthur HAT (https://forum.openmarine.net/forumdisplay.php?fid=29) +--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=31) +--- Thread: Setup Pypilot motor controller with MacArthur HAT (/showthread.php?tid=4638) |
RE: Setup Pypilot motor controller with MacArthur HAT - Sailoog - 2024-05-07 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. RE: Setup Pypilot motor controller with MacArthur HAT - braydengirard - 2024-05-07 (2024-05-07, 07:48 PM)Sailoog Wrote: Look at the point "Serial Data Connection": https://pypilot.org/schematics/hbridge_datasheet.htm 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! RE: Setup Pypilot motor controller with MacArthur HAT - Lazzz - 2024-05-07 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. RE: Setup Pypilot motor controller with MacArthur HAT - braydengirard - 2024-05-07 (2024-05-07, 10:19 PM)Lazzz Wrote: I have the same setup but I used: How did you go about connecting to those pins? Any pictures ! Thanks for the info. Still interested though how one would connect to the RJ45 port with the blue and green wires... RE: Setup Pypilot motor controller with MacArthur HAT - Lazzz - 2024-05-07 (2024-05-07, 10:26 PM)braydengirard Wrote: How did you go about connecting to those pins? Any pictures ! 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. RE: Setup Pypilot motor controller with MacArthur HAT - braydengirard - 2024-05-08 (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 ! 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. RE: Setup Pypilot motor controller with MacArthur HAT - Sailoog - 2024-05-08 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. RE: Setup Pypilot motor controller with MacArthur HAT - braydengirard - 2024-05-08 (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. 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. RE: Setup Pypilot motor controller with MacArthur HAT - Sailoog - 2024-05-08 I remember seeing the same effect. RE: Setup Pypilot motor controller with MacArthur HAT - Lazzz - 2024-05-09 (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!! |