1 / 9
KISS Viewer camera — zdjęcie 1
1 / 9

KISS Viewer camera

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

Kentucky's Interchangeable lens Small Sensor camera in a mini Viewer accepts Sony E/FE mount lenses with 9.7X crop

Ocena
0 / 5
Polubienia
4
Pobrania
6
Wydruki
0
Wyświetlenia
37
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Photo & Video
Licencja
Creative Commons — Attribution

KISS Viewer is Kentucky's Interchangeable lens Small Sensor camera in a mini Viewer. The basic shape suggests the classic look of a Tower Optical Binocular Viewer, and the unit has a pair of viewing holes that can be used for approximate aiming, but the unit is actually a mount for an AI Thinker ESP32-CAM camera to be used with an adapted lens. The native lens is removed from the OV2640 camera module included in the ESP32-CAM, and the KISS Viewer instead allows use of any lens in a Sony E/FE mount or adaptable to that mount. The OV2640's 2MP sensor is quite small, thus yielding an approximately 9.7X crop compared to a full-frame sensor, so cheap old lenses designed for full-frame cameras yield extreme telephoto captures. The images are delivered to your WWW browser wirelessly via 2.4GHz 802.11, and the WWW page offers a wide variety of still and video capture controls.

Although a lot of information is posted here, the complete overview of KISS Viewer is posted as an Instructable: KISS Viewer: Kentucky's Interchangeable-lens Small Sensor camera in a mini Viewer. All the firmware and postprocessing software is freely available at https://aggregate.org/DIT/KISS. It is a very easy build, although there are a lot of parts to 3D print. This Printables posting is where you get the latest part STLs to 3D print.

Software

Before assembling anything, perhaps while the parts are printing, I recommend programming your AI Thinker ESP32-CAM boardlet using the ESP32 Arduino environment. You will need not only the ESP32-CAM, but also a USB serial converter for programming it. The programming process, and much more about using the ESP32-CAM, is detailed by a Random Nerd Tutorial. In fact, the code used in the tutorial demonstration is almost exactly what you want to program the part with for the KISS Viewer, and you could use it rather than my version. My code is mostly a set of minor edits applied to the CameraWebServer demo code that comes with the ESP32-CAM Arduino environment. There are two catches:

  1. The OV2640 camera module always contains the same sensor, but it isn't always in the same orientation relative to the cable that connects it to the ESP32-CAM board. The 1600x1200 pixel sensor is typically set such that the 1600 dimension in is the direction of the white text printed on the cable, which might be portrait or landscape orientation when mounted in KISS Viewer depending on the particular OV2640 you get. Most sellers are not consistent about which you get, although the portrait version seems most common. Unfortunately, the OV2640 controller doesn't know how to rotate the image 90 degrees, which is what you'd need for the portrait version to produce an upright live view. My code uses JavaScript in the HTML interface to add a button for toggling 90-degree image rotation of the live view.

  2. The 2.4GHz 802.11 interface in the ESP32-CAM must be configured at compile time to connect to a specific network using the sample code, so it would not work without that 2.4GHz network. Many home networks no longer provide a 2.4GHz option and, even if yours does, you would only be able to use KISS Viewer on the 2.4GHz network you compiled it for. Thus, my code has the (default) option of KISS Viewer establishing its own 2.4GHz 802.11 network that you can connect to with your computer or smartphone.

I strongly recommend programming the part and testing it using the native lens before assembling KISS Viewer. To make it more obvious whether you are running the original demo code or my version, the HTML interface produced by my version of the code identifies the device as KISS Viewer, and all the controls have blue colors from the official University of Kentucky color scheme rather than the red shades of the demo code.

Printing

The assembled KISS Viewer would fit in a cylinder 260mm tall with a diameter of 144mm -- which is fairly large for a 3D-printed object. All parts are designed to be printable without supports using a typical FDM printer with a 0.4 mm nozzle. Each part is in a file named with the prefix "viewer_". Although most parts should be strong enough using default print settings, parts 3 (or 11 and 12), 6, 8, and 9 are potentially prone to breaking at layer interfaces. Printing those parts with thicker walls or stronger infill wouldn't hurt, and enabling infill combination in your slicer can significantly help avoid cracking at layer boundaries while also reducing print time.

