Skip to content

Team1157/aESC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adaESC Firmware  Copyright (C) 2024  Ada Tessar
       Schematics Copyright (C) 2024 Kooper Q and Ada Tessar 
This program comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions

This project implements a sensorless Brushless DC (BLDC) motor controller using an Arduino and the MCP2515 CAN bus module. The controller uses open loop control for sensorless commutation and receives speed control commands via CAN bus.


- Supports minimum speed for reliable sensorless operation
- MOSFET-based motor drive
- canbus control (example in canbus-motor-test.py)
- user interface for testing directly over usb

Hardware Requirements

see /partslist

Pinout
                               +---------------------+
                               |    Xiao ESP32-C3    |
+----------+                   |                     |
|   Xiao   |                   |                     | 0 ----+           
|  CAN Bus |                   |                     | 1 ----|--+        
|  Module  |                   |                     | 2 ----|--|--+     
| (MCP2515)|                   |                     | 3 ----|--|--|--+  
|          |                   |                     | 4 ----|--|--|--|--+
|  CS -----|-- 7               |                     | 5 ----|--|--|--|--|--+
|  SO -----|-- MISO            |                     |       |  |  |  |  |  |
|  SI -----|-- MOSI            |                     |      +H  L  H  L  H  L    MOSFET Drivers
| SCK -----|-- SCK             |                     |       |  |  |  |  |  |    (for each phase)
+----------+                   |                     |       v  v  v  v  v  v
                               |                     |  Phase A     B     C  
                               +---------------------+                       
                                                                             
                       +-------------------+
 A --------------------|                   |
 B --------------------|   BLDC Motor      |
 C --------------------|                   |
                       | (e.g. T200/Neo )  |
                       |                   |
                       +-------------------+
Notes:
1. MOSFET connections:
   - Phase A: High (Pin 5), Low (Pin 6)
   - Phase B: High (Pin 7), Low (Pin 8)
   - Phase C: High (Pin 9), Low (Pin 10)

3. CAN Bus Module connections:
   - CS: Pin 7
   - SO: MISO of Arduino
   - SI: MOSI of Arduino
   - SCK: SCK of Arduino

4. Double-check all connections before powering on the system!!!! (i maybe shorted a 12v battery :3)
Dependencies

- SPI library (built-in to arduino ide :3)
- MCP2515 library (https://github.com/autowp/arduino-mcp2515)

 Setup

1. Connect the MOSFET driver circuit and BLDC motor according to the pinout.
2. Connect the MCP2515 CAN bus module to the Arduino.
3. Install the MCP2515 library in your Arduino IDE.
4. Compile and upload the code to your Arduino board (CHECK YOUR PINOUT AND WIRING NOW!!!!!!)

Usage

1. The motor controller listens for CAN messages with ID 0x123.
2. Send a 16-bit speed value (0-1000) via CAN to control the motor speed.
3. The controller will automatically handle commutation and speed control.

Ensure proper cooling and protection for the MOSFETs and motor during operation.

This code controls high-power electronics. Incorrect use can lead to equipment damage or personal injury. Always ensure proper insulation, cooling, and safety measures when working with motor controllers and power electronics.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages