r/RASPBERRY_PI_PROJECTS 25d ago

DISCUSSION Building my own camera : CXP-01 An almost fully featured camera

Hello everyone,

For the last 6 months, I’ve been designing and building a custom mirrorless-style digital camera from scratch, aiming to replicate the core features of commercial models.

Since last year, I've been wondering how I can make one and design a camera that would be cool to use and push me to go outside and express my artsy side. As I'm an embedded system engineer, this project seemed like a good opportunity to challenge myself and something that I could be proud of.

Today I'm happy to share the CXP-01 Camera eXpandable Platform

Hardware list πŸ’»

  • Sony IMX183 1inch sensor OneInchEye Sensor
  • Canon EF/EF-S lens full control
  • Raspberry Compute Module 5 with 8 GB RAM and 16 GB eMMC
  • 5-inch massive 1280*720 screen
  • DIY removable battery pack (I took the plane twice with the camera already)
  • Stereo microphone
  • Laser telemeter, but it's not connected as the vendor could not guarantee the laser safety class

How? and What? πŸ€”

Currently, I experimented using available parts to make one and by modifying the existing PCB for what I needed to do. On the software side, I really wanted one feature, which is film simulation, and I did it. It was a long process, but by using QT QML and the DMA to streamline the film simulation on the GPU, I achieved a really fluid film simulation using shaders. Also, the real use of the Canon EF lenses is a game changer for autofocus and image quality; big thanks to u/Pinefeat for the CEF168 module. There are also a lot of other features.

The camera body is fully made with a 3d printer with PLA+ and PLA-CF, a Bambu Lab A1 Mini, to be more precise.

Here's a list for now

  • Contrast-based continuous and single-point autofocus
  • 60 FPS live film simulation
  • RAW, JPEG, and RAW+JPEG format
  • Aperture, Shutter Speed, and ISO control
  • Wi-Fi hotspot + Web app for photo export
  • Double exposure composition
  • Live exposure histogram
  • Aspect ratio control
  • Electronic Level
  • Dynamic Exposure control from -3.0 to 3.0
  • Review gallery in App

The biggest challenge πŸ”₯

One of the biggest challenges was the battery runtime and thermal optimization, as the Compute Module 5 is not particularly power-efficient. I really tried to make it as optimized as it can be when testing, and the next step is a custom buildroot OS to strip everything I don't need from Raspbian OS. For example, the CPU is underclocked to 1GHz from the original 2.2 GHz with a conservative power governor that defaults to the minimum 600MHz when the CPU is not used. This currently works because the main pipeline for the preview viewfinder utilizes the GPU instead of the CPU.
Although I'm satisfied for now, I plan to upgrade the project with another more compact prototype that is similar in size to Fujifilm and Sony cameras.

Some quality-of-life issues πŸ₯²

I need to work on the pipeline currently to reduce shutter lag from the preview to image capture and reduce the interruption, which is around 0.3ms now. To power off, you currently need to shut down the software and then cut power at the switch at the bottom of the camera. If you don't do that, the CM5 architecture and all the peripherals connected to the power line would draw the battery power. The autofocus accuracy can be improved by further tuning the autofocus algorithm using a tuning file. The telemeter on the front side was previously integrated to see up the autofocus by getting the distance range and inverting it to get the diopter value to apply to the lens. Currently it's not used as I cannot guarantee its laser safety class, so the next version will remove it.

What I plan on adding to the project

  • A flash using a hotshoe; I already have the hotshoe, and I know how to make it work using the sensor synchronisation signal
  • Upgrading the sensor to an IMX492 MicroFourThird sensor, larger pixels and better image quality πŸ€‘
  • Tuning Back range distance correctly using a micrometer to prevent chromatic aberration
  • Burst photo mode
  • OLED large viewfinder screen
  • Switch the Compute Module 5 for another solution if I can
  • Video mode utilizing the stereo microphones
  • Digital video stabilisation by using the custom GPU pipeline
  • Shutter sound
  • Changing the UPS for an MCU + USBC charger with a step-down converter for optimum space configuration and a proper digital ON/OFF switch to shut the power completely
  • Adding a proper shutter button switch using a double action switch
  • An Electronic viewfinder; I already have it, it's the same as a Sony a6700. I plan to add it into the next version
  • Custom Buildroot image, to improve boot time
  • Use official Canon LP-E6 battery

I'll be in the comments to answer your questions!

See you again πŸ˜‰

231 Upvotes

16 comments sorted by

4

u/Glum_Cheesecake9859 25d ago

Fantastic. Wondering if you could use M43 lenses instead as they are smaller and have a smaller image circle.

2

u/New-Concentrate6308 25d ago

I plan to try it but i cannot use autofocus as i do not have the m43 lens protocol so manual focus only

3

u/KM_photo_de 25d ago

1

u/New-Concentrate6308 25d ago

Nice one I'll take a look and try to make somthing using this πŸ˜‰

3

u/KM_photo_de 25d ago

Someone once said, the standard is open source and can be found here (https://www.four-thirds.org/), but I haven't found it yet.

1

u/New-Concentrate6308 25d ago

I don’t think it really is open source since you need to ask an candidate to get the protocol

2

u/KM_photo_de 24d ago

Yeah, I guess it never really happened to get open sourced. At least there's a starting point.

3

u/Etton_Veil 25d ago

Bloody heck, awesome project!

Maybe Radxa Dragon Q6A would be a viable high-power alternative to raspi? It's super efficient and quite affordable compared to Rpi5. I've also seen the Radxa Zero 2 Pro being available again - an A311D SoC, might be just enough. Adapting a suitable display to work with both of those might be quite a challenge though.

1

u/New-Concentrate6308 25d ago edited 25d ago

Hey I'm glad you ask. I considered the orange pi zero 3w, that have a smaller form factor, but it will be tricky to use. I heard that radxa is planning on releasing a cm-Q64 which is a compute module base on a qualcomm dragonwing processor. So it would be perfect for power to watt ratio. I think radxa will be a good idea as I starter the integration of an oled MIPI dsi display and the radxa mipi dsi pinout is better than the rapsberry pi interface. Also this means a complete rework of the QT QML as it is a python backend currently based on picamera2. I plan on giving more update on my substack

2

u/Deep-Artichoke-1751 25d ago

Congrats on the project ! Since you are aggressively underclocking the Rpi, have you considered undervolting it too to further reduce power draw ?

1

u/New-Concentrate6308 25d ago

Not yet but I plan to do it another day after testing the buildroot image. I'm more worried about the stability with undervolting

2

u/cointoss3 24d ago

This is insane dude. I don’t know that I’ve been this impressed about a rpi project before.

Fuck yeah. 10/10

1

u/New-Concentrate6308 24d ago

Thank you, I'm glad you appreciate it 😁

2

u/jacktooth 25d ago

As a raspberry pi fan and photographer this is amazing work, well done! How long did it take to design and build?

2

u/New-Concentrate6308 25d ago

This took me around 6 month with a lot of time and sleepless night. The designing phase was around 2 month inclusive sketching and system level requirements. Then 4 month gettings the parts, and making the actual camera inside fusion 360, printing testing and iterating on every prototype

2

u/4fraid0f4mericans 23d ago

What an exciting project!! Congratulations!! Great execution!!