Skip to the content
PCBKitNew board
2 layers75 × 35 mmCANPower, the printed circuit board in 3D

Accessory power controller for BMW CAN bus bikes

Size
75 × 35 mm
Copper layers
2
Thickness
1.6 mm
Parts
66
Nets
66
Pads
228
Tracks, vias
585, 49
Pours
19
Routed
Yes
KiCad
KiCad 4
Created
2 Jan 2018
Updated
6 Jul 2018

Overview

CANPower is an open-source printed circuit board by RaphWeyman, from the RaphWeyman/CANPower repository on GitHub, published under the GPL-2.0 licence. It is a 2-layer board of 75 × 35 mm with 66 parts on 66 nets, routed with 585 tracks and 49 vias.

It is built around the PIC24HJ128GP504-I/ML, MCP2562-E/SN and MCP16311-E/MS, with the MCP1727-3302E/SN and BSS83P among its other parts. Its parts include 23 capacitors, 21 resistors, 7 connectors, 5 ICs and 2 transistors. It belongs with the interfaces and adapters boards and the PIC boards of this library.

Main components

5

README

README.md

CANPower

Accessory power controller for BMW CAN bus bikes

Two channel power switch using BMW CAN bus messages to control switch output. Microchip PIC24 based.

Hardware is a printed circuit board created and modifiable with KiCAD. If no modifications are required then the gerbers zip file can be used as is to get manufactured. The gerber file names are as required by Elecrow.

The software is packaged as a Microchip PIC IDE project and requires Microchip MPLAB X with the 16 bit PIC compiler installed - all free from the Microchip website.

The 6 way "debug" header on the PCB connects directly to the the Microchip PICKit 3 debugger/programmer. This or some other programmer is required in order to program the software to the Microchip MCU.

Functionality may easily be changed by modifying the application.c file. Here's what the default application does:-

  • Switch channel 1 is set to go fully on or fully off with the ignition for accessory power
  • (can easily be changed to staying off by changing the CHANNEL_1_ON define).
  • Channel 0 is controlled by the ASC switch (can be changed with the BUTTON_PRESSED define).
  • Channel 0 has two modes; modulated and unmodulated. Unmodulated behaves like channel 1; fully on
  • or fully off with the ignition.
  • Modulated is PWM controlled for several power levels from fully off to fully on and each of the quarters
  • inbetween (modify at the CHANNEL_0_PWM_SETTING). PWM is slow for heated clothing but can be changed to
  • fast by changing the CHANNEL_0_PWM_MODE.
  • A long press (>20 seconds) of the control button toggles between modulated and unmodulated modes.
  • A short press (<1 second) of the control button while in modulated mode cycles through the modulation levels.
  • Channel 0 mode and modulation level are stored in EEPROM at power off time (immmediately prior to transition to the
  • alarm simulation state)).
  • An alarm simulation is included after the ignition is turned off (and the POWER_OFF_DELAY has elapsed).
  • During alarm simulation the switch chip is turned off but the LED indicates as if there were an
  • alarm module armed.
  • Alarm simulation continues for the ALARM_SIMULATION_TIME or can be disabled by setting the ALARM_SIMULATION_TIME to zero.
  • A kickstand warning indication is output to the LEDs if the kickstand is deployed while the ignition is on
  • The warning can be disabled by commenting out the KICKSTAND_WARNING define.
  • Ignition on is determined by CAN messages being received.
  • Fully on state is maintained POWER_OFF_DELAY. If no CAN messages are received for longer than the POWER_OFF_DELAY
  • then channels 0 and 1 are both turned off and the alarm simulation is stated.
  • Power to the CPU is latched using the PORT_POWER hardware control. When either the ignition is on or the PORT_POWER is set to
  • POWER_PORT_ON power is supplied to the CPU. This allows the CPU to maintain power during the POWER_OFF_DELAY
  • and the ALARM_SIMLATION_TIME. At the end of the ALARM_SIMULATION_TIME, the PORT_POWER is set to POWER_PORT_OFF so as to cut
  • power.
  • Indications are assumed to be for a single bi-colour LED.
  • LED is dimmed according to the ambient light sensor CAN bus message.
  • LED0 fully on indicates channel 0 is in unmodulated mode.
  • LED1 on but with between 1 and 4 inverse blips indicates channel 0 modulated mode and the number of inverse blips indicate
  • the modulation level (4 blips - fully on).
  • LED1 flashes 4 blips when the channel 0 mode is changed.
  • Both LED0 and LED1 fully off indicate either modulated mode with channel 0 output at the fully off level or no power to the CPU.
  • LED0 flashing at 1Hz indicates that the kickstand is extended.
  • LED0 flashing at 4Hz indicates a switch chip fault - recover by ignition off/ignition on.
  • LED1 blips every few seconds for the alarm simulation.
  • Indications can all be changed by modifying the INDICATIONS and CHANNEL_0_INDICATIONS table.
  • Application is a state machine with a single state variable 'state' and a function of type
  • state_function_t for each state.
  • Each state function must implement the actions for state entry and for state maintenance.
  • The current state's function is invoked regularly (once per timer tick).
  • The StateTransition function is used to change state.
  • The state machnine can be extended by adding to BOTH the states_t and the STATE_FUNCTIONS

