LED Brake light conversion for a 1993 Triumph Tiger (version IV)

So, a few years after version 1, I have now completed my 4th iteration of this idea.

Version 2, was more 5mm LED’s like the 1st, but was unreliable.  Version 3 used the same LED’s as version 4 but with a 556 timer as in version 1.  Version 3 got very hot – so hot in fact it started to smoke.

This version is an interim version as it still gets too hot on full brightness.  Fortunately, the brake light only requires a fraction of the maximum output, so is perfectly useable for long periods of time.

New for version IV is the 12F675 PIC Micro Controller.  This was my first dabble with Micro controllers and I am hooked.  The reason for the change is that the PIC can do PWM like the 556 timer, but with less circuitry.  It also enables me to modify the brightness of the output without the need for me to take the cover off and adjust variable resistors (and it can also do 0-100% duty cycle).  This is the source code for the PWM and the control on the 675 chip.  Todo: Add watchdog timer support and maybe add option to reduce brightness steps.  Having looked at some PWM code on the net, I decided to create my PWM code from scratch.   I did try a 2 timer approach, but found that a single timer worked better for me.

Continue reading LED Brake light conversion for a 1993 Triumph Tiger (version IV)

Bike/Car Camera System Using Alix 3d2/3d3 Boards

Foreword: A while back, whilst traversing a roundabout, some bastard drove into the side of my lovely car and, although it was his fault, claimed it was mine and that I was in the wrong lane, etc, etc. Before that point, I had been toying with the idea of installing a forward facing camera to capture my trips to Wales and the number of idiotic incidents one sees when driving anywhere. This was the final impetus I needed to start my project. My original system used a Mini ITX board without any hardware encoder, relying on the efforts of mencoder and the CPU to encode the raw stream to a useable size and of reasonable quality. I learned quite quickly, that a hardware encoder was required.

Choosing the Alix system: After getting fed up with the car I wanted to install a similar camera system onto my motorbike. Rather than doing something practical and spending lots of money on a bespoke system, I decided to use my experience from the CarCam project to build a system for the bike. Being short of space, I needed the smallest system I could find, with hardware encoding, USB support and run on 12V. Needless to say, I couldn’t find anything that fitted this requirement.  How ever, I did find a supplier of MPEG2 Mini PCI cards which meant I only needed to find a small system board that accepted Mini PCI.

Development: It’s been over a year since I started working on this project.  I have sold one system to a friend who has been using it to record his off-road exploits (as well as his commutes).  During this time, I have refined the code to a stable release and optimised the time it takes to start recording from power on to around 25 seconds (from around a minute in the early code).  The system is based on Slackware 13.0 with a heavily customised 2.6.30 kernel and environment.  I am using aufs2 to mount over “/etc” and “/var” to prevent the Compact Flash card from being prematurely destroyed by OS writes.  The handling of inserted/ejected media, as well as media errors, is done via syslog-ng which calls helper scripts when the appropriate kernel messages are generated.  Other scripts are called from cron to check that the recording doesn’t exceed the 4GB file size limit of the FAT32 file system and that the USB device doesn’t fill up.

Video Quality: The output video needs some deinterlacing, but the overall quality is very good.


Continue reading Bike/Car Camera System Using Alix 3d2/3d3 Boards