Author Topic: Application of robot sensors for auto-cancel turn signals on a motorcycle?  (Read 2827 times)

0 Members and 1 Guest are viewing this topic.

Offline kenkammTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Hello,

I'm not building a robot per se, but I think learning about robots and sensors will help accomplish my goal. I want to build an auto-cancel system for the turn signals on my 2012 Honda CBR1000RR.

Normally, after completing a turn, one must remember to turn off the turn signal. Some bikes come with this feature, but most don't. Mine didn't, and I thought it would be a fun project to make one.

There are some store-bought solutions, but they are just essentially timers with various modes. I think a timer is a lame solution.

Self cancelling signals on a motorcycle are a bit of a tricky problem:

1) You can't rely on handlebar position sensing, because of the way motorcycles turn
    a) The bars don't turn very much at all except in low speed corners
    b) Because of the way motorcycles work, each steering "event" is preceded by a counter-steer (this is what leans the bike.)
2) Detecting lean is tricky because the turning force is essentially down through the centerline (a mercury switch won't work reliably.)

I tried experimenting with a heading hold gyro (out of one of my model helis) and due to drift etc, it doesn't really provide a reliable output I could use to flip a switch or delatch a latching relay or something.

I've done a bunch of searching to try to learn a little about what sensors might suit this application. My thoughts on a solution:

1) I don't know how to build robots (yet) or write code.
2) I don't want this to cost more than, say $100.
3) A distance-traveled system would probably work as long as it was fairly accurate.
4) A compass heading system might work too, as long as the compass can work reliably when mounted in a motorcycle (vibration, interference, lean?)
5) If there was a reliable way to sense lean angle without sensor drift, that might work.
6) If a gps sensor could be used to determine distance, that could work, but I think gps sensors might be too expensive.

A couple of questions for the experienced folks:
1) Is there a sensor that could be mounted underneath the bike that would "view" the road surface and determine distance traveled? When car magazines test cars they have a device like this. It looks at the road surface and somehow measures speed.
2) Is there a way to use an accelerometer and not have it be "fooled" by the fact that the bike leans in turns, thereby creating a false "UP?"
3) Can a compass sensor be mounted under the seat or somewhere hidden and still function properly?

The basic output I would need would be a logic high or low that I could use to reset a circuit or unlatch a latching relay.

Thanks for any insight you can provide.

Cheers,
Ken

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Application of robot sensors for auto-cancel turn signals on a motorcycle?
« Reply #1 on: September 05, 2012, 10:39:51 PM »
Hi,

I'm not building a robot per se, but I think learning about robots and sensors will help accomplish my goal. I want to build an auto-cancel system for the turn signals on my 2012 Honda CBR1000RR.

Normally, after completing a turn, one must remember to turn off the turn signal. Some bikes come with this feature, but most don't. Mine didn't, and I thought it would be a fun project to make one.
Strange... Of the five MCs that I've owned, the two rice burners did have this and even a Honda CD50 I had as a teen was equipped the same way.


There are some store-bought solutions, but they are just essentially timers with various modes. I think a timer is a lame solution.
Ahemmm... Are you going for form or function here?


Self cancelling signals on a motorcycle are a bit of a tricky problem:
And yet, they managed to make them semi-reliable back in the seventies?
Can't be that hard, given the progress of technology since then.


1) You can't rely on handlebar position sensing, because of the way motorcycles turn
    a) The bars don't turn very much at all except in low speed corners
They turn plenty to detect it.


    b) Because of the way motorcycles work, each steering "event" is preceded by a counter-steer (this is what leans the bike.)
Only the more abrupt turns and only up to a certain speed, you need counter-steering, but anyway, it can be handled by a timer ;)
(Or eg. by logic).


