p.u.l.s.e. – fader control for Motorcycle parking Lamp

My brother is a Mechanical Engineer who loves his KTM Duke 200 bike. He asked me to build this circuit : http://sunbizhosting.co.uk/~spiral/blog/?p=227 for a ‘heartbeat’ lamp controller for the parking light. A Neutral Detect (ND) signal controls the lamp pulsing. When ND is HIGH, the Lamp is fully lit. When ND goes LOW, the lamp starts pulsing.
I’m not familiar with PIC microcontrollers, and didn’t want to dabble in “C” code. I’d be comfortable with an Arduino, but even the smallest AT Mega seemed too big (and overkill) for this simple requirement. How about an AT Tiny ? A bit of Googling, and I found this excellent resource for running the Arduino environment on the AT Tiny : http://hlt.media.mit.edu/?p=1695
Time to churn out a circuit. I selected the ATTiny45 which has 6 I/O pins, with two of them being PWM, and three Analog. The schematic and board layout (in KiCad) can be found on the wyolum code repository at Google Code. The idea was to have a board that plugs in to the existing lamp socket. The board size is about the same as a T10 lamp. A new socket is wired to the p.u.l.s.e. board which then attaches to the lamp. A third wire from the p.u.l.s.e board goes to the Neutral Detect (ND) signal in the bike. This makes the installation clean and simple.
p.u.l.s.e. – fader control for Motorcycle parking Lamp
3D render of the p.u.l.s.e. board
The 6 way header is ICSP for programming the AT Tiny.
p.u.l.s.e boards
Assembled p.u.l.s.e board
Green wire is for ND signal. Red and Black go to a Lamp socket. The p.u.l.s.e board plugs in to the original lamp socket.
Now for the Important bits – getting Arduino to run on the AT Tiny. These are the steps
PHASE I – Get the AT Tiny boards.txt files
1. Download AT tiny hardware description files for the Arduino environment from here: https://github.com/damellis/attiny/zipball/Arduino1
2. Create a sub-folder called “hardware” in the Arduino sketchbook folder (find its location from preferences dialog in Arduino IDE)
3. Copy at tiny folder from inside the downloaded .zip to the hardware folder. You should end up with folder structure like Documents > Arduino > hardware > at tiny that contains the file boards.txt and another folder called variants.
4. Restart the Arduino IDE.
5. You should see  AT tiny entries in the TOOLS > BOARD menu.

Read More: p.u.l.s.e. – fader control for Motorcycle parking Lamp

Leave a Comment

Your email address will not be published. Required fields are marked *