I am currently working on a self-balancing bicycle project using MPU6050 sensor. I am finished with controlling the movements of my bike; forward, backward, left and right. The problem is the Balancing where i will be using the Tilt angle read by the accelerometer to be fed to my Gear/Motor that has Reaction wheel to be used to balance my bike using torque.
I have a code on a 2 wheeled balancing robot that I found on the internet; i will place it bellow.. Can anyone tell me if I can modify this code for my Self-balancing bike? if Yes, please help me modifying this.. Thanks
Your project is very ambitious, and it can't be based on the 2 wheeled balancing robot code.
Did you ever try to ride a bike yourself, and keep it stand still? If it tilts, you'll have to drive a curve and move forward or back, until the bike is upright again. For this purpose you'll have to control the steering angle and the bike speed, while the 2-wheel robot controls the speed of two wheels. That's a very different control model.
DrDiettrich:
Your project is very ambitious, and it can't be based on the 2 wheeled balancing robot code.
Did you ever try to ride a bike yourself, and keep it stand still? If it tilts, you'll have to drive a curve and move forward or back, until the bike is upright again. For this purpose you'll have to control the steering angle and the bike speed, while the 2-wheel robot controls the speed of two wheels. That's a very different control model.
yes, i know they're 2 different ideas, but both uses MPU6050 and Kalman Filtering with the same Idea (Inverted Pendulum).. so therefore the codes i sent can't be modified for my SELF-BALANCING BICYCLE?
You have posted about 70k of code. Do you seriously expect someone to study all that? As well as which you accompany it with 5 lines of text. You have been working with it for weeks and you don't yet know what it does
Have you made a simple balancing robot so you have some programming and tuning experience under your belt? This robot Post may be of interest