Skip to content

Warthog Batteries (Sysnergie)

Jean-Michel Fortin edited this page Jan 19, 2024 · 21 revisions

Introduction

The original Warthog batteries were replaced by the company Sysnergie (based in Sherbrooke) in October 2023. The company is a start-up, and the lab basically funded the development of their product. Keep in mind that it is a prototype, and that the employees can be contacted for any issues.

Documentation

A preliminary User Guide (only in French) was provided by Sysnergie and is available here : User Guide

Note: If the link is not working, ask Jean-Michel Fortin.

Overview

  • The Warthog contains 16 battery modules of 48V all connected in parallel
  • Each module contains 48 cells : 12S 4P
  • The modules are daisy-chained for communication
  • When fully charged, the remaining_capacity is around 9400 Coulombs
  • Each module contains a NXP transformer that communicates with other modules through a transformer physical layer (TPL)
  • For V1.0, the cables between each module are connected with Neutric connectors
  • A CAN bus (ethernet cable) is accessible to debug the state of the batteries inside the left rocker
  • The charging port is also accessible inside the left rocker
  • Always power off the robot before charging, because the batteries will shut down upon connection with the charger

CAN-Bus Configuration

To communicate with the Battery Management System (BMS), we use a PEAK PCAN-USB adapter. The initial driver setup on the Warthog low-level was made following this guide.

In a nutshell, setup was done using the following commands:

sudo apt install -y libpopt-dev
cd ~/
wget https://www.peak-system.com/quick/PCAN-Linux-Driver
tar -xzf PCAN-Linux-Driver
cd peak-linux-driver-*
make clean
make NET=NETDEV_SUPPORT
sudo make install
sudo modprobe pcan
cd ~/
rm -rf PCAN-Linux-Driver peak-linux-driver-*

Since there was already a PCAN-PCI device inside the Warthog to communicate with the motor controllers, we had to configure the PCAN driver so that the USB adapter would not be given the can0 port. To achieve this, we modified the end of the file /etc/modprobe.d/pcan.conf:

options pcan assign=peak    # <-- ADDED LINE
install pcan modprobe --ignore-install pcan

This way, the PCI adapter takes the can0 slot while the USB one is given the can32. This can be validated using the following command:

cat /proc/pcan

Finally, to make sure that the port is opened at startup and with the right bitrate (250000), we created a systemd service at /etc/systemd/system/socketcan.service. This service simply executes a script located at /home/administrator/scripts/setup_socketcan.sh.

ROS Driver

We defined a custom ROS driver to monitor the state of the batteries, called sysnergie_batteries_ros. The source code is available here: https://github.com/norlab-ulaval/sysnergie_batteries_ros.

It depends on the cantools and python-can libraries.

From the SysNergie module, we receive current and voltage measurements for the whole battery pack at a frequency of 10 Hz. We also receive other measurements and health signals at a frequency of 1 Hz. For simplicity, we combine everything in a custom message called BatteryLog, which published on the /battery_logs topic every time a new message is received on the CAN Bus.

Debugging

We use the same PEAK PCAN-USB adapter for debugging. An ethernet cable is available in the left-side rocker of the robot. We suggest using BusMaster on Windows to view CAN frames.

In Linux, you can use can-utils to debug the CAN-Bus. Install it with:

sudo apt install can-utils

To check that the driver is working properly, you can print raw CAN messages in the terminal using:

candump -x can32 | grep RX

Note: Replace can32 with the appropriate CAN port for your setup.

With python-can installed, you can display the CANBus messages using the following command:

can_viewer -c "can32" -i "socketcan"

Norlab's Robots

Protocols

Templates

Resources

Grants

Datasets

Mapping

Deep Learning

ROS

Ubuntu

Docker (work in progress)

Tips & tricks

Clone this wiki locally