Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

Self Balancing Bicycle

Please complete the following information

Contact Information

University and Department: Nanyang Polytechnic, Singapore

Team Members: Wei Fei

Faculty Advisors: Pom Yuan Lam, Tan Kian Sin

Primary Email Address: POM_Yuan_Lam@nyp.gov.sg, numericalcontrol@gmail.com

Primary Telephone Number (include area and country code): 65-65500710

Project Information

Project Title: Self Balancing Bicycle

List all parts (hardware, software, etc.) you used to design and complete your project:

[Harware - NI RT-Single Board RIO (SbRIO-9631), quadrature encoders, brushless motor and drivers, brush motor, small bicycle

Software - LabVIEW Real-Time and LabVIEW FPGA programming ]

Describe the challenge your project is trying to solve.

[Challenge was to retro-fit a previous project with a new controller to balance a bicycle within 1 week. Previously we had a self balancing bicycle project controlled via DSP,

all electronics were removed and replaced with a SbRIO-9631, except for motor drivers.]

Bicyle_back_1.JPG

Describe how you addressed the challenge through your project.

[On the main frame (body) of the bicycle is a flywheel, the bicycle maintain its balance by employing the gyroscopic effect of the spinning wheel. The orientation of the flywheel is controlled via a Maxon brushless motor.

A optical incremental encoder senses the floor angle.

boy.JPG

The FPGA was programmed to read encoder signal from the floor sensor and the flywheel orientation and convert them to counts, FPGA also output analog voltage to the motor controller to control orientation of the flywheel.

FPGA_Block.JPG

LabVIEW Real-Time was running a PID loop to balance the bicycle.

RT_block.JPGRT-Front.JPG

It was pretty amazing to have the system balanced within a week and we attributed the success to the following 2 points:

1) Using LabVIEW Real-Time, we are able to tune the PID parameters at ease. Previously these parameters can only be set during programming of the DSP. Any changes in these parameters are very time consuming. Furthermore, in LabVIEW Real-Time we can monitor the output of the system immediately. In our previous setup, we have to logged the data and upload the file to a host pc and plot it for analysis. Using the LabVIEW Real-Time we had achieved tremendous amount of time saving probably 80% as compared to previous setup.

2) We encountered some noise on the encoder that detects the flywheel position that is used to control the flywheel's orientation. Our encoder is capable of outputting complementary signals, namely A, Not A, B, Not B. The first solution that came to our mind was to implement complementary system for noise reduction as shown.

A_NOTA_encoder.JPG

But this solution needs additonal circuitry and not doing justice to FPGA technology.

Hence we proceed to "build" this complementary noise reduction system into the FPGA using LabVIEW for FPGA programming.

encoder_noise.JPG

The bicycle is balancing well and is robust enough to withstand a kick (disturbance) from its side.

Please see a youtube video at http://www.youtube.com/watch?v=Bb6qQjxGih8

]

Please upload photos below:

[Click on photo icon on task bar]

Please insert video below:

[Click on video icon on task bar]

Contributors