Operating a relay with the Pixhawk Aux pin

I've opened this topic to discuss the question Reuben asked on the 3.2 beta thread regarding the abiltiy to use the Pixhawk to control a 3 volt relay.


My feeling is that you can use the circuit that Marco proposed on the "Using AUX pins as relays for CHDK" thread with a few changes. The spec sheet for the relay that Reuben has lists a coil resistance of somewhere between 25 and 60 ohms depending upon the model of the relay, so the maximum current using a 3.3 volt supply would be 132ma. That is within the range of the 2N3906 in Marco's circuit. So a circuit that looks like the following should work for him. Any other suggestions?

3691151361?profile=original

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • A friend used the schematic to make a board for me that I use to trip my Sony NEX 6 from the Pixhawk Aux pin. It works great. So much better than using the IR trigger of the Sony which wasn't that reliable and had serious delays. If you don't want to build the board I think a PicoSwitch does much the same and it's cheap.  

    Here's the tutorial we used to add a wired shutter release to the Sony NEX 6 if interested.

  • Ok fixed it ..found a PMW switch with FETS and amalgamated the two .... 

    • Reuben

      You mentioned how you thought Henri's circuit (Attachments: Pixhawk relay driver-2.pdf, 14 KB) could be used as a simple switch.  I agree with you, many cameras just need to short two pins. 

      Could you share a way to do this simply with a mini 3v or 5v spdt relay?

      You mentioned that you felt "that this solution could also be used and a switch. To  ground two wires two each other.. just need to change the incoming feed from 5v to one end of the earth pin and the other pin to the out put of the transistor ..some cameras just need to short two pins to trigger..."

      Could you suggest a diagram to achieve this.  All I want to do is trigger the HACKHD camera switch pins. 

      Kind regards

      j.

  • Thanks guys for your help ..  Just to understand better seeing as its is easier to find an  existing  5v supply, as we have many on the copter (Rx supply , Pixhawk supply etc) what would need to change in the schematic  i.e the resistors value ?? It would be great to post a schematic for both versions  ..

    • If you are going to keep a 3 volt relay then you would need to add a resistor in series with the relay coil of about 1/2 the value of the coil resistance for both schematics.
  • With just one resistor see the drawing.. The second FET could be powered by other voltage than 3.3V

    I prefer FET than bipolar transistor for such application.. 

    Pixhawk relay driver.pdf

    https://storage.ning.com/topology/rest/1.0/file/get/3701832052?profile=original
    • Hi Henri  Thanks for the info ..just to clarify ..why is there two 3v feeds ?  I know we need a +3v signal from the aux pin .. and an accompanying ground pin which i guess would be common with the earth on the 3v coil ..and then either a 3v or 5v 1amp independent feed for the + side of the coil. for energizing it...

      Also why use a FET ..is it faster switching ?

      • That is a schematic convention, the two 3Volts points are actually connected together.

        If you have 5V available, then you can use the enclosed schematic as is. Advantages of FET are numerous

        The 2N7000 can drive 60 Volts few hundred mA and needs only micro amps to drive it. As it has very low Rds ON virtually no heat and very low loss of energy. Cost? Few cents!

        They are better ones but for your application I guess it will do nicely :-)

        Henri

        Pixhawk relay driver-2.pdf

        https://storage.ning.com/topology/rest/1.0/file/get/3702667455?profile=original
        • Thanks Henri !  But why two diodes on the 5v line and not one ?  I understand the diode on the coil is to help with quick voltage drop so the coil reacts quicker is this so ?

          Cheers Reuben

          • The two diodes on the 5 Volts line are to drop the voltage powering your relay.

            Each 1N4004 diode drops 0.7 volt. So 0.7 x 2 = 1.4 volt. 5 - 1.4 = 3.6 volts (roughly).

            The diode across the relay is there to avoid high voltage generation when you de energize the relay. A little bit like you car ignition coil. (as a "cartoon" explanation).

            BTW: You would be better with a  6 volts reed relay. You wouldn't need the 2 1N4004 in series with the 5 volts and reed relay are more reliable than the standard ones.

            Henri

This reply was deleted.

Activity

DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
yesterday
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Thursday
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23
More…