CHDKPTP File Downloading - page 8 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

CHDKPTP File Downloading

  • 92 Replies
  • 23167 Views
Re: CHDKPTP File Downloading
« Reply #70 on: 28 / March / 2018, 05:18:49 »
Advertisements
Hmm that's an interesting thought, I'll experiment with it.

The following would require developer input/comment but could be of interest to you.

In recent testing of precision sync (on SX150IS) it transpires that it does not work well with either cameraside script or ptp connection still active - the camera crashes in up to 50% of cases. This is probably not surprising given the tight loops involved with that method.

In any case, it seems that (for a single camera), assuming ptp comms has already been locked and the switch wire then set to 0V (say by a usbhub per port 5V switch), by subsequently:
  • setting the remote / twopush / sync enable (via multicam.lua)
  • stopping the cameraside script and then closing the ptp connection (via multicam.lua)
  • pulsing the 5V per port usb hub switch twice
a shot is reliably taken without camera crashes (famous last words).

So, if the inbuilt chdk twopush switching action were re-coded to operate from the opposite polarity to that which currently exists then triggering of all the cameras from a single mains power switch supplying all the hubs might look like this:
  • lock ptp comms (once only via multicam.lua)
  • set the remote / twopush / sync enable (once only via multicam.lua)
  • stop the camera side script and then close the ptp connection (via multicam.lua)
  • unplug the usb hub from the laptop/PC (or at least break 5V connection from PC)
  • turn the usb hub mains power off (to prefocus) then on
  • turn the usb hub mains power off (for lcd black screen) then on for sync shot (but see further below).
  • reconnect the usb hub to PC
  • start ptp connection (via multicam.lua)
  • start cameraside script (via multicam.lua)
  • download image / set zoom etc
  • repeat.
(Edit: at the end of the session disable remote via multicam.lua)

Issues:
using two cameras and two equivalent but unbranded externally powered 10 port usbhubs to act as a simple usb switch using mains power as the trigger (with no ptp connection & normal usb remote voltage level operation), decimated precision sync in a 10 stereo pair test, that crt tester result was:

Minimum mis-sync = 8.86ms
Maximum mis-sync = 29.65ms
Average mis-sync = 17.47

