Setting Wooden Bits via BLE and ESP8266

My laser cut binary clock, Wooden Bits, originally had no means to set the clock, other than at compile time. I later added a tactile button and ISR to provide this function (increment the time until the correct time is shown) but I wanted a way to tap into the extra features of the DS3231 (alarm, temperature) and also to experiment in wireless control.

Continue reading Setting Wooden Bits via BLE and ESP8266

Raspberry Pi DAC – MCP4725 with wiringPi

The Raspberry Pi lacks a DAC but using the I2C bus, one can easily add a device like the 12bit MCP4725. The GPIO library wiringPi provides support for I2C devices, however, getting the MCP4725 working with it isn’t a simple as one might hope. The device is 12bit but the I2C protocol works on bytes (8bits). To send 12bit data, the Microchip designed the message transfer like this:

The MC4725 expects the 12bit data to be broken into two bytes and sent directly after each other.
The MC4725 expects the 12bit data to be broken into two bytes and sent directly after each other.

Continue reading Raspberry Pi DAC – MCP4725 with wiringPi

Noise Crayon – Noise Amplitude to Light Spectrum Converter

Continuing on from my Ambient Noise Level Indicator, I wanted to create an enclosure and make it stand-alone – not requiring a computer to do the processing. I ended up with a little device that converts noise amplitude to the light spectrum: Noise Crayon.

The Ambient Noise Level Indicator used the MCU serial host Processing to perform a FFT and various averaging routines to create an indicator for ambient noise. The idea being that it would change colour when background levels rise above a threshold. Moving to an ATMEGA328, performing this processing – especially the FFT – is asking a little too much of it. There are libraries but I’ve heard of limited successes.

Continue reading Noise Crayon – Noise Amplitude to Light Spectrum Converter

Developing Simulink Device Drivers for ARM Cortex

Simulink Embedded Coder offers an ARM Cortex-M support toolbox, which includes code optimisation for the MCU and QEMU emulation but lacks any S-Block drivers for the device. The lack of drivers limits the Simulink development to merely number crunching. You can create cevel blocks that execute external C functions but this requires separate source files with a shared header and pre-defined initialisation, leaving the model without full control of the hardware. In this post, I go over the process of creating hardware driver S-Blocks.

Continue reading Developing Simulink Device Drivers for ARM Cortex

Building Atmel Studio ASF Project using External Makefile

The Atmel Studio IDE is a useful tool thanks to the comprehensive debugging support and management of project drivers via the Atmel Software Framework (ASF) – coming from a hardcore Vim advocate. One thing I dislike about IDEs is the fact they hide the make process from the user making it difficult to break a project away from the software. On wishing to develop code on different operating systems (being Visual Studio based, Atmel Studio is limited to Windows), and outside the IDE, I set about creating a Makefile for an Atmel Studio project built around the ASF.

Continue reading Building Atmel Studio ASF Project using External Makefile

Wooden Bits – Binary Clock

Wooden Bits Gif

I’ve been meaning to make a binary wall clock for a while and to also try out kerf bending with the laser cutter. What put me off creating kerf bends before I found OpenSCAD, was the manual creation of all the lines in the right places. It’s the kind of repetitive, uniform task computers were made to do.

Continue reading Wooden Bits – Binary Clock

Laser Cut Adaptable Wire Dispenser in OpenSCAD

I wanted a wire dispenser that wasn’t fixed in place so I could move it to where I was working. To my surprise, such a thing doesn’t exist (I couldn’t seem to find fixed ones either, other than using a kitchen towel rail). Keen to put my new found love for OpenSCAD to use, I set about making such a thing.

The `projection()` command in *OpenSCAD* allows one to easily create 3d objects that can be exported as 2d .dxf for printing
The projection() command in *OpenSCAD* allows one to easily create 3d objects that can be exported as 2d .dxf for printing

OpenSCAD really suits this type of design requirement; something that is going to need to scale user defined variables (the wire reel in this case). I didn’t want to create a design for 6 wire reels from a specific manufacturer, then find they change their spindle, or I decide I need more reels. It’s particularly hard scaling a laser cut box because of all the teeth/dents that slot it together. With a GUI based CAD program, you’d send hours fiddling around with the spacings/length or trying to create patterns – then still ending up with bits that don’t fit together! This is actually my second project in OpenSCAD that I’d bashed together quickly. I’ve got another more complex project to document too.
Continue reading Laser Cut Adaptable Wire Dispenser in OpenSCAD

SoundBar VU Meter Laminated Wooden Speaker

I felt that the battery powered Bluetooth speaker I made could be improved with more colour! Taking a leaf from the VU meters on amplifiers of the 80s, I decided it would be neat to sandwich clear acrylic between the plywood layers, each with an integrated LED that would form a full body amplitude meter.

Having a look around, I found a IC made by Texas instruments that did the VU meter job for me: the LM3915. Below is a photo series showing the construction and completed unit. I designed this version as a soundbar to sit below my monitors at work, so it doesn’t have a battery or Bluetooth, making the wiring easier inside and a slimmer unit. For this one I also used an Oak stain rather than a clear stain on the ply and filled the text with black acrylic, which looks much better I think.