-
Notifications
You must be signed in to change notification settings - Fork 3
Step 14 The Pypilot Motor Controller
WARNING: this information has been written in 2021, when pypilot version was 0.24 and Openplotter was 2.0. In 2023 these versions have by far been superceded and information in this chapter is most likely to be partly obsolete. Work in progress will be documented in the Workbook Release Notes.
This is for when you ordered a ready-made pypilot controller and it arrived. The question is: what next.
This is a 2019 model:
This is how a 2021 model seems to looks like:
The 2019 model matches exactly the schematics on the pypilot site.
As you can see on the first picture, when you connect 12V to the motor controller, and you don't connect it to the raspberry, there is one led that will light up on the arduino. The colour might be green or red. This is the power led.
The 4 wire cable with a watertight connector should be connected to the raspberry as follows:
Pypilot motor controller | Raspberry pi |
---|---|
Vcc | 3V3 pin 1 |
RxD | TxD pin 8 |
TxD | RxD pin 10 |
Gnd | Gnd pin 6 |
Please note that RxD and TxD are crossed. This is a point-to-point connection, and for that you connect TxD to RxD and vice versa. I won't mention wire colours here, you must figure that out yourself. If you bought an IMU from the pypilot store it comes with a cable that matches the one from the pypilot motor controller.
Once hooked up to the raspberry, it is very likely that the RxD led on the arduino will burn continuously, in addition to the power led. This means that the UART has not been set up on your raspberry.
To fix this, click Raspberry -> Preferences -> Raspberry Pi Configuration, click the Interfaces tab, check Serial Port, uncheck Serial Console, Click OK, don't reboot yet.
Then, go to Raspberry->Openplotter->Serial, and click on UART. It will turn grey and beg for a reboot. This action is equivalent to adding dtoverlay=disable-bt
to /boot/config.txt:
After the reboot the RxD light on the arduino should be OFF *). Then you can run pypilot on the console and check the output. You should see that it probes, then finds an arduino controller on the /dev/ttyAMA0 interface. At that point, the Rxd and Txd lights on the arduino should blink very quickly, like 4 blinks per second. All your pypilot user interfaces should indicate the presence of a motor controller.
- If the RxD line on the arduino is still continuously ON, check /boot/config.txt again. There have been cases where the GPIO14 pin was used by the gpio-fan overlay. If that is the case, disable that line.
Pypilot Workbook
- Introduction
- What is pypilot
- The software component
- The hardware component
- The User Interface component
- Pypilot functions
- Data connections
-
The steps
- OLD
- Step 1: Install Openplotter Headless
- Step 2: Install pypilot
- Step 3: The openplotter user interface
- Step 4: The browser interface
- Step 5: The HAT interface
- Step 6: The Arduino controller
- Step 7: OpenCPN Pypilot Plugin
- Step 8: Looking under the hood
- Step 9: Wiring up the Nano
- Step 10: Installing Tinypilot
- Step 11: Tinypilot under the hood
- Step 12: Using openplotter tools remotely
- Step 13: SignalK connections
- Step 14: The Pypilot Motor Controller
- Step 15: Understanding motor.ino
- Parameters
- Gains
- NEW
- Step 1: Installing pypilot
- Step 2: Web interface
- Step 3: OpenCPN pypilot plugin
- Step 4: Installing the arduino
- Step 5: Wiring the arduino
- Step 6: Setting up data connections
- Step 7: SignalK connections
- Step 8: HAT interface
- Step 9: Debian under the hood
- Step 10: Tinypilot under the hood
- Step 11: Openplotter details
- Updating pypilot: debian
- Updating pypilot: tinypilot
- Feedback
- Todo
- Finally
- Autopilot Route Plugin
- Watchdog
- Workbook Release Notes