I have to pick a platform for a project I want to make. Which microcontroler would you recommend?
I want to develop a custom control board for electric unicycles, currently they all have chinese made ones with no open source software and appalling quality. Most appear to be using a ST 32bit stm32f1 series chip. Amusingly they don't even use this chip to run the motor controller instead adding a second microcontroller to manage the the timings for the 3 phase motor and hall sensors.
Should I stick with the ST stm32 series or is there better options? I don't really care much about price, only ease of use, how open source friendly it is and using the fewest chips possible to reduce PCB complexity.
Basically to get it to work I think I need
Input for 6 axis gyro / accel
Input from three hall sensors for RPM and motor phase timing
output to 3 different motor control mosfets for phases
output to control some circuits controlling regenerative braking.
Spare IO for measuring voltage and adding things latter on.
The good thing about the STM32 controllers is that the evaluation boards have a debugger and programmer on them. You could get a STM32F4Discovery board which has an accelerometer on it. Generally the F4 series have an FPU (great for spatial calculations) and it's fast (up to 168MHz). For control of the motors you could use dedicates ICs (not MCUs). TI and co. have ICs which are 3phase controllers w/ integrated mosfet drivers and they accept a PWM pulse as input. Then you could simply use DMA (or software) for controlling a timer peripheral.
All I can say is Freescale's dev boards are total shit and to not buy shit from them.
STM32 seems like the most popular choice. I'm a little lost on the motor controller though.
None of the controllers go anywhere near the volts/amps I need.
Do I just connect the controller output to another layer of larger mosfets?
If I use a controller like this it handles all the regen braking circuits? All I have to do is pass Engine / Brake and reverse data to it?
>>902795
This controller (the pic) seems to have braking (brake pin) but doesn't have the regenbraking feature. For higher amperages you should use ICs with integrates MOSFET drivers (this one also has mosfets, which is useless for higher amperages) so you can attatch external MOSFETs (so they don't share the DIE). You could use dedicates lowpower STM8 or STM32 MCUs to control the motors (like in quadcopters, electric speed controller)
>>902546
All i can say is freescale's boards are totally the shit and buy shit from them.
Seriously i dont see whats bad with them.
I myself have a frdm k64f and its pretty badass.
>>902442
If you want a microcontroller specificly aimed at motorcontrol, not too long ago i stumbled on the V line microcontrollers from freescale, they are catered towards motorcontrol.
Especially the MKV31F256 seems interesting, 256k of flash, cortex M4, 120 mhz, 2 16 bit adc and 1 12 bit dac onboard 2 SPI, 3 UART, 2 i2c, 17gpio and a 16 channel DMA.
And that only for 3.50 per chip, and that price is not even bulk cost, literally cost per chip if you buy 1.
Thank's for the help. If I use The ST32 + driver combo how difficult is the BLDC code to make? Is there existing free code that makes it easy? Also has anyone tried TIs instaspin sensorless tech in comparison? I haven't been able to find a good comparison between that vs hall sensors.
I'm currently doing my bachelor degree in power electronics. If it's any help: dsPIC's (16bit architecture) has some nice Motor Control PWM modules built in. 3 independent PWM channels with dual outputs (H & L side), programmable dead time generators, and protection form driving both pins active. Also nice ADC.