Programming one USBasp with another USBasp

The lazy way to update the firmware on a USBasp without faffing with an Arduino Uno as a programmer and lots of jumper leads? Get another USBasp and use it to program the other one.

Instructions based on this blog post.

1) Plug both USBasp programmers together using the 10 way cable.

2) Short JP2 on the target USBasp (the one you want to update).

3) Plug the source USBasp into your computers USB port. Do NOT plug the target USBasp into a USB port!

4) In a terminal type
avrdude -c usbasp -p atmega8 -u -U hfuse:w:0xc9:m -U lfuse:w:0xef:m
to set the fuses. “-c usbasp” tells avrdude that you are using a USBasp as your programmer and “-p atmega8″ tells avrdude that the target device (the other USBasp) is based on an Atmega8 microcontroller.

5) Then program the firmware (you can download the precompiled hex file from the blog post I mentioned earlier).
avrdude -c usbasp -p atmega8 -U flash:w:usbasp.atmega8.2011-05-28.hex

If everything worked you should be done. Disconnect everything, remove the jumper on JP2 and give the new firmware a spin burning bootloaders.

MSP430 POV kits

With the firmware nearly complete, I started bagging up the components to make some kits for one of the Make Bournemouth workshops.

This is what is in the through hole kit:


And this is the surface mount kit:IMG_20140930_204122

That gives me 8 through hole and 8 surface mount kits. (I Still need to source some more batteries for the surface mount kits).



Each kit comes with a CP2102 USB to serial adaptor to talk to the MSP430 microprocessor and upload text messages. Firmware programming will require a TI Launchpad board or TI MSP programmer.

MSP430 based POV

I’ve been working on the MSP430 based Persistence of Vision (POV) board for a while now. The original version was meant to be etched with DIY PCB kit, but the results were less than spectacular and I kinda gave up and never put a board together.

The current version (rev2) is a much nicer board but is meant to be manufactured professionally. This isn’t a big deal anymore as it is possible to get small runs of small boards made at a really good price. I used the iTead Studios PCB service and have been really impressed with the results.

IMG_20140728_214829Surface mount board (left) vs thru-hole board (right).

It has taken me a while to sort out the firmware. For a long while it has just been displaying a pacman style ghost and didn’t do anything else. It could only be programmed via a TI Launchpad, and I couldn’t upload a text message via serial.

IMG_20140723_005024Basic firmware – displaying Pacman style ghost

Right now the firmware is pretty much working how I had hoped. I can now upload an ASCII text message via serial and display that on the leds, store it in flash memory so it will be persistent when the device is powered off and powered back on. It still needs a bit of work to tidy things up, but it is about 80% of the way there.

Firmware is on

Check out the flash_memory branch – that is where all the interesting changes are taking place, but be warned, the code may not be in a working state.

Pi Cam – Web cam

Its been a while since I looked at the RaspberryPi camera. I had intended to turn it into a door bell that emailed me a still of whoever had just rung the door bell – or maybe even a mobile phone app that could display a live stream in near real time… and… I was also going to try using it to take time lapse video but… I just didn’t get round to it.

However, I had a pressing need to resurrect the Pi and its camera recently when our Springer pup damaged her cruciate  ligament and had, what in hindsight was, pretty major surgery. I wanted to be able to keep an eye on her remotely and also so my wife could check on her from work.


So with the raspistill command, the screen command and the Apache web server all running on the Pi, I had a quick and dirty web cam.

First off I blew away the old OS on the 16GB SD card and reinstalled Raspbian.

Updated with:

apt-get update; apt-get upgrade

Enabled the camera with:


Installed the apache webserver with:

apt-get install apache2

Installed screen with:

apt-get install screen

Started screen with:


Note: screen allows you to run multiple ssh sessions from a single ‘ssh terminal’, detach from the ‘ssh terminal’ (i.e. disconnect) while all the commands continue to run. You can then reconnect to the screen session at any time. Probably overkill for this, but was handy for testing…

Then in the screen session run:

raspistill -t 0 -vf -hf -tl 10000 -w 800 -h 600 -o /var/www/immi.jpg &

Which does the following:

raspistill   is the command to take a still picture with the raspberry pi camera.

-t 0   means don’t wait to take a picture. If I set this to 5 (which I think is the default if you don’t use the -t switch) then the software will wait 5 seconds before taking a picture. Note: the -tl switch (we’ll get to that shortly)  doesn’t work if you ommit the -t switch.

-vf   means vertical flip – so flip the image vertically. For some reason the images from my Pi cam are back to front so I have to use the -vf command.

-hf   means horitonal flip – flip the image horizontally. As the camera is upside down at the top of the cage, this switch flips the image the right way up.

-tl 10000   means operate in time lapse mode and take a picture every n milliseconds. In my case I don’t need rapid updates so I’m taking a picture every 10 seconds (or 10,000 milliseconds). Note: As mentioned above, the -tl switch is ignored if the -t 0 switch is omitted.

-w 800   means set the width of the picture to 800 pixels wide.

-h 600   means set the height of the picture to 600 pixels wide.

-o /var/www/immi.jpg   means write the output file to the /var/www directory and call it immi.jpg (Immi is the dogs name).

The ‘&’ allows the command to run in the background. If the ssh session that ran the command exits, then the command also exits, hence the use of the screen command.

Finally I added a really really basic web page into /var/www to load the image and refresh it every 10 seconds.

<head><meta http-equiv="refresh" content="10"; URL="></head>
<body><p>Immi cam. Poorly Immi :(</p>
<img src="immi.jpg">

The ‘meta http-equiv=”refresh” content=”10″; URL=”> line does the job of reloading the page every 10 seconds.

It isn’t pretty, but it does the job and only took an hour to setup.

And now I know how to do time lapse with the Pi cam, I don’t have an excuse for doing that next!

Make Bournemouth

Make Bmth logo

The interest in 3d printing has led to my involvement with and taking part in workshops, helping out with workshops and even preparing content for and running the odd workshop.

We currently run a regular monthly workshop, that have ranged from kits to led resin cubes, cad software tutorials to paper craft critters.

We are also running open project workshop where we encourage people to bring along their projects. They can be finished, work-in-progress or just an idea.

Come along, grab a coffee and have a chat or help out on someone else’s project. Head over to the MakeBMTH website for details.


ABS Curling and sand blasted Ikea mirror

I haven’t done much work trying to get the dual extruder i3 working. I was frustrated by the curling I was seeing with ABS prints and the mess created using ABS juice (ABS dissolved in Acetone) so though I would try a sand blasted Ikea mirror

Going back to basics I wanted to get decent quality prints in ABS with one extruder. I have replaced the cheap 0.35mm jhead clone with a decent quality one. Initial results were promising but I was still seeing some curling.

I tried printing with brim and a light coating of ABS juice. That improved things, with only minimal lifting.

Getting the print off the bed was another matter. The brim came away easily enough but the print was well and truly stuck.

Prising the print up with a thin knife freed the print, but also some of the glass bed!IMG_20140323_091556 IMG_20140323_091613 I’ve gone back to glass with Kapton tape (wiped with Acetone before use) and brim and that seems to be working, for now.

Machine shop practice – lathe turning

Over the past 11 weeks or so I’ve spent 1 evening a week at a local college learning lathe turning and this multi-function mallet is the result. Now I have a grasp of the basics I hope to get my lathe up to scratch, cleaned up and fitted with a new adjustable quick change tool post and then I want to have a go at making my own hot ends.

IMG_6633-001 IMG_6632-001 IMG_6631-001 IMG_6630-001 IMG_6629-001 IMG_6628-001