Design Criteria

  • 100A continuous motor current
  • Compact size for discrete mounting on an E-Bike
  • Easy to solder
  • Programable
  • Waterproof
  • Based on Benjamin Vedder’s VESC 4.12 hardware

Introduction

As part of my electric mountain bike project I needed a speed controller for a large hub motor.

I wanted the bike to be fast, so high current was essential. I had 3kW in mind at the beginning of the project (60A). I also wanted the bike to look good. Large speed controllers give an E-bike that bulky home-made look in my opinion. My speed controller needed to be small enough so that it could be hidden under the seat..

The controller would need to be fully programmable with safety features to avoid overheating the motor, over discharging the battery etc. These features are not available on the standard cheap controllers.

I found Benjamin Vedder’s VESC, (Vedder electronic speed controller) https://vesc-project.com/ which is very popular in electric skateboard projects. As such the hardware is designed to be compact rather than accommodate high current limits. The original design does not offer any way to easily heat sync the MOSFETs. The software is very advanced with associated windows and Linux setup applications. There are even android apps to monitor the device and adjust settings via Bluetooth.

I decided to re-design the hardware to allow for a current limit of 100A and above.

These were the first PCB’s I designed so although this project is currently working fine please suggest any improvements to my layout!

PCB Design

The original VESC 4.12 is a 4 layer board with components on both sides. The processor is a 64 pin STM32 which drives 6 MOSFETs via a DRV8302 MOSFET driver. The DRV8302 also contains a 5V switching regulator and 2 current shunt amplifiers.

My design reconfigures the hardware onto two, two layer, stacked boards to reduce the costs of manufacture. The components are mounted on the top side only to allow easy flow soldering using a hot plate or modified clothes iron.

The 6 power MOSFETs and current shunts are on the bottom driver board which is mounted onto a heat sink for cooling. The majority of the other components are on the top processor board. Splitting the boards like this was the best way to minimise the footprint of the device. Also, I expected to blow up a few MOSFETs during testing. The driver board as such is almost disposable with the expensive IC’s being positioned on the top driver board.

Note that I did not populate the servo connector. I didn't have a use for this input.

Version R1 – Now Revised

These were the first PCB’s I designed and as such there were a few issues. Some are quite embarrassing, but I will mention them all in the hope that you can learn from my mistakes.

Driver Board

  • All MOSFETs were connected the wrong way around with the drain and source connections swapped. When getting to grips with DesignSpark PCB I was messing around creating symbols and PCB foot prints. I made the MOSFET symbol as an experiment but never checked it. Always check all symbols and foot prints down the most obvious details!

Processor Board

  • Not enough border around JST connectors meant they didn’t fit. I was able to trim them down to allow me to test the board. Again, check symbols and footprints.
  • Some passive components I had selected were actually very difficult/expensive to obtain. Make sure you can get the part before putting it into your design.
  • The USB connector I had selected didn’t seem to exist anymore. I found one that was close enough to test. As above.

Although the issues above were frustrating I was able to modify things to get the firmware loaded into the STM32 and check that all the functions worked correctly. In fact, although I have since revised the driver and processor boards I am currently using a R2 driver board connected to my original R1 processor board. It’s not pretty, but I...

Read more »