KEVIN CHEN
← Back to Projects

CAN Bus Communication and Control

This is an embedded CAN communication system running on an STM32F10x microcontroller. It ties together button inputs, LED control, ADC sensing, and CAN messaging to show two nodes talking back and forth over a CAN network.

On startup the program sets up the system clock, GPIO, ADC, a timer, and the CAN controller with its message filters. Two push buttons drive the state: a wake-up button and a user button, each one updating its LED and broadcasting its status over CAN using fixed message IDs.

Once it's up and running, a timer periodically fires off the ADC readings over CAN. It reads the value from an analog input, packs it into a CAN message, and sends it out to the other nodes on the network.

It also receives CAN messages and uses them to control two external LEDs (LED8 and LED9). Incoming messages are filtered by ID, and the payload decides whether each LED turns on or off.

Key Achievements

  • Developed firmware for STM32F107 microcontroller to handle CAN bus messaging and I/O sampling
  • Implemented real-time data processing and communication protocols
  • Designed robust error handling and message filtering systems
  • Optimized for low-latency communication in automotive applications
© Kevin Chen