2) Detecting lean is tricky because the turning force is essentially down through the centerline (a mercury switch won't work reliably.)
That's not completely true - Try bolting a glass of water to your bike and go for a drive - if your statements holds water, so does the glass ;D


I tried experimenting with a heading hold gyro (out of one of my model helis) and due to drift etc, it doesn't really provide a reliable output I could use to flip a switch or delatch a latching relay or something.
Did you try a 3-axis accellerometer?


I've done a bunch of searching to try to learn a little about what sensors might suit this application. My thoughts on a solution:

1) I don't know how to build robots (yet) or write code.
Not knowing your time frame or whether you want to build other stuff, I'd stay off microcontrollers then - too much to learn for just a single use.


2) I don't want this to cost more than, say $100.
For how many ;D


3) A distance-traveled system would probably work as long as it was fairly accurate.
Well, it's the exact equivalent of a timer paired with your velocity


4) A compass heading system might work too, as long as the compass can work reliably when mounted in a motorcycle (vibration, interference, lean?)
Sounds complicated and then you'd need a microcontroller.


5) If there was a reliable way to sense lean angle without sensor drift, that might work.
Same as above.


6) If a gps sensor could be used to determine distance, that could work, but I think gps sensors might be too expensive.
Complexity should be your concern here as well (GPS chips are not that expensive)


A couple of questions for the experienced folks:
1) Is there a sensor that could be mounted underneath the bike that would "view" the road surface and determine distance traveled? When car magazines test cars they have a device like this. It looks at the road surface and somehow measures speed.
A very fast low-res camera and a whole lot of clever software - look for optical flow sensors, but that'd break your budget.


2) Is there a way to use an accelerometer and not have it be "fooled" by the fact that the bike leans in turns, thereby creating a false "UP?"
3) Can a compass sensor be mounted under the seat or somewhere hidden and still function properly?
Yes, but why not step it down a bit?


The basic output I would need would be a logic high or low that I could use to reset a circuit or unlatch a latching relay.
Personally, I'd rip out the relay and make a fully electronic solution, but different folks...

I'd guess the 2012 version of the Gold Wing has got an odometer pulse that you could tap into.
Has it's got electronic meters with displays or oldfashioned "clocks"?
Does it have an electronic gear indicator?
A "clutch engaged" indicator/switch?

RPM x gearing = distance travelled (as long as the clutch is engaged).

A random thought: Usually you speed up after a turn and then shift up - either condition could be detected and used for quenching the turns signal

One or two slotted IR couplers could be used to detect when the steering angle is straight ahead (it cannot be turning under that condition).

Counter steering can be dealt with (if the method you go for needs it) either by a timer or by distance travelled. Steering angle would do as well, but that's an unneeded complication.


I'd go for a combination of timers, with a timer as the final judge.
Like this...
Flasher ON
Start timer 1 (overall timer - when it times out, flasher OFF)
When steering angle deviates from straight ahead, start timer 2
If timer 2 times out, flasher OFF
When steering angle returns to straight ahead, start timer 3 (reset timer if angle deviates before it times out).
If timer 3 timed out (meaning that the steering angle was straight ahead for the entire time, flasher OFF).

The above can be made with a couple of slotted couplers, 3 timers (eg. 555 or one 558) or the tiniest microcontroller - like this...

And a little handiwork, mounting a "flag" (an interrupter) and the couplers to the frame/headtube.

The more components you use, the higher the chance that something goes wrong - same thing with complexity. KISS and tell ;D
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline kenkammTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Application of robot sensors for auto-cancel turn signals on a motorcycle?
« Reply #2 on: September 06, 2012, 06:45:56 PM »
Hi,

Strange... Of the five MCs that I've owned, the two rice burners did have this and even a Honda CD50 I had as a teen was equipped the same way.
And yet, they managed to make them semi-reliable back in the seventies?
Can't be that hard, given the progress of technology since then.
I have owned three bikes; a 2001 Ducati Monster, a 2008 Triumph Speed Triple, and a 2012 Honda CBR 1000RR. None have auto-canceling signals.

