# Bank angle/lean angle for motorcycle.

**URL:** <https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124>\
**Category:** Factual Questions\
**Created:** [April 4, 2011, 6:42am UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124 "2011-04-04T06:42:48Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![automagic](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@automagic](https://boards.straightdope.com/u/automagic)\
**Post date:** [April 4, 2011, 6:42am UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/1 "2011-04-04T06:42:48Z")

</div>

I want to make a lean angle reader for my motorcycle. I was thinking I could use a level tool that has a needle that reads how far the tool is angled in one axis. Then I could put that in front of the camera I have mounted on my gas tank this way I can review it later. Will this work?

I know I can set it up correctly so it would work with the bike standing still but will the forces involved in a turn affect how far the needle swings? Do I need to read the angle in more than one axis?

---

<div class="post-metadata">

**Author:** ![Richard\_Pearse](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/richard_pearse/32/13144_2.png) [@Richard\_Pearse](https://boards.straightdope.com/u/Richard_Pearse)\
**Post date:** [April 4, 2011, 7:03am UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/2 "2011-04-04T07:03:18Z")

</div>

A simple level will be fooled by the acceleration forces in the turn and will probably read close to level when leaning over. I’d think you’d need something that uses a gyro similar to an aircraft artificial horizon.

---

<div class="post-metadata">

**Author:** ![EvilTOJ](https://avatars.discourse-cdn.com/v4/letter/e/ee59a6/32.png) [@EvilTOJ](https://boards.straightdope.com/u/EvilTOJ)\
**Post date:** [April 4, 2011, 1:34pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/3 "2011-04-04T13:34:25Z")

</div>

I know the Toyota FJs have a horizon level gauge in them, I’m sure there’s aftermarket parts that are similar that can be used.

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [April 4, 2011, 1:53pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/4 "2011-04-04T13:53:16Z")

</div>

An accelerometer will do it. Arrainge the accelerometer so it is vertical (reading 1 g) when the bike is upright, and reading 1g (bank angle = 90 degrees)

Bank angle= arcsin(g/a)

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [April 4, 2011, 2:04pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/5 "2011-04-04T14:04:41Z")

</div>

> [@Richard\_Pearse](#):
>
> A simple level will be fooled by the acceleration forces in the turn and will probably read close to level when leaning over.

It’ll read _exactly_ level, unless the rider is hanging off, as is sometimes done during turns.

An [artificial horizon](http://en.wikipedia.org/wiki/Artificial_horizon) is likely to be pricey. You can try **Kevbo’s** accelerometer solution; the theory is valid, but I suspect you will find that the signal is drowned out by noise, i.e. high-frequency chassis accelerations due to bumps in the roadway. At a 45-degree lean angle your accelerometer should be reading a steady 1.414 g’s, but bumps and dips will cause huge variations in this unless your accelerometer signal is sent through a low-pass filter.

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [April 4, 2011, 3:47pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/6 "2011-04-04T15:47:00Z")

</div>

> [@Kevbo](#):
>
> An accelerometer will do it. Arrainge the accelerometer so it is vertical (reading 1 g) when the bike is upright, and reading 1g (bank angle = 90 degrees)

No, an accelerometer will have exactly the same issue as any other kind of level: the acceleration from turning a corner will throw it off. A fancy powered gyroscope could do it, but I can’t think of anything else off the top of my head (well, if you have a nice horizontal horizon available, maybe some kind of visual tracking system could work… the hard part is getting the horizon of course).

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [April 4, 2011, 3:57pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/7 "2011-04-04T15:57:32Z")

</div>

> [@Quercus](#):
>
> No, an accelerometer will have exactly the same issue as any other kind of level: the acceleration from turning a corner will throw it off.

😕

The acceleration from turning a corner is exactly what we hope to measure with an accelerometer. The vector-sum of gravity and lateral g’s (due to cornering) can be used to calculate the lean angle. An accelerometer measuring g’s on a vertical axis (relative to the motorcycle itself) would measure a value between 1.0 (motorcycle standing vertical, traveling straight down the road) and 1.414 (motorcycle in a hard turn, leaned at 45 degrees). **Kevbo’s** equation shows how to extract lean angle from this measurement.

---

<div class="post-metadata">

**Author:** ![Richard\_Pearse](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/richard_pearse/32/13144_2.png) [@Richard\_Pearse](https://boards.straightdope.com/u/Richard_Pearse)\
**Post date:** [April 4, 2011, 4:53pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/8 "2011-04-04T16:53:00Z")

</div>

> [@EvilTOJ](#):
>
> I know the Toyota FJs have a horizon level gauge in them, I’m sure there’s aftermarket parts that are similar that can be used.

Car levels I’ve seen have been simple levels susceptible to acceleration errors, but I haven’t seen any recently so they may have improved.

Another option is to just fit some kind of frame with lean angle marks to the camera. Then measure lean angle against the horizon. This won’t work if the horizon isn’t visible of course.

---

<div class="post-metadata">

**Author:** ![Digital\_Stimulus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Digital\_Stimulus](https://boards.straightdope.com/u/Digital_Stimulus)\
**Post date:** [April 4, 2011, 5:30pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/9 "2011-04-04T17:30:21Z")

</div>

Might someone explain to me the problem with using readily available COTS sensors (e.g., as referenced in [this accelerometer/gyro buying guide from Sparkfun](http://www.sparkfun.com/tutorials/167))? Obviously, those are not in ready-to-use form, but let’s assume one has the capability to put together a custom solution.

Are there fundamental and insurmountable issues with using such sensors? Or is it a matter of accuracy/error? Or something else?

---

<div class="post-metadata">

**Author:** ![Robot\_Arm](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robot_arm/32/18280_2.png) [@Robot\_Arm](https://boards.straightdope.com/u/Robot_Arm)\
**Post date:** [April 4, 2011, 7:34pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/10 "2011-04-04T19:34:17Z")

</div>

It might be possible to build something using proximity sensors in the footpegs. If one peg is farther from the ground than the other, you’re not level (or the road isn’t).

This measures your angle to the road, not the horizon, but might that be more useful? The traction limit is determined by the contact patch and the lateral force relative to the pavement. If you’re in turn 15 at Daytona, the corner is banked and the horizon doesn’t mean much.

---

<div class="post-metadata">

**Author:** ![RedSwinglineOne](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@RedSwinglineOne](https://boards.straightdope.com/u/RedSwinglineOne)\
**Post date:** [April 4, 2011, 7:57pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/11 "2011-04-04T19:57:19Z")

</div>

> [@Digital\_Stimulus](#):
>
> Are there fundamental and insurmountable issues with using such sensors? Or is it a matter of accuracy/error? Or something else?

I think the main problem is that the G we feel from gravity feels exactly like the G(s) we feel from acceleration. The sensor cannot distinguish betweent the two. Because of this, if we know an object is not moving, we can determine its orientation. If we know an objects orientation, we can determine its movement. But we cannot very well do both at the same time.

From your link

> [@](#):
>
> If you’re trying to monitor the orientation of an object in motion, an accelerometer may not give you enough information to know exactly how it’s oriented. Unlike accelerometers gyros are not affected by gravity, so they make a great complement to each other.

---

<div class="post-metadata">

**Author:** ![Joey\_P](https://avatars.discourse-cdn.com/v4/letter/j/919ad9/32.png) [@Joey\_P](https://boards.straightdope.com/u/Joey_P)\
**Post date:** [April 4, 2011, 8:02pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/12 "2011-04-04T20:02:51Z")

</div>

> **[SpeedAngle Inc.](https://www.speedangle.com/)**
>
> SpeedAngle Inc. - Master the Art of Cornering

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [April 4, 2011, 8:11pm UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/13 "2011-04-04T20:11:11Z")

</div>

> [@Machine\_Elf](#):
>
> 😕
> 
> The acceleration from turning a corner is exactly what we hope to measure with an accelerometer. The vector-sum of gravity and lateral g’s (due to cornering) can be used to calculate the lean angle. An accelerometer measuring g’s on a vertical axis (relative to the motorcycle itself) would measure a value between 1.0 (motorcycle standing vertical, traveling straight down the road) and 1.414 (motorcycle in a hard turn, leaned at 45 degrees). **Kevbo’s** equation shows how to extract lean angle from this measurement.

My mistake. I see what he was saying. The idea is theoretically workable, though it would be confounded by any braking or (forward) accelerating during the turn (maybe if you get a two-axis accelerometer you could avoid some of that problem), and there are going to be lots of transient errors, as the bike leans, stands back up, and hits bumps or potholes.

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [April 6, 2011, 1:12am UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/14 "2011-04-06T01:12:42Z")

</div>

Wow, thank dog for the dope. I have given up on this one on motorcycle boards.

“NO, the gas does not move to the low side of the tank or carb bowl when you lean!”

Yes, you would need to low pass filter the accelerometer output, but the suspension will take out the worst of the bumps…if it doesn’t you have worse problems than bad accelerometer readings, as the wheels will be skipping sideways.

Another way is to us a gyro as a reference. Vibrating bar types can be very compact, and they are cheaper every time I look at them.

The gyro can be arrainged either to measure the bank angle directly, or you can measure yaw rate and speed, and calculate required bank for a coordinated turn. More trouble, but then instead of a gyro you could use a digital compass or even a gps 2nd derivative.

---

<div class="post-metadata">

**Author:** ![Richard\_Pearse](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/richard_pearse/32/13144_2.png) [@Richard\_Pearse](https://boards.straightdope.com/u/Richard_Pearse)\
**Post date:** [April 6, 2011, 8:35am UTC](https://boards.straightdope.com/t/bank-angle-lean-angle-for-motorcycle/577124/15 "2011-04-06T08:35:56Z")

</div>

> [@Joey\_P](#):
>
> [http://www.speedangle.com/](http://www.speedangle.com/)

This looks like it does everything the OP wants and more.
