
I got inspired by a post about using analog gauges to display PC stats. The author of the article uses a voltmeter and a PIC 18F2550 connected to the USB port to display the CPU usage and the download speed. I wanted to do something similar and started looking on Ebay for a fancy voltmeter. I couldn’t find anything I really liked but there was a tachometer which got my attention.
A tachometer is usually installed in a car to measure the rotation speed of the engine. but I was going to use it to display the level of CPU usage. I bought the tachometer on Ebay, from a Chinese seller. I paid it only £20 delivered but I can not say it is a top quality device. Though It does its work it is very plasticky and the needle movement isn’t very precise.
The tachometer connects to the engine PC through 3 wires: 2 wires for the 12V power supply (the red and the black wires), whilst the green wire carries the signal which drives the needle. If the tachometer was installed in a car the signal would be a square wave coming from the engine coil: the higher the frequency of the square wave the further the needle moves. I wasn’t sure about the required amplitude of the signal but I found out that 5V were just right.
Of course I wasn’t connecting the tachometer to an engine’s coil but to a PIC 18F2550 microcontroller which would create the 5V square wave to drive the needle. The beauty of the 18F2550 is that its size is quite small, it has 28 pins, has a reasonable amount of program memory and also hardware support for the USB 2.0.
This was my first project involving USB communications and the main reason of this work was experimenting with this family of USB devices, as well as having a nice homemade gadget sitting on my desk.
Continue Reading ->

I have spent the Sunday afternoon working on this RS232 to TTL levels converter. Nothing exciting here, just a little tool I need to connect Microchip microcontrollers to the PC serial port, during my debugging sessions.
The circuit is very easy and available on hundreds of websites: the MAX232 chip only needs 4 1uF capacitors. I could have chosen the MAX233 instead, because it has the same functionalities of the MAX232 but it doesn’t require the external capacitors, and it would have been much easier to fit inside the little project box!


I eventually completed the project described in this article. The result is not as neat as I expected and in particular I don’t like the two screws on the front panel but this is the best I could do.
The LED display shows the current time, the Google Adsense balance, the number of unread email messages and the number of people visiting a website I run (this data comes from whos.amung.us).
The display is driven by a PICLF628 microcontroller connected to the router through its serial port (check Rod Whitby’s post for details on the WRT54GS serial port).
Continue Reading ->
I check my emails quite often, probably at least every hour and most of the time I have no new messages. What I needed was a kind of visual notifier that lights a led or waves a flag or makes a noise when I get a new message. My first attempt was using I-Buddy, a funny USB gadget which is intended for using with MSN. When you get an emoticon I-Buddy flips the wings and lights its head. Quite good stuff. In the UK is available for around £15 but I got mine from the Ebay for £2.99 plus a couple of pound for the shipping. If you are a programmer it is possible to make I-Buddy do whatever you want using its API and any language compatible with the .NET Framework (for example C# or VB .NET).
So I wrote a little tool to check my mailbox and make I-Buddy flip the wings if there was a new message. Good enough but then I realised I wanted something working without the need of a computer turned on all the time. I already had a Linksys WRT54GS router modified to work with OpenWRT, an open source firmware working on many devices which turns your router in a real Linux box you can use as a web server, a proxy, a mail server or anything else. Personally I bought mine because I needed an Asterisk server at home and the WRT54GS was powerful enough to manage up to 4 simultaneously calls.
Now you should know the WRT54GS has 2 serial ports on the PCB which are not connected to the external world but they are there for us. I thought I could connect some type of display to one of the serial ports and then drive it with a shell script.

Continue Reading ->