A small monobox speaker (LM386 amp + speaker in a box)

April 30th, 2013

I decided to have a go at making a monobox from the MAKE site. It’s basically a small battery (or mains) powered amplifier and mono speaker for playing music from an iPod/mp3 player. Here’s my finished monobox:

Monobox and iPod

The guide to make the monobox is pretty thorough and lists everything you need to get going. I used some slightly different parts in the end and the speaker was smaller than then one in the guide, but it still sounds good. The speaker itself was a 66mm mylar speaker from Maplin. I also used an extra 0.033µF capacitor instead of the 0.047µF too – which seemed to work ok.

At the heart of the circuit is an LM386 amplifier chip. Some of the Marshall practice amps use these chips, so you know they can’t sound too bad. The LM386 is designed for low-current/battery powered circuits, but obviously can still be used with a suitable mains adapter too.

The first job in building the circuit was setting it up on the breadboard:


Breadboarding monobox circuit

It sounded great when I first tested it out on the breadboard:



So with the circuit confirmed as working, the next step was to solder up the circuit and create a container for it & the speaker. I bought a small wooden box from Amazon to act as the case. I cut a circular hole in the box (using a fret saw and then Dremel to smooth the edges) for the speaker and cut out some pieces of plastic, foam and plywood to form a brace to hold the speaker in place:

Cutting out pieces for monobox

I then drilled some holes for bolts to mount the speaker inside the box:

Speaker fitted to lid of box
Inside view of speaker attached to box

After soldering the circuit up:

Close-up of monobox circuit

I tested the circuit out inside the box to make sure it sounded ok:

Testing speaker inside box
Speaker and circuit inside box

The hessian grill I’d attached was a little wonky at this point, but I decided to fix that later. There was a more pressing problem to deal with first.

A little stereo oddity

When testing out the circuit inside the box I went through quite a few different songs on the iPod. Most of them sounded good, but one in particular did not sound right. That song was “Space Oddity” by David Bowie. It sounded like you could only hear the backing track – the main vocal and other parts weren’t really there. Normally that’s what happens with a stereo when one speaker goes dead, but in this case there was only one speaker and it was meant to be receiving both sides of the audio. I experimented a bit and found that I could hear each side of the audio on it’s own ok. It was only when they were combined that it didn’t work properly. The weird thing was that most songs were ok, but not this one.

In the end I realised that it was due to how “Space Oddity” is mixed. Most songs nowadays seem to be fairly evenly spread out on both channels/speakers in stereo. “Space Oddity” on the other hand has one channel that is very quiet. This meant that the voltage coming out of that wire was normally very close to zero (at least compared to the other channel). The other channel’s voltage would be higher and by combining the two wires together there was effectively a short-circuit and some of the current would go back into the iPod rather than into the amplifier. So the answer to this problem was to properly combine the stereo channels to mono. This meant to putting two low value resistors (1.5Ω in my case) in before the channels meet. This creates just enough resistance to stop the partial short-circuit that was occurring.

Luckily I had left the speaker and power connections on the circuit board accessible via a female header, so I created a small “daughter” board with the resistors on:

Adding small board to mix stereo to mono for monobox

With the circuit finished and the stereo to mono mixing kink worked out I turned my attention to the box again.

Decoupage or so much sanding and varnishing

I opted to decoupage the box to give it a sort of antique look, which would also work well with the hessian speaker grill I was going to use. I first sanded down the box, filling in any holes etc with milliput (and sanding again). I then used a couple of coats of primer to seal the wood, the lightly sanded it all again, then spray painted it white:

Speaker box painted white

I then took some nice textured paper and stuck it all over the box using watered-down PVA glue. I also printed out a copy of a fox illustration I scanned in and stuck that on with PVA glue too. Then I started applying layers varnish. Luckily I chose to use quick drying varnish, which meant I only had to wait an hour between coats. I would paint on three layers of varnish, letting it dry between coats, then sand down with progressively finer sandpaper. I would then varnish again and repeat. I think in the end I must of applied about fifteen coats of varnish in the end (sanding about five times). Eventually the surface started to look pretty good when sanded, but there were still a few tiny shiny spots on the otherwise matt surface. To remedy that I used some matt varnish spray paint, which was just enough to even out the finish nicely:

Decoupage on the monobox box

With the box finished I glued the power and audio (3.5mm) connector in place:

Glued power and audio sockets into monobox
Power and audio sockets stuck in place

