Free RTOS

Getting Started With FreeRTOS And ChibiOS

If operating systems weren’t so useful, we would not be running them on every single of our desktop systems. In the same vein, embedded operating systems provide similar functionality as these desktop OSes, while targeting a more specialized market. Some of these are adapted versions of desktop OSes (e.g. Yocto Linux), whereas others are built up from the ground up for embedded applications, like VxWorks and QNX. Few of those OSes can run on a microcontroller (MCU), however. When you need to run an OS on something like an 8-bit AVR or 32-bit Cortex-M MCU, you need something smaller.

Something like ChibiOS (‘Chibi’ meaning ‘small’ in Japanese), or FreeRTOS (here no points for originality). Perhaps more accurately, FreeRTOS could be summarized as a multi-threading framework targeting low-powered systems, whereas ChibiOS is more of a full-featured OS, including a hardware abstraction layer (HAL) and other niceties.

In this article we’ll take a more in-depth look at these two OSes, to see what benefits they bring. Continue reading “Getting Started With FreeRTOS And ChibiOS”

Arduino Sketch: The Next Generation

What was your first Arduino program? Probably an LED blinker — that seems to be the “hello world” of microcontrolllers. You probably moved on to things a little more complicated pretty quickly. At some point, things get harder because the Arduino lacks an operating system.

There are operating systems that will run on the Arduino. They aren’t full-featured like Windows or Linux, but they allow you to run multiple tasks that are both isolated from each other (to some degree) and have a way to cooperate (that is, synchronize, share data and resources, and so on). One such operating system is ChibiOS. It will run on AVR- and ARM-based devices. You can find documentation about the entire project on the home page along with other ports.

The problem with adopting a new operating system is always getting started. [ItKindaWorks] has started a video series on using ChibiOS and has posted three installments so far (see below; one is about getting started, the other two cover messaging, mutexes, and priorities).

Continue reading “Arduino Sketch: The Next Generation”

Open Source ESC Developed For Longboard Commute

For electric and remote control vehicles – from quadcopters to electric longboards – the brains of the outfit is the Electronic Speed Controller (ESC). The ESC is just a device that drives a brushless motor in response to a servo signal, but in that simplicity is a lot of technology. For the last few months, [Ben] has been working on a completely open source ESC, and now he’s riding around on an electric longboard that’s powered by drivers created with his own hands.

esc-for-longboardThe ESC [Ben] made is built around the STM32F4, a powerful ARM microcontroller that’s able to do a lot of computation in a small package. The firmware is based on ChibiOS, and there’s a USB port for connection to a sensible desktop-bound UI for adjusting parameters.

While most hobby ESCs are essentially black boxes shipped from China, there is a significant number of high performance RC pilots that modify the firmware on these devices. While these new firmwares do increase the performance and response of off-the-shelf ESCs, building a new ESC from scratch opens up a lot of doors. [Ben]’s ESC can be controlled through I2C, a UART, or even a CAN bus, greatly opening up the potential for interesting electronic flying machines. Even for ground-based vehicles, this ESC supports regenerative braking, sensor-driven operation, and on-board odometry.

While this isn’t an ESC for tiny racing quadcopters (it’s complete overkill for that task) this is a very nice ESC for bigger ground-based electric vehicles and larger aerial camera platforms. It’s something that could even be used to drive a small CNC mill, and certainly one of the most interesting pieces of open source hardware we’ve seen in a long time.

Continue reading “Open Source ESC Developed For Longboard Commute”