MR60

Pixhawk external LED?

Hi,

Anyone succeeded to install external LEDs on Pixhawk?

On APM we could configure the param Led_mode to a binary value representing which actions turn LEDs on A5 and A6.

Is there an equivalent feature on Pixhawk? Found nothing in the wiki about it.

Thx for any info,

Hugues

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

Join diydrones

Email me when people reply –

Replies

    • Excellent pls post your progress!

      On a related subject I bought these http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=...

      I really like these!! The lights do the two most important things for me. They help with orientation and let me know when the battery is low [ handy if you don't bother with telemetry or don't have that ].  I built my own quad and installed LED's on the booms, red in front, green in rear. So these lights have a matching super bright red LED and green LED I place respectively aiming forward not down. It's amazing how much it helps with orientation. Simply hit the yaw and when you see bright red you know its aimed back at you. The lights are solid until 10.5 volts is reached at which point they flash quickly.  If I were smart enough to write the code I would have externally controlled LED's to do only what the pixhawk LED does. Seems like if it starts trying to communicate modes that could really get complicated for the user. The same flashing yellow light used for low bat could also be used to indicated a RTL failsafe event like it already does on the Pixhawk. Anyway just my two cents. I sure wish I could help with the code but that is certainly not my forte :[

    • MR60

      Nice use of LEDs.

      Since I asked the question, 3DR and resellers sell an external pixhawk led you can simply connect on the I2C port.

    • Yea I've used those. I wish the pixhawk had two I2C ports so you didn't need to about tripping your wiring to use one.

    • MR60

      Hi Richard, you can use the four I2C ports extension that comes standard with the pixhawk.

    • Developer

      One limitation of the Toshiba RGB LED (which is what's in the Pixhawk RGB LED) is that it has a fixed I2C address.  This means that only one can be present on each I2C bus.  On the Pixhawk the RGB LED that's on the board uses the "internal" I2C bus, if you plug an external RGB LED into the board's "I2C" port then it's connected to the "external" I2C bus.  It would be possible to light up both the RGB LED on the board and one that's plugged inextenally but we don't do this at the moment.

    • How would one go about implementing that both the internal and external LEDs light up?

      I installed the external led on the bottom of my Y6 with the thinking of being able to see it while flying. Unfortunately I lose the ability to see the light while arming on the ground.

    • Developer

      Jay,

      If you want to do it in software, it would require changing the PXFirmware's rgbled driver so that it starts a driver on both the internal and external I2C buses.

      A simpler solution though is just to split the I2C line and run it to two RGB LEDs.  Because the LEDs simply listen I think it will work.

    • Thanks Randy!

      I see in the code where it looks for the external led first and if not found then loads the internal led. Im tempted to mess with the code, but i agree that just adding another led to the i2c splitter is the simpler solution.

    • Ahhh I see. That explains why only one comes on. I've had an issue a couple times with connecting an external LED and it didn't work rather the internal one still did as though the Pixhawk didn't see the external one here. Yet plug in a different one and suddenly it works. fyi this was with a China LED's not 3DR. Remember that old verbiage 'scuzzi voodoo' ? Referencing when multiple hard drives were connected via scuzzi cables sometimes for no apparent reason you had to disconnect them and then connect them in a different order and then all worked as planned. On paper it shouldn't matter but....

      In perfect world I'd love to see the pixhawk with 2-3 I2C ports for a much cleaner wiring install for LED's and or a second compass availible for failover. Nothing hundreds of thousands of man hours and a tremendous amount of resources couldn't accomplish whilst I simply sit around and wait :] 

  • The serial addressed strip LED thing seems to be at a price point where it's cheaper than other ways of generating multi coloured lighting for copters now (>$20 for a 1 meter strip).

    It might be time to relook at the idea of code driven from Pixhawk to control these WS2812B based serial RGB strips via a spare digital pin (it doesn't need SPI or I2C).

    http://www.ebay.com.au/itm/1M-Black-PCB-WS2812-WS2811-RGB-LED-Strip...

    If the strip was wrapped right around the whole copter main body, the strip could be used to indicate failsafes or be Nav LED's for night flying (or both). The ring of LED's could be lit in four quadrants as classic Nav LED's. Some could strobe White etc as well. The patterns possible are endless...

    One feature might be to have the whole strip change colour in flight with respect to the take off position (the RTL point). The LED strip could change colour depending on the copters movement, away, towards, left or right of the take off point. The idea being the for night flight the way to tell which way your pointing is to just yaw until you get the colour you want (say Green for towards you) and push the forward stick till it comes home. Sort of like the 'Simple flight mode' does with the whole copter. It may allow the pilot to venture further away at night than a few fixed colour LED's allow but still fly in Stab or Acro confidently.

    Anyway, I'd code this myself if I could, but I can't.

    Cheers,

    Martin

This reply was deleted.