Re-gluing the speaker grill

Now that the box looked nice and well finished I decided I’d best re-glue the speaker glue to make it look neater. Previously I’d just stretched the hessian by hand before sticking it to a piece of plastic, but that left things looking a bit wonky and not very taut either. This time I used a large embroidery hoop to stretch the hessian first, then stuck the plastic to the hessian using two part epoxy:

Using embroidery hoop to pull hessian taut before gluing

Once the epoxy dried I cut out the plastic from the rest of the hessian:

Hessian speaker grill cut out

(NB. you can see the black foam seal here too)

Sealing the box

After I attached the circuit board with a small piece of wood and a screw to the inside of the box, I then needed to seal the box as best as possible. In case I needed to fix or adjust something inside the box I didn’t glue the box shut (as the original monobox guide suggested). Instead I hot-glued some felt around the inside to help stop sound escaping through the gap between lid and bottom:

Monobox circuit in place with felt seal

I then put in a bit of wadding to help further dampen any sound originating from inside the box:

Monobox filled with wadding

and then screwed the lid shut very tightly.

The finished monobox (complete with decoupaged fox illustration and hessian speaker grill)

A little buzz

The finished box sounds great, but when running off the mains there is a buzzing sound in the background. You can only notice the sound when you are close by and nothing is playing. It’s not enough to stop me using the monobox to play music, but it is annoying that it does it. My guess is that the power supply is adding in some extra noise. I did experiment with adding in some extra capacitors to smooth the power supply, but it didn’t seem to make a difference. When running off batteries there is no such buzzing sound and it should quite happily run off a 9V battery for about 24 hours or so.

Here you can see the finished monobox in action:


Fimo dinosaurs

March 29th, 2013

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

From left to right, there’s an apatosaurus (green – aka brontosaurus), stegosaurus (yellow), tyrannosaurus (purple) and a triceratops (red).

You can see a better view here of the apatosaurus and triceratops holding the card, showing that they are made of two parts held together by the magnets:

Fimo dinosaurs holding a card

Each dinosaur was moulded from Fimo in one piece first. I then placed them in the fridge for a few hours to make the Fimo harder – so it wouldn’t deform when cutting. I then used a “tissue blade” (a very thin long blade) to cut the dinosaurs into halves before baking in the oven.

Fimo dinosaur halves Fimo triceratop halves

I then carefully out out holes for the magnets in each half – taking care to make sure the magnets were aligned correctly. Initially I used epoxy glue to glue the magnets in place, but later just opted for super glue, as it dries much quicker and was just as strong.

After the magnets were glued and the glue was dry I painted eyes, mouths and a few other features (e.g. yellow horns on the triceratops) with acrylic paint. I then used some matt varnish to protect the paint work.

I also made sure that the magnets were all aligned the same way so you could make mix’n'match dinosaurs, like an apatatops and a tricerasaurus:

Making a musical Robot Santa ornament using an ATtiny 85

December 29th, 2012

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.

The first seeds were planted when I read about using an ATtiny 85 to make a musical greeting card. What got me thinking was that so few parts were involved and it could all run quite happily off a three volt coin/watch battery. Farnell had ATtiny 85′s available for 89p each (when you ordered 10 or more). So the chips with a few parts wouldn’t cost too much at all.

The next step was figuring out how to program the ATtinys. There’s a really good series of tutorials on using an Arduino to program the ATtiny chips on the MIT high-low tech blog. I was using an older Arduino (Duemilanove) so the circuit was a little different – no capacitor on the reset pin. Instead there’s a 100 Ohm pullup resistor on the reset pin to stop the Arduino resetting when it’s used as a programmer for the ATtinys.

The MIT tutorial specified a fairly basic set of “cores” for the ATtinys. These are the extra files need to make the Arduino environment work (to a greater or lesser extent) on the ATtiny. The cores in the tutorial provided some of the basic functionality, but in the end I opted for Arduino Tiny cores. These added quite a lot of the functions from the Arduino environment. In particular they added the tone function, which would be very helpful when it came to playing music.

To just check that I could program the ATtiny chips I setup the programming circuit on a breadboard at first:

Programming Attiny85 using Arduino

Setting up the circuit each time quickly became boring though, so I got a proto shield and soldered up the circuit (plus headers) to make it easier to quickly get going:

Shield soldered for easy Attiny85 programming

