On 2015-02-15 3:55 AM, YTC#1 wrote:
> It is a KLR, it won't have anything approaching an electric gadget, other than the spark plug. Even the headlights are candles :-)
Laugh, but I've whipped up a time-averaging Arduino based voltmeter
for the KLR to gauge the state of the battery when I've got my Gerbing
kit is hooked up. The reason for all this fiddle faddle is that the
alternator on the KLR is rather weedy and it's critical not to use
too much current in the heated gear or the battery will drain down
over time. But if I keep the duty cycle low enough on the temperature
controller, I can ride as long as I like (or can tolerate, given my
Champ-like nesh tendencies).
Normally, all you would need is a voltmeter to show the battery
voltage. But the problem is, the system voltage varies so much
depending on whether the temperature controller is on or not. It's
a pulse width modulation device, with a fixed cycle frequency of
1 Hz. The average power delivered is a function of the pulse width
which varies from nothing to 100% on. This makes it impossible to
gauge the state of the battery with a conventional voltmeter because
the readings jump around so quickly. The fact that the gloves and
the jacket are usually turning off at different times doesn't help.
http://www.revzilla.com/motorcycle/gerbings-portable-dual-temp-controller
Taking readings continuously as fast as the Arduino will go (well,
under the Arduino high level language will allow, going deeper would no
doubt be faster, but it's fast enough), I fill up a circular queue and
average the readings over enough samples to give a stable reading. Of
course I can cycle through instantaneous readings or averaged, and
I can give the user a choice of averaging times only limited by the
size of the queue, but practically it doesn't matter much once you
go past about 25 readings.
It's in a breadboard configuration now, using the Arduino LCD display.
I am seriously thinking making a go of selling it as a complete item,
as even KLR owners are not immune to farkle-itis, despite their
parsimonious reputation. I may even offer a steampunk version using
TIL311 alphanumeric LED displays. :)