Canbus Lighting Controller

I am working on a Canbus connected LED Controller.
After looking at the vesc code I want to leverage speed info, battery level, brake and IMU data to control addressable LED & 12V Front & Brake.
Project will be opensource and free to all.

  • Canbus coms with passthrough
  • compact
  • ws2812B using wled code
  • front and rear light control
  • single button control (external)
  • low cost
  • JLBPCB assembly friendly
  • firmware upgradable
  • PPM\UART remote Macro (i.e. Brake 100% 3 times rapidly turns on\off lights)
  • Mobile App
  • Integrated Buck

Info Iinks:


Board will likely be STM based I will be limited to what carry in stock.
My prototype was esp32 based and not very assembly service friendly.
The upside is canbus on STM is a snap but I will need to port the wled code over.

I am in 2 minds.
Option one use the nRF52840
LCSC stocked
Can double as a can connected ble module.
Can be updated by over the air/swd port
Nordic Dev environment is a skullf##k
Limited storage

Create board with a socket for esp32 module
Native support for wled code and libraries
Circuit python support
Wifi web app easier to code.

Canbus support is tricky but doable
Bulkier design.
Requires user to source seperate part.

Ordered a nrf Dev board with built in canbus transceivers to test the concept. I have also started on the esp32 PCB design. Not all (V)ESC have an IMU so I will add a header to add a built in IMU.


Fuck me this is a lot of reading.
My original plan of doing can bus in software and just hanging some TJA1050 can bus ics off gpio might be not be the best.
New plan add a can bus dedicated controller connect it to the esp32 via spi and it talks to 2x TJA1050.
No bit bashing as it handles all the timings. Adds about a $1 to the design but frees up a lot of heavy lifting from the esp32.

Also looking at Atmel micros
They have the advantage of having in built can bus controller. The library and code are well documented for can bus. I can see why everyone ops for UART comms.

Prefered Controller: (dev bourd ordered)


Instead of making this wireless, and wasting quite a bit of juice staying in contact wirelessly – how about driving it with some cheap wires, or even better - use a conductive INK pen to draw out the circuit, and then once it’s working, paint over it with some kind of protective paint – a clear nail polish would probably work nicely.