S90 MECHA SIMULATOR MOVIE and Arduino IDE CODE for the SparkFun Micro Pro 5VThis is the full-featured solution. Figure 1 shows the bench setup for the movie.
> Lower left: SticK Shutter Controller (with own 5V PS coming from the left)
> left red LED: shutter closed.
> right green LED: shutter open.
> Just above controller: IS and SHUTTER
> The SHUTTER solenoid is the shiny dot at 8 o'clock (near the ribbon cable). You can see it move.
> Upper left: IRIS.
> Lower center red board: the star of the movie, the MECHA SIMULATOR
> Left red LED: power. Power is connected to the 4.5V camera AC adapter cable.
> Lower right yellow LED: simulated FOCUS phototransistor signal. You can see the infamous stow jiggle.
> Upper right green LED: simulated ZOOM phototransistor signal.
> There is no MCU LED for IRIS (similar to ZOOM anyway).
> Central area: MECHA connector breakout (ZOOM PI, FOCUS PI, left // IRIS PI, ZOOM ENCODER PIs, right). The connectors at 45deg are ZOOM ENCODER PIs, shown disconnected from the camera main board.
> Top: S90 facing down towards the table surface. No LCD, no SWITCH PANEL, no FLASH, and now no MECHA
.
> On the back of camera: sacrificial MECHA that has so nicely served its purpose, now there only because I have not cut off its main board connector yet // later.
MOVIESeconds
0: PLAY mode idle: SHUTTER is closed
5: ->REC (CHDKPTP): SHUTTER opens
5+: MECHA unstows
7: Liveview ON
15: shoot+dcimdl command line from CHDKPTP (Tv=2s with dark subtract ON)
16: Camera AF LED turns ON for 1/2 s (faces table but you can see it), and takes the shot
19: SHUTTER closes for 2s to acquire dark.
22: SHUTTER opens
22+: JPG is transferred to PC (*very* slow USB 1.0)
27: ->PLAY
29: SHUTTER closes
31: MECHA stows (yellow LED blinks FOCUS jiggle)
34: end.
44 MB
http://www.sendspace.com/file/prbvmzEXTRA COMMENTSThe solution is so small it will fit into the battery compartment, leaving the CCD completely free to swing out over the main board (for thermal hardware) and face upwards (from the table in this photo), finally allowing us to remove the entire MECHA for the instrumentation. That was the initial objective of this endeavor and I am quite confident to say today it has been 100% successful.
Sparkfun's BLINKY was bench-tested running down to at least 3.4V at 16 MHz on the 5V MCU. Therefore, this solution is portable and should run from both the 4.5V AC adapter power supply and 3.7V S90 battery (battery operation was not tested).
One very nice side-effect of this solution is that I found dummy-loading the stepper coils is not necessary and thus the removal of the FOCUS and IRIS reduces power by at least 1W in REC mode, in effect, giving REC mode nearly as much battery life as PLAY mode.
@srsa_4c
Next up ... looking at your latest solutions.
TECHNICAL INFOLevel translation is only needed on the output pins of the MCU module. With a simple resistor-divider, the reduction ratio needed is 3:2 such that at a MAX operating voltage of 5V, the output pin will present 3.3V to the input of the main board. Here I used series 1K facing the MCU, 2K to GND, and tap to main board. On the MCU input pins a HIGH is 1.9V (at 5V), and since the main board (PI POWER drive) delivers 3.3V, no level translation is needed.
The solution is fully specified with MECHA pinouts here:
http://chdk.setepontos.com/index.php?action=dlattach;topic=8801.0;attach=7357. Orientation of the breakouts in Fig 1 is the same as the photo.
const int IRIS_pin = 8; // [iris PI-1] right breakout top (YEL wire)
const int FOCUS_pin = 9; // [FOCUS PI-2] left breakout (BLU wire)
const int ZOOM_pin = 5; // [ZOOM PI-4] left breakout (WHT wire)
const int MOTION_POWER_pin = 7; // [iris PI-3] right breakout top (ORG wire) -- MOTION_POWER input pin -- this pin is internally tied to INTERRUPT #4
const int ENCFR_pin = 14; // [ZOOM ENCODER PIs FRONT-R] right breakout botttom (YEL wire) -- Encoder front PI
const int ENCBK_pin = 16; // [ZOOM ENCODER PIs BACK-R] right breakout botttom (BLU wire) -- Enooder back PI
const int ENC_POWER_pin = 3; // [ZOOM ENCODER PIs COMM] right breakout botttom (ORG wire) -- ENC_POWER input pin -- this pin is internally tied to INTERRUPT #0
USAGEIt is important to wait a *full* 10 seconds after MCU PUP for it to reset before going ->REC, otherwise you'll get a LENS ERROR. The GRN and YEL LEDs do a 1/2s flash to indicate ready to go ->REC.
edit: Please refer to
http://chdk.setepontos.com/index.php?topic=8801.msg94646#msg94646 for the latest version.