Posts with «stm32» label

Face-tracking robot with Arduino UNO Q

An inexpensive robot kit with Arduino UNO Rev3, obstacle-avoidance sensors, and line-following capability becomes a face-tracking robot. The trick is in the control board: just replace the UNO Rev3 with an Arduino UNO Q, which has the same headers and mounts an STM32U585 microcontroller alongside a Linux microprocessor. Iulia Feroli’s project shows how local artificial intelligence can be added to a low-cost robot without touching the mechanics.

The robot starts from the Elegoo kit, with its motor shield and sensors for obstacle avoidance and line following. The UNO Q slots in place of the original board, and the shield moves over without any modification. Thanks to the STM32 microcontroller and the Linux microprocessor, the new board runs machine learning models locally, with no cloud connection. A standard USB webcam is connected to the UNO Q to provide vision.

Video stream and face tracking

The webcam video stream is processed with the face tracking Brick from Arduino App Lab. The code converts the face position in the frame into movement commands for the robot. The robot rotates to center the face and moves toward it, always staying in front of the person. The result is a responsive face tracker that requires no external servers or Wi-Fi connections.

Iulia Feroli’s project is documented in a video showing the robot in action, with an explanation of the assembly and the code. Swapping the board is the core of the intervention: the UNO Q maintains electrical and mechanical compatibility with the UNO Rev3 but adds the computing power needed for AI. In addition, the face tracking Brick in Arduino App Lab simplifies managing the machine learning model, making the code accessible even to those without neural network experience.

What you need to rebuild the project

To replicate the robot you need only a few components, all easily available. The list includes the Elegoo kit, a USB webcam, and the control board. Here are the main steps:

  • Remove the Arduino UNO Rev3 from the Elegoo kit and keep the motor shield.
  • Mount the Arduino UNO Q in its place, checking that the headers align.
  • Connect the USB webcam to the UNO Q port.
  • Upload the sketch with the face tracking Brick from Arduino App Lab.
  • Power the robot and test it in front of a face.

The UNO Q is the heart of the system: it combines the simplicity of the STM32U585 microcontroller with the power of the Linux processor. This combination allows local machine learning models, such as face tracking, to run without additional hardware. The board is also available in a 4GB version with a full accessory kit, which includes everything needed to get started.

The original Elegoo kit, with its Arduino UNO Rev3 board, remains an excellent base for other projects. However, for this face tracker, the UNO Q is the right choice: it offers the necessary computing power and maintains compatibility with the shield. The overall cost stays low, and the result is a smart robot that impresses with its responsiveness.

Source: https://youtu.be/FIu14vCvGfs?si=8SSW0K6O7J6Y07tz

The post Face-tracking robot with Arduino UNO Q appeared first on Open Electronics.

Arduino UNO Q 4GB: A Dual-Brain Board for Physical AI

Physical AI needs a board that can think and act at the same time. This project pairs a Qualcomm Dragonwing IQ8 processor with an STM32H5 in a dual-brain architecture. The first runs AI models with 40 TOPS, while the second controls motors and peripherals in real time. The result is a complete platform for robotics and automation.

The board carries 16 GB of LPDDR5 RAM and 64 GB of eMMC storage. Connectivity includes tri-band Wi-Fi 6, Bluetooth 5.3, 2.5 Gb Ethernet, and CAN-FD. The board with integrated display from the Arduino UNO Q family offers a similar starting point for anyone approaching this world. The project board is open source and free of proprietary lock-ins.

How the dual-brain architecture works

The Qualcomm Dragonwing IQ8 processor handles the artificial intelligence. The STM32H5, on the other hand, guarantees deterministic control over motors, CAN bus, and other peripherals. The two processors communicate efficiently, so the AI can make decisions and the hardware executes without unpredictable latencies.

The preinstalled operating system is Ubuntu with an Ubuntu Pro license. The Arduino core runs on Zephyr RTOS, which offers guaranteed response times. In addition, the environment supports VS Code, PyCharm, Jupyter, and Docker for development.

AI models optimized for the NPU run through Arduino App Lab. The platform supports importing GGUF models from Hugging Face and training with Edge Impulse Studio. There are over 100 ready-to-use examples.

  • 40 TOPS of AI power
  • 16 GB LPDDR5 RAM
  • 64 GB eMMC
  • Tri-band Wi-Fi 6 (2.4/5/6 GHz)
  • Bluetooth 5.3
  • 2.5 Gb Ethernet
  • CAN-FD

Why a board for Physical AI is needed

Modern robotics requires perception, decision, and action in a single device. This board unifies everything in an open format. Makers can prototype with Arduino UNO shields and Raspberry Pi HATs. Moreover, ROS 2 support and the CAN-FD, I2C/I3C, SPI, PWM, and UART interfaces make it suitable for professional projects.

Compatibility with existing shields lets you reuse sensors and actuators you already own. For example, those with the more powerful processor board from the Raspberry Pi family can compare performance. In addition, the Works with Arduino program allows scaling prototypes to production level with certified SOMs from SECO and Toradex.

An open ecosystem for physical AI

