Would the STM32F103C8T6 be enough for this project?

I plan to build a robot that uses 4 encoders like these for each motor. Now I plan to use interrupts in order to calculate the RPM value based on the encoder signals. The code will also respond to the speed of the motor i.e. a sort of PID where the motor will spin slower when more torque is required.

So my question is, Will the STM32 board (this one) running on STM32_duino be sufficient for reading 4 interrupts??

My understanding is that all the GPIO pins are hardware interrupt capable. Plus with 3 timers will this board alone be up to the task ? Or should I go with 4 individual ATMega's on each wheel communicating with one central one ?


How about attinys

Consider having a subprocessers for each encoder.  That way each one can count wheel movement while the main processor works on something else.

I also think it would be cheaper and more pin efficent.

I admit i’m a at-tiny fan but thats my 2 cents.


Software encoders

Four of thos encoders will barely make a dent in the work load for an ARM (or almost any other CPU). Additionally, most ARM chips have internal timers channels that can be configured for hardware counting functions such as quadrature decoding… 

That’s great to hear

That’s great to hear ggallant. The encoders are still on their way via slow boat from china. I’ll keep testing code with IR sensors until then. Thanks alot !!


Hey robotgoldfish,The

Hey robotgoldfish,

The ATTiny’s would’ve been my goto boards too if the STM32 wasn’t enough :smiley: Those little chips are brilliant. You should have a look at the STM32 board too. It’s really easy to use thanks to the STM32_duino and the clone boards are very cheap ( almost the same as an ATTiny85 online.) Or you could try the maple mini which uses a similar chip but is a bit more reliable than the clones (they go for $4 on aliexpress).

Thanks for your reply !!



I am nowhere near the level where i could use the power of the STM32 chip.  But i was thinking of using a ATTiny make a I2C motor controler with a position encoder when i saw your post, and hence the reply.   


There’s no shortage of CPU

There’s no shortage of CPU on that microprocessor, and it has several timers that can be used for encoders. The only thing that bothers me about that microcontroller is its 3v I/O, as opposed to 5v. If you’re going to interface it with 5v devices then you’ll need to use a voltage shifter (still very cheap, not a big deal really). Raspberry Pi is also 3v I/O, so if you’re going to use it with a Pi then the 3v is actually a plus, not a minus. Arduinos, however, are 5v. Just something to consider.

There’s a chance that I’m completely wrong here. Please somebody correct me if that’s the case.

Most of STM32 pins are 5V tolerant

You can simply connect 5V output from encoder to 5V tolerant input of STM32.