To most closely match the look of a Tower Optical Viewer, I recommend printing parts 1, 2, 6, a second 6, and 7 using Silk Metallic Silver PLA. Parts 3, 4, and 5 should all be the same material, with good choices including Black PLA, Dark Green PLA, and Silk Metallic Silver PLA. Parts 11 and 12 are essentially an alternative to part 3 that has been broken into two pieces that screw together for those with printers that can't handle anything over 120mm tall. Part 6a and a second part 6a basically are rectangular cores to go inside the part 6 prints and can be printed in any material. Because these cores are printed in a different orientation, inserting (and gluing) them into the part 6 pieces greatly increases the strength of those parts, which is important because they provide the clamping force to keep a mounted lens from drooping. Part 8 is the locking pin to hold an E/FE-mount flange in place, and it can also be printed in any material. It is screwed partially into the inside of the camera's E/FE-mount and tightened using a screwdriver to lock a lens in place after the lens has been mounted. Part 9 is the mount for the ESP32-CAM boardlet, and it can also be printed using any material. Finally, part 10 is an optional holder for an 8x8mm NIR blocking filter. Once the native lens has been removed from the OV2640 that came with the ESP32-CAM, it also no longer has an NIR (near infrared) blocking filter. Thus, if no NIR blocking filter is added, KISS Viewer is full-spectrum sensitive. Full spectrum sensitivity means that NIR scene content down to around 1050nm is recorded and visible light colors will be altered by this NIR light.

Note that you can get an even shinier chrome look by painting printed parts with silver paint rather than using Silk Metallic Silver PLA. However, you need to be careful not to have the paint interfere with part functionality -- which would most likely happen for the E/FE flange surface and screw threads. You also can use flat black paint to minimize reflections and seal light leaks within the body (parts 1 and 2), but in practice this does not seem to be an issue.

Assembly

None of the 3D printed parts should require significant postprocessing, but some assembly is required:

  1. If you printed part 11 and 12, you can screw (and optionally glue) those parts together to create what is effectively your part 3.

  2. Part 4 should be glued into the indentations in part 3 and given time for the glue to set. Alternatively, the parts can be welded together using a soldering iron. Note that the part 4 ring has a large enough internal diameter to easily pass over the top of part 3.

  3. Part 5 should be glued into the indentations in part 4 and given time for the glue to set. Alternatively, the parts can be welded with a soldering iron. Note that the part 5 ring has a large enough internal diameter to easily pass over the top of part 3.

  4. Both pairs of parts 6 and 6a need to have the rectangular 6a parts glued into the slot in part 6 as a stiffener. The better the glue bond, the stronger these parts will be; I used cyanoacrylate glue.

  5. Mount the ESP32-CAM boardlet on part 9. Part 9 is essentially a circuit board without traces, and the ESP32-CAM boardlet should be mounted into it such that the wings of part 9 line up with where the OV2640 imager is and the boardlet is pushed in so that the pins protrude as much as possible from the indented side of part 9. In other words, the ESP32-CAM board goes on the side that is the bottom of part 9 in the print orientation. The ESP32-CAM boardlet can be tacked in place using a few spots of hot glue, but try to avoid encasing any active components in hot glue so that they can stay cool more easily while operating.

  6. The ESP32-CAM's OV2640 native lens is screw-mounted with a tiny thread, but to keep the focus fixed, it is generally tacked in place with Loctite or a similar glue. Take the OV2640 module as a separate part, not connected to the ESP32, and hold the square base of the chip module with one pair of pliers while using a second pair to gently loosen the native lens by turning it counterclockwise until it is free to remove. KISS Viewer does not use that lens.

  7. Lock the OV2640 cable into the ESP32-CAM boardlet's connector. Some OV2640 modules come with self-stick backing; if yours did, peel off the backing and press it to the flat metal of the TF card slot casing. If yours isn't self-stick, use a dot of glue to hold the OV2640 in place. Don't use hot melt glue because the camera gets warm enough for that to distort and leave the camera module flapping around. The raw sensor of the OV2640 module is exposed throughout this, and the pixels are tiny compared to dust spots, so be careful not to contaminate the sensor while handling it.

  8. Optionally, mount the 8x8mm NIR blocking filter to give the camera accurate visible-light color rendering. Use tweezers to place the 8x8mm filter into part 10, then place that over the OV2640 module. Use heat-resistant glue to lock part 10 and the NIR filter in place against the TF card holder. With the NIR filter in place, the OV2640 sensor is somewhat protected from dust, and dust landing on the NIR filter is far enough in front of the sensor that the shadow it casts typically isn't problematic until lens apertures around f/11 or higher.

  9. Mount part 2 within the fork of part 3 using the 6+6a screws. Don't overtighten -- we know you are stronger than the 3D-printed screws.  ;-)

  10. It is now time to solder the power connections to the ESP32-CAM. I'm a big fan of using a wire-wrap tool to connect to the pins, then soldering. If you don't have a wire-wrap tool, for two pins it isn't hard to manually wrap a wire around each pin using tweezers. Viewing the ESP32-CAM from the back, the top pin on the left side should be connected to 5V and the pin just under it to Ground. No other connections are needed for operation, although USB serial access and programming the ESP32-CAM require additional connections, respectively, on two or four pins. The 5V power can come either from a USB cable snaked up through the stand and base of part 2 (before soldering to the boardlet!) or from a standard 9V battery regulated to 5V with the battery resting on the shelf inside part 2. I originally used ye olde 7805 regulator from a rail of them I had lying around, but it gets unpleasantly warm dropping 9V to 5V. There are now many buck converter boardlets that are much more efficient (e.g., 96% vs. 56% for a 7805); just make sure the one you pick can handle a steady draw of at least 500mA. The one I used is this Teyleten, which costs less than $1 each, does not require adjustment to output precisely 5V, and is rated to supply 2A without problematic heat dissipation. Whichever regulator you are using can be glued down over the cable hole at the bottom of part 2.

  11. Mount an E/FE lens on the unit. You can use a screwdriver to adjust the E/FE lock screw to keep the mounted lens from rotating.

  12. Slide part 9 into the slots on part 2, power it on, connect your web browser, and turn on live video view. The positioning of part 9 is supercritical in establishing the focal plane of the camera. Aim the camera at something distant (looking through the viewer holes makes aiming easy) with the lens aperture wide open and focus set to slightly closer than infinity. This will allow focus slightly beyond infinity with the lens used for adjustment, but that might be necessary to ensure infinity focus for adapters or lenses that are slightly miscalibrated or for lenses that change infinity focus depending on ambient temperature. The appropriate distance should have the ends of the rails of part 9 within a few mm of where the slots end and part 1 will be mounted. While watching the live view, move part 9 along the slots. You want the entire image to be sharp. Minor tilts will, through the Scheimpflug principle, result in tilting the plane of focus more than you'd expect. Although you could use this tilt ability to your advantage under specific circumstances, you don't want the focal plane tilted for normal use. Once you have part 9 well aligned, I recommend locking it in place with a little hot glue in the slots.

  13. The final step of assembly is mounting the viewer-side cover, part 1, on part 2. The cover is deliberately held by a single screw, part 7, so that it can easily swing out of the way to access the inside of part 2. Such access is necessary to change the 9V battery, unlock the E/FE lens mount, or to re-adjust the focal plane. Part 7 is a little awkward to screw in because it is designed to look like the focus adjustment on a Tower Optical Viewer, but take your time and don't overtighten it. The KISS Viewer is actually fully operational even without part 1 mounted.