The board uses Ubuntu Pro as its main operating system. Zephyr RTOS handles real-time hardware control. This mix ensures flexibility for development and robustness for execution.

Arduino App Lab is the access point for AI models. It supports importing from Hugging Face and training with Edge Impulse. There are also over 100 ready-made examples to get started right away.

The board is powered by a 65W USB-C power supply. It is designed for those who want to move from prototyping to production without changing platforms. Finally, support for Arduino shields and Raspberry Pi HATs makes it versatile.

For those starting out with embedded AI, the board with the STM32 microcontroller offers a simpler alternative. However, this board represents the next step for advanced robotics projects. Physical AI thus becomes accessible to makers, educators, and professionals.

Source: https://www.qualcomm.com/internet-of-things/products/iq8-series

The post Arduino UNO Q 4GB: A Dual-Brain Board for Physical AI appeared first on Open Electronics.

Bluepill Copies Code So You Don’t Have To

You really should learn to read Morse code. But if you can’t — or even if you can, and just want a break — you can always get a computer to do it. For example, [jmharvey1] has a decoder that runs on a cheap Bluepill dev board.

The device uses a touchscreen and a few common components. The whole thing cost about $16. You can see it at work along with a description of the project in the video below.

The code uses the Arduino-style setup for the Blue pill — something we’ve talked about before. As for the decoding method, the software employs the Goertzel algorithm which is akin to a single frequency Fourier transform. That is, while a full transform gives you information about the frequency component of a signal across a wide range, the Goertzel algorithm probes the signal for one or a small number of distinct frequencies.

The decoder table looks confusing at first until you realize that each “decode” value consists of a 1 as a start bit followed by a 1 for a dash and a zero for a dot. All bits to the left of the start bit don’t count. So an “E” codes as 02 hex — a start bit followed by a single zero or dot. A “C” is 1A hex (1 + -.-.). Once you find the matching code, you apply the same index to another table to look up the actual letter or string of letters.

If you buy a Bluepill to make one of these, you might as well get two and build something to send code, too.

Open-Source ARM Development Simplified

The ARM series of processors are an industry standard of sorts for a vast array of applications. Virtually anything requiring good power or heat management, or any embedded system which needs more computing power than an 8-bit microcontroller is a place where an ARM is likely found. While they do appear in various personal computers and laptops, [Pieter] felt that their documentation for embedded processors wasn’t quite as straightforward as it could be and created this development board which will hopefully help newbies to ARM learn the environment more easily.

Called the PX-HER0, it’s an ARM development board with an STM32 at its core and a small screen built in. The real work went in to the documentation for this board, though. Since it’s supposed to be a way to become more proficient in the platform, [Pieter] has gone through great links to make sure that all the hardware, software, and documentation are easily accessible. It also comes with the Command Line Interpreter (CLI) App which allows a user to operate the device in a Unix-like environment. The Arduino IDE is also available for use with some PX-HER0-specific examples.

[Pieter] has been around before, too. The CLI is based on work he did previously which gave an Arduino a Unix-like shell as well. Moving that to the STM32 is a useful tool to have for this board, and as a bonus everything is open source and available on his site including the hardware schematics and code.

Blue Pill Makes Cheap But Powerful Morse Tutor

[W8BH] attended a talk by another ham, [W8TEE] that showed a microcontroller sending and receiving Morse code. He decided to build his own, and documented his results in an 8 part tutorial. He’s using the Blue Pill board and the resulting device sends code with paddles, sends canned text, provides an LCD with a rotary knob menu interface, and even has an SD card for data storage.

All the code is on GitHub. If you are interested in Morse code or in learning how to write a pretty substantial application using the Blue Pill and the Arduino IDE (or any other similar processor), this is a great exposition that is also a practical tool.

[W8BH] takes good advantage of breakout boards with things such as the displays and jacks on them. Of course, you don’t absolutely have to use those, but it does make life easier. You can see [W8TEE’s] version posted in an online forum.

The parts of the tutorial all build on each other, so you start out simple and get deeper and deeper. The tutorials are PDF files, but they are well organized and easy to read.

We’ve done our tutorials and videos on the Blue Pill. If you don’t want to rely on the Arduino IDE, there are ways around that, too.

Blue Pill header pic: Popolon [CC BY-SA 4.0]

Hack a Day 08 Aug 03:00

Hackaday Prize Entry: Oscilloscope for the Masses

If you head down to your local electronics supply shop (the Internet), you can pick up a quality true-RMS multimeter for about $100 that will do almost everything you will ever need. It won’t be able to view waveforms, though; this is the realm of the oscilloscope. Unlike the multimeter’s realistic price point, however, a decent oscilloscope is easily many hundreds, and often thousands, of dollars. While this is prohibitively expensive for most, the next entry into the Hackaday Prize seeks to bring an inexpensive oscilloscope to the masses.

The multiScope is built by [Vítor] and is based on the STM32-O-Scope which is built around a STM32F103C8T6 microcontroller. This particular chip was chosen because of its high clock speed and impressive analog-to-digital resolution, which are two critical specifications for any oscilloscope. This particular scope has an inductance meter built-in as well, which is another feature which your otherwise-capable multimeter probably doesn’t have.

