vince31
Posts: 26
Joined: Thu May 23, 2013 10:26 pm
Location: Swindon or Blackpool, depends on day of the week!

Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 8:57 pm

I want to use the Raspberry Pi B+ to short two contacts (via the GPIO). I have a flash gun for the PiCamera and I want to trigger it to flash when the photo is taken. To make the flash gun trigger all I need to do is short the 2 flash gun contacts. But how can I make the GPIO do this?

User avatar
joan
Posts: 14843
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 9:10 pm

What voltage is going to be across these contacts? Some flashes expose several hundred volts which is not Pi (or human) safe.

P_Monty
Posts: 57
Joined: Sat Dec 27, 2014 2:45 pm
Location: Wiltshire, UK

Re: Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 10:22 pm

What about an opto-isolator? One side driven by the goig line, with the flashgun across the other side...

User avatar
DougieLawson
Posts: 38452
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 10:47 pm

P_Monty wrote:What about an opto-isolator? One side driven by the goig line, with the flashgun across the other side...
The flash voltage is very likely to blow the opto-isolator off the face of the planet on the first shot.

A mechanical relay is probably the only way to switch that thing.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

vince31
Posts: 26
Joined: Thu May 23, 2013 10:26 pm
Location: Swindon or Blackpool, depends on day of the week!

Re: Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 10:59 pm

Im not trying to control the flash voltage which is obviously hundreds of volts, I just want to short circuit the trigger circuit in the standard flash gun which runs off 2x AA batteries (3v).

User avatar
joan
Posts: 14843
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 11:02 pm

vince31 wrote:Im not trying to control the flash voltage which is obviously hundreds of volts, I just want to short circuit the trigger circuit in the standard flash gun which runs off 2x AA batteries (3v).
Measure the voltage.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Use GPIO to short circuit 2 contacts?

Tue Jan 20, 2015 11:50 pm

You probably want a mechanical relay, preattached to a relay board. You can get cheap ones that will handle up to 220 volts for a couple of dollars, but as others have said, measure the voltage. Don't assume that the 3v supplied is being passed directly to the flash bulb.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 2:08 am

None of the GPIOs function as a contact closure. You have to use an external device if that is what you want. A simple NPN transistor or FET like a 2N7000 comes to mind.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 3:10 am

Good luck measuring the transient voltage without a time-resolved, scope-like tool. I'd be interested to see that curve if you do measure it.

As others have said, mechanical relay. No muss, no fuss. I would guess that it's a single discharge independent of any momentary switching closure length, but who knows. Just a cap methinks.

C
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

vince31
Posts: 26
Joined: Thu May 23, 2013 10:26 pm
Location: Swindon or Blackpool, depends on day of the week!

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 7:39 am

Thanks guys and gals, just read on another post that a Xenon flash gun is useless for the Pi camera anyway because of the rolling shutter principle used by the camera and only some of the lines of the frame will capture the 1ms flash. So think I will just use a bright white LED strip and switch it ON the OFF as required from the GPIO (via relay).
Last edited by vince31 on Wed Jan 21, 2015 9:07 am, edited 1 time in total.

User avatar
DougieLawson
Posts: 38452
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 9:04 am

vince31 wrote:I'll try to measure the voltage tonight with my multimeter if I can...
Best of luck trying to spot an event that lasts 1/60th of a second with a meter. Hint: you won't be able to measure it that way.

An SSR probably won't work because they use zero crossing.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

vince31
Posts: 26
Joined: Thu May 23, 2013 10:26 pm
Location: Swindon or Blackpool, depends on day of the week!

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 9:09 am

Thanks Dougie, seems like a Xenon flash is useless anyway with the Pi Camera. see post above.

gordon77
Posts: 4905
Joined: Sun Aug 05, 2012 3:12 pm

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 9:50 am

DougieLawson wrote:
vince31 wrote:I'll try to measure the voltage tonight with my multimeter if I can...
Best of luck trying to spot an event that lasts 1/60th of a second with a meter. Hint: you won't be able to measure it that way.

An SSR probably won't work because they use zero crossing.
Not all SSR are AC switching

http://cpc.farnell.com/finder/34-81-7-0 ... 5-00001003

Mark_T
Posts: 149
Joined: Sat Dec 27, 2014 10:54 am

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 10:13 am

