Adding an Arduino Nano to my '76 XS360

BBS360

XS400 Guru
Top Contributor
Messages
1,974
Reaction score
196
Points
63
Location
BC, Canada
Flasher.png


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.:shrug:

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. :thumbsup:
 
I've looked at that circuit a few times. Hopefully a much simpler version will work for mine.
Thinking the arduino should be able to handle most of the filtering and triggering provided by the 555.

Once I get my motor back in the frame and running I might test some locations on the ignition circuit with an oscilloscope to see how messy raw inductive or capacitive readings would be.
 
The code needs some tweaking, it needs a proper connector to plug into the flasher relay connector (male H4?), but it works:
20150427_200507 (Medium).jpg


Shuts off after the front wheel spins the required number of times. Totally silent too.

The heat sink gets a little warm with 27W bulbs but I don't think it's an issue. LEDs would barely stress it.
 
Love the idea Levdir. I think these bikes are the perfect platform to play around with microcontroller integration. I had a class last quarter that went over PIC microcontrollers and basic, which I think could control almost everything you would want on a bike this simple. We're going to be doing Arduino at some point so I am very much looking forward to that. Stoked to see how your unit works out!
 
Back
Top