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: 68176

Reply to This

Replies to This Discussion

Will this design work if I place the transistor on the incoming voltage to the camera rather than the outgoing?

The circuit that uses two transistors ( BC547 &  BC557 ) is needed when the camera ground (0V) must be at the same potential as the pixhawk.  Apparently Sony cameras need this while Canon Powershots do not.  So the Powershots can use a "floating ground" approach and thus a simpler one transistor circuit.

I don't believe that will work as your have drawn it.   All of the circuits published so far depend on you driving the transistor into saturation ( Collector to Emitter voltage drop approaching 0v) by driving enough current into the base.  That won't happen with your circuit so the highest voltage the USB + signal will likely see is 3.3/2 = 1.65V.

I could be wrong, allthough I'm quite sure that I'm not.  Build it and see?

Why do you want to not use the original circuit ?

 Reply by Sandy Sound 9 hours ago

And is it possible to add an LED to show it is receiving/passing signal!

If you want to add an LED, change R2 to 1K ohms and put the LED in series with it.  Connect the camera across the combined R2 & LED circuit.

Just tinkering, it didn't work for the record!

I could see 5v coming into the circuit, but when I multimeter across the usb plug it has a constant 0.26v and when I use "trigger camera now" command it would jump to 0.40-50v but the camera would not take a photo.

I'll build the original and see how that goes.

:)

That's pretty much what I would have expected to see based on basic transistor theory.

So, I have the circuit built, and without the camera connected the LED glows dimly, and I measure 0.32V at the usb connection. When I use the "trigger camera now" function the voltage jumps to 0.50V and the LED glows brighter. Should I be seeing 5v at the usb connection? or do I need the camera connected first?

You should see almost 5V at the USB connection. You don't need to connect the camera.   Please draw and post another diagram - this time of the exact circuit you constructed?

Also,  try the original circuit (without substitutine the LED and 1K resistor). Looking at it now, you probably need to increase the current into the transistor base in order to get enough drive through the LED as you will be trying to pull a lot more current there than before.   If the circuit works without the LED's we can play with the value of R1 a bit next.

Here is the circuit - It is the same as the link you sent me. I don't seem to be getting enough signal through. I have a 220K resistor on the 3.3v signal line from pixhawk (white cable) going to the transistor base (middle pin), and a 1000K resistor in series with the led across the + and - of the usb cable...On the left red is 5v, black is earth and white is signal - on the right red is + and black -.

Drawing:Typo in the drawing - I labelled it 1000K but it is actually 1K.

Did you try the original resistor values without the LED ?

If you want to use the LED,  drop the value of R1 to something between 6K and 10K.  That will get you a lot more current through the LED & R2 and a bigger voltage drop.

Thorsten - I built the cable using the circuit board from OSHPark..soldered-up and connected to my Iris.

Camera is a Elph 330HS with CHDK loaded...the script i'm running works if I plug a USB into a charger....it fires right off.
I connected to AUX 5 and configured in MP per the forums etc.  I connected +5 and ground from the receiver channel 4 connector into position 8 on the "main out" area of the px4.

Set Aux 5 to trigger via relay, set pin 54 as relay pin.

Commanded a camera trigger from MP...nothing....

Tthhe receiver 5v output provide enough amperage? I checked on my voltmeter...there is indeed 5v there.

I get readings of 0.28 doing nothing and 0.45 when triggered. Perhaps it is a setting in the pixhawk I need to change? I have changed the trig type to relay (1) and channel 7 is set to camera trigger and the camera shutter is set to RC10 (Aux2). The relay pin is set to 51. I have also tried changing the camera shutter to transistor to no avail but I am not getting 3.3V output on the signal line from pixhawk...

EDIT: Ok so that was my issue - channel 10 needs to be set to camera trigger not channel 7 in my case... I see 5v now :-)

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service