For high voltage isolated switching I would suggest an opto-triac would be a
possibility - high voltage and works either polarity...

User avatar
Burngate
Posts: 6253
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 11:57 am

joan wrote:Measure the voltage.
iinnovations wrote:Good luck measuring the transient voltage without a time-resolved, scope-like tool. I'd be interested to see that curve if you do measure it ... I would guess that it's a single discharge independent of any momentary switching closure length, but who knows. Just a cap methinks.
DougieLawson wrote:Best of luck trying to spot an event that lasts 1/60th of a second with a meter.
I've read this thread several times, but still haven't worked out what people mean ...

Before the switch closure there are some volts across the switch.
I'd have thought it wasn't many, as sticking a high voltage on contacts that can be touched could be a bad idea, but who knows?
Whatever, that voltage just sits there, so measuring it with a meter is straight forward, isn't it? No nasty short-term pulses or the like?
So measure the voltage, and you know what your switch has to withstand, be-it a relay, opto-coupler, transistor, whatever ...

When the switch closes, there's no voltage to measure. It's zero.
Maybe current in a short pulse, and a meter is going to be useless for measuring that. But then your very expensive 500MHz Tektronix 'scope is also going to useless without an expensive current probe

But surely, the designer of the gun isn't going to rely on someone else's weedy switch to carry anything high-speed or high-current - there'll be some electronics as an interface. So all you need to do is interface with that.
Even a BC108 should work.

Not that a Xenon flash is any use for the Pi's camera, but for anything else ...

User avatar
joan
Posts: 14843
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 12:32 pm

Perhaps a photo of the contacts the OP plans to short would help? If it the camera flash contacts that may be several thousand volts - rather more than the several hundred volts of the flash capacitor.

vince31
Posts: 26
Joined: Thu May 23, 2013 10:26 pm
Location: Swindon or Blackpool, depends on day of the week!

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 1:33 pm

flash.jpg
flash.jpg (22.52 KiB) Viewed 2985 times
Its a simple standard camera flash gun as shown in the photo with a hot shoe attachment. I just needed a way to short the hot shoe contacts on the bottom to make it flash when commanded via the GPIO. But apparently a Xenon flash is no good for the PiCamera anyway, so I'll have to make up my own flash using an LED strip and just switch it on before the photo and then off afterwards.
I'm making a simple Photo Booth for my daughters wedding and it will get dark into the evening, thats whats behind the original request/idea. Done all the software and camera working fine, just need to make sure there is enough light thats all.

User avatar
DougieLawson
Posts: 38452
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 1:45 pm

How about http://www.amazon.co.uk/Neewer-Channels ... B008MTN9MM and triggering that from the RPI (by some hardware hacking of the sender unit). That way they've done the hard part of handling whatever voltage and current runs through the hot shoe and they've handled the timing.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

vince31
Posts: 26
Joined: Thu May 23, 2013 10:26 pm
Location: Swindon or Blackpool, depends on day of the week!

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 1:53 pm

DougieLawson wrote:How about http://www.amazon.co.uk/Neewer-Channels ... B008MTN9MM and triggering that from the RPI (by some hardware hacking of the sender unit). That way they've done the hard part of handling whatever voltage and current runs through the hot shoe and they've handled the timing.
That looks like a good idea, like you say its a matter of hacking the Tx module to make it trigger so still the same basic problem but safer voltage guaranteed. Main problem is the fact its a Xenon flash unit I was trying to trigger and thats no good for the Pi Camera. Thanks for helping out.

Mark_T
Posts: 149
Joined: Sat Dec 27, 2014 10:54 am

Re: Use GPIO to short circuit 2 contacts?

Wed Jan 21, 2015 5:23 pm

Burngate wrote: But surely, the designer of the gun isn't going to rely on someone else's weedy switch to carry anything high-speed or high-current - there'll be some electronics as an interface.
Older flashguns have 250V or so discharging through the switch to fire a 4kV step-up transformer
which is attached to the trigger electrode of the tube. Yes its high voltage, yes its high speed, the current
isn't too large, but any mechanical switch will turn _on_ fast with 250V across the contacts, because they
arc and a spark gap is the first and still one of the best high-speed switching technologies there is.

That's why I'd recommend an opto triac which can handle 100's of volts of either polarity without
frying.

Return to “Automation, sensing and robotics”