H48C Tri-Axis Accelerometer to balance a segway style device
donnpangy
Posts: 49
The H48C Tri-Axis Accelerometer seems to have a static tilt component and a dynamic acceleration component. Is there a way to separate the 2 or is there a way to use the dynamic acceleration to my advantage?
··· The static tilt portion works great as long as you don't have any acceleration.
··· The static tilt portion works great as long as you don't have any acceleration.
Comments
What you are observing as the "static tilt component" is actually the acceleration due to 1g of gravity on Earth that every object at rest experiences.
The Accelerometer only has one component and can not by itself determine the difference between an incline vs. an acceleration. You need other components such as a Gyro which can determine angular rate acceleration but has no response to the effects of gravity to mathematically determine your tilt angle.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 8/16/2009 1:48:00 PM GMT
· Thanks for your input on the Tri-Axis Accelerometer chip. Do you think it can do this job or is there a better choice to accomplish this.
·· Should I use an RC rate gyro with heading hold? Is there a chip that·I can get that will do this, or should I just get the gyro.
Thanks so much
Depending on what you want to do, a single sensor solution is not going to do it. In order to determine where 'down' is at all times, you need an accelerometer and a Gyro to work together to resolve the correct position.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
···· Thanks for the info. I have an RC helicopter gyro (Futaba GY260) that I will install today. It has a heading hold feature which should really help the balancing.
Thanks again,
Don
· I have the gyro hooked up and I am having problems reading the servo input.·If you read the servo using the·Propeller spin code, the resolution is pretty poor. Do you know of an assembly code that does something similiar so that i can get a head start with this. I have not started to play with the Propeller assembly yet. A head start would be appreciated.
· (Below is my Propeller code that only gives me 50 for a centered servo pulse.)
thanks so much,
Don
············· repeat while INA[noparse][[/noparse]4] == 0
················ servo4 := 0················
············· repeat while INA[noparse][[/noparse]4] == 1
················ servo4 := servo4 + 1
·········· VGA.dec(servo4)
·········· VGA.str(string("· "))
· Thanks for the info. I looked at the code and I think it will work for me.
thanks again,
Don