Roy Brewer
  • Male
  • United States

Roy Brewer's Friends

  • Yangbo Long
  • George Tarrant
  • robert bouwens
  • Anish
  • Raul
  • Cliff-E
  • Ravi Gaddipati
  • Seb Madgwick
  • Caleb Chamberlain
  • Bill Nesbitt
  • Brian Mills
  • Gian Carlo M.
  • Geoffrey L. Barrows

Roy Brewer's Discussions

Accelerometer question for IMU Experts

Started this discussion. Last reply by Ajit Krisshna May 19, 2013. 17 Replies


Roy Brewer's Page

Roy Brewer's Blog

Robot Control course from Coursera featuring quadrotor control

Posted on July 28, 2012 at 7:00am 10 Comments

I thought some of you might be interested in this:

Control of Mobile Robots

Magnus Egerstedt (Georgia Tech)

About the Course

This course investigates how to make…


Parallel programming on the Arduino with Occam

Posted on June 17, 2010 at 9:11am 0 Comments

Looks like these folks are implementing the parallel programming language Occam on the Arduino.

They specifically mention a UAV project on running on ArduPilot

- Roy

Complementary filter demo

Posted on February 16, 2010 at 10:30am 2 Comments

This is a demonstration of complementary filters on pitch and roll attitude using 3 gyroscopes and 3 accelerometers running on a custom Quadrotor controller board. Filters are coded in Python on the laptop with VPython rendering of spinning 3D cubes. Sensor processing code is running on the ATMega644p-based controller and is written in C. For Python code, see:… Continue

New 9 DOF sensor for $99

Posted on December 4, 2009 at 10:28am 12 Comments

Its means to be interfaced to a PC over USB, but it appears to provide 9 DOF (accelermeters, gyros, and magnetometers). The device apparently can output the raw sensor values and/or Kalman filtered quaternions

Too good to be true?

-… Continue

Accelerometer question for IMU Experts

Posted on August 7, 2009 at 8:09am 45 Comments

I'm sure there's plenty of experienced IMU builders on this board who can resolve this question (see here: (starting at the 5th comment) and here:… Continue

Comment Wall (4 comments)

At 1:52pm on July 29, 2009,
William Premerlani
A recent idea from Ben Levitt has caused me to reconsider an answer that I gave for one of your questions.
Ben has suggested that one of the spare pins on the UAV DevBoard, RE8, could serve as an extra PWM input. It just might work! Ben is going to try it. If it does work, then the spare pins on the UAV DevBoard could be used to expand it from 4 PWM inputs and 3 PWM outputs to 5 PWM inputs and 6 PWM outputs.
Best regards.
At 7:25pm on July 29, 2009,
William Premerlani

The 6 PWM outputs total would split up as 3 PWM hardware outputs and 3 PWM software outputs. Obviously, the hardware outputs would work the same way they do now: you write to duty cycle registers.

The software outputs could be implemented without too much trouble using a couple of spare timers and their interrupts, using a technique that I used on the first PIC board that I built a long time ago. The first timer generates interrupts every 2 milliseconds, creating ten 2 millisecond "time slots" for the software PWMs within which pulses are generated. Ten times slots are more than enough, only three of them would be used. A simple scheduler would decide which pulse was being generated, and start the front edge of the pulse. An interrupt generated by a second timer would control the falling edge of the pulse.

The entire process could be packaged up in such a way as to be transparent to the programmer, who would see a simple duty-cycle interface to the three additional software PWMs.

Its on my list of things to do soon, if someone else doesn't get to it first.

Best regards,
At 2:22pm on August 29, 2010,
William Premerlani
Hi Roy,

Regarding "DCM lite", I will give you the short version now, the longer version when I have some time.

The bottom row of the direction cosine matrix contains all the information you need about pitch and roll. It is possible to update the bottom row without using any of the other rows, if you take a look at the details of the computation. Updating the bottom row involves multiplying the update matrix times a vector equal to the bottom row. Then, the roll-pitch drift compensation can be computed from the bottom row, and the accelerometer values.

If all you want is pitch and roll, you can stop there.

If you also want yaw, there are several ways that I can think of that you could use to do that. One way is to integrate the yaw rate, which you can compute from the elements of the bottom row plus the gyro rate values.

Best regards,
At 8:41am on May 19, 2011, Caleb Chamberlain said…

Hey Roy,

I'm happy to answer any question you have.  Email might be the most convenient way to do it: my personal email address is voiceafx [at]

You need to be a member of DIY Drones to add comments!

Join DIY Drones


© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service