SmaTrig 2.1

Servo switch for photography and microcontrollers

Click here for an intro on the usage of the servo for drop photography (EN) (DE)

servo switch

Inspired by the beautiful falling drop images that become popular in the net I also purchased a magnetic value to make some experiments. Having already the SmaTrig and the delay circuit the only missing element in the drop photography chain was a circuit converting the low current trigger signals into a high current power signal driving the magnetic valve. This component is usually referred to as a servo, just like in a car. Such a switch comes in handy whenever heavy lights, solenoids, valves, motors, heaters or big relays have to be controlled by photographic circuitry, a microcontroller or other logic level circuitry.

The presented servo circuit has two inputs. One is a pull-down input as used in photographic triggers. You can release the servo just by connecting the signal and ground wires. This is how all cameras and flash units are triggered.

The second option is a logic level input allowing a direct connection of a microcontroller. A voltage of about 2.5 V at the input is required to switch the servo. A microcontroller supplied with 3 V or more is thus compatible. More details how to connect what are given below.

If you look for switching heavy loads connected directly the mains, check out the Opto-isolated Power Switch project. The project here is mechanically much less complex since insulation is not an issue.

Connection to photographic equipment

The servo switch can be connected directly to all photographic trigger circuits presented on www.doc-diy.net. The controlling device should be of open-collector type meaning that the output transistor just pulls down the input wire of the servo to ground. In the simplest case a simple mechanical switch can be used. The input signal is at the tip of the jack plug, the ground is on the shaft. The voltage at the input wire equals the supply voltage. If you supply the circuit with 12 V, 12 V will be appear at the input.

The two 3.5 mm jack sockets are connected in parallel. If you connect two independent trigger devices you will have a logical OR-connection. This is practical if for example use two separate delay circuits to generate two sequential drops that are emitted by one magnetic valve. This is the typical drop-on-drop setup. To connect the SmaTrig or the delay circuit a standard 3.5 mm audio cable is needed. The length is not critical.

Connection to a microcontroller

The pull-down input is not directly compatible to microcontollers, because the voltage at the input might exceed the controller voltage. An additional input has been added therefore. To connect the logic circuit connect both grounds and the logic output to the + pin of the logic input. Apply a voltage between 2 V and 12 V to switch. No resistor is needed in the path.
The input is compatible to devices like the AVRs, Arduino boards, the Raspberry Pi or TTL circuits.


Circuit design

As often on this web site DIY-friendliness was an important aspect for the design meaning that low budget and good availability components and solutions are the first choice. The circuit was planned to work in the 12 V range and switch a couple of Amperes. For this task a MOSFET (N channel) in the common TO220 package is an obvious choice. To connect a MOSFET of this size to weak signals a little helper at the gate of the big transistor is needed. I picked a NPN small signal bipolar transistor.
Having the rough idea of the circuit I put it together in LTspice to check what resistor values are best for robust operation and how the timing of the circuit was. BTW, LTspice is a great free spice simulator from Linear. Learning it is definitively a good investment if you have to design circuits from time to time. In the screen shot below the basic functionality is shown.

ltspice screenshot

When designing with MOSFETs three things should be checked:

  • Does the MOSFET open completely in the on state? Is the gate voltage high enough to guarantee a low resistance allowing low dissipation?
  • Is the switching fast enough for your application? Has the gate driver enough power to allow a "sharp" opening and closing of the MOSFET? Too slow switching for a given frequency will result in dissipation
  • Is the gate current not exceeding the driver capabilities? The gate of the MOSFET acts like a capacitor and the charging current might become significant for bigger types

All this can be checked within minutes in LTspice, assumed the selected components come close to what you are going to use on your board. Sometimes the selection of an equivalent MOSFET from the library might require some investigation. Definitively criterion 1 should be fulfilled in our design to avoid dissipation and the need for a radiator.
For the MOSFET I picked the IRLZ34. It's a modern, logic level, low gate charge, low resistance type. It's specs "overkilled" my needs in terms of drain-to-source voltage and current by far giving the circuit a high potential for extending the operation conditions. Especially the low gate voltage of the logic types, indicated by the letter L in the name is practical if you want to lower the operating voltage from 12 V to 5 V for example.

If you can't source the IRLZ34, the IRLZ24 and IRLZ44 are also a good choice. There is also an insulated version of these types called IRLIZ24, IRLIZ34, IRLIZ44 respectively. It's electrically equivalent and also a very good choice. The lower number types have a higher on-resistance, but less gate charge for faster switching and easier driving. In everyday usage with loads like a magnetic valve you probably won't notice any difference. In general, dozens of types will fit if you stay with the 12 V supply. For lower voltages the minimum gate voltage should be checked.

power switch schematics

The image above shows the final schematic.
It has to be mentioned that the presented circuit has no galvanic separation. In simple words this means the trigger circuitry is connected to the battery and the load with a wire without insulation in between. If you don't connect any dangerous high voltage devices to the servo, you don't have to care about this fact at all.
As a means of protection a voltage protection diode (transil diode) can be used parallel to the supply or at the inputs.
BTW, adding an opto-isolation is not a big issue, but the problem of the IR-LED power supply has to be solved. If the servo is used just for pulses like for controlling a magnetic valve in drop photography, a lithium coin cell like the popular and cheap CR2032 will do the job.

Board and mechanics

servo switch pcb layout

In this type of projects, the electrical design is rather trivial and it is the mechanical implementation that eats up most of the time.
After building two prototypes on a perfboard I knew how the final board should look like. I eagled the board, first in a dimension of 60 x 45 mm, then in 50 x 50 mm to fit in a better price category at a PCB service I wanted to try out. The eagle files can be downloaded below.
In the picture below a perfboard implementation of the circuit is shown. The bottom traces are "x-rayed" to the top (thanks Norbert for the pic). The microcontroller input is missing in this version.

servo switch perfboard layout

Please note, the device shown in the title image above is based on an older version of the PCB without the logic level input.

Downloads

servoswitch.zip - Eagle files, LTspice schematic, bill of materials

General

Please note, building and operation of the presented circuit is at your own risk!

Feel free to feed back any ideas for further improvement or simplifications.

I have some spare PCB from my prototype order. Contact me if interested under

contact

Σχόλια (0)

Όνομα
E-mail (Δεν εμφανίζεται online)
Ιστοσελίδα
Τίτλος
Σχόλιο
To prevent automated Bots form spamming, please enter the text you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
»
This comment form is powered by GentleSource Comment Script. It can be included in PHP or HTML files and allows visitors to leave comments on the website.

Disposable Email   Temporary Email   Temporary Email