Re-configuring the HC-06 (cheap) bluetooth serial module

I picked up a cheap bluetooth serial (rs232) module from Amazon. As it didn’t cost too much, I thought I’d take a chance. The module arrived fine, though (unsurprisingly) without any documentation. Initially I’d tried following the documentation for configuring a HC-05 module, but after I while I realised it was actually a HC-06 module. The HC-06 is very similar to the HC-05, but (crucially) initially runs at a different baud rate (9600bps instead of 38400bps). Luckily I found some good instructions for configuring the HC-06 serial module elsewhere. I’m going to recap what I did to get the module working with my (OS X) laptop and a USB serial adapter. Initially I just connected the pins from the bluetooth module to the USB serial adapter directly. Although this meant that the power/ground pins lined up it also meant that the rx/tx (receive/transmit) pins also lined up – which we don’t actually want. We actually want the rx pin on the serial adapter to go to the tx pin on the bluetooth adapter (and vice-versa). This is because it’s not simply passing through the signals – instead we’re transmitting from the serial and receiving on the bluetooth adapter. This also means that we have to make sure the baud rates of both adapters match. You can see the pinouts of the bluetooth (top) and serial (bottom) adapters here: USB Bluetooth module (HC-06) and USB serial adapter I used a breadboard and some jumper wires so I could have rx and tx swapped over: Configuring HC-06 bluetooth module with USB serial adapter connected to laptop
Continue reading

LeChuck from Monkey Island cross-stitch with animated LEDs driven by an ATtiny

After acquiring some aida and a set of fairly cheap embroidery silks, I decided to try my hand at cross-stitch. As with a lot of craft related activities cross-stitch and embroidery are having a resurgence. The fact that cross-stitch is essentially the first form of pixel-art makes it perfect for rendering old-school 8bit/16bit graphics. Heading over to the Sprite Database I found the sprite for LeChuck from Monkey Island 2: LeChuck’s Revenge.

Nearly finished LeChuck cross-stitch + frame, button and electronics

Continue reading

Fimo dinosaurs

I’ve been having a little Fimo renaissance lately. Partly due to using some Fimo for the nightlights I’ve made, but also from seeing some of the other wonderful things people like Joo Joo have made.

I saw a little guide on making photo stands out of plastic toy dinosaurs and magnets and thought that I could do the same using Fimo. I ordered some tiny magnets online, that had a 300g pull – enough to be quite strong, but not so strong they’d cause any injuries! I also got hold of a few more varieties of Fimo and set to work:

The complete set of fimo magnet dinosaurs

Continue reading

Configuring an Edimax EW-7811UN on a Raspberry Pi for WiFi

