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

Chris Anderson liked Zara Mae Pickering's profile
Monday
Azjeg liked Azjeg's profile
Apr 27
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
More…