I am using the APM 2 for both my quads and it is tricky to get the barometer covered to avoid errant airflow since it is below the daughterboard. To solve this, I ended up pretty much filling up my stack cover with breathable foam. But once that was done, I could barely see the on-board LED indicators.
Fortunately, the current code supports remote indicators without too much trouble.
If you look at the pin-out images on the Wiki, you will see that the AN pins are labeled Motor LEDs. They really don’t have a lot to do with the motors – but they do serve as pretty handy indicators.
If you look in the code, you will find defines for these pins as follows:
AN4 – Motor or Aux LED
AN5 – Motor or Beeper
AN6 – Motor or GPS
AN7 – Motor
AN8 – Motor
For my purposes, I focused on AN5 for the Beeper, AN6 for GPS indicator and AN7 as an Armed indicator.
The default seems to be to have the beeper enabled and the LEDs on. That is easy to change however. The different possibilities are set using bit masks to build the LED_mode parameter. A bit mask (if you already know, feel free to skip ahead) is simply a way of packing a bunch of on/off settings into one byte of data. A Byte is 8 bits, so you can have 8 different switches in one byte. If you look at the following table, you will see a single bit is set to ‘1’ and the rest to ‘0’ in each row. To build the mask, you just add all the rows together and convert to a decimal number (or convert then add).
Bit Number
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 1 = 1 Motor LEDs On/Off
0 0 0 0 0 0 1 0 = 2 GPS On/Off
0 0 0 0 0 1 0 0 = 4 AUX Function On/Off
0 0 0 0 1 0 0 0 = 8 Beeper On/Off
0 0 0 1 0 0 0 0 = 16 Low Battery Flash – fast/slow
0 0 1 0 0 0 0 0 = 32 Motor LEDs NAV blink On/Off
0 1 0 0 0 0 0 0 = 64 GPS LEDs Nav Blink On/Off
1 0 0 0 0 0 0 0 = 128 Not used
Note that the NAV settings cause the LEDs (either the motor LEDs, the GPS LED, or both) to blink 3 times when you hit a waypoint in AUTO flight.
The low battery flashing defaults to fast flash so setting that bit to 1 will enable slow flash.
I really only want the beeper, the GPS and the Motor LEDs on, so I set the mode to decimal value 11 (which is binary 00001011). This should equate to: GPS Nav blink off, Motor LED Nav blink off, low battery flash fast, beeper on, AUX off, GPS on, Motor LEDs on..
The way you set this to be the value used is through the Mission Planner.
Establish a connection with the APM and the Mission Planner software. Go to the parameters list and find LED_Mode. It should be set to something like 9. Change that to 170 (or whatever you decide to use) and write the settings to the APM.
The outputs on the APM are 5V, so for most LEDs, you’ll need a resistor on the positive lead (the longer leg of the LED). In my case, the blue LED I was using required a 100 Ohm resistor and the red one required a 150 Ohm resistor (note – not going to explain it here, but there are a ton of online resources and calculators to figure out the resistor values needed for a given LED). I soldered up the resistors and LEDs to leads and cemented them at the edge of my stack cover’s base. For the beeper, I just used a 5V piezo beeper I happened to have lying around. Radio shack sells one that will work, but it isn’t very loud. If you want volume, you may need to shop around,
When you connect to the AN outputs, you need to run the negative lead to the ground pin (the one nearest the edge of the board) and the positive lead goes to the signal pin (the one farthest from the edge of the board). The middle pin is always 5 Volts so if you plugged in there, the LED or beeper would be always on.
Beeper goes to AN5, GPS to AN6 and the ARMED light goes to any other motor LED output, but I chose to just use AN7.
That’s all there is to it. When you turn on the APM, you the LEDs will stay off until it is booted, then will flash the same as the on-board ones. When a GPS lock is achieved, the GPS LED will stay lit. When the bird is armed, the red LED will blink out and once it is fully armed, it will light a solid red. The beeper will beep twice on arming, and once on disarm.
Comments
I got a response from UAV Objects. They replied with a thead:
http://www.rcgroups.com/forums/showpost.php?p=28703222&postcoun...
And suggested that the blue wire (in the photograph, linked above) goes to the GPS, and the green lead goes to the arm status LED. The tricky thing is that on an RCTimer ArduFlyer, we leave the first two rows to the right of micro-USB connector unpopulated because they are only for re-programming the board in the event you catastrophically LUNCH it, so counting from the THIRD pin, the GPS LED connects to the 6th pin over, and arm LED to the 7th. (ground connects to any outer-most pin)
Then they suggested: Set the LED Function to 11 in Advanced Parameters (conveniently omitting where you find "advanced parameters"). Now matching that with what appears at the top of this thread, 11 in binary is setting bits 1 2 and 8. Now I cannot find the LED "function", nor can I locate "LED_Mode" in the .xml file. Another thread indicates it's the EPM parameter that gets set, and predictably, the bit state is reversed, so enabling DISABLES, and I'm assuming "external LEDs" means those off the board, connected to the pins we're referencing, but I wouldn't bet anything on it.
If I don't get this figured out by next week, I'm going to solder the leads directly to the BOARD where the LEDs are and forget the pins, the parameters and the "enable disables" binary crud.
Ok, here's more info on the "annunicator". I connected the BEC (or what I suspect is one) to the distribution board, and connected three of the LED contacts to center-pins as indicated at the top of this thread. Whether I connect the ground to the APM or not, the LEDs are super bright. All three light up solid, and nothing blinks.
If I disconnect the annunicator from the APM, they all go out, so something from the APM is making them illuminate, whether powered or relay-triggered. I haven't tried disconnecting the board from buss power yet. I'm hoping to hear something from anyone else before I unsolder those leads.
Is there some programming I need to do to make the on-board status echo to those pins? Some bit pattern?
Has anyone found anything like documentation for the RCTimer "annunicator" (gotta love Chinglish!) that CAREYER posted a picture of? The end without LEDs on it seems to have a BEC on it! It is printed "Gnd" and "+Vin" and "2-6S" (pretty good deal for $7 if I knew the current capacity of it)
But if power is being fed through this (BEC?), then the contacts on the bottom are... relay triggers?
Can I connect this board to "buss power" and avoid the brown-out threat posted of here? I've sent an email to UAV Objects to see if they have anything more (than nothing at all) on this board they sell to RCTimer.
So is the "word" that we should use the jD-IOBoard and NOT rely on the ArduFlyer power for the board that comes with the (RCTimer) kit? What does the APM board put out, and what does the annunciator board consume?
I read "if your devices are eating too much power...". Ok, how much is too much and do the LEDs on that board constitute too much?
Very interesting with the external LEDs and beeper. I have installed it and it works fine. However, I'm not happy with the beeper. Cannot hear it through the motor sound. I suppose it can just be replaced by a LED as long as the current drain is not to big??
I understood the bit pattern, but what I don't understand is what defines which of the ports (A5 to A7) the different signals end up on. Hope you can give a brief comment on that.
I read all posts but I cannot find an answer :
Which PIN I should connect BATTERY ( FAST / SLOW ) LED ?
I have BUZZER connected to AN5 , GPS to AN6 , ARM to AN7 .
Now I need FAST flashing LED to warn me that my battery is getting LOW . I have my LED_MODE = 11
Hi there,
has anyone wired up the RCtimer Annunciator yet? (http://www.rctimer.com/product_1107.html)
Why the heck does this thing have 4 LEDs? As far as I understand this Mod shows just Arm and GPS status.. so what's the other LEDs for? Next: Do I need to confiure anything in MissionPlaner in order to make these things light up correctly?
It would be great if someone could but a wiring diagramm if possible.
Wondering if it is possible to have the APM control one of the LEDs a a strobe?
Best regards and thanks for your help.
Hi,
What did you used for legs ? Thx.
tell of what made the legs?
Hello Jani,
do not take my remark negatively, it just was a question. I wanted to understand why this duplicate.
And also know that I will never put in doubts your skills and experience of UAVs.
:)