balancing with tiltsensor

Post your NXJ projects, project ideas, etc here!

Moderators: roger, imaqine, 99jonathan

New User
Posts: 5
Joined: Tue Apr 14, 2009 10:46 am

balancing with tiltsensor

Postby scrasun » Thu Apr 16, 2009 11:34 am

I am trying to get my nxt to balance on two wheels by using an accelerometer (tiltsensor) to detect if it is falling. However I cant seem to get it to work. It does not react fast enough to movement and just keeps falling over. Does anyone have any tips on how I could get it working.

Also should I used the tiltsensor to measure which way it is leaning, or whether or not it is falling? And should I allow time for the motors to speed up before changing direction as it does not seem to move fast enough?

Any help is appreciated.


User avatar
leJOS Team Member
Posts: 4827
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby gloomyandy » Thu Apr 16, 2009 1:44 pm

I think you will have a lot of problems trying to do this... You really need a gyro not an accelerometer (and ideally you want both).... There is a long thread discussing this over on the that you might want to take a look at....


PS You might want to take a look at... which was my balancing robot...

Return to “NXJ Projects”

Who is online

Users browsing this forum: No registered users and 3 guests