ArduCopter needs life. it needs to be able to communicate with is pilot. Live information can be displayed to the pilot using colors and patterns through 1 RGB_LED. 7 easy made colors can be used to identify the state of the quadcopter. RGB_LED's can also be used as the navigational lights as well. Although this is a good idea their is a main drawback.
It is hard to see far away or in bright light, but still it would be a useful tool for the pilot and spectators.
What information and how.
The most vital information while flying is battery life. How much time is left. The APM's battery protection could be linked to the RGB_LED to display real time voltage through color. The RGB_LED starts out solid GREEN. Battery is fully charged. As the battery drains the color of the LED will fade from GREEN to YELLOW to RED, and LAST flashing rapid RED.
GREEN = Battery FULL
YELLOW = Bat. half way
RED = Bat. LOW
Blinking RED = Bat DEAD
This would through in a YELLOW Blink if not locked.
If GPS is locked no Blink
If GPS in not locked Blink YELLOW
This would add in a rapid, rapid BLUE blink.
If PPM signal is good no blink
if PPM no signal rapid, rapid BLUE blink.
Motor not armed:
Battery, GPS, and PPM status displayed
RAPID BLINKING RED / WHT while under 40% throttle
If above 40% throttle Battery, GPS, PPM, and flight mode is displayed.
Each flight mode can be assigned a color and/or pattern to identify while flying.
The Health Beacon would also make it easier to test Tx setups on the ground.
Before flight motors not armed.
Please feel free to shoot this to peaces.
The system has three LEDs already to tell you how it is (if the code initialisation goes through the same as APM).
During the APM startup procedure we know when different things are initialising because of the pattern produced by the LEDs (and when everything is ready to fly). Whilst it does not give the wealth of information you want it does indicate the necessary parts. Does the ACM code not have this startup indicator?
As for using an RGB LED to do what you wish, do you really believe something 5mm in size will be easily visible on a moving craft during the daylight at speed? I certainly don't however if you wish to pursue this idea it would be relatively easy given the wealth of connections free on the top of the APM IMU board.
There are two PWM outputs spare (analogue write will allow variable control) so thats two colours with lots of variants not sure you will be able to have a third variable output but on and off should produce twice as many colours as without that colour. The only thing left is for you to do the coding, I'd suggest doing the mode colours first as that is easy.
Hope to see this as a addon pack, for those having the newer 2560 board with more memory.
I'm afraid that it will not be possible to add all those options to the older boards, because the actual code is near memory limit (128 Ko).
It should be better to keep the small available amount of memory on older boards for stabilization or auto modes enhancements, so that users with older hardware can still upgrade to get better flight capabilities.
You do not need a library for an LED (even a RGB version). At worst you would need a few variables as the "light" level for each colour to produce the colour you actually want.
The code for what you want means you will have edit the main ACM code not create an addition like my camera tracking code. Your best way to find the code you are after is to start looking through the startup procedure and what it calls.
As for building it for the 2560 that rules out at least 75% of the community given the boards havent been shipping that long. After you have something functional check your available memory and if you are getting tight (<200 bytes) then you need to look for another way to deal with it. I2C is used by the IMU for most sensors so you could use that to add your LED with a uC to read the messages you send from the ACM shortening the code as the uC will have the complete control.
I think that a LED mounted on the bottom of the multicopter would be a very good idea. This is what I intended to do anyway, but status functionality would be awesome.
Does anyone know where to find a very bright LED or light to mount to the bottom?
1 watt LEDs are common, but you are right, they would need a small buffer circuit so that they don't overload the AVR outputs.
40 mA max for one output pin (200 mW).
And the following rules needs to be respected for output current sourcing :
1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200mA.
2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.
3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200mA.
4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100mA.
5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100mA.
The max VCC power supply current of the AVR chip himself should not be higher than 200 mA.
This is the LED I'm using.
I looked at the ACM.pde found a few things, but pretty much lost as how to add in a fuction and an output to the loops. I have a demo sketch that i use with my Arduino. That i might be able to use?