Alan B wrote:At any rate, good progress on your project. One advantage of using existing low cost hardware. The downside is only 32K in the chip will limit what can be done and chew up effort trying to keep things fitting.
Yes but I also see one advantage, less possibilities of many features which should make the project small and so more probability to finish it!!
Alan B wrote:I've been doing a little work on my similar project with the ATmega64M1, but the disadvantage is that I haven't built hardware yet (and it is not so cheap to buy the demo boards, the chips are cheap however), so it is more theoretical at this point.
You should join this project (didn't you already?
). Count the number of users on this forum that made their own hardware/motor controllers and see which of them is available to buy online and possible to ship to any country in the world - and with accessible price.
Alan B wrote:I haven't compared the chips in detail, that might be interesting to do, but I suspect they're similar in many respects. Both are using the same compiler core (GCC), and are similar in speed (16 vs 20 mips). The memory size of the ATmega64M1 is apparently double of the STM8 chips on these boards, if I understand the remarks I've seen here. They both have pin change interrupts. The ATmegaxxM1 family has a very sophisticated six output Power Stage Controller for generating three phase PWM, I'm not sure what the ST8 has there. The STM8 ADCs seem to be 12 bit whereas the AVR's are 10. The AVR has a DAC output and comparator that can trip off the PWM outputs in hardware for very fast response overcurrent shutdown that is not dependent on the CPU's response time.
- Forget about AVR - I had work with them in the past and I liked a lot the support of GCC and the datasheets and community, but they lack a cheap and OpenSource tool for debug like we have on STM32/STM8!! We use SDCC for STM8, no GCC available.
- Go to Ebay and find the cheaper Arduino board: it is STM8 and STM32. From china we see a lot of devices with STM32, see hoverboards and many other motor controllers!!
- STM8 have 6 PWM channels, complementary and we are using them. STM8/STM32 have TIMER 1 with specific hardware for motor control, but STM32 is more powerful TIMER1 for motor control.
- STM8 ADCs are also 10 bits.
- STM8/STM32 also have a digital pin for "break" on TIMER1, that can disable directly the duty_cycle. But on sinewave, that is not ok as it is the same as change the PWM/sinewave shape, so not needed.
- Are you looking to more flash memory on STM8 on this Kunteng motor controllers??
-- original is STM8S105C6T6, 16MHz, 32kbytes flash memory
-- pin compatible: STM8S208CB, 24MHz, 128kbytes flash memory -- so if you are looking to build your hardware, you should be able to solder, so you can swap the original STM8 to this new one
See here: https://opensourceebikefirmware.bitbuck ... tives.html
Debug session we have on STM8/STM32/ARM, we can stop the firmware execution, see variables, change their value on the fly, etc, etc -- you need to zoom out in your browser: https://opensourceebikefirmware.bitbuck ... mware.html