Kawasaki KLR Forum banner

1 - 20 of 20 Posts

·
Premium Member
Joined
·
373 Posts
Discussion Starter #1
I want to add a set of auxiliary lights to the beast, and I'd like to integrate their switching with existing hardware rather than add another switch. The functionality I have in mind revolves around the high beam switch, and is described as:

A. Vehicle includes high beam light.
B. Vehicle includes auxiliary light (this is spot/fog light).

N = ~3 (ideally, this would be tunable and set during testing)

1. Vehicle is running, low beam is on (continuous), high beam and auxiliary light are off.
2. User flips high beam switch ON; high beam turns on.
3. User flips high beam switch OFF; high beam turns off.
4. User waits less than N seconds.
5. User flips high beam switch ON; high beam and auxiliary light turn on.
6. User flips high beam switch OFF; high beam and auxiliary light turn off.
7. User waits more than N seconds.
8. User flips high beam switch ON; high beam and auxiliary light turn on.
9. User flips high beam switch OFF; high beam and auxiliary light turn off.
10. User waits less than N seconds.
11. User flips high beam switch ON; high beam turns on; auxiliary light remains off.
12. User flips high beam switch OFF; high beam turns off.

+++

Put another way, from the ON position on the highbeam switch, flipping the switch quickly off then on again changes the status of the auxiliary light's response to the switch, latching and unlatching it with regard to the switch.

If the high beam is on WITHOUT the auxiliary, the user can turn the auxiliary on by quickly flipping the high beam off then on again (high beam is also on after quick-flip).

If the high beam is on WITH the auxiliary, the user can turn the auxiliary off by doing the same (high beam is on alone after the quick-flip).

In all cases where the high beam is on with the auxiliary, if the user turns the high beam off the auxiliary also turns off. The question is whether the user then waits more or less than N seconds to turn the high beam on again. If more, the auxiliary also comes back on. If less, the auxiliary does not come back on.

In case this is not clear, the high beam can be on without the auxiliary, but the auxiliary cannot be on without the high beam.

+++

I was wondering if some forum members would be so kind as to offer ideas about a few different approaches to getting this done. Tom mentioned that a 555 timer would be helpful. Looking at the 555 page at Wikipedia, I'm seeing a "bistable" mode that looks promising, but I'm not exactly clear on how that would work. I do have some specific design questions deriving from the explanation there, but it seems premature to ask them.

I think this could easily be accomplished with an Arduino, but I don't like the idea of the extra complication and bulk. But I'm open to hearing ideas along these lines.

+++

Thank you in advance!
 

·
Registered
Joined
·
320 Posts
I want to add a set of auxiliary lights to the beast, and I'd like to integrate their switching with existing hardware rather than add another switch. The functionality I have in mind revolves around the high beam switch, and is described as:

A. Vehicle includes high beam light.
B. Vehicle includes auxiliary light (this is spot/fog light).

N = ~3 (ideally, this would be tunable and set during testing)

1. Vehicle is running, low beam is on (continuous), high beam and auxiliary light are off.
2. User flips high beam switch ON; high beam turns on.
3. User flips high beam switch OFF; high beam turns off.
4. User waits less than N seconds.
5. User flips high beam switch ON; high beam and auxiliary light turn on.
6. User flips high beam switch OFF; high beam and auxiliary light turn off.
7. User waits more than N seconds.
8. User flips high beam switch ON; high beam and auxiliary light turn on.
9. User flips high beam switch OFF; high beam and auxiliary light turn off.
10. User waits less than N seconds.
11. User flips high beam switch ON; high beam turns on; auxiliary light remains off.
12. User flips high beam switch OFF; high beam turns off.

+++

Put another way, from the ON position on the highbeam switch, flipping the switch quickly off then on again changes the status of the auxiliary light's response to the switch, latching and unlatching it with regard to the switch.

If the high beam is on WITHOUT the auxiliary, the user can turn the auxiliary on by quickly flipping the high beam off then on again (high beam is also on after quick-flip).

If the high beam is on WITH the auxiliary, the user can turn the auxiliary off by doing the same (high beam is on alone after the quick-flip).

In all cases where the high beam is on with the auxiliary, if the user turns the high beam off the auxiliary also turns off. The question is whether the user then waits more or less than N seconds to turn the high beam on again. If more, the auxiliary also comes back on. If less, the auxiliary does not come back on.

