What Do I Build Next? A Raspberry Pi 4 HQ Camera with Screen
Last year the Raspberry Pi Foundation announced the HQ Camera mount ” Buy a Raspberry Pi High Quality Camera – Raspberry Pi” and lens system ” 12.3 megapixel Sony IMX477 sensor, 7.9mm diagonal image size, and back-illuminated sensor architecture, with adjustable back focus and support for C- and CS-mount lenses” to take the Raspberry Pi camera to the “PRO” level.
Would this mount that allowed “CS” lenses adapt to this platform transform pictures that rival Professional or even Cell phone pictures? I wanted to find out.
The 1st hinderance was availability and then cost. $50.00 for the HQ mount, $50.00 for Telephoto lens, $25.00 for 6mm Wide angle, $25.00 for the 5MP CS lens and that was on top of the Raspberry Pi 4 – 1GB $30… so about $180.00 USD without SD card-$10, Tripod- $20.00, power adapter/battery pack- $7.50, Pi 4 case with 3.5″ TFT Display with touch- $30.00; so add another $67.50 with taxes, shipping and now I’m at $300.00.
1 / 2
•
2.5″ TFT-left with RPi3B+ and 2.8″ TFT-right with RPi4B+
My original idea was to utilize a 2.5″ TFT Touchscreen with 4 buttons from Adafruit ” PiTFT Plus Assembled 320×240 2.8 TFT + Resistive Touchscreen : ID 2298 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits ” and a modified case “Pi Model B+ / Pi 2 / Pi 3 – Case Base and Faceplate Pack – Clear [for 2.8 PiTFT] : ID 3062 : $8.95 : Adafruit Industries, Unique & fun DIY electronics and kits “; with these four buttons I could have power-ON/OFF, Start the PiCamera App, Preview/Take “LIVE” picture. and “Timer” for elapse or delayed picture or something like that or I could utilize a Pimoroni Pibow PIM345 Raspberry Pi 3B+ case “again modified for a Raspberry Pi 4”. I could not find a Raspberry Pi 4B+ case for the 2.5″ TFT screen.
But “wait a minute” you say, ” why not use a Raspberry Pi 3B+? “. Yes I could and it would be easier with “No MOD-ding” and since I had purchased two HQ Camera mounts, I’ll be making two versions.
1 / 6
•
All hardware required?
Both versions would require some slight case modifications to attach the HQ Camera mount and a slot for routing the HQ Camera cable itself. These were easy mod’s using a drill and a rotary dremel tool.
1 / 7
•
RPi 4B+ build
1 / 7
•
RPi 3B+ build install standoffs
1 / 5
•
HQ Camera Mount
1 / 10
•
Position RPi3B+ in case bottom to position camera cable route
Actually, the most difficult aspects of these builds were “how do you focus the attached lens and why is the optimal focus point for each camera mount different for each lens?” Even though each CS lens had its own focus mechanism, the camera base also had a “coarse focus ring” that had different position that was achieved by trial and error. Thus was the requirement of the “preview LIVE screen” that would be used to setup each picture before it is taken.
This also meant, the interchanging of lenses required a few minutes between pictures when changing lenses. Swapping between the Telephoto and the Wide Angle lenses proved not for the faint of heart, unless as it was in my case, that you have two cameras that could be dedicated to a specific lens.
My next upgrade for these builds is this Arducam CS-Mount kit: “for $110.00” although I have the Telephoto and Wide Angle lenses (I paid $75.00 for these) it is still a value to me for the other three lenses
Amazon.com : Arducam CS-Mount Lens Kit for Raspberry Pi HQ Camera (Type 1/2.3), 6mm to 25mm Focal Lengths, 65 to 14 Degrees, Telephoto, Wide Angle, Pack of 5 : Camera & Photo
As displayed on Amazon’s site
Now to install the PiTFT faceplate and buttons (I haven’t re-programed these buttons to take picture, show live image, show stored pictures, and power ON/OFF Camera).
1 / 5
•
TFT faceplate upside down with buttons loosely installed
Now, for the 1st boot…will it?
1 / 13
•
this is a good sign
More localizations and updates
1 / 9
•
more localizations…interfaces
Now to enable 2.8″ PiTFT Screen, using Adafruit install script
1 / 7
•
Adafruit’s Easy Single script procedure
Trying to get the screen orientation correct with buttons
1 / 4
•
rotate screen
The build up of the RPi4B+ is similiar to RPi3B+ (In my build I added HQ Camera mount after initial power up for clarity and assembly ease)
1 / 10
•
RPi4B+ bottom case modification hardware for HQ camera mount
Not Install the HQ Camera mount
1 / 5
•
position HQ Camera mount on standoffs
Now dry fit, route camera cable and modify the RPi4B+ bottom case
1 / 7
•
now to figure the camera cable routing and careful bend
Now to modify intermediate case for camera cable
1 / 6
•
rough position for camera cable
Now attach touchscreen and faceplate
1 / 5
•
excess camera cable loop-long isn’t it
Now for the RPi4B+ build, first power up (some may notice missing touchscreen and HQ Camera)
1 / 15
•
install USB-C power, mini HDMI cable, and USB keyboard and mouse
Installation of Touchscreen for RPi4B+ with heat sinks
1 / 5
•
Touchscreen directions for installation
1 / 10
•
addition of heatsinks
Final pictures and additional lenses
1 / 4
•
RPi3B+ left/ RPI4B+ right
Now to view pictures and video on the RPi touchscreen, I installed RaspiCam (Android App on my cell phone) or RPi Camera Viewer for Android ” https://play.google.com/store/apps/details?id=ca.frozen.rpicameraviewer&hl=en_US&gl=US ” and Picamera utilities/functions ” https://picamera.readthedocs.io/en/release-1.13/ ” locally and on my Windows 10 PC, I installed RPi Camera viewer. ” https://www.microsoft.com/en-us/p/rpi-camera-viewer/9nqwx2pnvzk2?activetab=pivot:overviewtab “
Also, RaspiCamera Remote: (but this App wants the stream to be available on port 5000):
” https://play.google.com/store/apps/details?id=com.pibits.raspberrypiremotecam&hl=en_US&gl=US “
I even used VNC Viewer to remote into the local desktop and to launch the local Picamera utility remotely.
Now for my lens tests and video streaming…
1 / 4
•
My RPi4B+ HQ Camera with external HDMI screen and keyboard from NexDock
1 / 5
1 / 4
I made these comments in beginning of this writeup when testing the two Adafruit lenses but I later found that the Arducam lense kit of five lenses were of better quality and apparently had a focal point that required minimal coarse focus adjustment when swapping lenses:
” the most difficult aspects of these builds were “how do you focus the attached lens and why is the optimal focus point for each camera mount different for each lens?” Even though each CS lens had its own focus mechanism, the camera base also had a “coarse focus ring” that had different position that was achieved by trial and error. Thus was the requirement of the “preview LIVE screen” that would be used to setup each picture before it is taken.
This also meant, the interchanging of lenses required a few minutes between pictures when changing lenses. Swapping between the Telephoto and the Wide Angle lenses proved not for the faint of heart, unless as it was in my case, that you have two cameras that could be dedicated to a specific lens. “
I also determined that besides local preview mode, I would need to have video streaming enabled so I followed this write-up:
” https://makezine.com/projects/beginner-project-a-remote-viewing-camera-with-raspberry-pi/ “.
I also installed a surveillance mode following this writeup:
” https://gndtovcc.home.blog/2020/04/15/video-streaming-with-raspberry-pi-camera/ “.
The best thing about this remote viewing was the webpage
I also tried this writeup, but had issues with “numpy” compilation issues after flask was installed on my RPi4B+ build but did not have an issue on the RPi3B+ version:
” https://github.com/EbenKouao/pi-camera-stream-flask “. Be sure to use the Raspbian OS release May 2020 build, I used the most current version.
Future revision for RPi3B+ build
” https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi ” and ” https://github.com/nift4/Raspberry-Pi-Testing “
1. Program buttons for Power ON/OFF
2. Launch camera utility
3. take still picture/video
4. view picture/video
Future revision for RPi4B+ build
” https://ozzmaker.com/programming-a-touchscreen-on-the-raspberry-pi/ ” and ” https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/overview “
1. External Power ON/OFF button
2. Button to launch camera utility
3. take still picture/video
4. view picture/video
Nonetheless, I discovered that one of my Adafruit lenses had an internal defect or debris within its assembly and I must exchange it but all my other lenses perform as expected in all streaming modes.
Here are some other links to info that can expand upon this project or were viewed when researching:
zerow survelliance
https://www.makeuseof.com/tag/set-up-raspberry-pi-camera-module/#:~:text=Setup%20is%20straightforward%2C%20and%20requires%20you%20to%3A%201, a%20picture%3A%20Use%20a%20simply%20command%20line%20instruction.
https://picamera.readthedocs.io/en/release-1.13/recipes1.html
https://play.google.com/store/apps/details?id=com.pibits.raspberrypiremotecam&hl=en_US&gl=US
https://github.com/EbenKouao/pi-camera-stream-flask
https://www.electronicsforu.com/electronics-projects/make-video-streaming-camera-with-raspberry-pi#:~:text=Make%20Video%20Streaming%20Camera%20with%20Raspberry%20Pi%201, composite.%20…%205%20Giving%20movement%20to%20camera.%20