User Guide

Using KISS Viewer is straightforward, but the HTML page interface provides a surprisingly wide array of camera controls for the OV2640. Once you have powered up KISS Viewer, connect your computer or smartphone to its 2.4GHz 802.11 wireless Ethernet network, which may be named something starting with "ESP" although the source code requests it be named "KISSViewer". The default password is "kisskiss" and your password must be at least 8 characters long. Once connected, set your web browser to access the URL "http://192.168.4.1". That should bring up the KISS Viewer control page:

Initially, the page will not have an image displayed; that's enabled by one of the buttons near the bottom of that scary-long menu. You can find more about these options in various places on the WWW, but here we will briefly cover the most significant:

  • XCLK MHz: This clock essentially scales the speed of the camera processing. The default setting is 20, but dropping to lower numbers also slows sensor scan rates and thus can enable shooting in lower light with less noise. The camera is also less likely to suffer glitches at lower settings.

  • Resolution: The OV2640 is a 1600x1200 pixel sensor, but can downscale images to smaller sizes to reduce the JPEG file size, thus enabling higher frame rates for live view. 640x480 is a good compromise to speed composition and focus during live view, but 1600x1200 isn't that slow, typically delivering several frames per second.

  • Quality: Lower numbers here mean higher quality. JPEG DCT block artifacts become quite visible at higher numbers; I recommend staying close to 4.

  • Brightness, Contrast, and Saturation: These adjust what you'd expect, but are implemented purely in processing the JPEG -- they don't alter how the sensor captures the image and thus are not as useful as you might have hoped.

  • Special Effect: The sensor uses an RGB Bayer filter for color capture, and the "No Effect" setting delivers reasonable color images. The only other effect I find useful is "Grayscale", which produces good quality monochrome images with correspondingly smaller file sizes.

  • AWB, AWB Gain, and WB Mode: These settings alter white balance in the JPEG. Leaving them set as on, on, and "Auto" is usually what you want.

  • AEC SENSOR: This is basically your shutter speed control, implemented by dynamically adjusting the electronic rolling shutter scan rate. In on, it is automatically adjusted. If off, a manual exposure slider appears that allows you to set scan speed to have from 0 to 1200 units of delay, so higher numbers scan slower, letting the sensor see more photons.

  •  AEC DSP: This attempts to tweak exposure to correct for complex scene content, but often is overly aggressive. Consider turning it off.

  • AE Level: This is basically a brightness control that is applied as an offset to the sensor integration time. In other words, it is your exposure compensation control.

  • AGC and Gain Ceiling: This controls the analog gain applied while digitizing pixel values. AGC automatically adjusts this within the allowed range when it is on, but you get full manual control with it off. Boosting gain dramatically increases sensor noise, and sensor noise gets ugly fast. In low light, you are better off reducing XCLK MHZ and increasing delay for the rolling shutter.

  • BPC and WPC: These respectively apply corrections to the black point and white point, which typically improves JPEG quality (however slightly).

  • Raw GMA: Although the OV2640 can capture raw 10-bit data, there is a problem with DMA of the raw data to ESP32 memory. This option allows JPEGs to be created with a decent approximation to linear gamma, thus providing better dynamic range and a reasonable approximation to "raw" pixel data.

  • Lens Correction: This basically corrects for corner shading, which is largely about marginal rays not being fully detected, and is thus less lens-dependent than you might think. However, this vignetting correction is not as effective as one might hope because boosting brightness quickly hits dynamic range limitations. I generally leave it off when using Raw GMA.

  • H-Mirror and V-Flip: These do precisely what they say, but note that Horizontal and Vertical are relative to the sensor, which is often mounted 90 degrees turned.

  • DCW (Downsize): This enables scaling using DSP resampling to the requested resolution, whereas turned off uses only resolutions that the hardware directly supports. I generally leave this off.

  • Color Bar: Ignores sensor data and renders a test color bar image.

  • LED Intensity: Keep this off! This controls a bright white LED that is on the boardlet and hence behind the E/FE mounted lens on KISS Viewer. I suppose that it could be used for controlled fogging...

  • Toggle Rotate: This is not a standard control for the OV2640, but a simple mechanism for rotating images in the display so that they can match the sensor orientation in KISS Viewer. Note that this option only rotates the display of the image, not the image data.

  • Get Still: Capture and display a fresh still image.

  • Start Stream: Begin capture and display of a stream of JPEG images. Logically, this is requesting motion-JPEG video capture, but the frames are treated as individual JPEG captures. The repetitive nature of this capture mode can cause electrical interference patterns that show in images as structured noise, often lines in the 1600-pixel dimension. This is best treated as a live view mode for composition and focus rather than for capturing best-quality images.

  • Advanced Settings: Don't touch these unless you know what you're doing. However, the OV2640 does have support for things like ROI (region of interest) sampling if you need fancier control.

  • Save x: Two buttons with these labels will appear to the right of any displayed image. Clicking the Save button will save the current JPEG image.

