How to switch on / off DSLR cobra Flash using arduino

Hi,

Basically ,

My problem is how to switch on off a flash connected to a DSLR using arduino UNO

The flash is normally powered with 2 AA battery but I soldered a 3V 1A Power wall adapter and it works fine if directly connected to the power.

I can't figure out how to switch on/off the power.

The current draw during the flash reloading is Unknown , I don't have tool to measure it.

I tried using a TIP 120 but it doesn't work it properly.

I used the same wiring and code to Light LED and it works well

My questions is :

Is TIP120 appropriate to this use ? If not what components should I use instead ?

Thank you for your help !

Here is my wiring scheme for TIP 120 :

The test code is :

#define FLASHPin 6

void setup() {
  
pinMode(FLASHPin, OUTPUT); 

}

void loop() {
  
   // Switch ON
  analogWrite(FLASHPin, 255);
  delay(10000);
  
  // Switch OFF
  analogWrite(FLASHPin, 0);
  delay(10000);
  
}

This is a digital function so use digital output and commands.

Weedpharma

Thank you for your reply , I'm a beginner so my code should be ?:

#define FLASHPin 7

void setup() {
  
pinMode(FLASHPin, OUTPUT); 

}

void loop() {
  
   // Switch ON
  digitalWrite(FLASHPin, HIGH);
  delay(10000);
  
  // Switch OFF
  digitalWrite(FLASHPin, LOW);
  delay(10000);
  
}

You may also find the voltage drop across the Tr is too much. 3volt supply and possibly up to a volt lost in the Tr.

You may need to use a relay to remove the voltage drop. Or use a MOSFET.

What you need is a logic level gate mosfet. The gate needs to be fully on or the resistance of the drain/source is not at its least so causes heat. My favourite small mosfet is NTD5867NL. It works with 5v on the gate and handles a few amps with ease. They are cheap. I bought mine from RS Components. There are others but make sure they are fully on at 5v on the gate.

Weedpharma

My, my, people do come up with some remarkable questions here.

I think it would be rather illuminating to know why you feel the need to "switch off the power" to the flash. If your power supply is indeed connected to the battery terminals, then given that the "plug pack" is already connected to the mains, it will simply supply 3V power to the flash unit continuously - just as the batteries do. You do not after all "switch off" the batteries (though you should remove them if the given appliance is put into storage for an indeterminate period) - so why would you feel an imperative to disconnect the power pack other than manually?

It would be more of a concern that the power pack remains connected to the mains - Living in a country with 250V power mains (at least part of the time), it concerns me to have switch-mode supplies running with no load as I feel it puts them under stress (requiring them to operate at the absolute shortest pulse width). If your question was to switch off the mains supply to the power pack, I could see the point.

Thank for your response .

There is no battery inside the flash . The power supply is 220V AC / 3V 1A DC power wall adapter output and it’s directly soldered on the flash logic board.

The arduino is connected to a touchscreenPC

A User interface allow the user to switch on / off the flash by touching the screen . ( this part is working )

To switch on off the flash I need To switch on off the power .

.

Thank you for quick responding .

I'll order some and do test.

Is the wiring the same as TIP 120 ? Do I need to add 2.2kohm resistor Between arduino and base ?

Paul__B: My, my, people do come up with some remarkable questions here.

I think it would be rather illuminating to know why you feel the need to "switch off the power" to the flash. If your power supply is indeed connected to the battery terminals, then given that the "plug pack" is already connected to the mains, it will simply supply 3V power to the flash unit continuously - just as the batteries do. You do not after all "switch off" the batteries (though you should remove them if the given appliance is put into storage for an indeterminate period) - so why would you feel an imperative to disconnect the power pack other than manually?

It would be more of a concern that the power pack remains connected to the mains - Living in a country with 250V power mains (at least part of the time), it concerns me to have switch-mode supplies running with no load as I feel it puts them under stress (requiring them to operate at the absolute shortest pulse width). If your question was to switch off the mains supply to the power pack, I could see the point.

weedpharma: You may also find the voltage drop across the Tr is too much. 3volt supply and possibly up to a volt lost in the Tr.

You may need to use a relay to remove the voltage drop. Or use a MOSFET.

What you need is a logic level gate mosfet. The gate needs to be fully on or the resistance of the drain/source is not at its least so causes heat. My favourite small mosfet is NTD5867NL. It works with 5v on the gate and handles a few amps with ease. They are cheap. I bought mine from RS Components. There are others but make sure they are fully on at 5v on the gate.

Weedpharma

MOSFETs have been covered many times on the forum. Do a search in the box at top of page.

Weedpharma

Charles_80: There is no battery inside the flash . The power supply is 220V AC / 3V 1A DC power wall adapter output and it's directly soldered on the flash logic board.

But you said:

Charles_80: The flash is normally powered with 2 AA battery

Why do you need to switch the flash on or off if the mains supply is always powered?

If you want to control whether it flashes or not, would you not control the trigger source instead?

Paul__B: But you said: Why do you need to switch the flash on or off if the mains supply is always powered?

If you want to control whether it flashes or not, would you not control the trigger source instead?

What I want to do is turn on/off the main supply to turn on/off the flash.

DSLR API does not allow to trigger or not an external flash through PC command.

Just use a latching relay.

By the way, this is just an external flash. The "cobra" flash is the one on the DSLR - very different beast.

I've been working on this all day and I discovered that disconnecting the ground didn't have any effect on the flash power...It was still on even with the ground disconnected from the main supply... it seems that the ground goes trough the DSLR flash mount.

Then , I need a P channel logic level MOFSET ? Am I right ?

weedpharma: MOSFETs have been covered many times on the forum. Do a search in the box at top of page.

Weedpharma

If you use the MOSFET in the position you show the standard Tr, it is switching the gnd side of the supply and this is the normal usage with a N type MOSFET.

If you still have power without the gnd, you are not using the external power. It may be that you have simply charged the flash and it remains charged when you remove the gnd wire. Try removing the gnd and triggering the flash a few times to discharge it. Then reconnect the MOSFET and see if it can be powered up.

Weedpharma