# Camera focus and shutter automation with Arduino and high side Mosfet switch

I presently run an 8 camera system as follows:

Camera power supply

Power is provided, for all camera, by an ebay purchased 20A/5V psu. The psu voltage can be varied by +/- 10% (4.5V - 5.5V), I have it turned down to 4.5V.

DC V+ of this psu is connected to a blade fuse distribution board consisting 8 number 2A fuses. A power diode is then connected to each terminal of the blades before connection to the positive supply terminal at the camera (V_Batt+).

Voltage across each camera (V_BATT+/V_BATT-) is therefore approximately 3.8V (they would normally each operate with 2 AA batteries but I have had no issue at this higher voltage).

Camera Focus/Shutter release mechanism

Using a spare 20A/5V psu (which is turned up to 5.5V), camera autofocus is achieved on all cameras by applying 5.5V to pin 1 terminal of their mini female usb port (USB_P1).

I presently do this by way of a mechanical switch (SPST) connected to DC V+ of this spare psu. The output of the switch then fans out and is individually connected to each camera USB_P1.

When the switch is closed a small current flows into USB_P1 and exits at V_BATT-.

DC V- of both psu's (camera power and switch) are shorted with thick wire.

With the switch closed and 5.5V now applied between USB pin 1 and V BATT-, current flowing into USB pin 1 is measured (via DMM) as 0.42mA for each camera (3.36 mA total)

I have therefore modelled this high resistance switch path for each cameras as a
R = 5.5 / 0.42^10-3 = 13.1 KΩ resistor

With 8 cameras the equivalent parallel resistance is modelled as a 1.6375 KΩ resistor

Subsequently, opening the SPST switch causes the shutter mechanism to operate and exposure occurs.

Requirement (if possible)

I'd like to automate this switching action.

I believe the situation described requires High side switching. I imagine a logic level P channel MOSFET, operating in linear "triode" region, connected to Arduino digital i/o (with suitable current limiting resistor) to replace the mechanical switch.

has an RDS(ON) stated as typical 1.3Ω and maximum 1.5Ω (VGS = -5 V, ID = -300 mA).

Assuming, for now only, that I can operate the Arduino from this same 5.5 V supply already described, there is no IDS/VDS characteristic shown for VGS = -5.5V.

Question 1:
Is it safe to assume that this MOSFET will operate with VGS = -5.5V and that the RDS(ON) at that level will be better (i.e. lower) than 1.5 Ω ?

Now, if I do understand that correctly, assuming no worse than 1.5Ω operation and 8 camera switching

total series resistance is (1637.5 + 1.5) = 1639 Ω
I(tot) = 5.5/1639 = 3.356 mA
VGS = 3.356 mA x 1.5 = 5.034 mV
V USB_P1/V_BATT- is 5.5 V - 5.034 mV = 5.4949 V

Question 2:
Are my calculations a correct interpretation of the intersection of the load line with the IDS/VDS characteristic?

Now, with only a single camera turned on the same calculations are:
total series resistance is (13100 + 1.5) = 13101.5 Ω
I(tot) = 5.5/13101.5 = 0.42 mA
VGS = 0.42 mA x 1.5 = 0.63 mV
V USB_P1/V_BATT- is 5.5 V - 0.63 mV = 5.499 V

Question 3:
Is that also a correct interpretation of the intersection of the load line with the IDS/VDS characteristic?
I think anything higher than 5.4 V across V USB_P1/V_BATT will operate the camera focus and shutter action correctly.

However, the following is stated in the Characteristics for

VGS Gate threshold voltage
Min = -0.5 V, Typ = -0.7 V, Max = -1.0 V Conditions VGS = VDS, ID = -1.0mA

and for
Zero gate voltage drain current
Max = -1 mA Conditions VDS = 0.8 MAX RATING, VGS = 0V, TA = 125C

Question 4:
Do these two parameters mean the switch won't work as I expect for the case when only 1 camera is powered up and requires switching?

If so, is there another MOSFET better suited to my application?

Any comment appreciated.

I suggest that you get assistance by somebody a bit more familiar with electronics.

Electronic circuits often react strangely on signal voltages outside their operating voltage, and 8 broken cameras will be more expensive than qualified assistance.

Q1+2: your calculation is almost correct, but why do you bother with values below 1% of the total resistance?
The 13101.5 Ohm value most probably is 12k +-1k, more than 2 significant digits are very rare in practice.

Why do you think that you cannot use Arduino output pins to directly trigger the shutters?

DrDiettrich:
Q1+2: your calculation is almost correct, but why do you bother with values below 1% of the total resistance?
The 13101.5 Ohm value most probably is 12k +-1k, more than 2 significant digits are very rare in practice.

Thanks for your comment. I realised the load was very large, in both 1 or 8 camera cases, compared to the RDS(ON) and that the voltage drop across the MOSFET was relatively insignificant. I provided the calculations to that level of detail only in order to gain feedback to support that my understanding was correct.

DrDiettrich:
Why do you think that you cannot use Arduino output pins to directly trigger the shutters?

I do think an i/o pin will do that directly. The challenge with that is as follows.

I wish to expand the system from 8 cameras to 12 groups of 8 cameras (96 cameras in total). A series of 74HC595 shift registers (I think they can supply 15 mA / pin) could probably overcome that issue. However, each group of 8 cameras will be placed, in a circle, approximately 1 metre distance from the Arduino placed centrally in that circle. Feeding 96 wires from the shift registers to each camera will be messy.

