Arduino Burner PCB

Arduino Burner PCBContinuing my creation of circuits that save me a little time, I’ve developed a shield which turns an Arduino Duemilanove (or compatible) into an EPROM burner for ATMega328 chips. Imaginative as ever, I call it the “Arduino Burner.”

While working on the Standalone Sleepduino, I had cause to burn a custom bootloader to an ATMega328 chip in order to convince it to use its internal 8MHz oscillator instead of an external 16MHz crystal. With an Arduino Duemilanove, that’s not too difficult: follow the instructions from the Arduino To Breadboard article and you’re away.

It does, however, require a bit of time to set up the various wires; then more time is required moving the wires to upload a sketch to the newly-created Arduino-compatible microcontroller. Not much time, to be fair, but time nevertheless. So, the Arduino Burner was born.

The Arduino Burner is a simple shield based on the wiring from the Arduino To Breadboard article. It features room for a 16MHz crystal and decoupling capacitors, although these can be safely ignored if you’re programming an ATMega using the 8MHz breadboard bootloader. Installing them does, however, mean that you have the choice of flashing either bootloader; leaving the holes unpopulated means that you’ll be limited to the 8MHz version only. There’s also a 10K pullup resistor for the reset line, although again this is a ‘nice to have’ that can be ignored.

Usage is simple: stick a raw ATMega328 into the zero insertion force (ZIF) socket in the middle of the shield, set J1 to ‘BTLDR’ and open the RX and TX jumpers and you can burn a bootloader straight from the Arduino IDE. When your bootloader is installed, you can close the RX and TX jumpers and switch J1 to ‘SKETCH’ to upload a sketch – but remember to remove the Arduino’s own ATMega, or you’ll be uploading the sketch to that instead of your new chip!

The ZIF socket means that the legs of the ATMega328 are protected from damage – a key point if you’re burning large quantities of chips. It does, however, increase the cost of the shield quite significantly: a single 28W DIP socket is around 20p, while the particular low-profile ZIF chosen for this shield is around £8 – although this does drop as you buy quantities.

If you’re only creating one-off standalone projects, the Arduino Burner shield is overkill. If you’re doing large quantities and don’t fancy shelling out for a real AVR, however, it can be a serious time-saver.

I’ll be getting a prototype made up towards the end of the month, so pop back then if you want to see the shield in action.

Standalone Sleepduino Working

Just a quick update on the Sleepduino project: the PCBs for the Sleepduino Shield and Standalone Sleepduino arrived from the fab yesterday, and they work a treat.

Here’s a quick comparison between the Standalone Sleepduino and its breadboarded prototype:

Sleepduino Standalone Final/Prototype Comparison

As you can see, the Standalone Sleepduino is pretty compact, but still packs all the features of the original Arduino-powered version. In fact, it’s possible to take the (socketed) microcontroller out of the Sleepduino and upload a revised sketch, if you’ve got an ATtiny or similar or a spare Arduino to do the programming.

Just in case you doubt it works:

Standalone Sleepduino Working

At some point, I’ll be making a few tweaks to the design and then exporting some Gerbers for mass-production. Once I’ve got a costing for the PCB fabrication and parts – a 10K poteniometer, piezoelectric buzzer, three RGB LEDs, three buttons, nine 270-Ohm resistors and an ATMega-328 with socket – I’ll have a better idea of whether the project is worth pursuing.

Standalone Sleepduino PCB

Standalone Sleepduino PCBMy original concept to create the Sleepduino as an Arduino shield to aid with sleep via white-noise and night-lights – or as a convenient way of getting three RGB LEDs, three buttons and peizoelectric buzzer with adjustable volume into an Arduino – is good, but wouldn’t a stand-alone version be better?

Yes. Yes, it would.

As a result, my order with the fab now includes an original Sleepduino shield along with the new design: the Standalone Sleepduino. Measuring a mere 17.6cm², it’s half the size of the Sleepduino shield. It’s not just a reduced footprint, though: as the name suggests, the Standalone Sleepduino no longer requires an Arduino to operate, shaving about £22 off the cost of the device for those who don’t already have an Arduino or compatible hanging around.

