Designing a WakeUp Light

[Akhil] and his wife recently finished their WakeUp Light project. As the name suggests, this kind of morning alarm uses light to wake you up in the morning. The main constraints when starting this relationship-strengthening adventure were cost, ability to work with any table lamp, and having a simple but effective control interface, all while keeping all the design open. The created platform (put in the wooden box shown above) is built around a Stellaris Launchpad (ARM Cortex M4 based) and uses an AC dimmer circuit found in this instructable. For our readers interested in those, [Akhil] mentions two very interesting articles about their theory of operation here and here.

An Android application has been made to set up all the alarm parameters, which uses the phone’s Bluetooth to communicate with the (well-known) HC-05 Bluetooth transceiver connected to the Launchpad. For safety, the current design also includes an LM4876 based audio amplifier connected to the microcontroller’s PWM output. The next revision will integrate a Digital to Analog Converter and an SD-Card slot for better quality and music diversity. A presentation video is embedded after the break and you can find the official repository at GitHub.

Continue reading “Designing a WakeUp Light”

Embeded Sieve of Eratosthenes: Hunting Primes on ARM

Embeded Sieve of Eratosthenes

I ended up with just enough time over the weekend to pull together a quick project. I implemented the Sieve-of-Eratosthenes on an ARM chip.

If you haven’t heard of the Sieve of Eratosthenes then you really need to work your way through Project Euler. That’s where I first learned about this method of finding prime numbers. You begin with a list of all numbers, find a prime, then remove all multiples of that prime from the list. The real trick with doing it on a microcontroller is to figure out how to store a large list of numbers in a limited space. The gist of my method was to use a boolean array (I call it a bit-packed array but that may be the wrong way of saying it). The details are found in my project linked at the top.

‘Why?’ is almost always the wrong question to ask around here. But in this case, I did this because I wanted to try out the Bit Banding functionality of the ARM core. These chips have alias addresses that map to a single bit in the SRAM and also some of the peripheral registers. This allows read or write access for a single bit using a single instruction. Turns out that one side effect of 32-bit architecture is having addresses to burn.

Bitbanging USB On Low Power ARMs


With the Adafruit Trinket, the Digispark, and some very clever work with the smallest microcontroller Atmel offers, it looks like the ‘in’ thing to do for embedded software developers is to bitbang the USB protocol on hardware that shouldn’t support it. There are a lot of very small ARM chips out there without USB support, so it was only a matter of time before someone was able to bitbang USB on the ARM Cortex M0+.

The board above is based on an Energy Micro EFM32ZG, a very small 24-pin QFN device with up to 32 kB of Flash and 17 GPIOs. As with all the bitbanged USB hacks, the differential data lines are attached directly to the microcontroller. A 24 MHz crystal is needed, but the team behind the project is working on using the internal RC oscillator instead.

The code is portable with minimal changes between other manufacturer’s Cortex M0+ chips, and with a little work, this could become a very, very cheap USB-programmable ARM dev board, something the community could certainly use.

GEVCU – an Open Generalized Electric Vehicle Control Unit

At Hackaday we’re very happy to see the increasing number of open hardware devices that appear everyday on the internet, and we’re also quite thrilled about open-source electric cars. Pictured above is the GEVCU, an open source electric vehicle control unit (or ECU). It is in charge of processing different inputs (throttle position, brake pressure, vehicle sensors) then send the appropriate control commands to electric motor controllers (aka inverters) via CAN bus messages or digital / PWM signals.

The project started back in December 2012 and was originally based on an Arduino Due. Since then, the GEVCU went through several revisions and ultimately a complete custom board was produced, while still keeping the Cortex M3 ATSAM3X8E from the Due. As you may have guessed, the board also includes a Wifi transceiver so users may adjust the ECU parameters via a web based platform. All resources may be downloaded from the official GitHub.

NXP’s ARM Micros With Motor Controllers


It’s still relitavely early in the year, and all those silicon manufacturers are coming out with new toys to satiate the engineer and hobbyist for years to come. NXP’s offering is the LPC1500, a series of ARM microcontrollers optimized for motor and motion-control applications.

The specs for the new chips include an ARM Cortex-M3 running at 72MHz, up to 256kB Flash, 36kB SRAM, USB, CAN, 28 PWM outputs, an a real-time clock. There are options for controlling brushless, permanent magnet, or AC induction motors on the LPC1500, with dev boards for each type of motor. Each chip has support for two Despite NXP’s amazing commitment to DIP-packaged ARM chips, the LPC1500 chips are only available in QFP packages with 48, 64, and 100 pins.

Don’t think the LPC1500 would be a perfect chip for a CNC controller – the chips only support control of two motors. However, this would be a fantastic platform for building a few robots, an electric car, or a lot of the other really cool projects we see around here.

The BitBox Console Gets Upgraded

BitBox Rev2

The Bitbox, an open source game console, has received a number of updates in the past couple of months. Last time we covered this DIY console, [Makapuf] had just managed to get the first revision to run a simple game. The second revision will increase the colors to 32k, add another channel of sound for stereo, switch controllers from PS2 to USB, and add support for Olimex’s UEXT expansion devices.

While the hardware upgrades are impressive, there’s been a lot of work on the Bitbox software as well. A new game demo called Fire was created as a set of tutorials to help people start developing for the console. There’s also a BitBoy, a GameBoy emulator for the Bitbox. BitBoy is a ported version of gnuboy for the ARM Cortex-M4 processor that powers the Bitbox. It successfully emulates a number of commercial GameBoy ROMs.

We’re looking forward to seeing what’s next for the Bitbox. After the break, check out a video of BitBoy running on the Bitbox.

Continue reading “The BitBox Console Gets Upgraded”

STM32 Nucleo, The Mbed-Enabled, Arduino-Compatable Board

The STM32 line of microcontrollers – usually seen in the form of an ST Discovery dev board – are amazingly powerful and very popular micros seen in projects with some very hefty processing and memory requirements. Now, ST has released a great way to try out the STM32 line with the Nucleo board.

There are two really great features about these new Nucleo boards. First, they’re mbed compatable, making them a great way to get started in the ARM development world. Secondly, they have Arduino pin headers right on the board, giving you access to all your shields right out of the box.

Right now, there are four varieties of the Nucleo board based on the STM32F030, -F103, -F152, and -F401 microcontrollers. The STM32F401 is the high-powered variant, An ARM Cortex-M4 microcontroller running at 84 MHz, 512kB of Flash, and enough I/O for just about any project.

If you’d like to get your hands on one of the STM32 Nucleo boards, you can order a voucher to pick one up at Embedded World in Germany next week. Otherwise, you’re stuck ordering from Mouser or Farnell. Bonus: the high-end F401-based board is only $10 USD.