Pypilot is an open-source autopilot for boats, conceived and designed by Sean D'EPAGNIER.
Sean is a brilliant inventor with extensive skills in computer science, mathematics, electronics, and even ergonomics. He has been sailing extensively for many years on a sailboat without engine.
Sean has always relied on autosteering. Mechanical vanes have limitations, and as he looked for free software solutions, he found limited options. For these reasons, he created Pypilot to provide a high-performance, low-power autopilot that we can trust, extend and mo dify to meet our needs. Pypilot is a free software (GPLv3), and as such, you can trust it to work as intended and for future use without restrictions. Because freedom of modification is guaranteed, users around the world have continually contributed improvements, even minor ones, for the benefit of all users.
Sean is still very active on the Pypilot forum. For personal reasons, he still doesn't have time to manufacture the controllers, computers and HATs for the Pypilot store.
Although I have professional resources for designing and manufacturing electronics, I've always preferred to install on my boat what Sean offered in his store. With each upgrade, I've enjoyed discovering and studying his latest improvements. I started by buying a motor controller from him because it's the most difficult thing to make individually if you want a reliable and robust autopilot.
To encourage more and more people to use Pypilot, we offer robust computers and controllers at fair prices, along with information to help you get started. We will listen to your suggestions and continue to improve what we produce.
Why the motor controller is so important in Sean's Pypilot project?
Sean has always tried to have an energy-efficient autopilot. To achieve this, he used MOSFET transistors rated at least 83A, and even two to four in parallel for the 15 and 30A versions. This allows for very low voltage drop due to internal resistance and, more importantly, avoids the 0.6 to 0.8V threshold of conventional transistors used in some motor drivers.
With a current of 2A drawn by an Autohelm electric actuator, the voltage drop of Sean's or Navitop's controllers is less than 0.1V (7A controller), 0.07V (15A controller), or 0.04V (30A controller).
For comparison, with an L298N controller whose two H-bridges are in parallel, the voltage drop in the controller (VCESat) is 2.55V (typical) to 3.2V (max) with a current of 2A according to the L298N integrated circuit manufacturer's datasheet. The use of conventional transistors, sized to supply 1.5A or 3A, explains this. We then have 5 to 6W of heat loss in the controller as well as the overconsumption imposed by the under-powered motor to move the rudder.
A motor controller made from an IBT_2 H-bridge with 43A MOSFET transistors avoids the voltage drop of conventional transistors. However, Pypilot and Navitop controllers use significantly oversized MOSFET assemblies, i.e. 90 A for the 7 A controller, 168 A for the 15 A controller and 336 A for the 30 A controller. This ensures very low electrical losses and very little heat in Pypilot controllers whose transistors do not require a heat sink.
Recommended Use of Pypilot and the Controller
Pypilot motor controllers must be paired with an autopilot ECU such as a Raspberry Pi 0, 1, 2, 3, or 5 running Pypilot, with or without a MacArthur HAT.
Pypilot was designed by Sean d'Epagnier to consume very little power and be fully operational when installed on a small Raspberry Pi Zero W.
Comparative 12V power consumption of the Raspberry Pi alone:
Pypilot can run alongside other applications on a large Raspberry Pi. There are some great nautical application suites like OpenPlotter or Bareboats Necessities (BBN). Both include pypilot among many other applications. While this is informative and interesting, it's a bit like using your desktop computer as your boat's autopilot. Using an SD card as the Raspberry Pi's drive carries a high risk of damaging the file system and applications if a power outage occurs in the middle of a write, before all applications have completely stopped. Installing an SSD hard drive can avoid these problems. However, with these suites, there's still the problem that updates to certain applications can sometimes prevent the autopilot from working.
Your autopilot will be much more reliable, robust, and energy-efficient if you directly connect the controller and an IMU* to a tiny Raspberry Pi Zero W or Zero 2W with the Tinypilot image file installed on the Pi Zero's micro SD memory card.
Installing pypilot on a small Raspberry Pi Zero W dedicated to the pilot with the tinypilot image on the SD card
Tinypilot is a downloadable image file that easily installs onto a 16GB microSD card using the Raspberry Pi Imager app.
There is a separate image for the Pi Zero W (dual-core) or Pi Zero 2W (quad-core). See the download links at the top of the page.
We then have on the SD card all the Pypilot files configured to allow a quick startup and a robust lightweight Tinycore Linux system.
the lightweight Tinycore Linux system allows the Pi Zero to automatically run the Pypilot autopilot, its IMU, its LCD display, its Wi-Fi router, and its web server upon power-up.
It doesn't do anything else.
There's no point in adding a keyboard or connecting a display to the Pi Zero's HDMI output because the lightweight Linux system doesn't allow them to be used to navigate the graphical pages of Pypilot.
Connecting a JLX12864 LCD display to the Pi Zero is however useful for viewing the driver status (compass heading, setpoint, parameters).
If you want more graphical capabilities, you'll need to use any other device with a web browser, connected via Wi-Fi to the Pi Zero with the Tinypilot-Pypilot image on its SD card. You can also use another Pi with a full Linux system to run the OpenCpn pypilot plugin or to run the pypilot scripts for control (pypilot_control, pypilot_calibration, pypilot_scope).
The main "pypilot" script, which runs automatically with Ttinypilot on the Pi connected to the motor controller, obviously no longer needs to be run on other devices.
After powering on, Pypilot runs entirely from RAM. This allows you to stop the autopilot with the switch on the boat's electrical panel, without the risk of damaging files on the micro SD card. In addition, by installing a stable Tinypilot image, you can be sure that the installed file system has already been tested by many users and will remain intact until you install a new version of the Tinypilot image.
Even if there is a malfunction or problem with the RPI 3, 4 or 5, the autopilot installed on the Pi Zero with Tinypilot will still work. By choosing a Pypilot computer equipped with a Pi Zero, an additional AtMega328P (arduino) and a 433MHz receiver, the autopliot can even be additionally controlled by waterproof 433MHz remote controls that can be easily found on the internet for a few euros.
In the documentation you will find the schematic of a simple calculator that you can make to use Tinypilot-Pypilot.
If you choose to use TinyPilot on a Pi Zero, its 5V power supply will be safer and more robust if you power it from the motor controller using a micro USB cable with a JST connector that connects to the 10A and 15A controllers. Simply connect the micro USB connector of the cable to the "PWR IN" port on the Raspberry Pi Zero, or even the "USB" port if it's not being used for NMEA0183 data exchange. The 30A controllers have 5V output terminals to also power the Pi Zero W with a Pypilot computer. To avoid the intermittent contact issues sometimes encountered with microUSB connectors, it's possible to power the Pi Zero directly with 5V (+5V on pins 2 or 4 and GND on pin 6).
If you find the startup too slow, especially that of the web control interface, you can install a Raspberry Pi Zero 2 W instead of the Pi Zero W. But, this will be at the cost of higher power consumption (about 140 mA in 12V instead of 60 mA), without improving the operation of the autopilot. You should know that when starting pypilot, it is only when the autopilot is operational that the wifi and the web server are started, which is wise.
Pypilot motor controllers must be paired with an autopilot ECU such as a Raspberry Pi 0, 1, 2, 3, or 5 running Pypilot, with or without a MacArthur HAT.
Pypilot was designed by Sean d'Epagnier to consume very little power and be fully operational when installed on a small Raspberry Pi Zero W.
Comparative 12V power consumption of the Raspberry Pi alone:
- Raspberry Pi Zero W : 60mA
- Raspberry Pi Zero 2W : 140mA
- Raspberry Pi 3 B : >200mA*
- Raspberry Pi 4B : >250 mA*
Pypilot can run alongside other applications on a large Raspberry Pi. There are some great nautical application suites like OpenPlotter or Bareboats Necessities (BBN). Both include pypilot among many other applications. While this is informative and interesting, it's a bit like using your desktop computer as your boat's autopilot. Using an SD card as the Raspberry Pi's drive carries a high risk of damaging the file system and applications if a power outage occurs in the middle of a write, before all applications have completely stopped. Installing an SSD hard drive can avoid these problems. However, with these suites, there's still the problem that updates to certain applications can sometimes prevent the autopilot from working.
Your autopilot will be much more reliable, robust, and energy-efficient if you directly connect the controller and an IMU* to a tiny Raspberry Pi Zero W or Zero 2W with the Tinypilot image file installed on the Pi Zero's micro SD memory card.
Installing pypilot on a small Raspberry Pi Zero W dedicated to the pilot with the tinypilot image on the SD card
Tinypilot is a downloadable image file that easily installs onto a 16GB microSD card using the Raspberry Pi Imager app.
There is a separate image for the Pi Zero W (dual-core) or Pi Zero 2W (quad-core). See the download links at the top of the page.
We then have on the SD card all the Pypilot files configured to allow a quick startup and a robust lightweight Tinycore Linux system.
the lightweight Tinycore Linux system allows the Pi Zero to automatically run the Pypilot autopilot, its IMU, its LCD display, its Wi-Fi router, and its web server upon power-up.
It doesn't do anything else.
There's no point in adding a keyboard or connecting a display to the Pi Zero's HDMI output because the lightweight Linux system doesn't allow them to be used to navigate the graphical pages of Pypilot.
Connecting a JLX12864 LCD display to the Pi Zero is however useful for viewing the driver status (compass heading, setpoint, parameters).
If you want more graphical capabilities, you'll need to use any other device with a web browser, connected via Wi-Fi to the Pi Zero with the Tinypilot-Pypilot image on its SD card. You can also use another Pi with a full Linux system to run the OpenCpn pypilot plugin or to run the pypilot scripts for control (pypilot_control, pypilot_calibration, pypilot_scope).
The main "pypilot" script, which runs automatically with Ttinypilot on the Pi connected to the motor controller, obviously no longer needs to be run on other devices.
After powering on, Pypilot runs entirely from RAM. This allows you to stop the autopilot with the switch on the boat's electrical panel, without the risk of damaging files on the micro SD card. In addition, by installing a stable Tinypilot image, you can be sure that the installed file system has already been tested by many users and will remain intact until you install a new version of the Tinypilot image.
Even if there is a malfunction or problem with the RPI 3, 4 or 5, the autopilot installed on the Pi Zero with Tinypilot will still work. By choosing a Pypilot computer equipped with a Pi Zero, an additional AtMega328P (arduino) and a 433MHz receiver, the autopliot can even be additionally controlled by waterproof 433MHz remote controls that can be easily found on the internet for a few euros.
In the documentation you will find the schematic of a simple calculator that you can make to use Tinypilot-Pypilot.
If you choose to use TinyPilot on a Pi Zero, its 5V power supply will be safer and more robust if you power it from the motor controller using a micro USB cable with a JST connector that connects to the 10A and 15A controllers. Simply connect the micro USB connector of the cable to the "PWR IN" port on the Raspberry Pi Zero, or even the "USB" port if it's not being used for NMEA0183 data exchange. The 30A controllers have 5V output terminals to also power the Pi Zero W with a Pypilot computer. To avoid the intermittent contact issues sometimes encountered with microUSB connectors, it's possible to power the Pi Zero directly with 5V (+5V on pins 2 or 4 and GND on pin 6).
If you find the startup too slow, especially that of the web control interface, you can install a Raspberry Pi Zero 2 W instead of the Pi Zero W. But, this will be at the cost of higher power consumption (about 140 mA in 12V instead of 60 mA), without improving the operation of the autopilot. You should know that when starting pypilot, it is only when the autopilot is operational that the wifi and the web server are started, which is wise.
IMU (Inertial Mouvment Unit)
All Navitop computers integrate all IMU components directly onto their circuit boards, namely a TDK ICM20948 integrated circuit, its 1.8V power supply circuit and the I2C bus interface circuits.
The IMU is an attitude sensor, like those found in cell phones and drones.It is called a 9-axis sensor because it integrates 3 magnetometers, 3 accelerometers and 3 gyrometers, each of these 3 sensors in each of the X, Y and Z axes. Pypilot uses these 9 sensors to accurately calculate magnetic heading, roll, and pitch with magnetical 3D compensation to maintain accuracy, even when heeling in heavy beam seas.
Sean d'EPAGNIER, the designer of pypilot, recommended an IMU module based on the MPU9255 or MPU9250 chip. These modules, sometimes of very uneven quality and performance, were all directly compatible with the Raspberry Pi's 3.3V (3-wire) I2C bus. Since then, to achieve greater battery life, phones now operate at 1.8V. The MPU9255 and MPU9250 chips are becoming increasingly rare. They are increasingly being replaced by the ICM2948 chips with a 1.8V I2C bus. Unfortunately, this bus cannot be connected directly to the Raspberry Pi's 3.3V I2C bus. However, the ICM20948 chip is of much higher quality and consumes less power.
It's important to note that ICM20948 modules with only a few components, in addition to the ICM20948 chip cannot be directly connected to a Raspberry Pi's I2C bus, even though they can be powered by 3.3V or 5V according to the vendor, which is true but misleading. The ICM20948 chip can indeed be powered by 3.3V or 5.5V, but this is not the case for its I2C interface which has a separate power supply at pin 8 of the integrated circuit. According to the IC manufacturer, TDK, this should not be powered at more than 1.95V. Fortunately, there are more and more ICM20948 modules that are directly compatible with Pis and Arduinos. They are no more expensive, but they also include a 1.8V regulator to power the I2C interface of the ICM20948 integrated circuit, as well as a few additional components to adapt the ICM20948 chip's 1.8V I2C bus to the I2C bus of the Raspberry Pi (3.3V) or Arduino (5V).
In electronics, exceeding the manufacturer's limits can strangely not be a problem under certain conditions. But this means accepting the risk of malfunction with other operating temperatures or voltages. It is therefore prudent to install an ICM20948 module with an I2C bus compatible with that of the Pi. For example, there are modules designated ICM20948V2 or GY-ICM20948V2, which are suitable for the Pi.
All Navitop computers integrate all IMU components directly onto their circuit boards, namely a TDK ICM20948 integrated circuit, its 1.8V power supply circuit and the I2C bus interface circuits.
The IMU is an attitude sensor, like those found in cell phones and drones.It is called a 9-axis sensor because it integrates 3 magnetometers, 3 accelerometers and 3 gyrometers, each of these 3 sensors in each of the X, Y and Z axes. Pypilot uses these 9 sensors to accurately calculate magnetic heading, roll, and pitch with magnetical 3D compensation to maintain accuracy, even when heeling in heavy beam seas.
Sean d'EPAGNIER, the designer of pypilot, recommended an IMU module based on the MPU9255 or MPU9250 chip. These modules, sometimes of very uneven quality and performance, were all directly compatible with the Raspberry Pi's 3.3V (3-wire) I2C bus. Since then, to achieve greater battery life, phones now operate at 1.8V. The MPU9255 and MPU9250 chips are becoming increasingly rare. They are increasingly being replaced by the ICM2948 chips with a 1.8V I2C bus. Unfortunately, this bus cannot be connected directly to the Raspberry Pi's 3.3V I2C bus. However, the ICM20948 chip is of much higher quality and consumes less power.
It's important to note that ICM20948 modules with only a few components, in addition to the ICM20948 chip cannot be directly connected to a Raspberry Pi's I2C bus, even though they can be powered by 3.3V or 5V according to the vendor, which is true but misleading. The ICM20948 chip can indeed be powered by 3.3V or 5.5V, but this is not the case for its I2C interface which has a separate power supply at pin 8 of the integrated circuit. According to the IC manufacturer, TDK, this should not be powered at more than 1.95V. Fortunately, there are more and more ICM20948 modules that are directly compatible with Pis and Arduinos. They are no more expensive, but they also include a 1.8V regulator to power the I2C interface of the ICM20948 integrated circuit, as well as a few additional components to adapt the ICM20948 chip's 1.8V I2C bus to the I2C bus of the Raspberry Pi (3.3V) or Arduino (5V).
In electronics, exceeding the manufacturer's limits can strangely not be a problem under certain conditions. But this means accepting the risk of malfunction with other operating temperatures or voltages. It is therefore prudent to install an ICM20948 module with an I2C bus compatible with that of the Pi. For example, there are modules designated ICM20948V2 or GY-ICM20948V2, which are suitable for the Pi.