"Semi-reliable" isn't going to be good enough for me. Additionally, a manufacturer-integrated solution is not necessarily something that can be as easily accomplished in the aftermarket in all cases, would you not agree?

There are some store-bought solutions, but they are just essentially timers with various modes. I think a timer is a lame solution.
Ahemmm... Are you going for form or function here?
I would have thought my post made it clear I'm going for function. :) The off-the-shelf solutions have variable timers. If you sit at a light waiting to make a turn, they cancel the turn signals on you. They are not a solution involving handlebar sensing like your example, nor are they a multi-timer solution. Hence, I think they are "lame."

1) You can't rely on handlebar position sensing, because of the way motorcycles turn
    a) The bars don't turn very much at all except in low speed corners
They turn plenty to detect it.
Ok. Agreed. But separating small movements due to wiggling the bars as you come to a stop or moving the bars when you actuate the clutch at a stop from the small movements made during a wide, higher speed turn may be difficult.


Only the more abrupt turns and only up to a certain speed, you need counter-steering...[snip]
This statement is false, but I'll let you slide on this one because I agree that it could be handled by logic. :)

2) Detecting lean is tricky because the turning force is essentially down through the centerline (a mercury switch won't work reliably.)
That's not completely true - Try bolting a glass of water to your bike and go for a drive - if your statements holds water, so does the glass ;D
The key word here is "reliably." On higher speed turns, training teaches you to lean your body in, in order to reduce the lean angle of the machine. In lower speed turns, you lean the bike further than your body. Sometimes, you lean the same amount as the bike. This makes the mercury switch idea unreliable in my estimation. Granted, I have not experimented with it.

I tried experimenting with a heading hold gyro (out of one of my model helis) and due to drift etc, it doesn't really provide a reliable output I could use to flip a switch or delatch a latching relay or something.
Did you try a 3-axis accellerometer?

I've done a bunch of searching to try to learn a little about what sensors might suit this application. My thoughts on a solution:

1) I don't know how to build robots (yet) or write code.
Not knowing your time frame or whether you want to build other stuff, I'd stay off microcontrollers then - too much to learn for just a single use.
No, I don't own any 3-axis accelerometers nor do I know how to use one (but I am willing to learn if that is the best solution.)

I thought it might be fun to learn how to program a microcontroller. I have a mechanical engineering degree but studied EE for about three years before changing focus. A long time ago, I wrote a bunch of programs in C and C++ and even some assembly. Oh, and fortran. (!) So it's not totally foreign to me.

2) I don't want this to cost more than, say $100.
For how many ;D
Umm, one? ;D

3) A distance-traveled system would probably work as long as it was fairly accurate.
Well, it's the exact equivalent of a timer paired with your velocity
I think we're actually on the same page. I'm not saying a timer is generally a bad idea. I just don't think a single countdown timer alone is good enough.

The basic output I would need would be a logic high or low that I could use to reset a circuit or unlatch a latching relay.
Personally, I'd rip out the relay and make a fully electronic solution, but different folks...
By all means, I would prefer it be all solid state.

I'd guess the 2012 version of the Gold Wing has got an odometer pulse that you could tap into.
It's a CBR 1000RR, but yes, I did a little bit of research and there is a "0 to 5V pulsed output" that is used to signal the odo. I like the idea of using this to turn off the signals after counting a certain number of pulses. That way, if I'm sitting at a stop light for a few minutes, the signal will remain on. If I signal a lane change on the highway, it will still turn off even though the handlebars move very little. Ideally perhaps I would include a timer to make sure the signals stay on for at least, say, 5 seconds unless I manually cancel them with the stock switch.

Any thoughts on best ways to count pulses?

Thanks for your time and help!
Ken

Offline jkerns

  • Robot Overlord
  • ****
  • Posts: 270
  • Helpful? 12
