I had posted a few updates in rugbywarrior's thread but as his project has come to an end I will post further updates here.
My goal starting out was to produce a drop-in replacement for both the flasher relay and auto-canceller that would be 100% compatible with stock bulbs AND LEDs.
Seemed stupid to lose the canceller function when upgrading to LED bulbs.
The brain of the unit is an Arduino Nano microcontroller. It controls when the signals turn on, how fast they flash, and when they turn off.
Taking advantage of the stock auto-canceller connector the arduino can estimate speed and distance travelled, and will turn off the turn signals based on those two factors.
The current implementation scales the distance to turn off the signals based on speed. At 19mph or lower the unit will cancel the signals after 400'. Above 19mph the unit scales the distance upwards to a maximum of 1000' at 56mph.
I am open to suggestions to modify the cancelling functions. The beauty of the arduino platform is how easy it is to modify the code over USB.
The pcb layout above was just sent off for fabrication. This is the first pcb I've designed and ordeded but in a few weeks I'll have three boards to start soldering together. The exact circuit works on the prototype breadboard so I'm optimistic.
The basic flasher/canceller functions are fully functional. Once the components are soldered onto the board I should be able to plug it into the bike and go.
I've tried to keep the pcb small enough that it will fit into the stock flasher relay mount. It's about 1" longer than the stock relay but about the same diameter. Just need to fabricate a cylindrical case for it.
I've tried to allow for the addition of extra features in the future.
-The pcb incorporates an I2C communications header. There are hundreds of I2C modules available from temperature sensors to LCD screens.
-There is a header for reading an analog voltage input. Maybe an RPM sensor?
-There are also two extra digital inputs for future use (dunno)
No definite plans for extra features but RPM monitoring and an LCD screen are two of the more intriguing features.
With accurate speed and RPM readings it should be possible to do some horsepower calculations.