CANPico - CAN FD Module With Raspberry Pi Pico
Free Shipping Within The United States!
Shipped with Pico and MicroPython pre-installed.
The CANPico module is a carrier board for the Raspberry Pi Pico. It is soldered onto the Pico, connecting the Raspberry Pi to a CAN Bus controller and transceiver, ready for connection to a CAN Bus network via a simple screw terminal. The CANPico includes an instrument header with the CAN H and CAN L signals and the digital RX and TX signals for use with an oscilloscope or logic analyzer. Software support is via an open-source MicroPython SDK.
The open-source MicroPython SDK from Canis Labs implements a sophisticated CAN API, including priority-inversion free drivers, 1μs accuracy timestamps, large buffers, and an API for triggering a logic analyzer or oscilloscope. Support for communicating to a host device over USB (via the MIN protocol) enables applications like bus logging or even using a CANPico as a PC CAN interface. The SDK also includes the CANHack toolkit for low-level error injection. The SDK allows Python code to operate on the dual-core RP2040 microcontroller of the Raspberry Pi Pico. It responds in real-time to CAN Bus data traffic with times measured in microseconds rather than milliseconds, making it an excellent platform for hardware-in-the-loop test and emulation.
Main hardware features
- Microchip MCP2517/18FD CAN controller with 2Kbyte buffer space
- Microchip MCP2562FD CAN transceiver
- Screw terminal for direct access to CAN High/Low twisted pair wiring and a common ground reference
- Jumper for a standard 120Ω CAN bus termination resistor
- Jumper for enabling and disabling transmit input to the transceiver
- Header pins for logic analyzer access to digital CAN signals (TX and RX pins of the transceiver)
- Header pins for oscilloscope access to the analog CAN signals (CAN High/Low, ground)
- TRIG pin for logic analyzer and oscilloscope triggering on programmable CAN events
- Direct GPIO access to CAN RX and TX pins for software error injection
- GPIO control over transceiver low power standby
The Raspberry Pi Pico is designed to be soldered onto a board using the ‘half moon’ edges, leaving header pins free. The other connections are USB (for power and connectivity to a host) and the CAN bus. The 6-pin header is intended to support a logic analyzer and oscilloscope to see raw CAN signals. The yellow jumper enables the termination resistor. The blue jumper enables transmission on the bus (when removed, the board is restricted to a listen-only mode, a helpful security feature).
The software support is provided with a MicroPython SDK that has the following APIs:
- CAN API
- CANHack toolkit API
- Trigger API for triggering test instruments on CAN errors and CAN frames with a specified ID and payload
- MIN API to communicate with a host PC over a second virtual USB serial port
The CAN API consists of the following Python classes:
- The CAN class provides control and status of the CAN controller
- The CANFrame class encapsulates CAN frames, which are either created in software or by receiving them from the CAN controller hardware
- The CANError class encapsulates CAN error frames, which are created receiving them from the CAN controller hardware
- The CANID class describes a CAN ID: every CAN frame has a CAN ID, but many frames can have the same ID
- The CANIDFilter class describes how a CAN controller should identify and accept CAN frames based on their CAN ID
The MIN API provides MIN protocol support for reliable communication with a host PC. Some of the CAN API calls use a binary representation to allow items to carry over MIN.
- Hardware Reference Manual (PDF)...
- MicroPython SDK Reference Manual (PDF)...
- Latest firmware (.uf2, release date 2021-05-10). Based on the v1.15 release of MicroPython for the Pico...
- CANPico Schematics (PDF)...
- Kicad Design...
- MicroPython Programming Example for CANPico...
- CANHAck Blog Post...
- CANHack Demonstration Video...
It is exciting to get involved with MicroPython, the re-implementation of Python 3 for microcontrollers and embedded systems. This helpful guide presents the knowledge you need to roll up your sleeves and create outstanding embedded projects with this lean and efficient programming language. If you are familiar with Python as a programmer, educator, or maker, you are ready to learn and have fun along the way.
The author takes you on a journey from the first steps to advanced projects. You explore the types of devices that run MicroPython, and examine how the language interacts with hardware to process input, connect to the outside world, communicate wirelessly, make sounds and music, and drive robotics projects.
- Work with MicroPython on four typical devices: PyBoard, the micro:bit, Adafruit’s Circuit Playground Express, and ESP8266/ESP32 boards
- Explore a framework that helps you generate, evaluate, and evolve embedded projects that solve real problems
- Dive into practical MicroPython examples: visual feedback, input and sensing, GPIO, networking, sound and music, and robotics
- Learn how idiomatic MicroPython helps you express a lot with the minimum of resources
- Take the next step by getting involved with the Python community
A short introduction to the Canis Labs CANPico CAN hardware for the Raspberry Pi Pico. Demonstrates sending CAN frames with the MicroPython CAN API and a logic analyzer with a CAN protocol decoder.
An intro to th...A short introduction to the Canis Labs CANPico CAN hardware fo...