CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD - page 23 - Creative Uses of CHDK - CHDK Forum

CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD

  • 704 Replies
  • 169760 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #220 on: 20 / November / 2012, 08:41:19 »
Advertisements
@ahull

Recall the TIMING:

PLAY->REC

  PI POWER: t=0+: HI -> @960 mS: LO
  ZOOM:      t=0+: LO stowed -> @289 mS tau_Z1: HI unstowed
  FOCUS:     t=0+: LO stowed -> @336 mS tau_F1: HI unstowed
  IRIS:         t=0+: HI stowed -> @715 mS tau_I1: LO unstowed

REC->PLAY (from wide angle)

  PI POWER: t=0+: HI -> @910 mS: LO
  IRIS:         t=0+: HI already stowed -> @910 mS: LO still stowed
  FOCUS:     t=0+: HI unstowed -> @72 ms tau_F2: LO stowed -> @113 ms tau_F3: HI unstowed -> @173 ms tau_F4: LO stowed
  ZOOM:      t=0+: HI unstowed -> @496 mS tau_Z2: LO stowed

To test your hypothesis, before PLAY->REC I disconnected FOCUS MOTOR (can't disconnect its PI) and IRIS did not get deployed, agreeing with you and the timing sequence.

Next, I reconnected FOCUS MOTOR to revive, and then while running in REC mode, I unplugged FOCUS MOTOR (safe to do).  The camera continued to take shots, so again this confirms that both IRIS and FOCUS stepper motors operate open loop while taking shots and the camera does not test continuity during shoot operations.  With the FOCUS MOTOR still disconnected and REC->PLAY, IRIS stowed while ZOOM did not.  This also agrees with the timing sequence and your hypothesis.

Of course these tests aren't 100% conclusive because I cannot disconnect ZOOM independently of the other two unless I unsolder the motor pins (very tricky).  So overall, agreed, that is the trend.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #221 on: 20 / November / 2012, 12:37:31 »
Small progress, although I don't yet know whether it will apply to the S90. I have found the startup check for the lens (which causes it to retract when the camera thinks it's out). I have tested it on an A430 without its mecha circuits connected. When overridden, the camera forgets the previous lens error and starts up normally in play mode.
Both the A430 and the S90 seem to use the SRAM memory of the RTC circuit to store some flags, my guess is that all (CHDK) cameras do this.
Overriding the check could be potentially dangerous for cameras that don't have their mecha parts removed, the firmware probably relies on the retracted state at startup.
« Last Edit: 20 / November / 2012, 13:16:46 by srsa_4c »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #222 on: 20 / November / 2012, 13:38:02 »
That's very interesting.  edit: ... would be the cat's meow!

Quote
Overriding the check could be potentially dangerous for cameras that don't have their mecha parts removed, the firmware probably relies on the retracted state at startup.
On the S90, on PUP,  the lack of PI signalling evidence suggests that the camera would invoke the startup check you refer to, only if there was a previous bad-lens-condition shutdown.  Otherwise after PUP (PLAY mode) the startup check I think is ignored.  Of course all the individual component checking goes into effect when ->REC (my TIMING diagrams).  Potentially dangerous?  maybe not ??  In any case, if the mecha connector is removed and MECHA is in a nice state (not damaged), plugging it back in should revive the camera on the next PUP (before PLAY mode starts).

Quote
When overridden, the camera forgets the previous lens error and starts up normally in play mode.
Here is a good test:  Can you put the camera into REC mode and take a shot?, then back into PLAY, and then REC and again take a shot?  How does that look?

« Last Edit: 20 / November / 2012, 13:42:34 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #223 on: 20 / November / 2012, 13:55:15 »
On the S90, on PUP,  the lack of PI signalling evidence suggests that the camera would invoke the startup check you refer to, only if there was a previous bad-lens-condition shutdown.  Otherwise after PUP (PLAY mode) the startup check I think is ignored.
Yes, this firmware routine is pretty similar in the cameras I checked.
Quote
Potentially dangerous?
This is meant to warn the broader audience :) I don't want people to break their cameras.

Quote
Here is a good test:  Can you put the camera into REC mode and take a shot?, then back into PLAY, and then REC and again take a shot?  How does that look?
The lack of startup check does not prevent further checks when rec mode is attempted :) That's why it's "small" progress. It only makes testing easier at this point.

The relevant part for S90 1.01a is this, if it works:
Code: (c) [Select]
      "    BL      sub_FF861488 \n"