I'd much prefer the Drain of the single P channel MOSFET, situated close to the centrally located Arduino, split in star fashion, and radiate in 12 cables to each group of 8 cameras over the 1 metre distance before each of these 12 cables split in 8 again much closer to each group of 8 cameras.

In summary, a single MOSFETsolution (if possible) would (i) require less hardware (ii) less Arduino programming (iii) much simpler cable wiring.

Any further comment would be, similarly, appreciated.

DrDiettrich:
Why do you think that you cannot use Arduino output pins to directly trigger the shutters?

Having thought a bit more, I guess I should consider simply triggering each group of 8 cameras directly from 12 Arduino pins. I guess i'd then need a mega 2560 ... is it possible to use PORT manipulation one of those to control 12 pins all at the same time? (I have zero Arduino experience).

In this case no need be concerned with time to charge MOSFET gate capacitance.

First of all, do you need to trigger all cameras differently? If not, simple amplifiers or inverters (7404...) for a common trigger signal can do the job, if ever required.

If you have groups of 8 cameras, that number fits exactly one shift register. Place the registers near their 8 cameras, and control each such cluster from Arduino in a star topology. All registers can be controlled by common clock and data lines, with only one separate select/enable signal for each register (SPI interface).

DrDiettrich:
First of all, do you need to trigger all cameras differently?

The general case is that they do need to be triggered all at the same time. Delays for each camera could also be useful on occasion but that can be controlled, per camera, in the camera software.

DrDiettrich:
If not, simple amplifiers or inverters (7404...) for a common trigger signal can do the job, if ever required.

I'm very glad you mentioned that, I had no idea. You mean simply connect that to a single i/o pin and split the output to any number of cameras in any way I see fit? do you know how much current that amp can supply?

DrDiettrich:
If you have groups of 8 cameras, that number fits exactly one shift register. Place the registers near their 8 cameras, and control each such cluster from Arduino in a star topology. All registers can be controlled by common clock and data lines, with only one separate select/enable signal for each register (SPI interface).

Very interesting, I think I could imagine another use case related to this.

I have heard of SPI but had no idea how it works. I will read this a bit later Arduino - SPI. If I have a query about that and post on this thread are you likely to see my comment?

Thanks for all your very useful suggestions. If you had not mentioned driving directly from an arduino pin i'd still be somewhere down the MOSFET rabbit hole!

Right, you can use simple logic gates, or stronger buffer gates, to distribute a signal to multiple receivers. A demultiplexer can be used to route a signal to 1 of 8 or 16 receivers.

An Arduino contains SPI hardware for shifting 8 bits into and out of external shift registers.

DrDiettrich:
Right

Much appreciated.

I'd plan to connect both Arduino & 7404 to DC V+ / V- of the 20A/5V of something like this Regulated Switching Power Supply 3.3V 5V 9V 12V 18V 24V 36V 48V Universal PSU DC | eBay

The one I have has the facility to increase/decrease the voltage by 10%. I have found reliable triggering (using the mechanical switch) to occur only when that voltage is 5.4 V or greater.

Is that psu / level likely to damage the Arduino / NOT Gate and any other logic level stuff that could be required (for example - I also plan to attach an RF receiver to the Arduino so I can operate the switch via an rf t/x dongle).

See my 0.02\$ on voltages above.

If the operating voltages are not too different, i.e. a logic level of the lower voltage is accepted by the following (higher voltage) stage, such stages can be connected directly. Perhaps your shutter input is designed for higher voltage, 12-24V, so that you have to apply a higher voltage to that driver stage. If 5.4V is sufficient, go with that operating voltage or a bit higher (7V).

DrDiettrich:
See my 0.02\$ on voltages above.

Ah, I realise I didn't really know what you meant when you first said "Electronic circuits often react strangely on signal voltages outside their operating voltage"

DrDiettrich:
See my 0.02\$ on voltages above.

If the operating voltages are not too different, i.e. a logic level of the lower voltage is accepted by the following (higher voltage) stage, such stages can be connected directly. Perhaps your shutter input is designed for higher voltage, 12-24V, so that you have to apply a higher voltage to that driver stage. If 5.4V is sufficient, go with that operating voltage or a bit higher (7V).

So, I think I now know what you mean... the cameras would normally operate at 2 x AA = 3 V. I "artificially" derive a supply voltage of 3.8 V but the cameras "somehow" work at that value. Similarly, I apply a 5.5 V between USB_P1 terminal / V_BATT and measure that 0.42 mA is being consumed by the camera in those circumstances and "magically" model this "path" as a 13.1 KΩ resistor when, in fact, I have absolutely no idea what the internal circuitry / voltages of that path are instead knowing only that a paricular register bit in the camera changes state due to the switching action applied.

In other words, I may well be interfacing a 5.4 V to a circuit actually designed to work at very different voltage levels (e.g. 12 V, as you say) and by doing so the possibility of damage to the cameras and/ or the arduino / logic level circuitry exists?

If that is a fair description, can you imagine any circuitry (for precaution) I could apply at the NOT Gate / USB_P1 terminal interface?

You should try to get a data sheet of your camera, else you risk to damage all your cameras.

DrDiettrich:
You should try to get a data sheet of your camera, else you risk to damage all your cameras.

Understood - but nearly certain Canon don't provide details to the level required. The system has been rock steady with the manual setup described for many months.

If progress is to occur it must be "on a wing and a prayer", unfortunately.

Anyway, thanks again - you've clarified a lot.