In case this is not clear, the high beam can be on without the auxiliary, but the auxiliary cannot be on without the high beam.

+++

I was wondering if some forum members would be so kind as to offer ideas about a few different approaches to getting this done. Tom mentioned that a 555 timer would be helpful. Looking at the 555 page at Wikipedia, I'm seeing a "bistable" mode that looks promising, but I'm not exactly clear on how that would work. I do have some specific design questions deriving from the explanation there, but it seems premature to ask them.

I think this could easily be accomplished with an Arduino, but I don't like the idea of the extra complication and bulk. But I'm open to hearing ideas along these lines.

+++

Thank you in advance!
You mean like this: Autoswitch Lighting Controllers

I have one on my BMW which conveniently has separate turn signal switches with a cancel switch that is also separate and does nothing else so it is great to use for the trigger.
 

·
Registered
Joined
·
1,063 Posts
Aux Light

You may want to consider, if you want to flash your lights to, maybe, warn oncoming traffic of something, how this would effect your light system. Just throwing it out there for consideration.
 
  • Like
Reactions: pdwestman

·
Premium Member
Joined
·
373 Posts
Discussion Starter #4
You may want to consider, if you want to flash your lights to, maybe, warn oncoming traffic of something, how this would effect your light system. Just throwing it out there for consideration.
Indeed my friend. But if I'm riding along with high beams off and I flash my lights "on, off" once there will be no activation of this system. Only if I flash them "off, on" will there be a change. That's one of the reasons I'm looking at this pattern.

Repeated flashes would activate this, though. Starting from lowbeam, flashing "on off on," for example, would bring the aux on with the high beams with the second "on." Flashing a bunch and starting from lowbeams only, the bike would look like this:

low
high
low
high-aux
low
high
low
high-aux


Every other high beam flash would have aux as well.

:::

I know the Arduino approach here would be fairly straightforward. While I'm no expert, I have programmed one before. I can imagine a scenario where each "on to off" event on a particular pin resets a timer variable to 0, then the arduino adds to this variable in each frame (Arduino programs run in a loop of frames, so they're constantly iterating over code), then when it sees an "off to on" event, it compares the time variable against the "setting" variable, and if the timer is lower than the setting, it toggles between high/low on a pin which controls a relay. It may turn out that I go this route with a small-form-factor Arduino and call it good.

But I'm curious to work with the 555 chip, although I imagine it would be more complicated. The insight I can come up with myself in this area is considerably less complete. I know the 555 can send pulses for a set amount of time. I imagine these can be sent in response to a drop in voltage (i.e., when the switch goes off). The problem I have is envisioning the toggle solution. The 555 can give me voltage that endures for a particular time, but what would then compare the change in voltage in one spot (from the light turning on) against a charge in another spot (from the 555 timer which started when the light turned off) and apply a voltage to a third spot (the relay) if the first two spots both have voltage? What kind of component would this be?

The reason I'm interested in the analog approach is because currently the KLR has no microprocessor and I like that about it. It would be bitchin to keep the concept pure. That being said, the Arduino would also allow some cool special effects (strobing, brightness controls, etc., all controllable via this über simple double-click on the switch). Even so, I would like to keep the bike analog if possible.
 

·
Registered
Joined
·
320 Posts
That could very well be it, thank you! I've written to them and we'll see what they say.
I am curious as to what you find. I actually have never used mine after I installed it as I decided when I later added my auxiliary lights to run them off the high beam so that they went out when I switched to low beam for oncoming traffic. However, the status indicator LED still works so I think the Autoswitch still works.

It was tailor made for the BMW with its three switch turn signal system as the cancel button is intended to be a momentary switch which is ideal for the Autoswitch.

As an aside, when I first got my BMW, I thought the turn signal switch design was crazy. I had ridden Kawasaki’s since 1973 and it just seemed nuts to have three separate switches when one would do. Well, after riding 12 years now on the BMW and adding the KLR to my stable, I now have to switch. (pun intended) back and forth between the two systems. I found that I much prefer the BMW approach. It is very natural to push your right thumb to turn right and your left to turn left. And even cancelling with the right thumb is pretty easy, although the LT has self-cancelling signals so I rarely need to cancel manually. And the BMW switches are large and easy to find even with winter gloves. I now find the KLR single switch to be much harder to use, particularly with heavy gloves on in cold weather. Often, I think I have cancelled the signals only to find them still flashing, because there is so little tactile feedback from that tiny switch.