How? By taking the chip at the heart of the Arduino, the ATMega328 microcontroller, and embedding it directly into the middle of the circuit board.

To keep the size down and reduce the number of components required, the design of the Standalone includes a few tweaks over a traditional standalone Arduino creation. First of all, the traditional 16MHz crystal and associated capacitors aren’t there: the Sleepduino doesn’t need an accurate clock to work, so I’m using the 8MHz oscillator built in to the ATMega328 instead. There’s also no sign of a 5V regulator: instead, a USB B socket provides connectivity to a PC USB port or USB-based charger, which already provides a regulated 5V feed.

The Standalone Sleepduino won’t be for everyone: while it’s technically possible to reprogram it in the same way as the newly-renamed Sleepduino Shield, it involves having an existing Arduino or AVR programmer and taking the microcontroller off the board. If you’re looking for something to hack, the Sleepduino Shield will still be the better option; that goes doubly if you’ve already got an Arduino.

For those who just want a combination nightlight – with 334 possible colour combinations and four brightness settings, no less – and white-noise generator, however, the Standalone Sleepduino should prove a winner.

If I get enough interest, I’ll be sending off for a batch of both Standalone Sleepduinos and Sleepduino Shields from a PCB fab in China. I’ll then make them available either as a kit, or pre-assembled if you don’t fancy soldering it up yourself. Once my prototypes arrive, I’ll be doing some demonstration videos too.

Standalone Sleepduino BreadboardOh, and if you’re wondering how the Standalone Sleepduino looks when it’s not in its lovely compact PCB form, here’s the breadboarded prototype:

Not quite so pretty, huh?

Back-of-the-envelope calculations suggest that it’ll cost me around £13 to produce each Sleepduino Standalone kit, plus a quid or so for a USB A-B cable to go with it.

If you’d like to register interest in snagging yourself a kit or pre-made Sleepduino, drop me a line.

Sleepduino PCB

Sleepduino PCBAs a new father, I’ve found it’s difficult to convince my little bundle of noise to go to sleep at night. A common method of convincing a baby to sleep is to provide ‘white noise,’ either through the use of an expensive specialist baby-soother or by detuning a radio. Alternatively, there’s the Sleepduino.

Because I value my sleep more than I value my free time, I spent an afternoon designing and coding an combination white noise generator and nightlight for Alice’s nursery. Thankfully, I had the components I needed lying around: an Arduino with breadboard, three RGB LEDs, three tactile buttons, a piezoelectric buzzer and a potentiometer. Plus a whole mess of wiring.

The buttons control the LEDs: each LED has its own button, which cycles it through seven different colours before turning it off. Press the button again, and it’ll switch on again. The pot controls the volume of the buzzer, which exists to vocalise the output of a pseudorandom bit-shift register to generate a pleasing ‘static’ sound.

Set the LEDs to provide whatever level and colour of nightlight you think your baby – or, indeed, you – would prefer, adjust the volume of the white noise (apparently, it should be around the same volume as being in the same room as someone taking a shower) and cross your fingers that you’re going to enjoy the best night of sleep you’ve ever had.

It’s only the second proper night of using it, but it seems to be working: Alice had the best night’s sleep she’s ever had last night, and she’s been settled for a good couple of hours now without issue.

I’ve designed a printed circuit board version of the Sleepduino which plugs into the top of the Arduino without all the distracting and easily-knocked wiring. I’m making an initial prototype, which will arrive from the fab towards the end of the month. If it works, I’ll be opening the floor for anyone who wants to buy one.

Be aware, however: this is an Open Hardware project. I’m making the source code (most of which is appropriated from other projects anyway), schematics and PCB layout available under a Creative Commons Attribution-NonCommercial-ShareAlike licence, meaning you don’t have to buy one from me. If you’d rather, you can just grab the files and make one yourself. I won’t stop you. Hell, I’m actively encouraging it.

The pre-built shields will be for people who don’t fancy building one themselves, and I’ll probably also make them available with Arduino clones underneath so they’re literally ready to go out of the box.

Hopefully you guys will find them as useful as I’ve found the prototype version.