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

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

  • 704 Replies
  • 169030 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #410 on: 14 / April / 2013, 19:11:59 »
Advertisements
My guess is that gain alteration (dark shading ?) is introduced probably in the same area where dark subtract and distcorr takes place
These are not in the same area. Distortion correction does not alter RAW data, it only applies to JPEG (the necessary information is packaged into the .CR2 too). If what your samples show is the result of vignetting-correction, that process affects the RAW data, so it's done in a completely different part of the firmware code.
Quote
, and is sensitive to ZOOM.
That is expected.

I wonder what could be the reason behind your mixed results. Can you re-do the test on 100c, with a stock CHDK 1.1 build (in order to enable the firmware's lens distortion correction)? Does temperature have any influence on this? Where is the CCD temperature sensor of your 101a camera? Is that cooled as well?

FYI I just tried on a DIGIC4 camera (at wide angle, with the lens covered), the JPEGs are black, the DNG doesn't show any circular shape. ISO80, 1s and 1/125s. It's a bit newer than your S90, they may have reduced this effect on dark images, who knows.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #411 on: 14 / April / 2013, 21:53:11 »
FYI I just tried on a DIGIC4 camera (at wide angle, with the lens covered), the JPEGs are black, the DNG doesn't show any circular shape. ISO80, 1s and 1/125s. It's a bit newer than your S90, they may have reduced this effect on dark images, who knows.
Very kind of you to do the test.   In general, lens-covered fast shots at low ISO you can expect JPEGs to be completely black so they're not a good test method for this // that's been my experience.  If you have an open CCD like the 101a, then flooding with uniform light does show the donut in a normal exposure with a JPEG.  Hence the only consistent way is to do this test on a regular camera is with DNGs and CR2s, but you have push the tone curve very hard left, especially at low ISO.  I noticed that this effect, and its behavior under different ISOs too, is quite different between the 101a and 100c, so it's not surprising you don't see anything obvious (did you push the tone curve completely left to get a bright image, and it's uniform ??).

Quote
Can you re-do the test on 100c, with a stock CHDK 1.1 build (in order to enable the firmware's lens distortion correction)?
Yes I thought of this since the 100c does have distcorr disabled (you have a good memory!), and there could be some influence ... makes sense to do this.

Quote
Does temperature have any influence on this? Where is the CCD temperature sensor of your 101a camera? Is that cooled as well?
I've been doing a lot of different temperature tests recently.  In general the answer to your 1st question is no, but with a "but."  The thermistor is right on the CCD chip itself and is accurate (however FYI, I've determined that the reading CHDK presents is ~12C too high // I had a discussion about this with reyalp long time ago and now I am 100% convinced the reading is too high by that amount).  CCD temperature only makes a big difference for long exposures, and higher ISOs to some extent.   Some noise sources are: dark noise, photon noise, CCD-FDA noise, current source noise, power supply noise, CDS S&H capacitor switching noise, electromagnetic interference (from switching power supplies), ADC quantization noise, readout noise, etc.   At 1/125 regardless of ISO, the dominant noise is the sum total of "electronics noise," which is pretty much everything above except dark noise.  Dark noise starts to have a dominant effect in longer exposures and increased CCD temps.  Hence my 1/125th darkness shots on the 101a yield approximately the same noise histograms whether at -20C or +30C.  You could try increasing ISO, say to 400, making the electronics noise "brighter."  However, I noticed that at 400 on the 100c the effect is not obvious, but it is obvious on the 101a.  So yes, putting a stock CHDK 1.1 on the 100c should shed some more light.

« Last Edit: 14 / April / 2013, 21:57:04 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #412 on: 17 / April / 2013, 13:39:30 »
I'm still unable to reproduce this "circle" or "donut" effect on that particular camera (a3200). I have 2 other digic4 cams which were not tested for this, I'll proceed with those.

As a reply to that cc'd  message, I'd like to note that my changes are implemented on all 3 known firmware variants of the S90.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #413 on: 17 / April / 2013, 13:52:51 »
Thanks ... it's nice to know that your code exists for the other versions, and that more interest is coming online.  To see the noise in the RAWs at 1/125th you have to push hard left on the tone curve, almost to the extreme left.  You have to see noise to be able to see the donuts, if they exist on your cameras.  Try ISO100.  I haven't yet got around to running a stock CHDK in the 100c to re-enable distcorr as you suggested because I'm tied up with electron microscopy this week, but will certainly have something by the weekend.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #414 on: 17 / April / 2013, 16:35:12 »
MATCHBOX S90 VERSION II:  PRELIMINARY MCU FW SHUTTER CONTROLLER and MECHA SIMULATOR + Arduino IDE code

The code is more robust.  The photo is of the bottom side of the MCU PC board, as seen from the top, a kind of x-ray view. 

More about the new SHUTTER LOGIC ...

This version implements the shutter controller in the MCU, eliminating the bulky and complicated SticK SHUTTER CONTROLLER of ages past.  It also has AUTO-PUP on application of DC to the camera.  The system can work without RELAYS (open pins 3 & 4 of the PUP RELAY, short pins 3 & 4 of the AUTOPOWER RELAY and push the ON/OFF button by hand) and without the Si9986 (if you don't need an external shutter // just leave it out-of-circuit).  The optoisolator is necessary to run the LAMP ENAB signal.

To test shutter drive, parallel the SHUTTER [4V to 13V] pin to the CAMERA&MCU [+4.5V] power pin.  Connect the Canon shutter from the lens assembly to DRV A and DRV B.  MCU logic translates Canon PWM shutter drive into one continuous pulse 8.3 ms long (by default in code).  This good enough to change state of the Canon shutter.

Folks with a keen electronics eye might ask: why the need for an optoisolator in the shutter signals when TXO and RXI can be connected directly to the camera on a common GND system?  The answer is this ...  Normally shutter drive signals are LO and only one is pulsed HI when the shutter has to change state.  For some yet unknown reason Canon occasionally raises *both* signals HI simultaneously (which has no effect on the shutter state), and that confuses the MCU's shutter logic if connected directly.  Hence the optoisolator acts as a common-mode rejection circuit, that is, when *both* lines go HI from the camera, the output signals to the MCU remain LO.

IMPORTANT:  When programming the MCU, disconnect the DC power line from the camera, and, vice versa, disconnect the USB cable before connecting the camera DC power source.  DC to camera should not exceed +4.6V.  Once PUPed ino PLAY, be sure to go into REC mode within 60 seconds to enable IS error suppression.

CAUTION:  Use at your own peril.  Nothing is guaranteed.  A complete functional description will come at a considerably later date.

Please note that some of the pinouts have changed since VERSION I.
« Last Edit: 20 / April / 2013, 08:12:48 by SticK »

Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #415 on: 17 / April / 2013, 18:12:04 »
Thank you for posting this up! Also this solved one of my questions from the PM I sent you. I have a lot to work on. Hopefully I can get the 100c working and prove that you have a solution universal to all the firmwares.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #416 on: 17 / April / 2013, 23:06:50 »
S90 MECHA_SIM CONSTRUCTION SLIDE SHOW Part 1 of 3

All signal wires are AWG #40 enamel.  All power wire interconnects are AWG #32 enamel.

Figure 1 - Battery eliminator that comes with the AC adapter.  eBay # 110622940464 // not sure if available under this number anymore.

Figure 2 - Cut and trimmed MECHA connector with 9 wires threaded through a piece of stripped insulation, cemented to connector.  10K thermistor dummy resistor is cemented on connector.  You can cut the off the connector, however keep in mind that the traces will almost certainly short.  You can either sand the edge with 800 grit under a very good stereo microscope, or peel back the traces (like sardine can) which is what I did.  Once buzzed and tested, apply epoxy to the edges of the connector.
« Last Edit: 19 / April / 2013, 08:28:31 by SticK »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #417 on: 17 / April / 2013, 23:07:32 »
S90 MECHA_SIM CONSTRUCTION SLIDE SHOW Part 2 of 3

Figure 1 - Cable from MECHA connector comes in the upper right corner and is glued in.

Figure 2 - Flipped view of board bottom (as shown in the wiring diagram) making it easier to see routing from the top view when installed into battery eliminator for interconnect soldering.
« Last Edit: 20 / April / 2013, 07:09:07 by SticK »


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #418 on: 17 / April / 2013, 23:08:15 »
S90 MECHA_SIM CONSTRUCTION SLIDE SHOW Part 3 of 3

Figure 1 - Normal view so you can read resistor values and wire up the bottom side.

Figure 2 - Fully assembled controller.  Right edge, top 5-pin connector is CAMERA POWER (left in diagram), bottom 5-pin connector is SHUTTER (right in diagram).  GREEN BOARD: top copper is GND and bottom copper is +4.6V.  You have to isolate the +VE camera contact (upper of the two, bottom left corner area) from its immediate copper pad and jumper it with the #32 enamel wire.  Scratch grounds where needed and solder appropriate component pins to the exposed GND copper.  The MECHA cable and GND wire (#26 stranded min) exits between the two external connectors.  Solder GND wire to camera case.  I put in two extra LEDs just above the red capacitor not shown in the wiring diagram on the LAMP ENAB pin, to show continuous CLOSED (red) and continuous OPEN (green) shutter states.  Bottom lime: use the wiring diagram as your guide ++plus++ your own basic instinct and you should be fine.

If you do this correctly and excavate the plastic where obvious, the cover fits and the whole unit slides into the battery compartment.
« Last Edit: 20 / April / 2013, 07:12:07 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #419 on: 18 / April / 2013, 14:50:05 »
The special builds are here: https://subversion.assembla.com/svn/chdk-s1.bin/files/
I'll upload a newer build for 1.00c too.
Source diff is attached.

I'm still unable to reproduce this "circle" or "donut" effect on that particular camera (a3200). I have 2 other digic4 cams which were not tested for this, I'll proceed with those.
Done. None of my DIGIC4 cameras show this issue (tried with Irfanview and Raw Therapee)... Hard to believe, as all of them are lower end, with a certainly less sophisticated lens. It would be great it somebody else (perhaps with a higher end DIGIC4-5 model) could confirm the issue...

 

Related Topics