Category Archives: Uncategorized

Content import!

Hello, please excuse me, I migrated the content from an old, old, old site. I’ve guessed at the dates of original publication. Although the content is recent, my memories of the projects have faded and my willingness to revive any of these pre-arduino toys is non-existant. You may find something here of use, so fill your boots.



DASICARPODOC means “DAve’s SImple CAR iPOd DOCk.” It is a way to integrate an iPod to a car without a headunit. It displays artist and track information on an LCD and provides simple iPod control via remote buttons. There is also a home version, using an stv5730 to provide video output for a TV or projector in the works.


The prototype hardware for this project is based on SimmStick modules from Dontronics.


Main Board – SIM100

The main board is a SIM100, with a few modifications:

  • The power supply is protected from Load Dumps.
  • The Tx signal is clamped to 3V to suit the iPod electrical specifications.
  • A Trimpot is placed on the board for the iPod Accessory Identify signal.
  • The ATMega32 SDA and SCL signals are routed to the correct SimmStick I/O line.


IO Module – DT209

The DT209 Module, loaded with three 8bit I/O ports, provides the I2C interface to the LCD display and push buttons.

The socketted DIP switches are loaded in place of darlington driver arrays specified in the DT209 design.


The ‘video’ version uses a DT108 from Dontronics



Get the source here. This uses my avr library which is here. You will need to install eclipse and CDT, then import the source to an eclipse “managed make C project”.

In order to build the source you will need to have avr-gcc installed. Visit this page for a step by step guide to building the complete GNU toolchain for the AVR target.

I’m currently using the AVR-LIBC and AVRGCC packages for ubuntu, go point and click Linux.

Layers Baby Layers

This diagram shows major software modules and software/hardware split.

MAIN Software
iPod LCD Button Video
DOCK PCF8574 PCF8574 STV5730A Hardware
iPod LCD Buttons Video


Layer One – Hardware Interface Layer

The lowest software layer is comprised of three modules; I2C, SPI and SCI. The SCI module is responsible for communications between the iPod and dasicarpodoc. The I2C module drives the three PCF8574 8 bit I/O ports which in turn drive the LCD and Buttons. The SPI module drives the atmega internal SPI subsystem.


The SCI module drives the atmega’s internal SCI hardware. The SCI is initialised to 19200 8N1. The communications scheme is interrupt driven.


The I2C module drives the three PCF8574 8 bit I/O ports. Two of the ports control the LCD, the other interfaces to the buttons. The interface provided to upper layers is the function iicPortWrite(), which is a masked bit state maintaining PCF8574 driver. This module uses the atmega’s Two Wire Interface.


The SPI driver is part of the video module and provides access to the atmega’s SPI subsystem.

Layer Two – Driver API Layer

This layer provides a layer of abstraction, hiding direct hardware access. The four modules at this layer are the ipod, LCD, button and video modules.


The bulk of work done by this module is to format a command string to send to the iPod and to receive the iPod’s reply, interpreting the reply.


This module provides functions that drive the LCD display, after calling lcdOpen(), the bulk of work is done by calling lcdIoctl() and lcdPrint().


This module provides an interface for an array of (up to 8) buttons through the getButton() function.


This module provides functions that drive the stv5730 video IC.

Layer Three – Application Layer

This layer does stuff… …this is where you would put your code if you wanted to mess around with the driver.

Golf Temperature Gauge

The water temperature gauge in my 1989 MKII Golf died one day. Being terminally short of cash I decided to replace it with a DS18B20 temperature sensor with LCD display.


I have no idea how much a replacement gauge would have been, but it was a good weekend spent thinking, drinking, hacking and swearing.

The source code is available here

It uses my avr library which is here.

Manchester Data Link

Manchester Coding

Transmitter Source code

Receiver source code

I made a Transmitter/Receiver pair from a couple of PIC’s. The pair use a manchester coding system. This is a layer 2-ish solution. I put them on top of a 433 MHz rf and an IR layer 1.

I used the PICC Lite compiler from HI-TECH, which is pretty good but the version I have doesn’t handle bank switching properly.

The transmitter is a 12F675, with a 12C509 modulator for an IR data link layer or a 433 MHZ TX module from OATLEY for an RF data link layer.

Included in the source code package is the code for the 12C509 38/49 kHz IR modulator

The receiver is a 16F627 connected to an LCD display in 4 bit mode.

Look in the doc directory of the source for an explanation of the coding scheme.

Electronic Throttle Control

I developed a prototype Electronic Throttle Controller as my final year project at CPIT in 2001. The system consists of a 68HC11 based main board, a stepper motor and driver board, a pedal position sensor and an engine speed sensor.

An Electronic Throttle Controller replaces the mechanical linkage between a cars accelerator pedal and throttle. Breaking this linkage frees the designer to allow inputs from systems other than the drivers foot to control engine speed. Such a system can be used in launch/traction control systems, gearbox controllers and anti-stall systems.


Main Board

The main board is a double sided PTH design, I was lucky to have a friend with connections in the PCB manufacture business, making this design possible with the non existent project budget. It is a fairly conventional 68HC11 expanded memory design.


Stepper Motor Driver

The stepper motor driver is based on the ULN5804 motor driver IC from Allegro. I used a motor from an old 5 1/4″ floppy drive for the prototype demo. I housed it in an aluminium box with perspex lid for demonstration purposes.


Engine Speed Sensor

The engine speed sensor is based on a dual element Hall effect sensor from Allegro. Below is a concept drawing for the sensor, and the potted prototype.