I'm confused and a bit frustrated, would appreciate any help as I'm not sure how to proceed.

Setup: I have a pixhawk autopilot running Arduplane 2.77, using Mission Planner 1.2.95

I've been following this guide to get my CHDK enabled camera working with my pixhawk. I'm interested in getting the camera triggering based on distance traveled.

Obviously the guide was written with APM in mind, so it needs to be adapted a bit for pixhawk; specifically the setting for RELAY_PIN. I've kept the rest of the settings the same as in the tutorial.

Pixhawk has 6 AUX ports according to the quick start guide, I am assuming that the numbers above the pins correspond to the AUX port numbering. When you mouse over the RELAY_PIN parameter, it says that pin 54 corresponds to Pixhawk FMU AUX1.

Tried setting RELAY_PIN to 54, no joy. Did a bit more looking, discovered in the release notes for 2.77: 

"Improved relay code
The relay and servo set code has had a major overhaul, with up to 4 relays now supported for MAVLink control and much better support for the DO_SET_SERVO, DO_SET_RELAY, DO_REPEAT_SERVO and DO_REPEAT_RELAY MAVLink commands. Along with these changes is a new parameter BRD_PWM_COUNT which allows you to specify how many auxillary PWM outputs to enable, with the remaining outputs being available as digital relays. This allows you to re-assign some of the aux servo outputs on Pixhawk for use as relays, by setting the RELAY_PIN, RELAY_PIN2, RELAY_PIN3 and RELAY_PIN4 parameters. The pin numbers for these pins start at 50 for the first aux servo pin, and go to 55 on Pixhawk."

Additionally,I found this github issue about this same problem that states that the Pixhawk can't trigger CHDK because its relay pins operate at 3.3V instead of 5V.

So i suppose my specific questions are:

1) Is AUX1 pin 50 or 54?

2) Can anyone confirm that the relays, when working properly, won't be able to trigger CHDK?

Views: 68460

Reply to This

Replies to This Discussion

Hi..

I have built Marco's circuit, but it didn't work to trigger the Camera with Pixhawk

I measure Signal pin voltage after plugged in the circuit was 0.0 volts, then I push Trigger Camera Now from MP the voltage jump only to 2,.. volt. If the circuit didn't plugged in, signal pin have 3,..volt. Is that normal?

In MP, I have set :

  • CAM_DURATION: 1
  • CAM_TRIGG_DIST: 3 (indoor test)
  • CAM_TRIGG_TYPE: 1
  • RELAY_PIN: 54

If there's something wrong with CHDK setting ?

Thanks

Maybe I have solved it....in accidentally way :)

No need any circuit... just connecting red cable from USB to (+) pin and black cable to Signal pin in AUX port. I have tested it and  can trigger camera based on distance....

Can anyone explain why the 3v3 relay signal is working for opiq and no one else?

Previously I am following this method for APM :

http://droneyard.com/2013/10/01/ardupilot-camera-tie-in-tutorial/

I try for Pixhawk and it's work after trial and error with cable connection...

Follofwing the discussion from the first and doing the test myself using a voltmeter, when triggered the signal pin giving a 3.3v while the middle pin (+) giving ~5v when triggered.

I think you follow the method differently. Most of us (and of course the one on the link that you mention) connecting the Red usb cable to signal pin and black cable to the ground pin on the pixhawk, while from your photos, you are connecting the red usb cable (+5) to middle pin on pixhawk (+5). Although it different, it shed a bright light.

I have built marco's circuit and able to perfectly trigger my camera on pixhawk same as apm did. But using your approach will save a bit more space on my tiny quad as there's no circuit required. Will try this method tonight to see if it's working on me as well.

This is a very bad idea ..as you could blow the board ..or cause it to brown out and you will crash, The signal pin on the Pixhawk is only 3.3v signal line and must not take a high load, you must use this circuit i have provided ..

No, it's not a bad idea. The camera will only sense the presence of 5 V, it won't power any internal components with it.

My analysis of opiq's solution:

When the camera is not triggered it should receive +5V, because the signal is connected to the ground. When triggered the camera should receive 5-3.3=1.7V, which is a logical 0. So the signal is basically inverted, but I think that CHDK is only looking at the transition from logical 0 to 1 (1.7 V-->5 V). That happens when the trigger is released.

Hi Reuben, i tried today your solution with single transistor but it doesn't work (Canon Ixus 140).
With my circuit all work fine.
Are you sure about the value of the two resistor?

Hi Marco ..

Yes it works, I have been testing for over 50 shots last night .. the extra 220k resistor is just to help the voltage to drop quicker when 3.3v is released .. i found it working well on my SX30..I had a test meter on the pin 1 and pin 5 when plugged into the camera , without the resistor the voltage float around 0.5v and 0.8v ..I tested with high signal 3.3v volt .. and I have a good 5v sent to the camera. Then i tested with Low signal (ground) and have 0v to the camera .. the first circuit i did using a PNP Transistor did not work when connected to Pixhawk, as when i send ground to the gate of the transistor it would also send 5v to the camera, so when plugged into the pixhawk it would constantly fire the camera , That is why I now using NPN.  So now I feed 5v direct to pin 1 and switch the ground Pin 5.

I think some cameras have different internal design?

Regards R

Marco .. do you know how much current load we can put on the 3.3v signal Aux pin on the pixHawk ?

Aux pins max milliamp load?

Ok guys who knows this info ?

I have been trying to find out how much load (current in ma) the aux pins can handle .. I have been sourcing some micro relays that are very tiny and can be easy for people to make and will work with Apm and Pixhawk without the need for the transistors and resistors and I need the info .. I tried to look here ( http://planner.ardupilot.com/wiki/common-analog-and-digital-pins-fo... )  but no info on this page . perhaps it should be added for all boards?  

Pixhawks 3.3v Aux digital signal line max milliamps 

Apm 5v signal lines Max milliamps  

Looking at the STM32 F4 data sheet page 77 and not the schematics of the pixhawk it is either 25mA on 3.3v or 5 mA on 5 volt tolerant pins. The APM with the Atmel 2560 mega can handle 40mA per the data sheet page 367.

Regardless of which one you go with they can't handle very much current. I would look into using relay switches you can buy fairly inexpensive which work off the 3.3 pwm signal. You need to make sure there is 5 volts provided on the servo rail. I would provide this with a separate 5v power source such as a SBEC or UBEC.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service