analog video detect as a remote input

  • 12 Replies
  • 729 Views
*

Offline reyalp

  • ******
  • 11515
analog video detect as a remote input
« on: 07 / June / 2018, 02:36:51 »
Advertisements
Following on from this post https://chdk.setepontos.com/index.php?topic=12692.msg137306#msg137306 by @hugoboss00
I remembered the cameras detect when you plug in the analog AV adapter cable into the USB port as documented on http://www.achillies.com/CHDK_Files/USB_Splitter.htm (from https://chdk.setepontos.com/index.php?topic=5691.msg62525#msg62525)

On g7x, physw_status[1] bit 0x8000 goes 0 when the cable is plugged in. Forcing it to 1 in kbd_update_physw_bits causes the video adapter to be ignored.

Advantages to using this over regular USB +5v:
1) Doesn't require a +5v source, just need to connect the pins (6 and 11 per achilllies doc linked above)
2) Doesn't need software hacks to work at the same time as PTP
3) For large multicam rigs, don't deal with cutting power after the hubs

Disadvantages:
1) Needs a proprietary or custom connector
2) Bit needs to be found
3) Some code needs to be added to support this as a remote input
4) Need code similar to get_usb_bit to read it.

Since I don't have anything that displays analog out and haven't built the spliter, I used the following in chdkptp to find the bit
Code: [Select]
=r={} phw=0x36c10 for i=1,10 do table.insert(r,string.format('0x%08x 0x%08x 0x%08x',peek(phw),peek(phw+4),peek(phw+8))) sleep(1000) end return r
... swap to AV cable before 10 seconds is up, swap back to usb ...
connect
getm
Don't forget what the H stands for.

Re: analog video detect as a remote input
« Reply #1 on: 13 / June / 2018, 02:42:28 »
I would like to implement this also for G7X, but unfortunately i dont have this 11 pin USB connector.
As soon i can get one i will add it to the multichannel remote patch. see https://chdk.setepontos.com/index.php?topic=13451.0
do you have a source where to get this connector?
G7X - CHDK 100d

*

Offline reyalp

  • ******
  • 11515
Re: analog video detect as a remote input
« Reply #2 on: 13 / June / 2018, 03:15:55 »
I would like to implement this also for G7X, but unfortunately i dont have this 11 pin USB connector.
As soon i can get one i will add it to the multichannel remote patch. see https://chdk.setepontos.com/index.php?topic=13451.0
do you have a source where to get this connector?
Assuming you just want the video related pins, you can probably hack up a Canon cable or clone, search for AVC-DC400 or AVC-DC400ST.

If you want both video and USB, the only option seems to be the DIY one linked in the first post. edit: Appear to be available from https://vp-systems.eu/order_cr.html or http://www.kapshop.com/p274/Canon-11-pin-for-CHDK/SDM-and-Video-out/product_info.html

There is another 11 pin mini-USB compatible plug, panasonic part AXJ443000
https://www3.panasonic.biz/ac/e/control/connector/interface-sm/connector-miniio/index.jsp

The external housing looks different, but it's possible the part with the pins is close enough.

Gopro also uses a proprietary mini USB, but it's 10 pins and they appear to be aligned with the standard USB pins. Pity since there are lots of breakout cables available.
« Last Edit: 30 / July / 2018, 16:41:59 by reyalp »
Don't forget what the H stands for.

Re: analog video detect as a remote input
« Reply #3 on: 19 / June / 2018, 16:39:13 »
Advantages to using this over regular USB +5v:
1) Doesn't require a +5v source, just need to connect the pins (6 and 11 per achilllies doc linked above)
2) Doesn't need software hacks to work at the same time as PTP
3) For large multicam rigs, don't deal with cutting power after the hubs
I don't know how I missed, until now, this and related "HDMI power and alternative remote inputs" threads - very interesting.

I'm not up to speed on either yet but don't wish to hold back with the following query - does Point 1 above infer pin 6&11 must be closed by a physical relay, similarly to:
The advantage of this is that the reed switch would just need to switch to ground or open circuit (or open circuit and the original terminal), not +5v.
?