If that was no worse over a large number of cameras & usb hubs it could still be significantly better than using existing multicam ptp based sync (I don't currently plan on testing it though).

Again , a dev would need to build or advise how much effort could be involved in swapping current usb remote voltage levels for twopush (and probably onepush) operation.

PS: There would be no need to recycle power to cameras using this proposed method (assuming none crash).


fmi:
e/  "Powered" USB-2 Hubs also have "Additional Capacitive" Power By-pass Filters. !!
f/   "Powered" USB-2 Hubs also have a "Current Limiting" Resistor for short circuit protection. !!

So, All this will have some  "Sync" effect when the triggering your a550 Cameras via "Powered Hubs" ....

« Last Edit: 28 / March / 2018, 16:11:44 by andrew.stephens.754365 »

Re: CHDKPTP File Downloading
« Reply #71 on: 28 / March / 2018, 22:31:29 »
Hmm that's an interesting thought, I'll experiment with it.
fmi:
e/  "Powered" USB-2 Hubs also have "Additional Capacitive" Power By-pass Filters. !!
f/   "Powered" USB-2 Hubs also have a "Current Limiting" Resistor for short circuit protection. !!

So, All this will have some  "Sync" effect when the triggering your a550 Cameras via "Powered Hubs" ....

Ref:- See Edit #1  ... Reply #63 on: 13/March/2018, for some more detail. ( BUT, slightly off the current topic.)
Attached file Modify USB Adapters.jpg shows how its possible to "Modify" some types of cheap USB Adapters.
Either at the USB Hub cable end or the Mini-B Camera cable end.

An (Maybe Cheaper) alternative is to USB Standard Type A Male to RJ45  Conversion. i.e. use cat 5/6 cable.
See the attached file USB Standard Type A Male AM to RJ45 Male Converter.jpg as an example.
i.e. The "Break-Out Boxes" concept... to be continued if there is any interest.

H-H
« Last Edit: 28 / March / 2018, 22:35:39 by Hardware_Hacker »

Re: CHDKPTP File Downloading
« Reply #72 on: 29 / March / 2018, 07:30:24 »
Will place an order for 10 of those "USB 2.0 Type A Male to A Female Adapter Plug to Socket Adaptor Joiner Coupler", thanks.

An (Maybe Cheaper) alternative is to USB Standard Type A Male to RJ45  Conversion. i.e. use cat 5/6 cable.
See the attached file USB Standard Type A Male AM to RJ45 Male Converter.jpg as an example.
i.e. The "Break-Out Boxes" concept... to be continued if there is any interest.

H-H

Definitely interested.

Re: CHDKPTP File Downloading
« Reply #73 on: 12 / April / 2018, 16:43:37 »
Hello, It's been a while.

So I've implemented the ability to connect to specific camera towers in my array using mc:connect({list="towerlist.txt"}), but every time I connect my console gets flooded with unused connections.

Any way to prevent this?


*

Offline reyalp

  • ******
  • 13714
Re: CHDKPTP File Downloading
« Reply #74 on: 12 / April / 2018, 16:52:48 »
Any way to prevent this?
Modify mc:connect to not print the stuff you don't want to see. The lines in question come from
Code: [Select]
printf('%s %d:%s b=%s d=%s s=%s\n',
status,
i,
lcon.ptpdev.model,
lcon.condev.bus,
lcon.condev.dev,
tostring(lcon.ptpdev.serial_number))
If you don't call that printf when status is "i", the "useless" lines will not be printed.
Don't forget what the H stands for.

Re: CHDKPTP File Downloading
« Reply #75 on: 12 / April / 2018, 21:09:34 »
Hello, It's been a while.

So I've implemented the ability to connect to specific camera towers in my array using mc:connect({list="towerlist.txt"}), but every time I connect my console gets flooded with unused connections.

Any way to prevent this?
Have you tried using some of the USBDeview v2.75 commands:-
Here ... https://www.nirsoft.net/utils/usb_devices_view.html

"...Stop/Disconnect Command-Line Options..."
"...Disable/Enable/Remove Command-Line Options..."
"...Save Command-Line Options..."

Also your re-post "..back to sync.." Reply #62 on: 13/March/2018
How did you resolve your  "USB device not recognized", problems etc.

If you want to try a hardware method for the "...ability to connect to specific camera towers..."

A very simple way is to only supply the USB +5 Volts "..to specific camera towers..."
See Post #Reply #71 on: 28/March/2018, See Edit #1 Example, "..Modify USB Adapters.jpg..."
The selected cameras in that tower will then auto-connect.
i.e. There is some (Hardware/Software) way to "switch" USB +5 Volts on/off for each camera tower.
Note that ALL the USB-Hubs controller IC's MUST not be (USB +5 Volts) "switched".
i.e. ALL the "Switching" MUST be only be done on the downstream cameras USB +5 Volts supply's.

H-H
« Last Edit: 12 / April / 2018, 21:27:34 by Hardware_Hacker »

*

Offline reyalp

  • ******
  • 13714
Re: CHDKPTP File Downloading
« Reply #76 on: 13 / April / 2018, 01:15:04 »
Have you tried using some of the USBDeview v2.75 commands:-
The output jdstech posted about comes from the line I quoted above in the multicam script. Putting it under an if status == 'i' to suppress the lines about ignored cameras is trivial.

Trying to use external windows USB stuff to avoid this output seems like a much more complicated solution.
Don't forget what the H stands for.

Re: CHDKPTP File Downloading
« Reply #77 on: 17 / April / 2018, 16:34:47 »
Quote
How did you resolve your  "USB device not recognized", problems etc.

The USB device not recognized problem I was getting was from cutting power to the usb hubs from their dedicated PSU's. So long as I disconnected the hubs from the computer beforehand I could trigger the power sync by simply switching off a central bust bar. This method worked but it would choke the USB hubs onboard IC's of power and would end up making the whole system go haywire.

I solved this by creating a trigger system I hinted at in an earlier post. I created 12 "dongles", one for each USB hub. The dongles took the place of the spst switches on the hubs, which were just connected via a 2 pin 2.54 jst plug. Each dongle contained a single NPN transistor, and plugged into a power line going between the 12 hubs. When I cut power to dongles they block the current going to the cameras through the USB power lines. This lets me acheive virtually perfect sync without having to modify individual cameras.

I have a quick question about setting exposure. I'm able to set the shutter speed using
Code: [Select]
set_tv96_directbut when I try to set the iso speed using
Code: [Select]
set_sv96I get some weird results.

Here's what I get when I only set the shutter speed, (It should say 1/125 in the shutter speed box, this was a problem with my screen capture not the system)

Everything works as it should, ISO is set automatically, F56 is having a bit too much fun.

Now here's what I get when I set the ISO,

The shutter is set automatically, and the ISO is the same between all the pictures, but it isn't what I set it to.

Now when I set both of them,

The ISO changes from everything being 640 to everything being 500, even though the value I input was 400 both times.

What's up?
« Last Edit: 17 / April / 2018, 16:42:32 by jdstech »


*

Offline reyalp

  • ******
  • 13714
Re: CHDKPTP File Downloading
« Reply #78 on: 17 / April / 2018, 20:37:14 »
What's up?
The screenshots don't mean much to me because I don't know what your code is doing.

There are two general things you need to be aware of with CHDK ISO overrides
1) There are two different kinds of ISO values, which we refer to as "real" and "market". If you want to set values that correspond to normal canon UI values, you need to convert from market to real before setting sv96 values. e.g. to set ISO 400, you should use something like
set_sv96(sv96_market_to_real(iso_to_sv96(400)))

2) Using CHDK ISO override puts the camera in auto ISO mode, and doesn't restore to the previous state. Since CHDK only applies the override to the next shot (or half press), subsequent shots will use auto ISO. This means you should either control ISO for every shot (calling set_sv96 with exactly the value you want) or set the cameras back to fixed ISO mode by setting the ISO_MODE propcase, like set_prop(props.ISO_MODE,100)
If you only want to use standard UI values (100,200, 400 etc) you could also just use ISO_MODE all the time instead of set_sv96.

One more thing:
Quote
Everything works as it should, ISO is set automatically
When you use CHDK overrides, the Canon firmware is not aware of the override. So you cannot set a fixed shutter speed and assume the Canon firmware in auto ISO mode will set an appropriate ISO value. If you override one exposure parameter, you need to override them all. If you want to modify Canon auto-exposure, you should read the Canon calculated Bv in half press and use the APEX equation to distribute the values over the available exposure parameters.
Don't forget what the H stands for.

Re: CHDKPTP File Downloading
« Reply #79 on: 18 / April / 2018, 05:44:09 »
This lets me acheive virtually perfect sync without having to modify individual cameras.

Excellent - are you able to supply any test results?

...[]...or set the cameras back to fixed ISO mode by setting the ISO_MODE propcase, like set_prop(props.ISO_MODE,100)
If you only want to use standard UI values (100,200, 400 etc) you could also just use ISO_MODE all the time instead of set_sv96.

Nice. When thinking of this last I had been considering UI Properties for ISO but would probably like to stay away from that.

Is there something similar to this to set the standard Canon UI shutter (e.g. 1/125)?




 

Related Topics