At this point I went through a few blind turns with the code on the ATtiny, but as I was using the Arduino environment I could use the Arduino itself for writing the code. In particular I could then use the serial port to aid my debugging of what was going on. This helped a lot, as it turned out I’d not been allowing for the fact that int on the ATtiny/Arduino is only 16 bits in size – rather than the 32 bit you’d expect on most desktop computers. This meant I was accidentally going past the maximum size of the int (about 32,000) and getting odd (usually negative) numbers in the wrong place.

I found a great Instructable on making a working set of traffic lights out of an ATtiny and Duplo. This had a very simple interface, that just required pressing a momentary push button to turn on the lights, that would then put the ATtiny to sleep after a while. It was powered by a watch battery and when asleep would use a minuscule amount of power (a few micro-amps), so would still carry on running after several months asleep. This was great as the code showed me how to disable the analog to digital converter and the analog comparator, which really cut down on the power used. It also showed me how to enable an interrupt on pin 0 to wake the ATtiny from sleep when the button is pressed.

For the music I went for the simple approach of having a function that would simply loop through an array, calling tone, noTone and delay to play the relevant notes. It also turned on the LED whenever tone was called, so that it would light up in time to the music.

The note frequencies and beats were specified in an array stored in the PROGMEM section of the ATtiny chip. This is an 8Kb section of read-only storage, which means you can store more data in there than can fit on the 512 bytes of RAM of the chip itself. The only tricky part is you then have to read values out the PROGMEM section using functions like pgm_read_word_near – you can’t treat it like regular RAM. With a few C-macros the transcribed music looked this this:

#define BPM 100l
#define NOTES_LEN 46