Re: Application of robot sensors for auto-cancel turn signals on a motorcycle?
« Reply #3 on: September 07, 2012, 07:08:07 AM »
Given that I used to carry two bags of groceries balanced on the gas tank (with a little help from my knees) I would think that the "tilt" sensor (mercury switch) concept isn't going to cut it (as suggested in the first post).

The solid state gyros are rate gyros and zero rate does not typically give you an exactly zero output, but you can learn the long term average value and assume that is "zero". The turn rate during a turn will be much higher than the error in your zero point estimation.

Compass sensors will cause problems unless you have at least two axis sensing and compensate for the motorcycle angle during a turn - this it caused by the fact that the earths magnetic field is not parallel to the surface (at least in most places). In the northern hemisphere, if you tip the sensor, it tends to indicate more "northward". A standard magnetic compass can even momentarily turn the wrong way (depending on the initial heading) as you lean into a turn.
I get paid to play with robots - can't beat that with a stick.

http://www.ltu.edu/engineering/mechanical/bachelor-science-robotics-engineering.asp

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Application of robot sensors for auto-cancel turn signals on a motorcycle?
« Reply #4 on: September 07, 2012, 07:40:32 PM »
Hi,

Only the more abrupt turns and only up to a certain speed, you need counter-steering...[snip]
This statement is false, but I'll let you slide on this one because I agree that it could be handled by logic. :)
So, you counter steer when you just want to make a half or a full lane change on the freeway?
Driving style is a personal thing, of course, but that sounds a bit risky ;D
Anyway... I know some people get all "religious" about the subject though, so let's just leave it :)


It's a CBR 1000RR,
Sorry, back when I was riding, the only CBR was the Gold Wing and I didn't think they "reused" their prefixes, so made a quick assumption - No insult meant, in my eyes it's one of the finer bikes Honda ever made :)


but yes, I did a little bit of research and there is a "0 to 5V pulsed output" that is used to signal the odo. I like the idea of using this to turn off the signals after counting a certain number of pulses. That way, if I'm sitting at a stop light for a few minutes, the signal will remain on. If I signal a lane change on the highway, it will still turn off even though the handlebars move very little. Ideally perhaps I would include a timer to make sure the signals stay on for at least, say, 5 seconds unless I manually cancel them with the stock switch.

Any thoughts on best ways to count pulses?
Since you don't mind getting into microcontrollers, go for it, it is the best way to make it small  and it won't need much besides the controller, a power transistor and some "glue".


When energized, Speedo/odo pulses should be read by an interrupt routine that just increments a counter variable by 1 at each pulse.
Main loop runs the flashing sequence of eg. 350ms on and 350ms off (or whatever suits you), which give you a rate of ~87 flashes per second (check local laws and regulations - in DK, it has to be 60..120/min, but I have no idea of other countries regulations on this).
After ~7 times through the main loop,start looking at the "distance travelled" routine an terminate the loop when a certain value is reached.
Fairly easy programming, but start with a "Hello LED" program ever the same :)

To remind you to shift the switch to neutral, an LED could make a short burst of flashes when it times out.

How exactly to make it, depend a little on how it's wired, as you do best in keeping the existing harness without modifications (gives you a better price when you want to sell it and makes it conform to wiring diagrams in workshop manuals).

I tried to locate a shop manual and/or an overview of the ECU outputs, but no cigar, so I'm not sure about how it's wired.
Do you know if the switch is wired to ground or what?
...And whether a single flasher relay is just wired to each side through the switch and where?
This is needed info, to make it an easy swap-in replacement for the existing flasher relay.

(Just discovered I didn't post this - nice that I use a good browser :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
My motorcycle has a built-in *loud* clicking noise when my turning signal is on. Too loud to forget to turn it off. Although I've occasionally had my 'moments' . . .

You could wire a simple piezo-buzzer or some other noise maker directly into the on/off signal/light circuit.

KISS  :P

 


Get Your Ad Here