I think BMW got this right, but even they succumbed to the pressure to standardize and I believe their new models all have the Japanese style switch now. At least I am pretty sure the K1600s I have rented in Europe have all had the single switch on the left handlebar.
 

·
Registered
Joined
·
899 Posts
You could do that with a NodeMCU using "if" statements based upon the amount of time (in milliseconds) the button was pushed. You'd have to de-bounce the button. You could even control the lights from the internet using Alexa for that matter. Seems like a lot of effort to control lights.

I've got an ESP8266 mounted n my truck that opens my gate anytime the truck is within range. I considered putting one of the bike with a proximity detector that would beep if someone got close to the bike as a warning alarm but that's me just playing.

ESP's are handy little devices and I'm using them all over the house to controls lights and stereo inputs. I blame them and Alexa for my weight gain.

They'd be great to control LED's that you mounts as a light show on the bike. I programmed one that controls some addressable LED strips and simulates fireworks. May use it in the Grandkids playground.

They'd work great as a turn signal cancel. You could program it to cancel the turn signal after so many flashes.
 

·
Administrator
Joined
·
8,289 Posts
Hmm, interesting. Two of those could replace the switch-box-on-a-stalk on my RT. I might have to consider that, even though it would mean taking the 30+ screws out to get the Tupperware off.

It's due for that soon, anyway, so maybe.

Thanks for the tip.
 

·
Registered
Joined
·
320 Posts
Hmm, interesting. Two of those could replace the switch-box-on-a-stalk on my RT. I might have to consider that, even though it would mean taking the 30+ screws out to get the Tupperware off.;

It's due for that soon, anyway, so maybe.

Thanks for the tip.

Only 30? That’s nothing. Must be close to 60 on my LT. The stingray has 4 screws. Each wind deflector has 3. Ground lights each have 2, as do the rubber bumper covers and then 3 each for the chrome trim piece. One screw only for the turn signal lens, but then 9 plus a grommet for each side panel. That’s 44 just for the upper part, and that isn’t including the nose fairing. Then the lower fairing has 10 screws in the center section and I think another 5-6 in each lower side. So, probably at least 60. I have gotten it down to about an hour to fully strip the LT for maintenance. :grin2:

One good thing was it really made me appreciate the KLR. I was able to remove the seat, fuel tank and all of the plastic in about 30 minutes and that was with the “figuring it out” time for my first time through. The hardest part was getting the two hoses off of the petcock! It is a real pleasure to work on the KLR.
 

·
Administrator
Joined
·
8,289 Posts
Install a flat washer over the nib on the pet coco, then install the hose. Next time use the washer to push the hose off.

Hoses push off easier than they pull off.
 

·
Registered
Joined
·
52 Posts
That is a brilliant suggestion Tom, next time I have the tank off I must do this.


Install a flat washer over the nib on the pet coco, then install the hose. Next time use the washer to push the hose off.

Hoses push off easier than they pull off.
 

·
Registered
Joined
·
320 Posts
Install a flat washer over the nib on the pet coco, then install the hose. Next time use the washer to push the hose off.

Hoses push off easier than they pull off.
Yes, I was able to “push” off the fuel hose as I could get my fingers on it to push it from its end, but the vacuum hose was too tight for me to get my hands on it well. I finally was able to twist it and push on it with a screwdriver to work it back. Yes, pulling is bad. Sort of like Chinese handcuffs...
 

·
Administrator
Joined
·
8,289 Posts
 

·
Premium Member
Joined
·
6,684 Posts
I usually just use long nose / needle nose pliers to Push the fuel & vacuum hoses off.

I use the same pliers to reach UNDER the first installed tire bead, from the BackSide to grab & insert inner tube valves into the rim hole from the back side.
 

·
Premium Member
Joined
·
373 Posts
Discussion Starter #15
You could do that with a NodeMCU using "if" statements based upon the amount of time (in milliseconds) the button was pushed. You'd have to de-bounce the button. You could even control the lights from the internet using Alexa for that matter. Seems like a lot of effort to control lights.

I've got an ESP8266 mounted n my truck that opens my gate anytime the truck is within range. I considered putting one of the bike with a proximity detector that would beep if someone got close to the bike as a warning alarm but that's me just playing.

ESP's are handy little devices and I'm using them all over the house to controls lights and stereo inputs. I blame them and Alexa for my weight gain.

They'd be great to control LED's that you mounts as a light show on the bike. I programmed one that controls some addressable LED strips and simulates fireworks. May use it in the Grandkids playground.

They'd work great as a turn signal cancel. You could program it to cancel the turn signal after so many flashes.
A lot of cool ideas here, thank you! It seems like the ESP would be considered an alternative to something like the Microduino. What is the programming workflow like?

Also, re: "it's a lot of effort for just lights," I agree but it seems like a fun thing to try, particularly given the challenge of doing this without using a microprocessor. Reading the last few days about logic circuits and whatnot. The going is slow, but it's something to do.
 

·
Registered
Joined
·
899 Posts
A lot of cool ideas here, thank you! It seems like the ESP would be considered an alternative to something like the Microduino. What is the programming workflow like?

Also, re: "it's a lot of effort for just lights," I agree but it seems like a fun thing to try, particularly given the challenge of doing this without using a microprocessor. Reading the last few days about logic circuits and whatnot. The going is slow, but it's something to do.
Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software.

https://www.arduino.cc/en/Main/Software
 

·
Administrator
Joined
·
8,289 Posts
I love it when people talk about this stuff. I know all the words they use; I don't have to look u pa single one!

I even kinda know that they are talking about computery stuff.

But strung all together it just sounds like Gabby Johnson.

 

·
Premium Member
Joined
·
373 Posts
Discussion Starter #19
Hehe, ok.

Hey Toney, you mentioned the ESP chip as an alternative to the Arduino. Sounds like it does the same thing in that it lets you read inputs, run code, then execute outputs based on this code. I was curious how you get the code onto this lil' bugger though, and how you write the code for it. In your response you mention the Arduino integrated development environment, though, which was confusing to me: Does the ESP use the same IDE as the Arduino? Also, when I first asked this question, I used the term "SDK" (software development kit) instead of IDE, which was an oversight on my part — it is indeed more properly called an IDE.
 

·
Registered
Joined
·
899 Posts
Hehe, ok.

Hey Toney, you mentioned the ESP chip as an alternative to the Arduino. Sounds like it does the same thing in that it lets you read inputs, run code, then execute outputs based on this code. I was curious how you get the code onto this lil' bugger though, and how you write the code for it. In your response you mention the Arduino integrated development environment, though, which was confusing to me: Does the ESP use the same IDE as the Arduino? Also, when I first asked this question, I used the term "SDK" (software development kit) instead of IDE, which was an oversight on my part — it is indeed more properly called an IDE.
The ESP8266 is built into a NODEMCU. All you have to do is program it with Arduino software. They're on ebay for a couple of bucks from China. You have to add a json file to the Arduino. YouTube it. There's a learning curve.

Here's one for 5 bucks. https://www.ebay.com/itm/NEW-NodeMcu-Lua-ESP8266-CH340G-ESP-12E-Wireless-WIFI-Internet-Development-Board/382621475889?epid=6025110158&hash=item5916046431:g:FhsAAOSweIlb4fGr

Cheaper from China but you'll wait a couple of months on it. The only downfall of the Node is the inputs and outputs use 3.3 volts not 5. A level shiftter fixes that if you have to have 5 volts.

Watch this:

I've moved on to the ESP32 chip for most things. It has bluetooth, touch sensors, hall and lots more but the codes you can get on Github are far less than the 8266 on the NODEMCU. One thing I'd advise is that you stay away from the "D's" in you code. An example would be "digitalWrite (D4,HIGH)" that works but use "digitalWrite (02,HIGH)". If you write D's, that same code will not run on a 32 so if you use the GPIO # instead of the D's you're better off if you decide to upload the code to a 32 in the future.

Here's the 32:


This is what you want to paste into your additional boards manager: https://dl.espressif.com/dl/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json

Lets see a video of you turning on your turn signals from work when the bikes home in the garage. LOL!
 
1 - 20 of 20 Posts
Top