Pixhawk use of AUX pin (55) to switch navigation light

Hello,I am struggling to understand how I can control the digital output pin #55 on Pixhawk.I want to switch navigation lights on my UAV via Mission Planner. I have the necessary logic to swith the leds but no idea, how to activate the pin via MP. All I read so far was with respect to camera trigger but I want simply to find a way to switch the leds on and off via MP.I have already "Googled" for some while but either i am missing the right key words or my problem was not yet discussed.I would appreciate your help very much.ThanksBest RegardsHarald

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

Join diydrones

Email me when people reply –

Replies


  • could you PLEASE explain how you were able to control your led's with your TX with a pixhawk flight controller
    Alejandro said:

    Hi Harald

    Thanks! It worked and I can control my leds with the RC :)

    The change I did, following your advice, was to disable all controls for the gimbal and parachute (which I don't use) and now AUX 5 follows RC7 (as a side note, the controls for the gimbal were blank not "disabled"... I did mark them as disabled)

    Thanks again for the wisdom and the time!

    Regards

    Alejandro

  • Hi all

    To add to this thread, I also would like to control AUX 5 but in my case with the RC channel 7 and I followed to the best of my knowledge all advice given here but without success.

    Basically I've set first and second relay to pin 54, AUX 5 (both relays just to be sure), CH 7 and CH 8 as on/off relays in the APM config (following this link http://copter.ardupilot.com/wiki/common-relay/) and mapped channels 7 and 8 of my RC to a couple of 2 position switches

    On the hardware side, I want to control a led stripe with my RC and for that I have connected a separated battery to a darlington array which I expected to drive with AUX 5 signal output

    The hardware part works fine (tested applying more than 3V to the control side of the array) but signal pin of AUX 5 never changes state regardless of what I do with the switches mapped in CH7/8

    Any advice or tip on what I’m doing wrong or missing here would be greatly appreciated (including the “Hey, you are doing everything wrong, you should…. “ sort of tip J)

    Thanks

    Alejandro

    • Hi Alejandro,

      sorry for late reply but I have tried to repeat the steps you have tried in my environment.

      I have managed to get the AUX 5 (pin 54) to toggle following the procedure in the link you mentioned.

      First you have to make sure you have the BRD_PWM_COUNT = 4 (then AUX5 and AUX6 are configured as digital output)

      The next I found out is you have to check that no other function uses those pins (in my case I had defined the parachute release  with CH7 which seemed to block the function of AUX5) After disabling this function it suddenly worked as expected.

      It also seems to be important that you have calibrated your radio and make sure that your CH7 is between 1100 and 1900

      I can measure a voltage level of 0.03V / 3.3V on AUX5 (between GND and Signal) depending on the switch position on my radio.

      I have updated to the latest Firmware version (copter 3.3.3).

      Hope this helps you to also get it working.

      Maybe I should mention that I also tried to get access to those pins via Missionplanner and a connected Joystick.

      I was able to define 1 joystick button to switch the AUX5 pin on and off.

      Regards

      Harald

      • Hi Harald

        Thanks! It worked and I can control my leds with the RC :)

        The change I did, following your advice, was to disable all controls for the gimbal and parachute (which I don't use) and now AUX 5 follows RC7 (as a side note, the controls for the gimbal were blank not "disabled"... I did mark them as disabled)

        Thanks again for the wisdom and the time!

        Regards

        Alejandro

  • Hi, I am a freshman of drone and plan to build a Pxhawk drone and also like to use Pixhawk to control LED navigation light and strobe light instead of an independent LED control kit, like this or many other kits.

    By this discussion, I learn Relay Switch, AUX OUT 5 & 6 can be set as relay to switch on/ off the navigation light though I haven't tested it. (Someone has tested it.) I just need the navigation light to be on or off and stay steady, but I want to flash the strobe light at a fixed frequency, like on-off-on-off in 1 sec, recycling after another 1 sec.

    Is there a way to make the Relay Switch AUX OUT 5&6 on/off at a programmable frequency to blink the strobe light by editing the firmware code? If not, any simple hardware solution?  

    Appreciate to suggestions! 

    Aircraft lighting - FlightGear wiki
    • Hi Eric,

      the phrase Relay Switch is a little bit misleading as you cannot directly switch a relay with the pin but you need a transistor to get the necessary current for switching a relay.

      The meaning is that you can program those pins as being either normal PWM outputs to drive servos or a simple binary output which delivers only a high or a low level.

      You need to have free channels on your RC to switch those functions.

      I am not aware that it is possible to program a kind of on/off scheme into the Pixhawk. This would have to be done by programming your your RC (I am not aware if such kind of function exists)

      With respect to the strobe light I would recommend to buy one with blinking already implemented.

      I think I have seen such products already.

      An example of how to connect the AUX pin to drive a relay is shown earlier in this thread.

      If you want to create the blinking circuit by yourself you should look for applications with e.g. NE555 where you can define the blink frequency by choosing the right components.

      Hope this helps you further

      BR

      Harald

      • Hi Harald,

        Thanks for your explanation! This is really a nice place! Yes, there are some blinking strobes ready to use I can find! If you need such information, I can share with you!

        Regards,

        Eric 

  • It looks like you have a good circuit and just need to change the pin voltage from 0 to 3.3v.

    In the latest version of the firmware they have provided this function on channel 7 or 8.

    http://copter.ardupilot.com/wiki/common-relay/

    This could also be used to raise or lower landing gear.

    It also talks about making more relay pins if you don't want PWMs.

     

    • Thanks Michael for your answer!

      My issue is that I need to use channel 7 and 8 of my RC for different functions so my intention was to switch the navigation lights via  MAVLINK from Mission Planner and currently I have no idea how to achieve this (maybe via Python script?)

      • We have the same challenge. My channels 7&8 are used for gimbal knobs. I need to use channel nine to turn my Lidar Lite v2 on and off. It is already setup on AUX 6, pins 54 and 55. I am trying to figure out how to use a TX switch to toggle the Lidar. Any ideas? 

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…