USB triggering with multiple cameras and PTP - Hotwire! Hardware Mods, Accessories and Insights - CHDK Forum

USB triggering with multiple cameras and PTP

  • 7 Replies
  • 8452 Views
USB triggering with multiple cameras and PTP
« on: 29 / January / 2015, 15:49:20 »
Advertisements
If any interest is shown in the following perhaps it could be split to a separate theread?
Edit: it has been (split) ;), see reply #1 below

This seems like as good a place as any to say - I still can't figure a scheme, for multiple cameras, to transistion the 5v USB line in the last leg of a powered usb hub network to take advantage of concurrent usb-remote triggering / ptp comms.

While there are some references to that e.g:
http://chdk.setepontos.com/index.php?topic=11583.msg113516#msg113516
http://chdk.setepontos.com/index.php?topic=11583.msg113517#msg113517

and example of a relay approach working http://chdk.setepontos.com/index.php?topic=11583.msg114361#msg114361

most detail is lacking.

In attempt to make progress, I posted this on the Camera-Axe forum http://www.dreamingrobots.com/forums/viewtopic.php?f=8&t=2280#p11443 - I made no ref to optoisolation there. 

There's some pretty smart guys on that site and a few have looked - but no response yet, so a possibility is that this may not be particularly straightforward. Among other alternatives are that I am making it sound more complicated than it needs to be.

In any case, some helpful comment here would be appreciated.
« Last Edit: 29 / January / 2015, 19:01:43 by andrew.stephens.754365 »

*

Offline reyalp

  • ******
  • 14126
Re: USB triggering with multiple cameras and PTP
« Reply #1 on: 29 / January / 2015, 16:35:32 »
I split this since I can't see how it's related to Peter Machtschuß's post.

On http://www.dreamingrobots.com/forums/viewtopic.php?f=8&t=2280#p11443 you wrote
Quote
(normally from 5V to 0V [but in my case 0v-> 5v since a problem with the chdk synch hook in file "capt_seq.c" for my camera type necessitates that!]) can be thought of as equivalent to a full-press of the shutter release button for this description only.
This doesn't make any sense to me, if CHDK can detect 0->5 it can detect 5->0. But without knowing what camera or a link to where this "problem" was diagnosed... ¯\_(ツ)_/¯
Don't forget what the H stands for.

Re: USB triggering with multiple cameras and PTP
« Reply #2 on: 29 / January / 2015, 17:14:14 »
On http://www.dreamingrobots.com/forums/viewtopic.php?f=8&t=2280#p11443 you wrote
Quote
(normally from 5V to 0V [but in my case 0v-> 5v since a problem with the chdk synch hook in file "capt_seq.c" for my camera type necessitates that!]) can be thought of as equivalent to a full-press of the shutter release button for this description only.
This doesn't make any sense to me, if CHDK can detect 0->5 it can detect 5->0. But without knowing what camera or a link to where this "problem" was diagnosed... ¯\_(ツ)_/¯

It is related to this post http://chdk.setepontos.com/index.php?topic=8810.msg118917#msg118917

Which, thanks waterwingz, describes that with the synch hook missing (onepush/synch enabled) the shooting process is initiated by the 5V line transistion from 0v to 5V and doesn't stop.

