Servers by jDrones

Start/Stop Switch not working

(dksmall) #1

I have installed a slide switch as outlined in the online documentation. I’m using a Futaba connector with black to one side of the switch and white to the other side of the switch. Red wire is cut off. I have verified that the switch itself is working correctly with an ohm meter. The cable is plugged into A4 and just to make sure, this is next to A3 which is the throttle output?

Manual mode works as expected, but when I switch to auto mode, the rover drives off. Doesn’t matter if the start/stop switch is on or off, as long as the mode is auto, it takes off.

On the programming side I changed AUTO_TRIGGER_PIN to 4. The controller is a PixHawk.

What am I doing wrong here?

(Thomas J Coyle III) #2

I used a push on push off switch and not a slide switch.

(dksmall) #3

Well electrically they’re the same, so that won’t change my problem. And
the problem with a push on/push off switch is you don’t know it’s state
just by looking at it. I guess it’s just a matter of preference.


(Thomas J Coyle III) #4

It has been over two years since I used a Start/Stop switch and I know that there is more to programming the Pixhawk for using the Start/Stop switch than just programming the AUTO_TRIGGER_PIN.
Even if you are using an R/C transmitter with the Rover, you still have to set the INITIAL_MODE to Auto (10) from the Manual Mode and then switch it back after you are done using the Start/Stop switch.

(dksmall) #5

I tried switching to initial_mode = 10, it didn’t change anything. I’m developing for the Sparkfun AVC and they want a start switch on the rover. I guess I could use the kick option but I like the idea of a switch that can also stop the rover if needed.

(Thomas J Coyle III) #6

Yes, I used the Start/Stop switch for two Sparkfun Rover competitions and it worked well for me.
Since you have mentioned A4, I assume that you are using an APM2.x? If so, then A4 is one of the input/outputs that run along the side of the APM on the USB connector side and not at the end of the APM where the servo outputs are located.
If you are trying to use an APM2.x to compete in the Sparkfun AVC, I wish you luck. The last time I competed in the Sparkfun AVC I was using a Traxxas 4WD brushless Slash Chassis equipped with a Pixhawk and dual GPSs. I also was using the active braking function so I could run as fast as possible between the turns and then slow down at the turn so as not roll over. Since the APM2.x can only run DCM you will find a lot of overshoot in the turns where as the Pixhawk running EKF/EKF2 would make perfect turns without any overshoot.

(dksmall) #7

The PixHawk I’m using has the USB connector on the right side of the module and that’s the only connector on that side. The firmware is APM3.x, never heard of EKF/EKF2. Is that a firmware that I can use with a PixHawk and Mission Control?

(Thomas J Coyle III) #8

There is a parameter, AHRS_EKF_USE, that must be set to 1 enable EKF/EKF2.
First of all the A4 pin designator refers to only the APM2.x input/output pins and you apparently have a Pixhawk as you have said.
Therefore you will have to use one of the Pixhawk AUX pins 1 - 6 to the right of the Pixhawk servo output pins as shown in the “Pixhawk connector assignments” section. The programming of the Pixhawk Analog/Digital pins 1 - 6 can be found here in the “Pixhawk digital outputs and inputs (Virtual Pins 50-55)” section. So you will need to follow the instructions and select one of the AUX pins, make it an input and connect the slide switch to it.

(dksmall) #9

I had come to that same assumption, that I might need to use pin 50-55 on the PixHawk. Thanks for confirming, I will try it tonight. I will also need to research EKF/EKF2, that sounds interesting.


(Thomas J Coyle III) #10

Due to the Sparkfun AVC being held late in the year, the chances of cloud cover increase quite a bit compared to the spring so I would recommend a second GPS for your Pixhawk to help improve the instantaneous sat count and improve your HDOP.

(dksmall) #11

I don’t know if I can get that request through the wife approval cycle, this little trip is already getting costly. :frowning:

(dksmall) #12

Ok, changed the auto_trigger pin to 51 and moved my switch cable to aux2 and now it works as expected. Almost ready for my first autonomous run!