3689486770?profile=original

 

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.

3689486868?profile=original

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.

 

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Developer

    @Alex, in generally people are not reading earlier pages on multipage posting. I also forgot that I post it earlier in here as it's many months ago so my apologies on that. Most of people are following postings trough email. Yes GLB 4 led module can be even more safer to use but it is also more complex to install. jD-Led board is full Plug-N-Play. 

    Having it's own power does not harm but does not also benefit you much. It's more like waste of efficiency and uses extra mAh's on switching regulator. But as said, sure you can use it.

    Remember that I was original developer who introduced Copter led systems to ArduCopter and that way to megapirates too as their code is based on my team old works from many years ago. 

  • Hi there,

    Diego your diagram is correct. 

    For the white and green light, in wy cas I d'ont need it. Maybe you can connect the whit to any "+" if the Analog rail and then, the white light always come when your quad is poewered... It's an idea.

    Muhammad, there is no buzzer on the board, you need to buy it ( i.e : http://www.goodluckbuy.com/lotusrc-t580p-fc-buzzer-for-t580p-quadco... )

    Jani, I don't understand really why you post that again? You have already posted before and we talk now here about another solution....Our solution provide more security cause they use his own power, not the arducopter power rail, and the command saide are opto-isolated from the CPU . 

    Have all a nice day.

  • Developer

    You can also get one fully ready to APM made boards fromjDrones. This board is also safe to use as it has proper powerdriver circuit so you are not browning out your CPU. There are few other boards available but those can be dangerous to use as they use current directly from main CPU which is always a bit bad. 

    jD-Ledbuzz_P1.jpg?width=350

    Boards are coming with DF13 cable so if you need longer or shorter cable, there are many choices.

    Here board connected to APM directly. No other cables and connections are needed. For operation. LED Mode 11 is correct mode

    jD-LedBuzz_P3.jpg?width=350

    Board can be found from Here.

    jDrones, R/C UAVs and More....
    Manufacturer of ArduCopter frames and parts. Custom airframe manufacturing, Custom design services for all your R/C UAV needs
  • Hi Alex, thank you bro. Is that that round plastic thingy at the bottom a buzzer? Or as in Diego's diagram we need a external buzzer?
    And Diego thank you too bro for the diagram, me likes pictures :-)
    My led board has been in its plastic for a looooong time
    Insha Allah I will try and get it working this weekend.
  • Thanks your help alex, you're correct , thats the way how to connect them to the APM. How can we use the yellow, green and white LEDs?3701710978?profile=original" The Questor " ( in Rcgroups)  sent me this diagram .

  • @Diego and Muhammad,

    I've buy the same bord and it's pretty simple to make it work.

    On the left side there is 2 pin :

    Power (+)

    GND (-)

    these 2 pins give the power to the board and need to be powered directly to your lipo battery , for that you need to solder a connecter or another similar idea to connect-it simply.

    The 5 other pins are only the "command" side and need to be connected to the analog pin of the Arducopter (A4, A5, A6 ... )

    Exemple : 

    GND connected to any "-" of the analog rail

    and the other pin control the color (R, G , B and W ) 

    For my use : 

    A5 - Beeper - 5V active Buzzer

    A6 - GPS - Blue

    A7 - Arm - Red

    Pretty simple, you can't go wrong, and it's a secure solution beacause the power is provided by the battery and the command side are isolated.

    Hope to Help, and sorry for my poor english :) 

  • Many of these boards have been sold on ebay , but I haven't seen any video/tutorial of them so far ... Weird
  • Hi Diego, not yet, insha Allah will get a friend of mine to help, he is into electronics so hopefully he can figure it out. Insha Allah I will keep you posted.
  • Hi Muhammad, have you figured out how to hook you board up? Im still looking for any info, but nothing yet. It does have +and- connections, should I take power from any 3s lipo  for it?

  • Hi guys, I too have just bought the same led/alarm board as above and also have no idea how to hook it up.
    My APM 2.5 I buried in the middle of my Tbs Discovery so the on-board lights are not much use.
    Thank you for any help.
This reply was deleted.