Wenting Channel
Stripping camera architecture down to electronic shutters and digital viewfinders makes custom hardware builds viable, but driving surplus CCD timing registers without vendor documentation introduces analog hurdles an FPGA or CMOS design would avoid.
AI-assisted summary of Build a DIY full-frame CCD camera — original source. Check the original for full context.
Source published:
Key ideas
- Wenting built an open-source DIY full-frame mirrorless digital camera (Sitina1) around a surplus 11-megapixel Kodak KAI-11000CM interline-transfer CCD and a Leica M mount. (0:00)
- Driving the multi-phase CCD required pairing an Analog Devices AD9990 front-end with discrete MOSFET drivers and CD4053 multiplexers to overcome vertical clock capacitive loads exceeding 100 pF. (4:06)
- Readout throughput is hardware-limited to roughly 4.36 FPS at full resolution by the AD9990's 48 MSPS dual-channel ADC, requiring 240p vertical line skipping to achieve a 25 FPS live preview. (8:08)
- The initial prototype relies entirely on an electronic global shutter, a 4-inch capacitive touchscreen, and a desktop post-processing utility to debayer and export captured RAW frames from an SD card. (11:14)
Detailed notes
## Background Published on YouTube by Wenting Channel on August 15, 2023, this video documents the design and assembly of a functional DIY full-frame CCD digital camera prototype. According to the creator's description, the build is an open-source hobby project (Sitina1 on GitLab) showcasing an initial, imperfect proof of concept that will be refined in future revisions.
## TL;DR Combining a surplus 11-megapixel Kodak KAI-11000CM full-frame CCD sensor with a manual Leica M mount, creator Wenting details the ground-up engineering of an open-source digital mirrorless camera. The architecture pairs an Analog Devices AD9990 analog front-end with an NXP i.MX RT1176 crossover microcontroller, overcoming complex clock-phase driving requirements, discrete level shifting, and hand-soldered PCB assembly. Firmware bring-up involved reverse-engineering undocumented timing registers by hand to stream a live preview to a 4-inch square touchscreen, resolving pipeline challenges like geometric inversion, dual-channel interleaving, debayering, and line-skipping downsampling. Despite prototype limitations—such as off-device PC raw processing, touchscreen shutter triggering, and interactive frame rate bugs—the build successfully captures and stores raw full-frame CCD photographs.
## Atmosphere & style The presentation carries an authentic, understated hacker ethos, characterized by Wenting's refreshingly candid reflections on design missteps, reverse-engineering headaches, and green bodge wires. His methodical, low-key narration balances technical rigor with modest self-deprecation as he shares 'really bad sample photos' and admits where Verilog or a CMOS sensor would have been easier. The pacing feels like an intimate workbench walkthrough, transforming the gritty reality of trial-and-error hardware debugging into a quiet, rewarding milestone when the custom camera finally displays first light.
## Bulletin - [00:00](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=0s) Wenting built an open-source DIY full-frame mirrorless digital camera (Sitina1) around a surplus 11-megapixel Kodak KAI-11000CM interline-transfer CCD and a Leica M mount. - [04:06](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=246s) Driving the multi-phase CCD required pairing an Analog Devices AD9990 front-end with discrete MOSFET drivers and CD4053 multiplexers to overcome vertical clock capacitive loads exceeding 100 pF. - [08:08](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=488s) Readout throughput is hardware-limited to roughly 4.36 FPS at full resolution by the AD9990's 48 MSPS dual-channel ADC, requiring 240p vertical line skipping to achieve a 25 FPS live preview. - [11:14](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=674s) The initial prototype relies entirely on an electronic global shutter, a 4-inch capacitive touchscreen, and a desktop post-processing utility to debayer and export captured RAW frames from an SD card.
## Key takeaways - [00:00](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=0s) To make a DIY digital camera build practical, complex mechanical shutter assemblies and reflex optical viewfinders were replaced with an electronic shutter and an electronic display. - [01:48](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=108s) The Leica M mount was chosen because its short mirrorless flange focal distance accommodates a vast catalog of manual lenses, eliminating the need to reverse-engineer electronic lens protocols. - [01:48](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=108s) Surplus industrial CCDs like the Kodak KAI-11000CM offer publicly accessible datasheets, whereas modern consumer camera sensors typically require restrictive NDAs and industry contacts to acquire. - [04:06](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=246s) The interline-transfer architecture enables a global electronic shutter by shifting photodiode charges into shielded vertical registers, though the reduced light-gathering area lowers full-well capacity. - [04:06](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=246s) Vertical CCD clock pins demand sub-microsecond rise times across capacitive loads exceeding 100 pF, requiring discrete MOSFET driver pairs and CD4053 analog multiplexers for multi-level voltage shifting. - [06:48](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=408s) The prototype PCB functioned reliably despite bypassing high-speed routing conventions like trace length matching and the 3W separation rule on parallel SDRAM lines. - [08:08](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=488s) Configuring the AD9990 timing generator required tedious register reverse-engineering and oscilloscope experimentation due to a total lack of vendor application notes or reference code. - [08:08](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=488s) Raw optical projections from manual prime lenses produce an upside-down image on the sensor plane, requiring an initial 180-degree rotation fix in software. - [08:08](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=488s) Because the KAI-11000CM reads pixels simultaneously outward from both halves of the die, the MCU's CSI peripheral receives an interleaved stream that must be de-interleaved in memory. - [08:08](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=488s) With the dual-channel ADC operating at 48 MSPS aggregate throughput, full 11-megapixel readouts are capped at 4.36 FPS, necessitating vertical line skipping down to 240p for smooth 25 FPS live view. - [11:14](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=674s) Early firmware exhibits an unresolved bug where adjusting the shutter speed alters the live view preview frame rate, and physical triggers were deferred in favor of an on-screen touch button. - [11:14](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=674s) In-camera raw image export was not implemented in the first prototype, instead relying on an off-device desktop utility co-developed with Yukidamayi-san to debayer and develop captured photos.
## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=0s) DIY Camera Concept and Architecture Simplification
Having practiced DIY electronics for over a decade while actively pursuing photography, Wenting decided it was a natural progression to build a custom digital camera from scratch. Arriving at a functional prototype, he decided to document the engineering and assembly process of this DIY full-frame CCD mirrorless interchangeable-lens camera (MILC), noting that a second video will cover necessary design revisions.
To make the DIY build feasible, the architecture had to be stripped down to the bare essentials: film, shutter, and lens. For a digital build, the physical film is substituted with an image sensor and its supporting drive circuitry. A mechanical shutter presented complex mechanical engineering challenges outside Wenting's expertise, so he opted for an electronic shutter instead.
```mermaid flowchart LR accTitle: Minimalist Digital Camera Architecture accDescr: High-level architectural trade-offs chosen to simplify the DIY camera build. subgraph Simplifications["Design Choices"] A["Film"] -->|"Replace with"| B["CCD Sensor + AFE"] C["Mechanical Shutter"] -->|"Replace with"| D["Electronic Shutter"] E["Optical Viewfinder"] -->|"Replace with"| F["Electronic Viewfinder (DSI Screen)"] end ```
The next challenge was the viewfinder mechanism. A separate side-mounted rangefinder would complicate focusing and focal length changes. An SLR mechanism with reflecting mirrors and prism lenses was also ruled out as far beyond his fabrication skills. Ultimately, he settled on an electronic viewfinder (EVF) using an integrated display for live preview. Although an EVF comes with clear trade-offs—higher power draw, noticeable display latency, and potentially washed-out visibility under direct sunlight—it dramatically simplifies construction while ensuring the preview framing closely reflects the final capture.
- Project repository: open-source on GitLab under `gitlab.com/zephray/Sitina1` - Camera type: DIY full-frame CCD mirrorless interchangeable-lens camera (MILC) - Optical viewfinder alternatives rejected: side rangefinder (focus/zoom parallax issues) and SLR reflex mirror assembly (mechanical complexity)
---
[01:48](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=108s) Component Selection: Sensor, Lens Mount, and Processing Hardware
When choosing parts, lens selection started with the mount interface. To avoid reverse-engineering complex lens communication protocols, Wenting restricted the build to manual glass. Because the mirrorless layout allows for a very short flange focal distance, he chose the Leica M mount, which offers a vast catalog of manual lenses.
Choosing an image sensor was dictated entirely by what appeared on the surplus market. High-end modern camera sensors such as the Sony IMX lineup generally demand non-disclosure agreements (NDAs) to access complete datasheets and remain difficult for hobbyists to acquire. Surplus industrial sensors, however, often have publicly accessible documentation. Wenting acquired several Kodak KAI-11000CM image sensors—an 11-megapixel, 35mm full-frame optical format, interline-transfer CCD capable of global electronic shuttering.
```mermaid flowchart TD accTitle: Hardware Component Interconnect accDescr: Block diagram of core chips, display, power, and sensor interface. subgraph SensorFrontEnd["Sensor Front-End"] CCD["Kodak KAI-11000CM CCD (11MP Full-Frame)"] AFE["Analog Devices AD9990 (AFE + ADC + TG)"] CCD <-->|"Clocks & Dual-channel video"| AFE end
subgraph CoreProcessing["Digital Core"] MCU["NXP i.MX RT1176 MCU"] AFE -->|"CSI Interface"| MCU SDRAM["SDRAM + Flash"] <--> MCU end
subgraph UIandPower["User Interface & Power"] Disp["4-inch 720x720 Capacitive Touchscreen"] Bat["Dual 18650 Battery Pack"] MCU -->|"MIPI DSI"| Disp Bat -->|"Split-rail DC-DC & LDOs"| SensorFrontEnd Bat --> MCU end ```
To drive the CCD, he chose the Analog Devices AD9990, a chip combining an analog front-end (AFE), an analog-to-digital converter (ADC), and an integrated timing generator. For digital control, he selected the NXP i.MX RT1176 crossover microcontroller. Wenting reflected on this architectural choice:
> “I went with this just because I thought it was going to be straightforward (which turned out not to be the case), not because this is the best solution.”
He noted that selecting an all-CMOS sensor path would have bypassed numerous CCD-specific hurdles, just as utilizing an FPGA or an SoC like the AMD/Xilinx Zynq would have delivered higher processing throughput. For user input and display, he paired a 4-inch 720×720 square capacitive touchscreen with the system, eliminating the need to fit mechanical tactile switches into the chassis. The entire system runs on a dual-18650 lithium-ion battery pack.
- Optical sensor: Kodak KAI-11000CM (11 MP, interline-transfer CCD, 35mm full-frame, global electronic shutter) - Sensor controller/AFE: Analog Devices AD9990 (integrated timing generator, analog front-end, ADC) - Main processor: NXP i.MX RT1176 microcontroller - Display: 4-inch 720×720 capacitive touchscreen driven over MIPI DSI - Power source: dual 18650 battery holder modules - Lens mount: Leica M mount (short flange distance, broad manual lens ecosystem)
---
[04:06](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=246s) CCD Physics and Analog Driving Challenges
The digital compute core is straightforward, consisting of the MCU, SDRAM, and flash memory. Driving the CCD, however, proved considerably more difficult. The sensor requires six discrete clock phases to operate. While the AD9990 handles signal generation, amplification, sampling, and digitization with few external components, delivering those signals into the sensor requires specialized driving stages.
Wenting explained how an interline-transfer CCD functions using an illustrative 4×4 pixel array:
```mermaid flowchart TD accTitle: Interline-Transfer CCD Charge Readout Sequence accDescr: Sequence from substrate charge dump to line-by-line serial output. A["1. Electronic Front Curtain: Dump substrate charge"] --> B["2. Exposure: Photons generate electron charge wells"] B --> C["3. Global Transfer: Shift accumulated charge to interline storage columns"] C --> D["4. Vertical Shifting: Toggle vertical clocks to step rows into bottom horizontal buffer"] D --> E["5. Horizontal Readout: Toggle horizontal clocks to shift pixels out to output nodes"] E --> F["6. AFE Conditioning: Buffer, correlate double sample (CDS), amplify, and digitize"] ```
The process begins with an electronic front curtain that purges all residual charge from the substrate. Incoming photons are converted to charge packets across the exposure window. Once exposure concludes, charges transfer simultaneously from the light-sensing photodiode areas into shielded interline vertical shift registers. This simultaneous transfer enables a global electronic shutter. Unlike full-frame architecture CCDs—where the entire silicon footprint gathers light—an interline sensor sacrifices photodiode surface area to fit the vertical storage columns, requiring microlenses above each pixel to refocus light into the narrower collection wells. This smaller collection area diminishes full-well capacity (the saturation charge threshold before blooming occurs), which degrades the sensor's maximum signal-to-noise ratio (SNR).
Once charge packets sit inside the shielded vertical columns, the vertical clocks toggle, stepping an entire row into the horizontal output shift register. High-frequency horizontal clocks then advance pixels one by one out through the charge-to-voltage conversion amplifiers to be sampled.
Bridging the AD9990 to the sensor created heavy analog design challenges. The CCD inputs do not use 3.3V or 5V logic levels: - Vertical clock pins present a massive capacitive load exceeding 100 pF while demanding sub-microsecond rise times ($<1\ \mu\text{s}$). Because standard 74-series logic chips or MCU GPIO pins cannot drive this load, dedicated discrete MOSFET driver pairs were implemented. - Analog multiplexers (CD4053) serve as flexible, multi-level voltage logic level shifters. - Horizontal clocks, having considerably lower input capacitance, are driven using 74-series logic level shifters. - Power rails rely on a combination of split-rail DC-DC converters and linear regulators, though Wenting characterized the initial power circuit design as "actually quite bad" and slated for a complete overhaul in revision two.
---
[06:48](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=408s) PCB Layout, Fabrication, and 3D Printed Prototype Enclosure
The printed circuit board layout was largely an exercise in interconnecting the functional blocks. Because the dual 18650 battery cells dictated a wide footprint, the chassis naturally accommodated the large 4-inch display, giving the PCB plenty of surface area. To keep the overall stack as thin as possible, low-profile board-to-board connectors from Harwin were chosen.
Because this board was intended purely as an experimental proof of concept, Wenting bypassed rigid high-speed routing constraints: - He omitted length matching on the parallel SDRAM traces. - He ignored trace separation rules like the 3W guideline (keeping center-to-center trace separation at three times the trace width to avoid crosstalk), yet the memory interface functioned reliably.
Production files were generated directly from KiCad using the JLCPCB plugin by Benny, and the board was ordered with partial surface-mount assembly (SMT) to accelerate fabrication. Once received, Wenting hand-soldered the remaining parts and debugged the board, leaving several green bodge wires across the circuit.
To test optical alignment and sensor performance, he modeled a quick, modular enclosure and had it 3D printed via JLCPCB's online SLA printing service, avoiding the messy setup and post-processing of a home SLA resin printer.
---
[08:08](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=488s) Firmware Initialization, Timing Registers, and First Light
Firmware development began with the 4-inch MIPI DSI screen, which behaves much like standard SPI or parallel RGB panels: the microcontroller issues an initialization command sequence to configure internal power stages and lookup tables (LUTs) before entering continuous video streaming mode.
Configuring the AD9990 front-end to drive the CCD was significantly more grueling. The chip features dozens of registers to govern exposure, clock phases, and digitization timings, but lacks reference firmware or manufacturer application notes. Wenting had to reverse-engineer the operational registers by studying the raw datasheet:
> “All I can do is read the manual ten times, write down some code, experiment, and then construct the waveform by trial and error. This is taking way longer than I expected. If I were to write some Verilog on FPGA it would take less than a day.”
Once the clock waveforms matched the required timing specifications, the microcontroller's CMOS Sensor Interface (CSI) peripheral was enabled to stream frame data directly into memory and out to the display.
```mermaid flowchart TD accTitle: Raw Data to Display Pipeline and Artifact Corrections accDescr: Corrections applied to raw sensor readout before final display output. Raw["Raw CSI Input: Dual-channel interleaved stream"] A["De-interleave dual channels (Left & Right halves)"] B["Optical inversion correction (180° rotation)"] C["Demosaicing / Debayering (Single-color subpixels to RGB)"] D["Line-skipping subsampling (Reduce to 240p for 25 FPS)"] Final["Corrected 25 FPS Live View Display"]
Raw --> A --> B --> C --> D --> Final ```
Initial test images confirmed optical life, but revealed several image pipeline problems: 1. **Geometric Inversion**: Light passing through a prime manual lens produces an inverted optical projection on the sensor plane, requiring a 180-degree rotation fix in software. 2. **Dual-Channel Interleaving**: The Kodak KAI-11000CM uses dual horizontal readout channels, reading pixels simultaneously from the left and right sides of the die toward outer amplifiers. Because the MCU's CSI peripheral simply dumped the incoming stream sequentially into memory, left-side and right-side pixels were stored alternately, distorting the frame geometry until de-interleaving logic was implemented. 3. **Monochrome Output**: The raw output appeared strictly monochrome. As Wenting explained, outside of specialized 3CCD prisms or Foveon X3 layered-silicon designs, typical camera sensors lack co-located RGB subpixels; individual photodiodes are topped with a single-color Bayer filter mosaic. Producing a color preview requires a software debayering/demosaicing algorithm to interpolate missing color values across neighboring pixels. 4. **Bandwidth Limitations & Frame Rate**: Full-resolution readouts yielded a sluggish refresh rate. The AD9990's ADC samples at 24 MHz per channel, delivering an aggregate 48 megapixels per second across both channels ($24\ \text{MHz} \times 2 = 48\ \text{MSPS}$). Dividing 48 MP/s by the sensor's 11 MP frame size caps the theoretical full-frame readout at roughly 4.3 frames per second: $$\frac{48\ \text{MP/s}}{11\ \text{MP}} \approx 4.36\ \text{FPS}$$ To achieve a smooth 25 FPS live preview, Wenting implemented vertical line skipping. However, because charge packets must be shifted out line by line once a row reaches the horizontal shift register, horizontal pixels cannot simply be dropped mid-row. Consequently, hitting the 25 FPS preview target required downsampling the vertical resolution to 240p.
To handle user adjustments, Wenting built a minimal on-screen touch UI. Although sensor ISO gain sensitivity control was not yet hooked up, manual electronic shutter speed adjustment was fully integrated and functional.
[11:14](https://www.youtube.com/watch?v=Ma9FrN5COIo&t=674s) Touch Controls, Image Processing, and Sample Photos
Wenting demonstrates the camera prototype operating with real-time feedback, though several software and hardware quirks remain in this initial build. There are still lingering bugs in the firmware, most notably an issue where adjusting the shutter speed unintentionally alters the live view frame rate. On the hardware side, the physical shutter button has not yet been mounted to the body, forcing reliance on a software shutter button via the touchscreen interface. As Wenting explains: “I haven’t installed the physical shutter button yet, so the on-screen touch control will do for now.” Tapping the on-screen release actuates the shutter, previews the newly captured image on the display, and commits the raw data onto an onboard SD card.
```mermaid flowchart LR accTitle: Capture and Processing Flow accDescr: Pipeline showing touch capture on camera to SD card storage and PC processing. subgraph Camera["Camera Prototype"] A["Touchscreen Control"] -->|"Triggers capture"| B["CCD Sensor"] B -->|"Previews image"| C["LCD Display"] B -->|"Saves raw data"| D["SD Card"] end subgraph PC["Computer Workflow"] D -.->|"Insert card"| E["PC Utility Tool"] E -->|"Basic image processing"| F["Final Sample Photos"] end ```
Because an in-camera image export pipeline has not been developed yet, getting usable pictures off the system requires popping the SD card out and loading it into a computer. Image conversion relies on a custom helper program running on the desktop: “I haven’t implemented any export feature on the camera, so for now a small utility on PC is used for doing the basic image processing.” Wenting specifically credits collaborator Yukidamayi-san for helping develop this post-processing software tool before sharing what he jokingly terms "some really bad sample photos." Concluding the overview of the first prototype's progress, Wenting promises that the next installment will dig deeper into UI refinements, further system improvements, higher-quality photos, and behind-the-scenes engineering anecdotes before signing off to read viewer thoughts in the comments.
- **Current Software Bugs**: Changing the shutter speed setting directly alters the frame rate of the live view feed. - **Workflow & Processing**: - Shutter triggering is currently handled via capacitive/resistive touch controls on the display. - Images are captured, flashed onto the screen for confirmation, and written straight to SD storage. - Raw sensor frames are converted and processed off-device using a bespoke PC utility created with help from Yukidamayi-san. - **Upcoming Developments**: Future coverage will focus on physical refinements, user interface development, better photo samples, and behind-the-scenes development stories.
## Mentioned Wenting, Yukidamayi-san, Benny, Kodak KAI-11000CM, Analog Devices AD9990, NXP i.MX RT1176, Leica M mount, JLCPCB, Harwin, KiCad, GitLab, CD4053, Sony IMX, AMD/Xilinx Zynq
## Video description Just something I have been working on recently for fun. This is the first prototype so it's quite broken now. Still need to improve lot of the aspects. The project is open source on gitlab.com/zephray/Sitina1. Order your PCB at www.jlcpcb.com.
[Source](https://www.youtube.com/watch?v=Ma9FrN5COIo)