Show Posts
Pages: [1]
1  Community / Gigs and Collaborations / Re: $200 USD for adapting this I2C to PWM program on: February 04, 2013, 04:07:37 pm
I have been contacted by a person who I shall be working with to complete this, so at this time I am not looking for any more offers.  Thanks for letting me post this here, everybody.
2  Community / Gigs and Collaborations / $200 USD for adapting this I2C to PWM program on: February 03, 2013, 10:52:10 pm
I am seeking a program to make an I2C to PWM converter, for use with the AR Drone.  I have attached a PWM converter program that had been doing this for the Mikrokopter, although it looks like it was only doing this on one channel (did he have four Arduinos for the four motors then?).  So basically, if you can have this read the I2C stream or four I2C streams (I don't know if all the data is on one wire, or if you'd have to connect to all four wires to get each one's I2C data) then convert and output to four PWM's, then we're set.  There's alot more detail about this in my other thread where I was trying to do this myself, but I've given up on trying to dive in head first on learning I2C and Arduino.  I just have too much else going on and could likely throw money at this much more effectively than I could throw time at this.

So without further ado, here's the thread I wrote on here about this all in detail:,145610.0.html
Here is a link with a bunch of info about the AR Drone motor controllers:
Here is a thread on the AR Drone Flyers forum I've also had many discussions on:
3  Using Arduino / Project Guidance / Re: I2C to PWM converter on: February 02, 2013, 11:12:21 pm
Not seeking to cross-post, but maybe somebody could move this thread over to the section where I can offer $200 for somebody to program this for me?  I have posted this reward to entice somebody on the AR Drone Flyers forum, but nobody there has done it yet, not really the place since this requires more Arduino programming skill, than it does AR Drone knowledge.  Based off the information on this I2C to read/adapt, it really can probably be done without a programmer even having an AR Drone or having used one before.  I'll pay $200 USD by paypal to somebody who can produce code that works for this, upon my ability to replicate their results.  Not saying the aircraft has to fly perfect or anything, but just to where it works enough I can start tuning the gains to my airframe.  No hardware needed to send me, I have Arduino boards I can use, I just need the sketch.

Here is my thread on that forum, and all the talk there about it:

I have attached a program I found for converting I2C to PWM for the MikroKopter board, so maybe it's just as simple as changing which I2C bits it reads, and adding the motor comparison / remix math I listed above, so the outputs are on adjustable gains. 
4  Using Arduino / Project Guidance / Re: I2C to PWM converter on: January 30, 2013, 01:32:40 pm
PeterH - Sorry I ran out of time to post my reply to you earlier.  If you think it would be possible to take an existing motor controller and more or less solder a big 25 Amp ESC on there so that instead of running little 15 Watt motors, now we could run 250 Watt motors, I would gladly send you a motor unit to work on.  But I hate to phrase it like that, copping out and asking someone else to do it.  But if you could help me learn what it will take to do that solder-surgery myself, I'd be all for it.  The existing motor controllers are all surface-mount components, so it's pretty daunting to think of starting to rewire in that, plus the huge power difference would need completely parallel (and much larger)power lines running to it.
5  Using Arduino / Project Guidance / Re: I2C to PWM converter on: January 30, 2013, 10:33:18 am
Riva - I have thought about that, and there's a few different approaches that I've come up with. 

One would be to use the entire existing airframe and then have framework extend outward to hold another four motors / props / esc's, with bigger batteries used and a knob to output the throttle speed for those other motors, so you could start off on a scale and increase the payload motors until it is sitting at only its original weight, and then tell the Drone to lift off, which it would now do like normal due to the relative "neutral buoyancy" the payload motors and all have created.

Another approach would be to put the add-on framework with its motors, batteries, everything, mounted on a ball joint located at the CG of the AR Drone (and the CG of this new payload frame).  So long as the CG's are all aligned, the Drone can tilt and roll without upsetting the payload frame, and the payload frame's flight controller keeps it holding level.  There would be issues with making sure the Drone cannot articulate into collision with the payload frame, but I feel this is doable.  I actually already have a quadcopter (in parts) coming in the mail to attempt this.

Another approach would be like that, but a "flying semi truck", which would use a hitch located at the CG of the Drone and of the payload airframe well behind it, and then a flight controller keeping the payload airframe level, and then an AFS gyro on the hitch beam that will send that angle (the height difference between the Drone and the payload frame) to be a throttle adjustment to the payload airframe, keeping it level with the Drone.

Those would be two very building-intensive (though no programming needed) ways to expand the AR Drone.  I'll work on those too.
6  Using Arduino / Project Guidance / Re: I2C to PWM converter on: January 30, 2013, 06:12:45 am
Well, I tried looking through all the motor code in that first post's link, and I'm losing confidence that there is enough information there.  I guess I had thought it was like one wire would be streaming a code of information over and over, and I could monitor that wire and there would be so many number of blocks of information, and I'd just have to pick out block 26 for one motor, block 27 for the next, etc.  But the more I look at it, the less this looks like the case.  I guess from being a newbie to advanced programming, I can't find anything in that information that clearly tells me how I can tap into the control stream.

Another idea I've had is to leave all four original motor controllers on there to do their whole fancy talking with the AR Drone mainboard, and then use the Arduino to monitor their motor output signals.  I would actually leave the motors on there, just not hooked to anything, and would need a way to monitor the frequency (or pulse duration more likely) of the three leads going to each motor.  This would add some slight lag to the system, but overall the new aircraft to be built will be much larger and therefore will have some mass to help slow down / smooth out any instabilities.  So then I need to figure out what a brushless motor signal looks like (the part actually going to the motor, not to its ESC) and then figure out how to have an Arduino monitor this to derive what throttle value it is at.
7  Using Arduino / Project Guidance / Re: I2C to PWM converter on: January 29, 2013, 01:32:32 pm
FLO /* Front left original throttle value
FRO /* Front right original throttle value
RLO /* Rear left original throttle value
RRO /* Rear right original throttle value
FLN /* Front left new throttle value
FRN /* Front right new throttle value
RLN /* Rear left new throttle value
RRN /* Rear right new throttle value
RGAIN /* Roll gain variable
PGAIN /* Pitch gain variable
YGAIN /* Yaw gain variable
TGAIN /* Throttle gain variable

/* Determining underlying commands of pitch, roll, yaw, throttle


/* Mixing
/* Pitch+Roll
FLPR /* Front left pitch roll mix
FRPR /* Front right pitch roll mix
RLPR /* Rear left pitch roll mix
RRPR /* Rear right pitch roll mix


/* Yaw mix-in
FLPRY /* Front left PR yaw mix
FRPRY /* Front right PR yaw mix
RLPRY /* Rear left PR yaw mix
RRPRY /* Rear right PR yaw mix


/* Throttle mix-in

Then output FLN, FRN, RLN, and RRN to their respective PWM channels.  Adjust multiplying factors of Gains as needed for over/undercorrecting.
8  Using Arduino / Project Guidance / Re: I2C to PWM converter on: January 29, 2013, 10:31:06 am

Thanks for the reply.  It sounds like we're mostly on the same page here, especially your last paragraph.  The issue of over/under correction I believe can be handled by an few adjustable variables multiplying against the "inferred control demands".  Once we can tell its overall hovering average is "X" amount of power, and the difference between right and left motors when tilted is "Y", then with throttle gain "A" and roll gain "B", the output to the left side PWM's would be (X*A)-(Y*B), and the right side motors would be (X*A)+(Y*B).  Later when I have more time, I can try to map up all the variables for mixing input and output, I've done this a few times in RealFlight by "programming" flight controllers by putting together servo mix after servo mix.
9  Using Arduino / Project Guidance / I2C to PWM converter on: January 29, 2013, 12:41:29 am
Hello, first post here so I wanted to lay my project out.  Unfortunately I have no experience programming Arduino, but I am a fast and willing learner.  I will describe my goal, and I then will be interested in what path of learning I need to take, to gain the knowledge to achieve my goal.  I'm not asking for someone to do this for me or tell me how to do this, but rather, how and where I can learn what is needed, so that I can develop and create this myself.

My goal is to take the output from the AR Drone quadcopter and adapt it to be four PWM signals that regular ESC's can use.  Currently the AR Drone outputs to four proprietary motor controller / esc / motor combos, so there is no easy interchange to use larger motors, for building bigger and better things.

Here is a link to a page that explains about this communication stream for the motors, the most I've found anywhere:

The Arduino would be tasked with several functions.  First, in order to keep the AR Drone "happy", it will need to communicate data back to the AR Drone's board in a way that supplies the information in place of motor controllers, so the AR Drone does not detect anything wrong.  If a motor controller is damaged, the AR Drone will refuse to fly - it doesn't blindly give commands to the motors unless it knows they're all working (including not stalled out).

Second, the Arduino will need to quickly monitor what the AR Drone is trying to tell the four motor controllers to do for power levels.  This will involve interpreting the I2C connection for each of the four motors.

Third, the Arduino will need to compare the motor values to each other to figure out what their differences represent, such as 45% on the left and 55% on the right actually meaning a roll left (at a certain rate), which it can then multiply by a gain (knob or variable), and apply the new PWM outputs.  The gains that would need to exist would be throttle, roll, pitch, and yaw.  For example, using this with bigger motors in a bigger airframe, we might need a gain of 90% to lower the throttle outputs, but when rolling, this would need to be applied as a greater difference between PWM outputs, in order to have it react at the same roll rate the AR Drone is expecting.  This really is a tuning scheme common to all DIY flight controllers, adjusting the response sensitivity.  It's just that here, we are trying to match it up to what the AR Drone is used to.

Finally, the Arduino will need to output to several PWM channels, which will feed ESC's for the brushless motors as desired.  There is the desire to have this be a "fast" PWM signal, such as 400hz.

I know enough to modify video games and was able to root my Android phone, so I'm not a total novice to program-minded things.  I actually can work wonders in Lego NXT-G which is a graphical interface of LabView I believe, so I think I could learn what it takes to achieve what I'm shooting for.  It will be a heck of an ordeal, but I'm willing to learn.  I expect I'll need to start out by getting the big Arduino learning kit from Radio Shanty, and after working through that, will need to start seeking out people's projects that have done the various aspects I need, such as I2C communication, PWM output, etc.

The AR Drone is a great aircraft and offers flight advantages that no other flight controller has, such as using the downward facing camera to hold horizontal position in a precise hover aided by ultrasonic height sensors.  I know of no other flight controller that could do that, short of something like an ArduPilot Mega which you would have to write the entire camera-tracking position-hold thing for.  This adapter seems like the most reasonable path for me to get more quadcopters flying just like the AR Drone, by using the AR Drone flight boards inside.

Thank you for your time and I appreciate any input you can give me.  I've tried to ask around the AR Drone forums to find somebody who knows Arduino well enough to do this, but to no avail.  So it looks like I'm going to take on this mission myself.  I look forward to the help you can give.
Pages: [1]