I tested Hardware_Hackers suggested USB Adapters (https://chdk.setepontos.com/index.php?topic=13294.msg136643#msg136643) hacked to include a normal switch cable on the output side of the hubs a while ago and, in limited testing of a 16 number camera system, ptp reliability seemed very good while a precision sync build (without detailed results to confirm) "seemed" to provide very good precision.


However, I am, perhaps mistakenly, concerned that the loose coupling of the switch cable supply and return paths could result in creating a very large loop antennae and problems as the system is expanded - the video cable solution would be very much more tightly coupled, presumably, decreasing any possible ill effect from that. On the other hand, if relatively slow mechanical relays are the only way to short pin 6&11 (preferably under microprocessor control) it seems "good" precision sync would not be obtainable across a large camera count.

I know (admittedly little circuit design experience) of no electronic component that can simply replace a mechanical relay (without understanding the behaviour of the circuit in which the substitution is imagined to take place).

Is the camera video output circuity (camera side of pins 6&11) understood to any extent that, for example, an externally connected photodiode (or amplifying phototransistor) is sufficiently reversed biased that on (associated optoisolator) LED light production the tiny reverse saturation current increases sufficiently to "short" pin 6&11 in a fashion functionally equivalent to a relay?
« Last Edit: 19 / June / 2018, 16:50:49 by andrew.stephens.754365 »


*

Offline reyalp

  • ******
  • 11515
Re: analog video detect as a remote input
« Reply #4 on: 20 / June / 2018, 00:10:48 »
I'm not up to speed on either yet but don't wish to hold back with the following query - does Point 1 above infer pin 6&11 must be closed by a physical relay, similarly to:
You should just need to close the circuit. Transistors would seem preferable to relays.

I bought a sacrificial AVC-DC400ST clone on amazon to test.
The detect pin seems to provide somewhat below battery voltage (on elph180 ~3.2 when camera vbatt and a voltmeter across the battery shows 3.77) and passes something like 0.05 ma. It just needs to be connected to camera ground (e.g the connector shell), not specifically the other pin in the connector.

Looking at achilies page again, I noticed it mentioned camremote cables. Sure enough https://vp-systems.eu/order_cr.html offers an 11 pin canon AV/usb splitter, though quite pricey. Some surgery would still be required to make the av detect switchable.

edit:
Image with +~3v pin indicated
« Last Edit: 20 / June / 2018, 03:06:14 by reyalp »
Don't forget what the H stands for.

Re: analog video detect as a remote input
« Reply #5 on: 21 / June / 2018, 11:38:07 »
Thanks for details and measurements - definitely worth considering this further.

I wonder if the camera is any better at sensing current change (rather than voltage)... anyway, if I ever do a crt stereo test will report back here.
« Last Edit: 21 / June / 2018, 16:30:49 by andrew.stephens.754365 »

*

Offline reyalp

  • ******
  • 11515
Re: analog video detect as a remote input
« Reply #6 on: 25 / June / 2018, 02:18:37 »
I tested sx160 (AA powered) with a multimeter. It showed ~1.7 volts, 0.02 mA. Voltage varied somewhat depending on camera battery voltage.
Don't forget what the H stands for.

Re: analog video detect as a remote input
« Reply #7 on: 25 / June / 2018, 16:09:16 »
Old cameras that used a separate AV plug had a mechanical switch. I don't if there are any of these with the AV plug bit detected.

SX150IS does have a separate stereo video port (e.g. use with Canon Stereo Video Cable STV-250N).

Since I don't have anything that displays analog out and haven't built the spliter, I used the following in chdkptp to find the bit
Code: [Select]
=r={} phw=0x36c10 for i=1,10 do table.insert(r,string.format('0x%08x 0x%08x 0x%08x',peek(phw),peek(phw+4),peek(phw+8))) sleep(1000) end return r
... swap to AV cable before 10 seconds is up, swap back to usb ...
connect
getm

I can just execute that with then without the STV-250N inserted and compare the table for a difference?
« Last Edit: 25 / June / 2018, 16:11:23 by andrew.stephens.754365 »


*

Offline reyalp

  • ******
  • 11515
Re: analog video detect as a remote input
« Reply #8 on: 25 / June / 2018, 16:45:45 »
Old cameras that used a separate AV plug had a mechanical switch. I don't if there are any of these with the AV plug bit detected.

SX150IS does have a separate stereo video port (e.g. use with Canon Stereo Video Cable STV-250N).
You can check whether it's an electrical switch by inserting something non-conductive in the socket. Before we had display off functions, people used to use a toothpick to trigger it and force the LCD off (as it turns out, this doesn't save much power)
Quote
Since I don't have anything that displays analog out and haven't built the spliter, I used the following in chdkptp to find the bit
Code: [Select]
=r={} phw=0x36c10 for i=1,10 do table.insert(r,string.format('0x%08x 0x%08x 0x%08x',peek(phw),peek(phw+4),peek(phw+8))) sleep(1000) end return r
... swap to AV cable before 10 seconds is up, swap back to usb ...
connect
getm

I can just execute that with then without the STV-250N inserted and compare the table for a difference?
If the switch is mechanical, there's probably no point.

From the manual, it looks like there is room to have both the video and USB cables connected, so you can just use rmem instead of the code above, like
Code: [Select]
rmem -i32 0x33694 3
You need to use the physw_status address for your camera (0x33694 for sx150 100a).

There may also be some bits that change constantly. You run the rmem command a few times without it plugged in to see if there are any that change on their own.

The sig finder match I added last night says the video detect bit should be 0x00800000 in word 0 for this camera.
Don't forget what the H stands for.

Re: analog video detect as a remote input
« Reply #9 on: 26 / June / 2018, 01:56:16 »
You can check whether it's an electrical switch by inserting something non-conductive in the socket... people used to use a toothpick
Couldn't put my hand on one :-[

If the switch is mechanical, there's probably no point.
Understood.

From the manual, it looks like there is room to have both the video and USB cables connected
Both fit.

You need to use the physw_status address for your camera (0x33694 for sx150 100a).

There may also be some bits that change constantly. You run the rmem command a few times without it plugged in to see if there are any that change on their own.
For the record:
Without cable (using > rmem -i32 0x33694 3), 5 repetition result was:
0x00033694: 0x282c18dc 0x4055f3c9 0x001cff70
0x00033694: 0xc8ac18dc 0x7055f0e9 0x001cff70
0x00033694: 0x48ac18dc 0x4045f3e9 0x001cff70
0x00033694: 0x88ac58dc 0x4045f3e9 0x001cff70
0x00033694: 0x08ac58dc 0x4055f0e9 0x001cff70

Constant items were noted and then the cable was inserted with result:
0x00033694: 0x682cd8dc 0x4055f0c9 0x001cff70
 
Unfortunately there was no change in any item that had been invariant with the cable unattached.
« Last Edit: 26 / June / 2018, 02:03:30 by andrew.stephens.754365 »

 

Related Topics