Automotive Senior Project Assistance: Motorcycle Control

AI Thread Summary
The discussion revolves around a senior project focused on creating a self-balancing motorcycle using a remote-controlled design. Key components include a tilt sensor, Arduino microcontroller, and a stepper motor for steering. The user seeks clarification on how the tilt sensor communicates with the Arduino and how to implement pulse width modulation (PWM) for motor control. Initial attempts to connect the tilt sensor to the Arduino resulted in confusing output, prompting a search for solutions to interpret the data correctly. Suggestions from other users include exploring alternative motor options and refining the control strategy to improve balance and responsiveness.
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: 563
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
 
How did you find PF?: Via Google search Hi, I have a vessel I 3D printed to investigate single bubble rise. The vessel has a 4 mm gap separated by acrylic panels. This is essentially my viewing chamber where I can record the bubble motion. The vessel is open to atmosphere. The bubble generation mechanism is composed of a syringe pump and glass capillary tube (Internal Diameter of 0.45 mm). I connect a 1/4” air line hose from the syringe to the capillary The bubble is formed at the tip...
Thread 'Physics of Stretch: What pressure does a band apply on a cylinder?'
Scenario 1 (figure 1) A continuous loop of elastic material is stretched around two metal bars. The top bar is attached to a load cell that reads force. The lower bar can be moved downwards to stretch the elastic material. The lower bar is moved downwards until the two bars are 1190mm apart, stretching the elastic material. The bars are 5mm thick, so the total internal loop length is 1200mm (1190mm + 5mm + 5mm). At this level of stretch, the load cell reads 45N tensile force. Key numbers...
I'd like to create a thread with links to 3-D Printer resources, including printers and software package suggestions. My motivations are selfish, as I have a 3-D printed project that I'm working on, and I'd like to buy a simple printer and use low cost software to make the first prototype. There are some previous threads about 3-D printing like this: https://www.physicsforums.com/threads/are-3d-printers-easy-to-use-yet.917489/ but none that address the overall topic (unless I've missed...
Back
Top