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

        • Hi Leslie,

          it depends what kind of receiver you are using? If it provides more than 8 channels in the PPM sum signal to the Pixhawk it should be possible to route them to the respective AUX outputs, see

          http://diydrones.com/xn/detail/705844:Comment:2002097

          Best Regards

          Harald

  • I too am hunting for an answer to this, but may be a bit behind you in terms of understanding. Eg: Not sure what 'the necessary logic to switch the LEDs is' - whatever that is I certainly don't have the logic. I'm not expecting just to be told but would like to know where, if anywhere, there's some guidance on the Aux outputs. 

    I've read quite a lot but it seems to come in at a level of assumption about a lot of stuff that I'm missing. For example we are told here: http://copter.ardupilot.com/wiki/common-relay/ that there are 2 relay pins. Great! They are called '54' and '55' which equal '5' and '6' on the side of the pixhawk. 

    I'd like to assign my spare channels on the Tx, Ch7,8 to interact with those to allow my LED circuit to flow. I'm guessing this is similar to your problem.

    In the APM planner there quite a bit of reference to relays here and there. In one area you can set the following:

    RELAY_PIN, RELAY_PIN2, RELAY_PIN3, RELAY_PIN4 to be a value of 54 or 55 or elsewhere you can set them to be Pixhawk FMU Aux 1 or 2. I'm not sure what relay_pin1,2,3,4 actually are. Outputs 1 to 4 on the side maybe? 
    I'm simply looking for a way to assign PWM values to trigger the ports 1-6. Not sure if this is something that requires programming. Maybe but I'm not clear on that and if it is I'm up for learning how! I appreciate all of this lis open source so it may not be that easy. It just seems that all documentation is aimed at people who are already familiar with this world!
    I'll keep hunting but hoping someone can help us here. :)
    • Hi Jamie,

      with respect to the logic, I use to control the leds, see attached schematic; I have installed a separate DCDC converter supplied by the 3S LiPo to have a 5V supply for the PWM outputs of Pixhawk, which also supplies my leds.

      My current understanding is, that by default AUX Pins 54 and 55 are configured as digital Output, i.e. providing voltage Levels of 0V and 3.3V depending on programmed state while the other 4 AUX Pins are configured as PWM out.

      What I don't know is how to change the state of those Pins, in your case via Input channels from RC, in my case via script or something else in Mission Planner.

      The mentioned Relay_Pins seem to be mainly history from PX4 and APM but this is guessing only.

      I also hope that someone with deeper knowledge of the interworking between RC, Mission Planner and Pixhawk can give us some hints.

      LED-Control.JPG

      https://storage.ning.com/topology/rest/1.0/file/get/3702532328?profile=original
      • Thanks! I see that you can change the number of pins act as relays from 2 up to 6. It's a parameter in APM but don't have it to hand. I'm not experienced in the electronic side but comfortable with assembly. So even though the pin acts as a relay you still need to have the circuit described? Is that to protect current running into the pixhawk? I'd like to make use of it if we get further with this!

        My other approach now is to test with one of these - Turnigy RC switch

        It's the only way I can think to at least test without using a oscilloscope which I don't have or understand. I want to see if I can pass through signals on some pins direct. Also if I can pass though on the Tx. 

        • Hi Jamie,

          I think you still misunderstand the difference between the usage of those 6 AUX Pins on Pixhawk:

          By default AUX 1-4 (Pins 50 to53) are configured as normal PWM Output, i.e. you can control servos with those pins.  The other 2 (AUX 5-6, pins 54,55) are configured as digital Outputs. To control a relay via those Pins you have to have a similar logic as I mentioned but need an additional protection diode for the transistor. A relay is a mechanical switch controlled via a solenoid switched by a transistor. (see the modified schematic).

          The Switch you mentioned will work on PWM Outputs but you have to configure those pins to represent your RC channels 7 and 8. The Parameter Servo_Out_Function is used for this. I personally have already achieved to have 2 flap servos connected and working to AUX1 and AUX2. You have to experiment which Parameter will fit your use case best.

          relay-control.JPG

          • I had a look around for Servo_out_function and the closest I found was some info saying to put RC1_FUNCTION (RC2,RC3 etc) to zero. This then allows that value to pass through as a PWM signal. But where does it pass through to? There are various RC parameters that go from RC1 up to RC12. 

            Not sure what 'RC' stands for is or what it relates to on the Pixhawk physical outputs. There are 14 outputs in total, and 12 'RC's' in the software interface. The 8 MAIN OUTs are all used up by the 8 motors. It's the 6 AUX OUTs I'm trying to make use of. So to get, for example Ch7 of the Tx to send a signal to AUX 1 is not something I understand! 

            If there's any documentation that helps explain all this it would be a great help, or any info on what I'm missing. Sorry this is all new and nothing seems obvious. 

            • the RC_Out 1..14 corresponds to the Output Pins of the Pixhawk; for the Outputs 1..4 the function is predefined, see

              http://copter.ardupilot.com/wiki/common-pixhawk-wiring-and-quick-st...

              under connecting motors

              for the other Outputs starting from 5 to 14 you can select 1 of 27 functions for that pin.

              see : http://copter.ardupilot.com/wiki/arducopter-parameters/

              One of those Options is RCPassThrough which means that the respective Input channel of your remote control is routed to the respective Output of Pixhawk. But up to now I did not find a way to change this 1 by 1 relation which you would need.

              But reading the connection hints I would suppose you have to connect each 2 of your motors to 1 of the 4 Outputs 1..4 which would leave you Output 5..8 for different function via RCPassThrough

              Hope this helps at least for your main issues

              • OK. I think I'll need to wait no for the little servo switch to arrive to start testing. I have all 8 'MAIN OUTs' used by ESCs (for Octocopter)

                The Rx can receive 8 channels 5 used already so I will use your advice to try and get this working. 

                Still not clear as you say RCPassthrough connects respective input to respective output. So RC7 =CH7 on Tx. But then I see this for output pins from this page

                If BRD_PWM_CNT= 2 then
                50 = RC9
                51 = RC10
                52 = Aux 3
                53 = Aux 4
                54 = Aux 5
                55 = Aux 6

                So Pin 1 (50) is RC9. My Tx only goes up to Ch8. So still not getting the logic of all this. It seems (for a newbie) everything is numbered in different ways and it would be helpful if Pin X wasn't also known as Knob Y and so on. Then we have 2 sets of out put numbered 1-8 and 1-6 and then a series of RCvalues from 1-14. Sorry for moaning but it all seems to be disjointed in how it is assigned!

                Anyway I'll review once I have my test output plugged in. 

                • Update. Here's my guess on how 'RC9' is assigned to Ch6.

                  I make RC9 passthrough and use this gimbal page to set the channels.

                  Not sure if this is correct but it will be my first thing to try out.

                  3691175244?profile=original

                  • Did this setup work for you?  I've been struggling to get a PWM signal from CH8 to RC9.

This reply was deleted.

Activity