So, prior to that, on my SX150IS (with no overrides), I can:

  • half-press to autofocus [post_levent_to_ui('PressSwOne')]
  • enter manual focus [post_levent_for_npt("PressSw1AndMF"]
  • turn all the ambient lights off and THEN
  • transistion usb 5v line from 0v to 5v -> wait a few 10's of ms, and no waiting for synch hook before firing the studio flash
  • ...etc

All of which has no significance unless I can design the scheme to simultaneously transistion the 5v line of each cam from 0v -> 5v.

[PS: my camera-axe post did try to qualify the SX150IS anomaly by saying:
"can be thought of as equivalent to a full-press of the shutter release button for this description only"]
« Last Edit: 29 / January / 2015, 20:08:30 by andrew.stephens.754365 »

Re: USB triggering with multiple cameras and PTP
« Reply #3 on: 29 / January / 2015, 21:17:53 »
All of which has no significance unless I can design the scheme to simultaneously transistion the 5v line of each cam from 0v -> 5v.
Are you making this too hard?

The 5V USB input pin on almost all P&S cameras draws almost no current.  It's really just a high impedance 5V sense input  (except the rare few that can charge over USB).

Why not just cut the 5V conductor (only) in each USB cable going from a hub to a camera and then connect all the 5v wires at the camera end in parallel?  Then simply switch that common +5V wire with a single switch, relay, MOSFET, or whatever from any one of the USB hub 5V wires that are now all sitting open.

The USB D+ , D- and 0V wires stay connected so you still get PTP connectivity.

I would strongly recommend a good heavy DC ground wire between each of the hubs - 14 gage or larger - just to keep the 5 volt level common for all hubs.   You might even want a small resistor ( 220 ohms ) at the end of the 5V common wired - connected to ground at that end - to "terminate" your signal line.

Seems like it should work fine?
« Last Edit: 29 / January / 2015, 21:23:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: USB triggering with multiple cameras and PTP
« Reply #4 on: 29 / January / 2015, 21:25:38 »
Which, thanks waterwingz, describes that with the synch hook missing (onepush/synch enabled) the shooting process is initiated by the 5V line transistion from 0v to 5V and doesn't stop.

So, prior to that, on my SX150IS (with no overrides), I can:
So the actual bug is that the remote hook is not (correctly) implemented on sx150. That it means the whole synced remote feature is totally broken, not that a particular transition can't be detected.

This should be fixable.

Edit: Further discussion of this bug should go in the porting thread: http://chdk.setepontos.com/index.php?topic=6953.msg120287#msg120287

Quote
All of which has no significance unless I can design the scheme to simultaneously transistion the 5v line of each cam from 0v -> 5v.
On the flip side, you don't have to worry about any of this if the remote hook doesn't work.  You may as well just use multicam (but not the shoot_hook_sync, because that depends on the remote hook too)
« Last Edit: 29 / January / 2015, 22:59:29 by reyalp »
Don't forget what the H stands for.

Re: USB triggering with multiple cameras and PTP
« Reply #5 on: 30 / January / 2015, 19:33:34 »
Are you making this too hard?

I hope so. My daughter just said it's something to do with my "telomeres" shortening and DNA unravelling. I only vaguely know what that means but she's a smart lady and is probably correct :)

...Seems like it should work fine?

Thanks for your comments - that's the next test.

Maybe the following experiment confused me - I hope the attached pictures tell the story since it's bedtime here...(the other unimportant items in the first hub are a wireless mouse dongle and SD card reader).

Attached file "single-layer-hub.jpg":

Cam connected to 7 port hub (with "per-port" switches) which has external 5v jack connected. This hub is connected to Win7 machine.

Results:

  • ptp comms is maintained between chdkptp and camera with "per-port" usb switch ON or OFF
  • when the "per-port" switch transistions from OFF to ON then chdk usb-remote (menu selection onepush/synch &capt_seq.c hook missing) shutter is released/image captured.
   
Attached file "double-layer-hub.jpg":

Cam is now connected to a second daisychained equivalent 7 port hub but has NO external 5v jack connected. This second hub is connected to the port on the first hub to which the camera was originally connected in the "single-layer-hub.jpg"

Results now:

  • with the "per-port" switch on the first hub ON ptp comms is maintained between the camera and chdkptp when the second hub "per-port" switch is ON or OFF.
  • As before - when the "per-port" switch, on this second hub, transistions from OFF to ON then chdk usb-remote (menu selection onepush/synch &capt_seq.c hook missing) shutter is released/image captured.

However, when the first hub "per-port" switch is turned OFF, ptp comms is lost between the camera and chdkptp - I had not expected that and don't understand it.

The hope was this action would have maintained ptp comms but switched level at cam (on 5v line) from 5v -> 0v (enabling switching of 7 cameras from a single switch)   

I really should get different place mats  :)

If the description isn't clear I can put a diagram together...but time might be better spent testing your proposal.

Re: USB triggering with multiple cameras and PTP
« Reply #6 on: 30 / January / 2015, 19:52:31 »
However, when the first hub "per-port" switch is turned OFF, ptp comms is lost between the camera and chdkptp - I had not expected that and don't understand it.
This makes sense. 

When you kill power out of the first hub with the "per-port" switch, you remove the power that was used by the electronics of the "second layer" hubs.   So there is no way for the PTP messages to get through those hubs.

You need to provide power for all hubs continuously.   It's only the final 5V connection to the cameras that you need to interrupt and that's the only connection you are allowed to interrupt if you wish to keep PTP communications active.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: USB triggering with multiple cameras and PTP
« Reply #7 on: 30 / January / 2015, 19:58:00 »
When you kill power out of the first hub with the "per-port" switch, you remove the power that was used by the electronics of the "second layer" hubs.   So there is no way for the PTP messages to get through those hubs.

Of course.

I am embarassed.

Thanks.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal