Thank you for your reply. I use MCC18 compiler, so it has sine & cosine functions. Does the sine/cosine function take a lot of time to execute? How do you integrate or differentiate in C? Is the pot you mentioned about a special type? The only two types I know of are the one with the turn knob and the one with the slider. There must be some drawbacks for using the pot, right? Otherwise, everyone would have used it. Best regards, James Humes wrote: Hey James, I set up an ADXL accel. in analog mode for static tilt measurement (following the datasheet) about a year ago and it worked fine with only a little averaging. Differentiate that signal to find the rate of change of angle. The only thing I could see holding you up is that to calculate tilt you have to take a sin or cos.. that could limit your sampling rate. I have built a balancing robot before (from the same inspirational source.. nbot) so I'll be happy to offer any experience I have from that. I used a pot to measure tilt for simplicity. James On 11/16/05, James James wrote: > > Hi Robert, > Thank you for your reply. Are you suggesting to only use the gyro and > forget about the accelerator? how about the Freescale accelerator? Is it > noisy too? Thanks! > > Robert Rolf wrote: > The accelerometer signal needs to be differentiated to get > velocity. The ADXL signals are quite noisy so you are better > off having a direct velocity signal from a gyro, particularly if > using PID control. > Robert > > James James wrote: > > > Hi everyone, > > > > I am thinking to build something like the nBot from > > David: > > http://www.geology.smu.edu/~dpa-www/robo/nbot/ > > > > I think it would be very cool to put the Feedback > > Control Theory I learned to practice. I am currently > > gathering information/parts to build the robot. > > Anyways, I have few questions: > > > > 1. Isn't the accelerator alone enough? I mean all > > you need to know are how fast the robot is tilting and > > the current tilt angle, right? Couldn't the > > accelerator alone do all that? > > > > 2. What's the role of the gyroscope? I understand > > that the output voltage change of the gyro is > > proportional to the speed or rate of the tilt angle. > > Isn't it the same as what the accelerator does? > > > > I am refering to the DXRS150 gyro and the > > ADXL203/MMA7260 accelerators. > > > > Best regards, > > James > > > > > > > > > > > > __________________________________ > > Yahoo! FareChase: Search multiple travel sites in one click. > > http://farechase.yahoo.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > --------------------------------- > Yahoo! FareChase - Search multiple travel sites in one click. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist