2020-07-02 09:09 AM
I am trying to make the transition from Arduino/Atmel micro controllers to something that can support true threading/multitasking in the 32bit ARM processor category. I am making a robot where I need to control 7+ 12v motors, 24 servos, 100+LEDS, speakers, and some sensors all over a USB host bus from a dualshock 4 controller.
I am looking for someone to point out to me a board/boards that is entry level user friendly with good documentation and support that can handle the above list simultaneously within timing groups. I am using a list of Arduino capable breakouts and would like to use them with the stm board. Can anyone help please? :grinning_face:
Solved! Go to Solution.
2020-07-02 12:15 PM
Hi,
NUCLEO Boards have Arduino like headers. Signals are 3.3V not 5V and there may be some restrictions in pin assignments, so there is no guarantee that every Arduino shield will work. Most (all?) Nucleo-144 boards already have a dedicated USB port on the bottom side. For the MCUs you may choose between F4 F7 H7 (increasing order of performance and chip complexity) and L (ultra low power) series. F4 should be powerful enough and is used in drone flight controllers alot. NUCLEO-F429ZI may be a good starting point. Here is a short summary: https://os.mbed.com/platforms/ST-Nucleo-F429ZI/
Check the "STM32 Nucleo-144 boards User Manual" for header pinout etc.. and the data sheet and reference manuals for the MCU.
Nucleo-64 are smaller but have no on-board USB connector, you may add (solder) one. Check NUCLEO-F466RE for example.
If you start your project with STM32CubeIDE or CubeMX, you can compare board/MCU parameters interactively. You may also check USB host and FreeRTOS (OS) middlewares. The generated code has some limitations (or even bugs), don't expect a big choice of ready-to-run SW packages for your specific application. But, its a starting point.
KnarfB
2020-07-02 12:15 PM
Hi,
NUCLEO Boards have Arduino like headers. Signals are 3.3V not 5V and there may be some restrictions in pin assignments, so there is no guarantee that every Arduino shield will work. Most (all?) Nucleo-144 boards already have a dedicated USB port on the bottom side. For the MCUs you may choose between F4 F7 H7 (increasing order of performance and chip complexity) and L (ultra low power) series. F4 should be powerful enough and is used in drone flight controllers alot. NUCLEO-F429ZI may be a good starting point. Here is a short summary: https://os.mbed.com/platforms/ST-Nucleo-F429ZI/
Check the "STM32 Nucleo-144 boards User Manual" for header pinout etc.. and the data sheet and reference manuals for the MCU.
Nucleo-64 are smaller but have no on-board USB connector, you may add (solder) one. Check NUCLEO-F466RE for example.
If you start your project with STM32CubeIDE or CubeMX, you can compare board/MCU parameters interactively. You may also check USB host and FreeRTOS (OS) middlewares. The generated code has some limitations (or even bugs), don't expect a big choice of ready-to-run SW packages for your specific application. But, its a starting point.
KnarfB
2020-07-02 03:23 PM
I am very familiar with using FreeRTOS and using USBHost libraries from 3rd parties. I have some experience with a USB breakout that I could possibly try and interface:
https://www.amazon.com/gp/product/B01EWW9R1E/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
I am acquiring a NUCLEO_L476RG from my Uni to test with but will have to return it.
2020-07-02 03:54 PM
IMHO using USB as interface of consumer game console is ok, but for realtime motor control and sensor ... unusual choice.
> I am very familiar ... using USBHost libraries from 3rd parties.
Hm, well, then ST have something to surprise you in this area.
-- pa
2020-07-02 04:54 PM
> something that can support true threading/multitasking in the 32bit ARM processor category.
you probably need to go really high end, multi-core chips for such capabilities. Unless by "true threading/multitasking" you mean "not true threading/multitasking".
2020-07-02 05:35 PM
Correct, what I meant was something other than manually stating and keeping track of an Arduino timer using Millis and something that doesnt lag when using a imposed RTOS. I dont really know what to look to but I know an ATMEL ic might not be the best. If i can have simultaneous function work without hanging loop then NUCLEO is the way to go. Some more insight is that currently I have my Arduino supporting all my needed functions but when I need to sweep any of my servos, you can see a noticeable hang on the LEDS loop. I am also using two Arduino UNO's just so my servo functions and LEDs dont hang my motor functions.
2020-07-02 05:37 PM
Good to here I just need to be told where to look. USB is just what he PS4 dualshock 4 has native support for in the controller. The third party stuff comes from: https://github.com/felis/USB_Host_Shield_2.0
and: https://maker.pro/arduino/projects/how-to-control-an-arduino-robot-with-a-ps4-bluetooth-controller