Ding dong! Hear that? It's the PiCowbell ringing, letting you know that the new Adafruit PiCowbell CAN Bus board is in stock and ready to assist your Raspberry Pi Pico and Pico W project in connecting to CAN bus networks for automotive or robotics projects.

CAN Bus is a small-scale networking standard, originally designed for cars and, yes, busses, but is now used for many robotics or sensor networks that need better range and addressing than I2C and don't have the pins or computational ability to talk on Ethernet. CAN is a 2 wire differential standard, which means it's good for long distances and noisy environments.

Messages are sent at about a 1 Mbps rate - you set the frequency for the bus and then all 'joiners' must match it, and have an address before the packet so that each node can listen in to messages just for it. New nodes can be attached easily because they just need to connect to the two data lines anywhere in the shared net. Each CAN device sends messages whenever it wants, and thanks to some clever data encoding, can detect if there's a message collision and retransmit later.

If you'd like to connect your Raspberry Pi Pico to a CAN Bus, the Adafruit PiCowbell CAN Bus board has a MCP2515 controller and TJA1051/3 transceiver! The controller used is the MCP2515, an extremely popular and well-supported chipset that has drivers in Arduino and CircuitPython and only requires an SPI port and two pins for chip-select and IRQ. Use it to send and receive messages in either standard or extended format at up to 1 Mbps.

Adafruit has added a few nice extras to this PiCowBell to make it useful in many common CAN scenarios:

  • 5V charge-pump voltage generator, so even though you are running 3.3V on a Pico board, it will generate a nice clean 5V as required by the transceiver.
  • 3.5mm terminal block pre-soldered on the board to get quick access to the High and Low data lines as well as a ground pin.
  • 120-ohm termination resistor on board, you can remove the termination easily by cutting the jumper marked Term on the top of the board.
  • Pre-connected CS and INT pins on Pico GPIO #20 and #21. You can cut the bottom solder jumpers and use the breakout pads to connect to any two IO pins you like.

Each order comes with an assembled PCB and header. You will need to solder in the header yourself, but it's a quick task.

Please Note! There are a lot of possible configurations, and we stock various headers depending on how you want to solder and attach. Especially if you want the Pico on top so that the BOOTSEL button and LED are accessible.

  1. Use the Pico Stacking Headers if you want to be able to plug into a breadboard or other accessory with sockets.
  2. Use the Pico Socket Headers if you want to plug directly in and have a nice solid connection that doesn't have any poking-out-bits.

The PiCowbell CAN Bus provides you with:

  • Right angle JST SH connector for I2C / Stemma QT / Qwiic connection. Provides 3V, GND, IO4 (SDA), and IO5 (SCL).
  • Reset button - Press to restart your program.
  • Every pad on the 'bell has a duplicate hole pad next to them for solder-jumpering
  • The ground pads have white silkscreen rectangles for easy identification, plus one long ground strip near the reset button.
  • Gold-plated pads for easy soldering.

If you are using the Philhower Arduino core, the Wire peripheral is already set up to use GPIO4 and GPIO5, and SPI is default on GPIO16, GPIO18 and GPIO19. If you use CircuitPython or MicroPython, you'll need to let the code know to look at 4+5 for SDA+SCL pins, and configure the SPI port for SCK=18, MOSI=19 and MISO=16.

This guide was first published on May 10, 2023. It was last updated on Mar 28, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.