MCU Hardware Advice: Cheap, Small, Can run LVGL and Provides USB HID

Description

What MCU/Processor/Board and compiler are you using?

I want to use C, or maybe MikroPython - but C/C++ is fine.

What do you want to achieve?

I am building a joystick-like peripheral, it needs a small screen and to work as a USB HID joystick device.

What have you tried so far?

I am currently working with RaspberryPIs, which can do USB HID on the Zero line of devices. The drawback is that they are hard to get in bulk, and get expensive quick in bulk. $15 each is not a total deal breaker, but it makes me consider going back to a low-end MCU. I am running rpi without x-windows. Just with the terminal and framebuffer.

I would love to use an ESP32, but they dont have USB-HID.

The MCU of course has to be able to run LVGL, but I wont be doing anything with lots of animation or similar. Enough EEPROM to store a few background images, splash screens, etc. would be great.

I realize this might be an annoying or off-topic post, and if that is the case, I apologize.

Thank you for any help!

I’m no expert when it comes to choosing MCUs, but you could have a look at the STM32 family. I know that they have pretty good USB device support and they are quite popular, so finding examples and answers to questions shouldn’t be too hard.

1 Like

Yeah, STM32 appear to have a great mix of price\features. Will probably have to get a ICE\Programmer though. Another benefit of a full SBC is they generally are easy to debug and program!

The STM32 product line is vast. I realize I am being lazy here, and it is a needle in a haystack without much more specific notes on what I am trying to do. I suppose I am hoping someone pops through with a specific suggestion of a device they found price effective and worked well with LGVL. MCU PN or a development board suggestion are both good.

Next stop is reading more posts here so I dont ask more inane questions.

This is definitely overkill, but I use STM32F746G-DISCO for my own hobby projects and it works great. The older F4 version (STM32F429-DISCO) also works well with LittlevGL.

Yeah, the disco boards jump out because others on the forums mention them here, but the cost is pretty high. I have this fantasy where I design a small product and simply make a few of them to sell, and only design a daughter board that plugs into a cheap MCU demo board.

MikroElectronica products have also always been great to use, but they again are quite expensive compared to the very alluring Raspbnerry Pis. They sell them for $5 in 1 qty, and $15/ea in bulk. They have lots of hand waving to justify this odd arrangement, which seems to be tied to unstated, but I am sure perfectly reasonable, commercial goals.

These boards are compelling, but they are serious overkill for what I want to do, and wont work if they cannot operate as USB HID devices powered just from a standard PC USB port… Ordering one now, at any rate, and will try it with an SPI display, armbian.com debian, and littlevgl.

This board that I’m using may also fit: a STM32F407VE:


I used STM32F423 (100MHz) in a project with a 240x240 TFT driven via 8-bit parallel port) and achieved 20-30 FPS with a lot of animations and opacity.

To get this high I used DMA in disp_flush_cb and 2 display buffers, 1/4 screen-sized each.

That looks great actually. Thank you.