I was given a Raspberry Pi last year. I quickly got hold of an SD card, keyboard, mouse and a ten metre ethernet cable (to connect it to the router on the other side of the room). I installed the version of Raspbian released in July and set to work updating and installing software using apt-get. However whilst the Raspberry Pi seemed to be working fine, it appeared the the ten metre ethernet cable and/or my wireless router’s ethernet port weren’t so happy. Running sudo apt-get update took a long time. Running sudo apt-get upgrade to get to the latest version of the Raspbian kept timing out. Downloads speeds started fairly modestly (30-40Kb/s, quickly dropped to less than 1Kb/s and then gave out all together.

This was obviously somewhat frustrating. A big part of the appeal of the Raspberry Pi is that it connects to the internet. An ethernet should connection should work easily, but it appears that my router didn’t agree with that. Given that everything else in the house connects over WiFi it seemed like that was the route to take. It also meant I could lose the monster ethernet cable draped around the house.

So when I had a bit of free time again I got hold of an Edimax EW-7811UN Wireless Nano USB Adaptor and set about getting it working. It’s a really tiny little adapter, just barely larger the the USB plug itself. Which means that the Raspberry Pi can keep it’s diminutive form factor.

Of course though to get the adapter working I needed to upgrade to the latest version of Raspbian (which includes the WiFi drivers) – which in turn required a connection to the internet.

So to get a temporary network connection I connected the ethernet port on the Raspberry Pi to the ethernet port of of MacBook and turned on internet sharing to share the WiFi connection. This was great and I wish I’d thought of it sooner as it gave me a full speed connection (500Kb/s at least). Of course at this point I made sure the WiFi adapter was not plugged in.

So first job was upgrading everything using apt-get:

    sudo apt-get update
    sudo apt-get upgrade

That probably took about 20-30 minutes and included the drivers for the Edimax WiFi adapter.

I then rebooted the Raspberry Pi and plugged in the WiFi adapter. To see if the drivers were working I ran:

    sudo iwlist wlan0 scanning

Which listed all of the WiFi access points that could be seen by the adapter – which indicated that the adapter was working properly. The blue LED on the adapter also started flashing at this point.

The next job was to configure the adapter to connect using my WiFi network. I edited /etc/network/interfaces:

    sudo nano /etc/network/interfaces

And added the following to the end of the file (be careful here as you don’t want to mess up your network settings):

    auto wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa.conf

That configures the wlan0 network interface to run and to use DHCP to automatically get a network address.

Next I had to add in the key and access point name (SSID) for the network:

    echo $(wpa_passphrase <ssid> <network password>) | sudo tee /etc/wpa.conf

The wpa_passphrase command is a handy way of generating the hexadecimal key that the configuration file wants (rather than the human readable password). I used sudo tee /etc/wpa.conf as simply redirecting the output directly to /etc/wpa.conf would not have enough permission otherwise.

This writes the settings on one line like this:

    network={ ssid="<ssid>" #psk="<network password>" psk=<long hex string> }

Which needs editing to break into more than one line (otherwise the # character will mess things up):

    sudo nano /etc/wpa.conf

The edited wpa.conf file ended up looking like:

    network={
    ssid="<ssid>"
    #psk="<network password>"
    psk=<long hex string>
    }

At this point that was all of the configuration done and it was time to fire up the wlan0 network interface (aka the WiFi adapter):

    sudo ifup wlan0

This thought about things for a bit (whilst it got a network address via DHCP) and then blue LED on the adapter lit up fully and I had a working WiFi connection!

Making a musical Robot Santa ornament using an ATtiny 85

William tests robot santa

In what is threatening to become a tradition, I made a Christmas ornament again this year. Last year I just made simple tree ornaments using sculpey and fimo.

This year things got a bit more involved, as I decided to make a musical model of the Robot Santa from Futurama. It was a good thing I started working on it in November, as it took quite a few evenings to get it all finished.

Continue reading

A quick Halloween Cylon Pumpkin using an Arduino and a few LEDs

Back in 2006 the new Battlestar Galactica series was going strong (and was still rather good). So it was almost inevitable (in hindsight) that someone would make a Cylon pumpkin for Halloween. That pumpkin was featured in a Halloween copy of Make magazine I bought and then held on to for the next five years. Finally, five years later, I have made my own Cylon pumpkin:


Continue reading

Building an Aerographics me163 (komet) free flight model plane

When I was younger I built and flew a couple of radio-controlled (R/C) aeroplanes. These were made from kits and were of a fairly modern style, with foam core balsa-covered wings and covered with heat shrink plastic (attached using a small iron). The two planes I finished used small two stroke internal combustion engines running on glow fuel and had roughly 5′ wing spans. They were fairly sizeable. I found them a bit unnerving to fly as that propellor had quite a lot of force behind it and could easily of taken off a finger or more. I did get my licence to fly (which was mostly to meet the requirements for getting the 3rd party liability insurance the BMFA provided), but after a few crash/rebuilds I lost interest and moved on to other things. It also didn’t help that the nearest club was a fair drive away and I was too young to drive.

This marked the end of my youthful interest in aviation.

Like many children growing up in the 80′s aeroplanes were one of those things that you just seemed to know about. I knew far too many names and details about WW2 aircraft in particular. The TV always showed re-runs of Battle of Britain, 633 Squadron and The Dam Busters. Spitfire, Messerschmitt, Focke-Wulf, Hurricane, Mosquito, Lancaster, Heinkel were household names as far as I was concerned. Airfix kits were a regular fixture too.

I’d always wondered whether I’d get back into aeroplanes. Then when on holiday I happened on a model shop selling free flight balsa planes. I didn’t buy one then, but ended up going to the local model shop a few weeks later and came away with an
Aerographics M.e. 163 Komet kit:

Messerschmitt ME 163 Komet Kit

Much like the real ME 163 this kit could take a rocket motor. I opted to just make it a glider and would launch it with a bungee cord.

Continue reading

Arduino powered, temperature sensing, RGB LED nightlight

About a year ago I started on a project to make a temperature controlled nightlight. I was inspired by seeing these lovely LED lamps styled as mushrooms growing out of pieces of wood. Those mushrooms were made out of glass, which was somewhat beyond my skills. However I then saw some had used translucent sculpey to make mushroom nightlights on instructables. So with that discovery it seemed like it would be rather simple to do…

The first job was to solder up a three colour (RGB) LED (a super bright one from oomlout):


Wires + RGB LED ready for coating in Fimo

I then covered the LED in translucent Fimo:


RGB LED and wires covered in Fimo

Continue reading