prog_uint16_t notes[2*NOTES_LEN] PROGMEM = {
  /* bar 1 */
  NOTE_E3, BEAT,
  NOTE_E3, BEAT,
  NOTE_REST, HALF_BEAT,
  NOTE_A3, HALF_BEAT,
  NOTE_A3, HALF_BEAT,
  NOTE_REST, HALF_BEAT,
  ...

Each note used one 16bit value for the frequency and one 16bit number for the the beat length. The beat length could probably have been encoded in less space, but this just kept the code simple. Also I only used either whole beats (crochet) or half-beats (quaver), so there could have been further optimisation there. In fact the total transcribed music only use 92 bytes of space anyway, which would have easily fitted in the RAM of the chip, but it seemed like a good practice to store the data in this way.

With the code figured out I then went back to the hardware side of things. I took the top of a washing liquid bottle and made a small wooden frame to mount the electronics on. I then tested that a piezo buzzer could still be heard when placed inside the container, when it was being run off of a 3 volt watch battery (rather than the usual 5 volts provided by the Arduino):

Testing piezo in container

The circuit consists of:

Circuit diagram for xmas ornament

Next I cut out some perfboard to mount the components, soldered them in place and stuck the board using hot glue to the wooden frame:

Checking rough layout of circuit

Decoration soldered up

At this point the electronics side of the things was done. I finished transcribing the music for the ornament (the theme from Futurama), which you can just about hear:

At this point I have some electronics components stuck to a piece of wood shoved into a plastic container – not yet resembling Robot Santa. At this point it was time to break out the milliput and start adding some recognisable features:

Robot Santa takes shape

Robot Santa halves

Robot Santa assembled

The milliput took quite a while to add, as I added a part then had to allow it to dry before applying the next part. I probably ended up spending more on the milliput I used, than on the electronics.

After all the milliput was complete I painted Robot Santa using acrylic paint and added a coat of varnish.

Robot Santa painted and varnish drying

Robot santa deployed in front of the xmas tree

I had to drill some extra holes in the case so the Futurama theme was audible, though it’s still on the quiet side:

The code I wrote is available on github in my arduino sketches repo.

Arduino powered, temperature sensing, RGB LED nightlight

September 4th, 2012

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

As Fimo only needs to be heated to about 100C to set it’s ok to do this, as it won’t hurt the LED. Also LEDs don’t normally give out much heat, so covering them is ok. Of course this is a relatively low power (though quite bright) LED as well which helps.

I found a branch on the way home from work, which I cut up and sanded down. This formed the base for the mushroom:


Testing fit of fimo covered RGB LED

As you can see I also opted for a chunky on/off button, in the style of the original mushroom lamps.

Next I put a small electronics project box into the bottom of the piece of wood and made space for a slide switch and power socket:


Power socket, slide switch and latch switch soldered

At the time I decided to try to use a Picaxe 08m chip to control the LED and read from a temperature sensor. The Picaxe 08m has a native function to read the temperature from a DS18B20 One Wire digital temperature sensor. It also had just about enough inputs and outputs to handle controller the three colors of the LED and reading from a slide switch (to make it switch between temperature display and plain nightlight). The individual chips were also pretty cheap, so it seemed like a good plan at the time.

However the size of the circuit and number of components I needed to solder was all a bit too much for me:


Red means fail

Eventually after much debugging I was able to get some things working – e.g. controlling the colour of the LED, but the temperature sensor just wouldn’t cooperate and always gave a high reading. I also managed to get through a few sensors due to mis-wiring them!

So I decided it was time to start again with the circuit. I bought a better soldering iron (a not too expensive digital temperature controlled one) and started on a new circuit:


Nightlight circuit take 2
Lots of jumper wires on nightlight circuit attempt 2

And before I could finish everything I lost impetus (an active toddler and a lack of sleep may have played a part) and the project sat on a shelf for nearly a year.

Then after discussing a friend’s Arduino experiments I realised that maybe I could use an Arduino Pro Mini to finish the job.


Comparing size of Arduino pro mini to original nightlight circuit

The Arduino was a lot more powerful than the Picaxe chip, with several K of RAM (vs. the 512 bytes for the 08m). Though it was overkill and cost more than the Picaxe chip it would make my life a lot easier. The Arduino gave me a 5V regulated power supply, so I could use the slightly simpler to read from TMP36 temperature sensor. I could also use internal an pullup resistor for the slide button. The other advantage to all that processing power was that I could use PWM (Pulse Width Modulation) when controlling the LED to produce a full range of colours. With the Picaxe I could only really have seven colours, with no smoothing between them. As this was intended to be used in the aforementioned toddlers bedroom having nice smooth transitions between colours was very appealing.

I soldered together the LED, switch, sensor etc to a small piece of perf-board with some female headers for mounting the Arduino too. I had to do a bit of work with a dremel to create more space, as the new setup was a bit taller too.

At this point I could then start programming the nightlight by hooking it up to a regular sized Arduino.


Nightlight working when wired to regular Arduino

This was great as it proved that everything was working fine and I could just focus on the code. It also meant I could do things like temporarily wire in a potentiometer instead of the temperature sensor, to make debugging the code simpler:



It was at this point that I then discovered what could have been a disastrous miscalculation – I spaced the headers for the Arduino Pro Mini too close together! Bit too much haste and perhaps a bit too little sleep, meant that I nearly had to start all over again for the fourth time! Luckily I found that as the headers were only 0.1″ closer together than they should be I could use some extra long male headers soldered on to the Arduino and bent to compensate:


Creating slightly offset headers for Arduino pro mini

Then it was a case of programming the Arduino Pro Mini using a serial adapter (carefully balanced so as to make contact correctly). I found I had to reset the Pro Mini and un-plug and re-plug the USB cable to get it work properly, but once the connection was good I could reprogram the board easily enough.


Programming Arduino pro mini with code for nightlight

All was good, so I decided to try out the nightlight by testing in different temperatures. The fridge seemed like a good starting point:


Testing nightlight in fridge

Luckily the weather was fairly warm that day too:


The nearly finished nightlight

I recorded a timelapse of the LED’s colour change as the temperature warmed up:


Changing color of nightlight after warming up from being put in fridge for a while

Sadly although the nightlight was responding to the change in temperature, it appeared that left to it’s own devices it would tend to warm up over a few minutes and then read a couple of degrees higher than it should. Without the bottom cover on it too longer to do this, so it was clearly some sort of a cooling issue, as it still read higher again if I turned the nightlight off then on again. I think I should have placed the sensor much further away from the rest of the electronics and made sure it was well ventilated.

So to help stop provide a little cooling/ventilation I ended up carving a wooden base our of pine, that I could drill a hole at an angle for cooling with an exit hole in towards the top of the main section. The base also gave the nightlight a bit more heft and made it easier to turn on/off as well as to operate the switch to change it from temperature to simple nightlight.


Wooden base for nightlight Nightlight on stand (rear view)

Despite the slight disappointment that the temperature reading wasn’t going to stay constantly useful, I am quite happy with the nightlight. It looks nice and will does work well as an actual nightlight. The temperature reading facility has been proving useful to see what the temperature of William’s room is like and therefore what sort of nightclothes would work best. Given how protracted it’s development has been I’m rather happy really. It’s also rekindled my respect for the Arduino platform. The Mini Pro in particular is great. It’s very small, but extremely powerful and as it’s a bit cheaper than a full size Arduino makes it more appealing for embedding it into a project permanently. I guess the only downside would be the lack of integrated USB connection (for serial IO), but that’s not needed for every project.


Nightlight on stand Nightlight on stand

As usual source code is available in my Arduino Sketches github repo (plus a Fritzing wiring diagram of the circuit).

Making a chair for a two year old

August 14th, 2012

About a year ago I made a table for William’s birthday. This year I decided to make him a chair to go with the table.

I learnt quite a bit making the table and that coupled with a few other projects (a raised bed and a small phone stand amongst others) meant that I was much more confident with my woodworking skills this time round.

When making the table the wood for the legs was maybe a bit thin for an amateur like myself and meant I had to use screws to hold everything together. This time I chose something a bit thicker, which would make creating “proper” joints much easier.

Pieces cut for chair

After brushing up on my chiselling technique I found making mortise and tenon joints pretty straightforward.

Mortise and tenon joint for chair

The great thing about using mortise and tenon joints was that I could then easily dry fit the pieces. At this stage it could even bear weight – though a knock from the side would cause it to fall apart again.

Testing fit of chair pieces

Next step was to create the base of the seat. This involved drilling holes in two pieces of wood, inserting dowels, gluing and clamping to make a wide enough single piece of wood. This was the same process I did when making the table, but I only needed to use two pieces of wood not four.

Gluing together two pieces of wood to form seat of chair

Then cut out the corners of the seat, made a small back for the chair and started to glue and clamp the frame pieces together.

All pieces cut out and now gluing and clamping chair

Lastly I drilled small holes into the bottom of the seat and top of the frame to insert dowels before gluing the seat in place.

Gluing and clamping seat of chair to body

With a couple of coats of varnish the chair looked pretty good.

Another coat of varnish applied to chair

The addition of a booster cushion made by Heather was the perfect finishing touch and a great second birthday present for William.

Finished chair and booster cushion

Making a table for a one year old

August 3rd, 2011

So William is a year old now and to celebrate that fact I decided to make him a table. Now given that my last piece of woodwork was a doorbell, hastily constructed using a coping saw on the doorstep of the previous house, this could have gone badly. Luckily it went pretty well. The table I’ve made has slightly wonky legs, but it’s otherwise sturdy and stable.

Next time I make something like this I’m going to try to do it better (of course). In particular I think I shall try and make some proper mortise and tenon joints, as they’ll help to keep things squarer. I opted to use dowels to pin the legs together, which meant the legs could move around too much before the glue set.


Table legs/frame

I then had to also add in some braces to the legs, which I fixed using brass screws to provide extra rigidity and strength. One good thing I did learn at this stage though, was that a tenon saw and a mitre block are a wonderful combination! Without them the legs would have been even wonkier.

Once the leg frame was made, next step was the table top. For this I leaned heavily on this guide to building a simple sturdy wooden table on the make blog. Sadly I didn’t have some of the tools used there (e.g. a router) so again made use of dowels to join the separate pieces of the table top together. This got easier once I also invested in a jig to help hold the drill bits steady and at 90°.


Drilling holes for dowels

Drilling holes for dowels

One half of table top with dowels in place

With a fair bit of clamping and strapping the table top came together pretty well. Though there were some small cracks left between the pieces in a couple of spots.


Table top clamped and strapped while gluing

At this point I could then test out the table a bit.


Trying out the table top on frame

The top was a little bit wonky. This was in large part to my poor choice of timber – I failed to check the timber was itself straight. Never the less I soldiered on and clamped the table down after applying some water to one side. After trimming the edges and sanding the table the wonkieness was less evident and things started looking much better.


Rounded corners and sanded down top

Next more holes were drilled and dowels inserted to pin the top to the frame. Then after the application of a whole load of glue more clamping occurred.


Clamping top to legs while gluing

Clamping top to legs while gluing

This final clamping to the table top really helped to reduce the curve of the table top further.

I then applied some wood filler to the cracks in the table top and also sealed off the join between the leg frame and the table top. Then after that was all dried and sanded down a coat of clear indoor varnish was applied to the legs and underside.


Starting to varnish the table

At this point Heather and I decided it would be nice to add some pictures to the table. So we broke out the paints. Heather painted one of William’s pirate toys and I painted an octopus/kraken that was on some of his pyjamas.


Painting a pirate

Pirate colors filled in

Pirate painted on table

Colors painted for octopus

The kraken awakes!

Pirate and kraken on table top

Pirate and kraken on table top

After that the top was varnished as well. We finished doing all of this just the night before William’s actual birthday. I had started with a couple of months ahead, but it always takes longer than you think.

I’m very happy with the final outcome. It was very satisfying making something semi-sizable with my hands. I’m also starting to acquire some better tools and a few more skills, so hopefully future projects will go even better.

The main thing though is that William seems to like the table.


William with the finished table

“Ultimate” Arduino Doorbell – part 1 (Hardware)

September 6th, 2010

After a first couple of small Arduino projects I felt the need to make something a bit more useful and permanent.

I had seen Roo Reynolds talking about hacking his doorbell to get it onto Twitter and as our doorbell is a bit rubbish I thought this seemed like a good project. His hack only updated Twitter, so there was no direct physical sign that the doorbell had been rung. Given that our current doorbell is pretty rubbish anyway (it should ring, but just makes a rattling sound), I decided to start off with the physical/audible side of things and then later move on to pushing notifications out to laptops on the local network or beyond…

I’ve been documenting my progress on Flickr now for a while.

Take apart wireless doorbell

Following Roo’s approach, I picked up a cheap wireless doorbell from Tesco for about £9 and took it apart:

I was able to verify that I could turn an LED on/off with the doorbell at this stage, so I knew I could use that as a signal in the Arduino. Using a multimeter also let me figure out some more details about the voltage and current used to power the speaker:

Testing wireless doorbell with multi-meter

This was about 3.1 V and 75mA output. That’s a few milliamps more than the Arduino can tolerate, so I knew I had to make sure I put a resistor (22KOhm) in between the doorbell and the Arduino. The doorbell would also need to draw power from the Arduino, but luckily the Arduino has a separate 3V output, so that wasn’t an issue.

Testing connecting Arduino to doorbell

From there I verified that when the doorbell was activated I could read a drop in voltage from the wire on the doorbell labelled “SPI”. At this point I had the input for my Arduino.

Servos and prototypes

The next step was to provide some sort of audible output. Originally I had thought about just adding a buzzer, but fancied something a bit more old-fashioned. I figured it’d be good fun if the nice 21st century tech of the Arduino used some rather more ancient technology to create sound – a bell.

Using a micro servo from Oomlout I created a couple of prototypes.

I made a pretty simple circuit to hook up the servo, doorbell and arduino:

The first prototype used some lego and a bell from a Christmas ornament:

This worked, but the servo was probably louder than the bell!

Next I got hold of a small brass bell from a music shop. Luckily the top unscrewed and would let me easily attached it to a piece of lego. So another prototype was created using the small brass bell:

Prototype doorbell with brass bell

This worked much better!

The bell is about 100g in weight, which isn’t massive, but when it’s flung around the lego prototype would tend to move too. Not so good when this will live on the kitchen window sill. So I’d need something sturdier for the finished version.

A little soldering

As well as trying out a better bell I also made the circuit for the bell and servo more permanent, by soldering everything up on a piece of stripboard. I also used a few headers, so most of the circuit would plug into the Arduino – like a rudimentary shield. The wire to the pin controlling the servo, was left to be plugged in separately. I hadn’t soldered anything since school, so I ended up swearing quite a bit trying to do this. For me it was probably the trickiest part of the whole exercise, but it did work in the end. Just glad I had a multi-meter with a continuity mode to find the short-circuits – a knife worked well to clear up some of those.

Stripboard soldering

Full soldered doorbell + arduino

Woodwork

I next turned to my (t)rusty woodwork skills to create a sturdier version. First off some pieces of wood to mount the Arduino, doorbell circuit and servo:

Arduino and doorbell mounted on wood block

Servo mounted in wooden block

Next came the base and first part of the bell moving arm:

Then I added the top piece of the arm as well as the picture wire to make the bell swing properly:

Closeup of bell innards

At this point everything worked as expected:

Tidying up

After the sawing and sanding was finished there was still some general tidying up to do.

Once I’d taped down the servo wire and antena wire with electrical tape I needed to deal with the movement of the whole piece when the arm swings out. First I got hold of some Sugru and made some small rubberised feet to prevent the bell sliding around:

Sugru rubber feet on bell

The next task was to add a counter weight so the bell wouldn’t tip over. For this I made two piles of fifteen pennies, which I wrapped in electrical tape and taped to the ledge on the reverse side from the Arduino:

Counter weights on back/front of doorbell

Eventually these will be covered up and will probably actually make up part of the internal structure of the outer decoration. This should also mean they’ll end up being attached better. For now though electrical tape has proved sufficient.

One final tweak involved inserting some small nylon washers either side of the arm:

Washer and tidier wire

This was done to help make the movement of the arm more consistent and slightly smoother. Previously I was finding that the arm would shift position slightly, which sometimes caused problems for the servo.

Deployment

With the hardware finished I then set about actually getting it all up and running as our real doorbell. So imagine my horror when upon placing the doorbell on our kitchen window sill and connecting the power everything went haywire and the arm just constantly moved! After some tweaking of the code and kitchen-side debugging I realised that I really should make use of the Arduino’s internal pullup resistors for the doorbell pin. Up until that point I had left it “floating”. When powered by the USB this rarely drifted to zero, so I thought it was working fine. However on mains power it regularly dropped quite low, making the Arduino think the button had been pressed, triggering the servo. Configured the pullup resistor and tweaking the activation threshold (as it was now higher than zero) sorted out this problem perfectly:

Conclusion

So we now have a slightly Heath Robinson doorbell. It works better that our old one. There’s also plenty of scope for making it do more too. In fact phase two will be mostly about connecting the doorbell to my Chumby to get it communicating with the local network.

Check out my doorbell git repository on github for the code, as well as a fritzing circuit file.

How to sew a felt horse

January 2nd, 2010

I’ve clearly picked up the making felt toys bug. For Christmas this year I ended up making a pair of felt horses for two of my cousin’s children:

A pair of felt horses

I thought I’d have a go at writing up the instructions for how I did this – complete with template for making your own:


How to sew a felt horse

It’s pretty easy really. As long as you can sew some backstitch you should be able to make this easily. If not then it might not be the worst first project to try either!

Two Months of Felt Creations

October 12th, 2009

It’s been a busy two months for me. I’ll soon be getting married and there’s been quite a lot to do. A while back I finished the invites for the wedding (which involved hand-stamped wrapping paper):


Wedding Invites

From there I moved on to creating a pair of robins to sit on top of the wedding cake:


Finished Robin Cake Toppers Robins One finished, one robin nearly finished

The robins are made out of felt and stuffed using bits of cut-up cotton sheet (as that was all I had to hand at the time – hence also the green cotton). The legs are simply silver wire stitched into place inside, with the red-breast covering up the extra stitches needed. The eyes are just small black beads (from Beads Unlimited in Brighton, as was the silver wire).

I felt they turned out really well, so seeing as they didn’t take too long (a couple of hours each) we decided it’d be nice to make more felt creatures (following an autumn theme) for table centrepieces. Initially we planned on one creature per table, then two and so with some extra help from my bride-to-be we ended up with twenty eight felt hedgehogs:


Hedgehogs with conkers Hedgehogs boxed and waiting Hedgehogs in production Felt Hedgehog in progress

Again the hedgehogs were made of felt. This time they were stuffed with wadding which made things easier. The spines were glued on as “fringed” bits of felt, with a special widows-peak shaped piece for the head. This time the eyes and nose were just small bits of black felt, glued in place – so as to be marginally more child-friendly. Each hedgehog body consists of three pieces of felt – two sides and a smaller bottom piece. The bottom piece makes them stand fairly levelly and also gives them a more rounded look.

Somewhere during this time I’ve also had several friends children’s first birthdays to contend with. So seeing as I was in a felt creature production mood I turned my hand to three felt toys:


Finished Felt Max (from Where the wild things are) Felt Spaceman Purple Felt Monster

I realised the other day that all thirty three of these were made during a roughly two month period – meaning one felt creation every two days! Not a bad rate of productivity I guess.

Converting a pair of trousers into a laptop sleeve

January 18th, 2009

I ordered one of the new metal Macbooks on the night they came out. So far it’s been a great machine, but there has been one minor problem – it’s a different size to my old 12″ Powerbook. So obviously my old crumpler laptop case was going to be no use.

After purchasing some green cotton thread, grabbing an old pair of trousers and a couple of hours sewing (by hand) I ended up with a perfectly workable laptop sleeve for my Macbook: