IMU in 1/4 Scale R/C Motorcycle

I noticed that Chris posted a while back about the use of an Arduino in an R/C car.  I've haven't posted anything here about my project as it's not autonomous, doesn't fly, and isn't really a drone.

It does, however, borrow code from the ArduIMU for the sensor fusion so perhaps someone may find it interesting.  "Normal" r/c motorcycles (yes, they do exist and are far more popular in Europe) use a loose spring linkage between the steering servo and the forks.  This allows the geometry of the bike to do the balancing and the servo can just nudge the bike to lean to one side (using counter steering.)  

My solution uses a more rigid servo connection driven by the output of a PID control.  The operator's steering input, the IMU's roll angle output, and the forward velocity of the bike are used to compute the steering angle to hopefully maintain balance while providing steering control.  Works well on road - real objective is for off road though.  

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi, I am trying to validate the model (Forth order linear) of cycle. For this I need the measurement of lean angle, steer angle and speed.

    I am using a RC bike. Lean and steer angle I can get from IMU. I am working with arduino. I want to know which sensor you are using for measuring the speed of bike.

    Thanks in advance.

  • I haven't read enough about the project to know either way, but at the DARPA Grand Challenge in 2004 I watched their first demo fail as the vehicle rolled two feet and then fell over.  The rumor at the time was that they had forgotten to turn on the gyro.

  • John, yeah that motorcycle was part of the inspiration for my little project!  The currently offered off-road r/c motorcycles use a heavy flywheel in the rear wheel to provide the stability necessary to run off road.  I had read that the team ghost rider bike was using steering alone to balance so I knew it should be possible.  However, I had also read in other material that that bike uses a control moment gyro at slow speeds as well, so I'm not so sure which is the case.  Of course their overall goal was to produce an autonomous motorcycle - just want mine to not fall over. :)

  • Dave have you seen the autonomous full-scale motorcycle that was developed for the DARPA Grand Challenge? http://archive.darpa.mil/grandchallenge05/TechPapers/BlueTeam.pdf

  • Sorry for taking forever to respond to these comments!

    This particular bike started out as a Ricky Carmichael bike that was sold by Radio Shack almost 10 years ago.  Only the wheels and tires remain. :)  I purchased the carbon fiber frame and front forks from a machinist who was selling kits a couple years back, but most of the aluminum parts were designed and machined by me.  The r/c electronics are just standard parts.  I'm currently using a Novak GTB ESC and brushless motor, powered by a 6 cell NiMh battery.  I do use a 6 channel stick radio for control.  I only need two channels for throttle and steering, but i use the two auxiliary switches as inputs to select different sections of the control code so I can selectively play around with experimental code.

    I do have a couple off road videos posted on YouTube that were shot by my 10 year old daughter.  They're kinda hard to watch as the camera isn't held all too steady... :)

    At the moment I think I have enough filtering on all of the inputs to keep things stable off road.  I just recently moved to an MPU-6050 from the older board that used all analog sensors so the on chip LPF has helped reduce the amount of filtering I need to do.

    In my research I've done on bike control systems I have read about there being a speed at which you need to switch over from "normal" steering to counter steering.  I don't currently take that into account but will definitely be something to look into adding in the future.  Unfortunately I didn't do the best job in CM early on in this project so it doesn't currently handle slow speeds as well as it once did... :(  Of course at that time it didn't handle higher speeds all that well...  But I'm not sure which of the many changes I've made since then have caused this...  I've got so many little issues that I'd like to work on / fix with the bike, but as the lone mechanical / electrical / software engineer on the project it's not easy.  (And the full time job, wife, 4 kids etc don't leave me much "play" time.)

    Hey Bruce!  Good to see you here!  I do hope to have some news for you soon.

    Dave

  • Haven't heard from you in awhile Dave.  Hope you are continuing to develop this bike.

    bruce@2wheelhobbies.com

  • Wow, that's pretty awesome.  Bit of a tank slapper near the end though. ;)

    Out of curiousity, have you found a difference between high speed and low speed steering effects?  I used to do a bit of enduro racing, and found that at high speeds, as you say, you push the opposite way on the handle bars to get it to lean.  But at low speeds that doesn't work at all, you have to throw your weight over and steer into the turn.

  • Funny. Off road will make the accelerometers crazy and breaking the DCM. I had this problem putting the imu on a "real motorbike". Everything runs ok until I put it on the bike. Filtering the acc and gyro solved the problem.

  • Awesome....can't wait to see how the off road bike performs.

  • Moderator

    wow! interesting.. did you make the frame yourself? any hints in the configuration, motors/batteries, etc..

This reply was deleted.