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.
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:
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.
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).
Comments
Maybe we could put this info somewhere in the svn as a text file.
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.
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.
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)
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.
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.
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!!
We don't control the APM production, Sparkfun does. But I'll ask them to look into this.