Parts

66
QtyValueFootprintReferences
8100nFCapacitors_SMD:C_1206C3, C5, C14, C15, C19, C20, C22, C29
610uFCapacitors_SMD:C_1210C4, C7, C9, C10, C17, C18
51MResistors_SMD:R_1206R2, R3, R19, R20, R21
4Mounting_Holes:MountingHole_2.5mm, , ,
4100KResistors_SMD:R_1206R5, R9, R10, R13
422nFCapacitors_SMD:C_1206C11, C21, C23, C24
32u2Capacitors_SMD:C_1210C12, C13, C16
210KResistors_SMD:R_1206R1, R7
2150RResistors_SMD:R_1206R16, R17
220pFCapacitors_SMD:C_1206C1, C2
2470KResistors_SMD:R_1206R4, R18
28K2Resistors_SMD:R_1206R12, R14
2BSS83PTO_SOT_Packages_SMD:SOT-23Q1, Q2
1120RResistors_SMD:R_1206R8
11KResistors_SMD:R_1206R11
122uHraphfootprints:Coilcraft_MSS7341L1
12AResistors_SMD:R_1206F1
12K2Resistors_SMD:R_1206R15
14MHzCrystals:Crystal_SMD_HC49-SDY1
152K3Resistors_SMD:R_1206R6
1BATTWire_Connections_Bridges:WireConnection_1.50mmDrillJ7
1BAV74LT1GTO_SOT_Packages_SMD:SOT-23D1
1CANPin_Headers:Pin_Header_Straight_1x02_Pitch2.54mmJ1
1DebugPin_Headers:Pin_Header_Straight_1x06_Pitch2.54mmJ3
1LEDPin_Headers:Pin_Header_Straight_1x03_Pitch2.54mmJ8
1MC06XSD200raphfootprints:QFN-23_12x12mm_Pitch0.9mm_holesU4
1MCP16311Housings_SSOP:MSOP-8_3x3mm_Pitch0.65mmU2
1MCP1727-3302Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mmU1
1MCP2562-E/SNHousings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mmU3
1Output0Wire_Connections_Bridges:WireConnection_1.50mmDrillJ5
1Output1Wire_Connections_Bridges:WireConnection_1.50mmDrillJ6
1PIC24HJ128GP504Housings_QFP:PQFP-44_10x10mm_Pitch0.8mmU5
1PowerPin_Headers:Pin_Header_Straight_1x03_Pitch2.54mmJ4

Questions

How big is the CANPower PCB?

It measures 75 × 35 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CANPower use?

66 parts, built around the PIC24HJ128GP504-I/ML, MCP2562-E/SN, MCP16311-E/MS and MCP1727-3302E/SN. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the CANPower KiCad files?

From the RaphWeyman/CANPower repository on GitHub, at the commit this page was made from: the board is Hardware/KiCAD/CANPower/CANPower.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the CANPower design in my own project?

Its repository publishes it under the GPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 4 layers53.3 × 68.6 mmHamShield1, the printed circuit board in 3D

    HamShield1

    EnhancedRadioDevices/HamShield1

    HamShield 1.0 Hardware

    381 parts8
  • 4 layers103.5 × 48.3 mmButtonBd2, the printed circuit board in 3D

    ButtonBd2

    frc971/electrical

    This repo contains the electrical files for the 971 FRC team. The files include PCBs and the electrical system diagrams. The PCBs are created using KiCad.

    165 parts3Apache-2.0
  • 2 layers102 × 103 mmOhmsprint, the printed circuit board in 3D

    Ohmsprint

    Jockkoo/Ohmsprint-2026-4Digitalca

    Ohmsprint hackaton 2026. KiCad

    123 parts1
  • 2 layers110 × 82 mmInvertor, the printed circuit board in 3D

    Invertor

    victorstoica114/Invertor_board

    This repository contains an ESP-IDF firmware for an ESP32 board that bridges, translates, decodes, and exposes battery/inverter communication over CAN and RS485.

    151 parts1
  • 4 layers103 × 126 mmSenzori iradiere, the printed circuit board in 3D

    Senzori iradiere

    cs-pub-ro/smart-solar-irradiance-sensor

    Open-source hardware & software for a smart wireless sensor that measures solar irradiance.

    351 parts
  • 2 layers100.3 × 76.2 mmEsp32-gateway hw, the printed circuit board in 3D

    Esp32-gateway hw

    monkeykingblack/esp32-gateway-hw

    72 parts
  • 4 layers110 × 90 mmURC, the printed circuit board in 3D

    URC

    spikonado/URC

    Universal Robot Controller

    180 parts2CERN-OHL-W-2.0
  • 2 layers88.9 × 78.7 mmWr rusefi, the printed circuit board in 3D

    Wr rusefi

    mck1117/wr-rusefi

    Georgia Tech Wreck Racing's implementation of a Rusefi compatible ECU

    147 parts1