Of course, there is no electrical coupling to the E/FE mount or any lens attached. Thus, focus and aperture control are entirely manual. There is also no mechanism for including useful EXIF data in an exposure. In fact, the ESP32-CAM does not have a clock that runs while power is off, so even timestamps are not feasible. On the other hand, saving an image on your computer or smartphone will generally tag the file with a timestamp.

The photos of plants included here were shot using a smartphone to control KISS Viewer with various lenses from 45mm to 300mm. Cheap commercial E/FE adapters can be used, but most also can be 3D printed; for example, the adapter I used for M42 lenses here happens to be my 3D-printed design. The particular ESP32-CAM I used has its OV2640 in portrait orientation, so the images had to be rotated 90 degrees to be upright, but no other processing was needed.

Design, Use of AI, and Acknowledgements

There are quite a few 3D models of Tower Optical Binocular Viewers available online, but I didn't use any of them. After collecting photos of actual Tower Optical Viewers, AI image-to-3D model tools were used to produce components of an approximately correct shape. The MakerWorld Image to 3D Model tool created a model that wasn't directly usable, but served as the primary approximate template for manually creating my OpenSCAD model. No AI-generated 3D structure was used without major manual editing, primarily to correct asymmetries, make the design cleaner and more printable, and improve the functionality of the KISS Viewer. Even the bumpy texture is manually created -- it is actually a texture I photographically sampled from a small sheet of leather. The result is that my 3D model consists of over 1,600 lines of very slow-to-render OpenSCAD code that also imports various things (e.g., my leather bump map). The parts it generates are not all in good printing orientations, and some require mesh repair. Thus, I decided not to distribute the rather messy OpenSCAD code and inclusions, but just final, cleanly printable without supports, part models toleranced for a typical FDM printer with an approximately 0.4mm nozzle.

I would like to acknowledge the work of two others that inspired portions of my design. All the threaded elements are based on structures generated by the excellent OpenSCAD ISO-standard metric threads library by Dan Kirshner. Although I have created many E/FE mounts, the Extension tube set for Sony E/FE for macro photography by thenickdude inspired me to invent a conceptually similar, but completely 3D-printable, grub screw locking mechanism; KISS Viewer also uses his E/FE bayonet design.

Tagi