Designing the new controller Part Two

Posted by Andy on May 30, 2016 Tags: development electronics

This post, I would like to talk about the details of the controller board. There were lots of different boards on the market. But we will design the board that has lots of differences.

The brain: MCU

Upgrading the MCU is the main reason for the new design. We are going to use STM32F103VE(cortex-m3) chips as the new MCU, later maybe STM32F40X(cortex-m4) if the computing power is still not enough. Comparing to the AVR chip, the STM32F103 chip is running at 72 MHz and 32-bit, that means at least 4.5 times faster than AVR chip (16 MHz and 8-bit). So we can run more complex algorithms and calculations with ease. And I can add more functionalities if I need in the future.

Stepper drivers

We're going to use A4982 as the stepper drivers because those chips are very reliable and robust. This chip is one of the most used stepper driver ICs in the market. There are not too many innovations with this chip. But we do have one design that other designs haven't used, current control.
The driver IC needs an analog signal to determine how much current supply to the stepper. All the stepper sticks are using a trim pot to adjust the current, see the picture below. So every time you want to change the current, you need to adjust the pot. This is very tedious.

Some advance controller boards have digital trim pot, so we don't need to adjust the pot manually. But adding one or two digital trim pot(s) will be costly.

Our design will not use trim pot but use DACs (Digital Analog Converter) to generate the analog signals. Our chip STM32F103 has two DACs internally, so we don't need to add other components. So we can adjust the current on the fly by sending the relevant G-codes. This feature makes us possible that different conditions with different current settings.