Solving PPM issues with APM boards


So I get my new APM in the post, excitedly open it connect a few servos, upload the dancing firmware test and.... nothing. Jitter and a crazy flashing mux led.

Anyway to cut a long story short it seems the PPM chip has not been programmed right by Sparkfun. I tried following the steps here,
using the manual process, but found that even though the source from here,
compiles and uploads fine, the chip still doesn't work.

Seemed to me that it may be the brown out protection that is the issue here since the servos probably drop the +v rail when doing stuff, and it looks like there isn't much filtering to the servo +5v rail.
So reading the fuses I notice that the brown out was set to 4.3v which seems quite high, more than likely the issue. So I set it to 1.8v hit program and voilà it all works nicely.

Looking through Jordi's batch file confirms this as this is the setting used in the batch.

Here is the old settings:

>
And the new:


So the process is this:
  • Connect up the APM to your programmer (follow the guide for programming firmware)
  • Go to the fuses tab and click read
  • It should show the extended fuse setting as 0xFC and brown out show as 4.3v (as the first image)
  • You can then either set the drop down to 1.8v OR change the setting directly to 0xFE in the lower section
  • Then hit program, check all the status messages are ok
  • For double confirmation, click read again
  • The settings should now be 1.8v / 0xFE
For me this fixed the PPM chip and now the dancing servos program works fine.

Powering the APM is something of an avoided topic. Seems to me like from the guide someone may blow the board by connecting things up wrong.
My personal preference is to de-solder SJ1 and power the radio gear & APM separately.
On the desk the APM uses the usb (for power and serial debug) and I use a bench supply for the servos (connected to input channel 8).
In the air, I use one of the ESCs (quadrotor) to power the radio etc and a separate BEC/regulator connected to the battery for the APM (connected to the power header).

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • lol .. no question on this anymore at least 8))
    Maybe we could put this info somewhere in the svn as a text file.
  • 3D Robotics
    Okay, I've deleted the manual option from the wiki.
  • Developer
    I would strongly discourage you from just series-connecting a pair of supercaps.

    They need current limiting while charging, and due to their wide tolerance range the imbalance can easily drive one over-voltage during charging.

    There are 5.5v supercaps out there that are smaller and quite possibly suitable; I've been experimenting with a few but so far no really positive results.
  • Scott, you have also done lots of efforts and shared with the community, thanks for that !
    I strongly go with M. Smith and suggest you few things to improve your power supply;
    You can consider separate BEC
    You can directly connect the Lipo to this BEC, ensure the voltage setting jumper is at 5V position.


    Many people use super cap may be 1F in parallel to the receiver's power supply. Here is 10F/2.5V, from Sparkfun, two of them can be connected in seried to get 5F, 5V.



    But scot, what all I have suggested is generally for application in large airframes where servos are taking large currents. If you have only 3-4 standard servos in your application then a normal ESC with 3Amp 5V inbuilt BEC should do the job.
  • Chris,
    I had the same reflex as Scott (we are engineers after all) ..
    I would recommend to remove the manual steps from that page and put itin a sub-page as non-recommended steps.
    Otherwise let's give all the right steps for the manual process as it seems to be lacking some info (I've never been able to make them work by myself)
  • Ah, yeah thanks for pointing that out, I forgot to check the 1280. The 328 should be fine at that voltage and that’s what I checked, but I forgot about the 1280!
    Hmm, I guess my solution is to go with powering the radio gear separately then.

    As for the brown-out setting, the value used (1.8v) came from Jordi's batch file. Don't think this is a problem for the 328 PPM chip as it can handle voltages as low as 1.8v and I guess that if the voltage does drop that low you'd want the failsafe to keep working even if the 1280 autopilot chip dies due to brown-out.

    I'll sort a better supply for the APM. I guess the regulator I have just isn't good enough. Any ideas about what kinds of current the APM is likely to draw (without the radio gear; e.g. reciever + servos on separate power? The onboard regulator datasheet says it supply’s a guaranteed 1.5A output current, so I guess it has to be at least that much.
  • Developer
    You don't want to drop the brown-out detector down that low.

    If your 5V supply is falling below 4.3V, you have a bigger problem. The Mega is out of spec at 16MHz and 4.3V; you need to fix your power supply situation so that it's not browning out.
  • The main reason was that I'm building a quad so I'm not sure I want the failsafe functionality. I was thinking then that I may want to disable it in the code to be sure. I've also been programming (in C/C++, not arduino) avr and avr32's for a while so I guess I feel confident enough that I wasn't going to break anything.
    I guess the other thing is that I don't like giving up and I don't like not knowing why something doesn't work! I'm a systems engineer after all, it's what I've been programmed to think!! ;)

    I didn't use the batch by the way (other than for checking the fuse values). I just reprogrammed the fuses using avr studio.

    Cheers for the help. Now on to the fun bit of actually using my APM!!
  • 3D Robotics
    Scott, glad the batch file fixed this for you--it's very reliable. Just out of curiosity, why did you try the manual process first? The manual is pretty clear that that is NOT recommended.

    We don't control the APM production, Sparkfun does. But I'll ask them to look into this.
This reply was deleted.