//patch to disable startup (play mode) check for not retracted lens, 1 -> [0x24ec + 0xc], 0 -> [0x24ec + 8]
      "LDR R1, =0x24ec\n"
      "MOV R0, #1\n"
      "STR R0, [R1, #0xc]\n"
      "MOV R0, #0\n"
      "STR R0, [R1, #0x8]\n"
//patch end
      "    BL      sub_FF8741A0 \n" // create mecha tasks, check for initial lens state
« Last Edit: 20 / November / 2012, 14:02:05 by srsa_4c »


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #224 on: 20 / November / 2012, 14:01:56 »
@srsa_4c
Quote
The lack of startup check does not prevent further checks when rec mode is attempted :) That's why it's "little" progress. It only makes testing easier at this point.
Nice to hear // great inspirational work!

@srsa_4c
Quote
I don't want people to break their cameras
By attempting a PFP configuration, the risk is implied.  It's damage during operation of course that we want to avoid, and since there are no components to move, it theoretically shouldn't happen.  Naturally, a solution like this makes sense only if normal PFP-state shooting is not impeded and continues to work without fail as I have tested in the other thread (except for the trackable and predictable malloc() fail after about 4000 shots). 
« Last Edit: 20 / November / 2012, 14:15:26 by SticK »

Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #225 on: 20 / November / 2012, 14:09:44 »
I haven't figured out how to quote a part of a message: select and quote??  When I press Insert Quote it puts in the whole message.
@SticK :  nice work on mostly figuring this out // if we could now just get you to include the additional quote information // those of us who casually follow this thread can then tell who's post you are replying to.
« Last Edit: 20 / November / 2012, 14:16:55 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #226 on: 20 / November / 2012, 14:21:20 »
@waterwingz
Quote
include the additional quote information
How's this?  OK?  If it's an ongoing conversation such as within previous couple of posts, then doing this way simplifies things.  Because the quote button on the side includes all the text, it causes a mess for me.  So I will only use if I have to go back far, which is exceedingly rare!

*

Offline ahull

  • *****
  • 634
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #227 on: 20 / November / 2012, 14:23:50 »
Hmm this looks very interesting, as I said previously I have a couple of Ixus 80s and I think an A2000 in my scrap box, that can be used as cheap targets to allow us to play with this, (they have damaged mechanisms, the usual focus ring/gear stripped by careless handling, but are probably not worth the time and effort for me to fix, since I picked them up for <4GBP on ebay).

They are almost fully functional, but wont focus across the full zoom range and give intermittent lens errors.

I would struggle to solder up a suitable test connector  :blink:, but if you want me to run software tests, I can fire them up.

In my case accidentally breaking the camera is well worth the risk. Accidentally releasing the magic smoke would not be a problem, (but seems a little unlikely  I suspect since we are *not* moving the mechanism, rather than moving in in unpredictable ways), after all they are only gathering dust at the moment. 

« Last Edit: 20 / November / 2012, 14:28:18 by ahull »


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #228 on: 20 / November / 2012, 14:46:45 »
Hmm this looks very interesting, as I said previously I have a couple of Ixus 80s and I think an A2000 in my scrap box, that can be used as cheap targets to allow us to play with this
Both have ND filter instead of iris, which - just like their mechanical shutter - is not checked by the camera at all (they can break but the camera won't give an error). The IS is still a problem, as it's controlled by a separate hw unit and the camera will probably miss it even in play mode. These models don't yet have DisableISDriveError.
Quote
I would struggle to solder up a suitable test connector
You only need to disconnect the mecha connector - assuming there's only one. Not like there's many things to try at the moment. Also, the only signal needed for this specific application (PFP) is the shutter signal.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #229 on: 20 / November / 2012, 19:41:05 »
@ahull
Quote
They are almost fully functional, but wont focus across the full zoom range and give intermittent lens errors.
Once you take apart a lens, if gears aren't stripped, they are surprisingly easy to fix.

@srsa_4c
Quote
You only need to disconnect the mecha connector - assuming there's only one. Not like there's many things to try at the moment. Also, the only signal needed for this specific application (PFP) is the shutter signal.
Yes exactly. 

@ahull
Quote
I would struggle to solder up a suitable test connector
If all works, all one would need to do is cleanly cut the main ribbon cable near the mecha connector and solder two wires for the shutter controller. 

I haven't yet tried disconnecting the IS to see how far DisableISDriveError will go, but now that we have independent access to the shutter signals, that is slated for Thursday late because at present I am getting a PPT ready for a conference.

 

Related Topics