New features continue to get added to this scope by [Vítor]. Most recently he’s added features which support negative voltages and offsets. His particular scope is built inside of a model car, too, but we believe this to be an optional feature.


Filed under: The Hackaday Prize, tool hacks

PlatformIO and Visual Studio Take over the World

In a recent post, I talked about using the “Blue Pill” STM32 module with the Arduino IDE. I’m not a big fan of the Arduino IDE, but I will admit it is simple to use which makes it good for simple things.

I’m not a big fan of integrated development environments (IDE), in general. I’ve used plenty of them, especially when they are tightly tied to the tool I’m trying to use at the time. But when I’m not doing anything special, I tend to just write my code in emacs. Thinking about it, I suppose I really don’t mind an IDE if it has tools that actually help me. But if it is just a text editor and launches a few commands, I can do that from emacs or another editor of my choice. The chances that your favorite IDE is going to have as much editing capability and customization as emacs are close to zero. Even if you don’t like emacs, why learn another editor if there isn’t a clear benefit in doing so?

There are ways, of course, to use other tools with the Arduino and other frameworks and I decided to start looking at them. After all, how hard can it be to build Arduino code? If you want to jump straight to the punch line, you can check out the video, below.

Turns Out…

It turns out, the Arduino IDE does a lot more than providing a bare-bones editor and launching a few command line tools. It also manages a very convoluted build process. The build process joins a lot of your files together, adds headers based on what it thinks you are doing, and generally compiles one big file, unless you’ve expressly included .cpp or .c files in your build.

That means just copying your normal Arduino code (I hate to say sketch) doesn’t give you anything you can build with a normal compiler. While there are plenty of makefile-based solutions, there’s also a tool called PlatformIO that purports to be a general-purpose solution for building on lots of embedded platforms, including Arduino.

About PlatformIO

Although PlatformIO claims to be an IDE, it really is a plugin for the open source Atom editor. However, it also has plugins for a lot of other IDEs. Interestingly enough, it even supports emacs. I know not everyone appreciates emacs, so I decided to investigate some of the other options. I’m not talking about VIM, either.

I wound up experimenting with two IDEs: Atom and Microsoft Visual Studio Code. Since PlatformIO has their 2.0 version in preview, I decided to try it. You might be surprised that I’m using Microsoft’s Code tool. Surprisingly, it runs on Linux and supports many things through plugins, including an Arduino module and, of course, PlatformIO. It is even available as source under an MIT license. The two editors actually look a lot alike, as you can see.

PlatformIO supports a staggering number of boards ranging from Arduino to ESP82666 to mBed boards to Raspberry Pi. It also supports different frameworks and IDEs. If you are like me and just like to be at the command line, you can use PlatformIO Core which is command line-driven.

In fact, that’s one of the things you first notice about PlatformIO is that it can’t decide if it is a GUI tool or a command line tool. I suspect some of that is in the IDE choice, too. For example, with Code, you have to run the projection initialization tool in a shell prompt. Granted, you can open a shell inside Code, but it is still a command line. Even on the PlatformIO IDE (actually, Atom), changing the Blue Pill framework from Arduino to mBed requires opening an INI file and changing it. Setting the upload path for an FRDM-KL46 required the same sort of change.

Is it Easy?

Don’t get me wrong. I personally don’t mind editing a file or issuing a command from a prompt. However, it seems like this kind of tool will mostly appeal to someone who does. I like that the command line tools exist. But it does make it seem odd when some changes are done in a GUI and some are done from the command line.

That’s fixable, of course. However, I do have another complaint that I feel bad for voicing because I don’t have a better solution. PlatformIO does too much. In theory, that’s the strength of it. I can write my code and not care how the mBed libraries or written or the Arduino tools munge my source code. I don’t even have to set up a tool chain because PlatformIO downloads everything I need the first time I use it.

When that works it is really great. The problem is when it doesn’t. For example, on the older version of PlatformIO, I had trouble getting the mBed libraries to build for a different target. I dug around and found the issue but it wasn’t easy. Had I built the toolchain and been in control of the process, I would have known better how to troubleshoot.

In the end, too, you will have to troubleshoot. PlatformIO aims at moving targets. Every time the Arduino IDE or the mBed frameworks or anything else changes, there is a good chance it will break something. When it does, you are going to have to work to fix it until the developers fix it for you. If you can do that, it is a cost in time. But I suspect the people who will be most interested in PlatformIO will be least able to fix it when it breaks.

Bottom Line

If you want to experiment with a different way of building programs — and more importantly, a single way to create and build — you should give PlatformIO a spin. When it works, it works well. Here are a few links to get you started:

Bottom line, when it works, it works great. When it doesn’t it is painful. Should you use it? It is handy, there’s no doubt about that. The integration with Code is pretty minimal. The Atom integration — while not perfect — is much more seamless. However, if you learn to use the command line tools, it almost doesn’t matter. Use whatever editor you like, and I do like that. If you do use it, just hope it doesn’t break and maybe have a backup plan if it does.


Filed under: Arduino Hacks, ARM, Hackaday Columns, reviews, Skills