Cannot control servo in PixRacer via RC channel [SOLVED]

Hello,

I am using a PixRacer on my S500 quadcopter running ArduCopter 3.4.6. The 5th pin of the PixRacer is connected via a signal line (signal & GND) to a Firefly Q6 camera. What I am trying to do is use channel 9 - which is assigned to a three-way switch on my FlySky TX - to control the camera via a PWM signal as stated in the wiki. The FlySky is configured to operate on SBUS, so I have 10 channels fully working and recognized on Mission Planner.

I can trigger the camera (switch between taking a picture and starting/stoping video recording) via Mission Planner’s servo tab using the first servo (numbered 5) but I cannot do the same using the three-way switch on my TX (which is on channel 9).

I have set the following on my ArduCopter set-up:
BRD_PWM_COUNT=6
RC9_FUNCTION=1 (to pass the RC signal to AUX1 which - if I understand correctly - is pin 5 on PixRacer).

Any help or tip in making this work is greatly appreciated.

I think the PWM count needs to be 4 for Quad Copter. The last two pins are Relay/PWM output.

Mike

@Frontier Hi Manos,

Pin 5 is RC5. If you want to pass-through input channel 9 to output channel 5, set RC5_FUNCTION to 59.

@iseries If you set PWM count to 4, it will only output PWM in the first 4 channels :slight_smile:

On a Pixracer there are only 4 aux out pins so should it not be set to 4 IE the number of pins to reserve for pwm.

Also in 3.5 there is no RC5_FUNCTION so how do you do it?

Mike

Like this:
BRD_PWM_COUNT=6 (default)
SERVO5_FUNCTION=59

Many thanks to everyone that provided feedback.

@OXINARF: Francisco, I had a feeling that RC9 was incorrect but as the wiki does not have any information about PixRacer, I did not want to mess this up. So, basically, the PixRacer (as it does not have AUX ports) starts with RC1 (1st pin) and goes up to RC6. After setting RC5_FUNCTION=59 everything works just fine.

@iseries: After setting BRD_PWM_COUNT=4 I could not trigger the camera from Mission Planner anymore. You make a valid point for AC 3.5 but I have not tried it yet.

@dkemxr: I assume you are talking about AC 3.5, right?

@iseries It’s a little hard to explain without going into details, but all ports in Pixracer are Aux ports, they would correspond to same six Aux ports in a Pixhawk. And you want to set BRD_PWM_COUNT to the number of PWM outputs you want. If you set it to 4, then the two last pins won’t do PWM output.

@Frontier Yes, it starts with RC1. And yes, @dkemxr is talking about 3.5, where we (finally!) separated the input from the output.

Now I remember, I asked Randy this when it first came out because I have a relay set to turn lights on and off on pin 6. Wanted to know if it would support relay pins since it only had 6 pins and not Aux out pins.

Mike

Ok, It seems if you have the relay_pin set to that port PWM does not work. Set RELAY_PIN = -1

I tried with RC input set to 9 which output two pwm values and that worked and I used the POT on RC channel 6 and that also worked.

This is using 3.5.0 RC6 beta code though.

Mike