Senior Project Assistance: Motorcycle Control

Click For Summary

Discussion Overview

The discussion revolves around the design and implementation of a self-balancing motorcycle project, focusing on the electronic setup involving a tilt sensor, Arduino, and motor control mechanisms. Participants explore the challenges of integrating these components and the control logic required for balancing the motorcycle.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • The initial setup involves a tilt sensor sending an error signal to an Arduino, which then uses PID control to output a signal to a stepper motor controller.
  • One participant questions the appropriateness of using PWM for a stepper motor, suggesting that stepper motors operate by energizing coils in a specific sequence.
  • The original poster clarifies their understanding of the stepper motor operation and revises their electronic setup plan, emphasizing the role of the motor driver in generating pulse signals.
  • Frustration is expressed regarding difficulties in connecting the tilt sensor to the Arduino, with reports of receiving nonsensical data from the sensor.
  • A participant suggests an alternative approach using solenoids instead of a stepper motor to enhance control and reduce backlash.

Areas of Agreement / Disagreement

Participants express varying opinions on the use of stepper motors versus solenoids for control, and there is no consensus on the best approach to connect the tilt sensor to the Arduino, as issues with data interpretation remain unresolved.

Contextual Notes

Participants mention specific components like the ArduIMU V2 sensor and Arduino Uno, but there are limitations in understanding the data output from the sensor and how to effectively communicate with the Arduino. The discussion reflects ongoing trial and error in the project development.

Who May Find This Useful

Individuals interested in robotics, control systems, Arduino programming, and self-balancing mechanisms may find this discussion relevant.

LabGuy330
Messages
36
Reaction score
0
Hello All,

A friend and I took on a senior project design that is certainly proving to be more difficult than anticipated.

Here are the details:


Design Challenge: Self Balancing Motorcycle

Description: A picture of our prototype is attached. The motorcycle is remote controlled with a DC motor that drives the bike. A tilt sensor is used to determine the inclination and a stepper motor is used to steer the front wheel in order to torque the bike back to a vertical position. Also we are using an Arduino for microprocessing.


My question lies in the set up. I am confused exactly how the sensor tells the motor to turn. I know some sort of pulse width modulation is necessary, which is where I grow weary.

This is how I think the set up should go:

The tilt sensor sends an error signal to the Arduino. The Arduino calculates a proper output through PID control (which we will create the code). The output is sent to the Stepper Motor Controller which converts the signal to PWM which is then sent to the motor. Then the motor turns.

Any help would be greatly appreciated. I can provide more information as well.

Thank you in advance!
 

Attachments

  • photo-2.jpg
    photo-2.jpg
    31.6 KB · Views: 575
Engineering news on Phys.org
From the picture it seems like you have achieved your goal - it looks upright and balanced! ha ha

PWM for a stepper motor. Interesting.
You sure it's is a stepper motor?
Doesn't a stepper motor require different coils to be energized in a certain sequence for it to turn, and energizing the coils at a faster pace makes the motor turn faster?

Or are you talking about a pulse width related to the error from the sensor, that is calculated in you PID, to determine for how long the stepper controller should energize the stepper motor, and at what speed and power level(torque)?

You have done your control analysis which I do not want to get into as its complicated for a forum.
 
Hey 256bits thanks for the reply!

Yes you are right about the stepper motor being actuated by energizing coils. I now have a better understanding of how things are suppose to work, thank you!

So here is now my new idea for the electronic set up of the balancing motorcycle:

The tilt sensor will produce an error signal to the Arduino. The Arduino will contain a Stepper Motor Control code that will output a pulse generation to the motor driver (this is where I was confused before). Then the controller will send a correction signal to the motor which will rotate and torque the bike back to the proper position.


Of course I am open to any criticism and suggestions.


Current Goals
  • Connect sensor to voltmeter and get some readings
  • Connect sensor to Arduino and get them to talk to each other
  • Place sensor on known inclination angles to test linearity of sensor
  • Figure out Stepper Motor Control code from Arduino Library

Will make updates as days go on.
 
Painstaking trial and error, but that is the fun and exciting part, especially when it starts to work.
 
17 November 2011

So here is my first update.

My goals today was to connect the tilt sensor to the Arduino and attempt to read some data. This became extremely frustrating and my attempts were unsucessful :(

The tilt sensor outputs a digital data stream. However, the readings I was getting were complete jibberish. It was a random string of strange looking characters (maybe somebody knows what I am talking about). Turning the sensor in each direction didn't appear to get any distinct change in the reading so I unaware if the sensor and Arduino are even talking to each other.

If anyone has experience with Arduinos any help would be greatly appreciated.

The components I am using are:
  • ArduIMU V2 (sensor)
  • Arduino Uno

I have found a program that will display the sensor's orientation (yaw, pitch, roll) and the values for their magnitude called ArduFlight. It works with the IMU without the Arduino so I can at least see if the sensor is working correctly.

Other than that I need to find a way to convert the jibberish serial data into something useful (like numbers lol). I am sure there is a way and I will continue searching for an answer.

Of course any assistance would also be nice. If anyone would like to see my attempted Arduino code I would be happy to show it.

Thanks,

LabGuy
 
Being a motorcyclist I suggest drop the stepper motor and use 2 solenoids, both always active to cut out backlash but one may be more active than the other for control inputs. Does this sound like a pair of human arms, could throw in a bit of weight shift as it develops! Good luck
Dom
 

Similar threads

Replies
9
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
Replies
3
Views
849
  • · Replies 3 ·
Replies
3
Views
1K
Replies
3
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K