News:

:) You cannot see "members only" boards if you are not a member, so please join the forum!

Main Menu

replacement for JVC video cam

Started by sem-geologist, February 04, 2025, 11:23:30 AM

Previous topic - Next topic

sem-geologist

(There is more universal methodological point at the end of the post, please scroll to last paragraph).
Our SX100 has 25 years, and JVC optical camera just broke down. SX100 PC was using composite video (coaxial cable with BNC connectors), and we were using T-joint to split signal and have direct view of live video on separate small 10 inch monitor (as framegrab'bed image at PC is extremely annoyingly laggy). So our replacement cam needed to give composite video. Most of Microscopy cams available in the market are now on USB2 or USB3, few has HDMI output - any of those are hard to plug into composite video expecting system and would require some video format changers (ready commercial solutions are pretty pricey devices).

I had found a solution below 100$. That is HQ camera module for Raspberry pi (which comes with no lenses only with CCD sensor of 1/2.3 inch) + Raspberry pi zero 1.3 SBC (which has CVBS (composite video base signal) header on the board. So as JVC cam had 1/2 inch sized sensor an this has only 1/2.3 inch - it is a bit smaller (only about 86% of view compared to JVC) and thus the scale is not the same, but I guess it could be recalibrated...

Well, we use optical image to set Z manually, as auto-focus on that SX100 is randomly faulty. I needed the solution in few days, so that I could go for winter break with my kids to mountains leaving the SX100 functional. I could set it up in a day, as these modules are quite easy to get. There are few important step/tips:
1. Flash Raspbian lite OS onto SD (OS without desktop)
2. Solder pins on CVBS headers on board
3. make a cable with BNC socket and CVBS
4. Disable uninstall unnecessary scruff from that little OS
5. Pay attention how the Cam module with ribbon cable is connected to raspberry pi zero (it is very easy to connect it reversed (wrong))
6. To start the live video conversion from cam module to composite video output the command from user mode should be executed on raspbery pi:
libcamera-hello -t 0 --width 720 --height 480where t=0 means that there is no timeout (else it would just work for 5 seconds);
and width and height forces NTSC proportions of video output (could not get how to change Raspberry output to PAL; will try figuring it out after holidays)
7. Screw out plastic part from JVC cam and screw on directly on raspberry pi HQ module, so the module could be mounted on SX100, where JVC were sitting.
8. JVC had ability of adjusting the CCD to focal plane, where raspberry HQ cam module has no such ability. I found out that it was enought to make (in my case) as single sheet paper ring and put it between plastic parts (it lifts up the module from SX100 case by few micrometers) - that was enought to get most sharp image at same plane as engaging auto-focus.

The tricky part is how to execute that command in user mode (it wont work from root like systemd service, cron jobs, and even could not work from .bashrc). Temporary I managed to make it autostart using .profiles , but it blocked my serial UART access to the pi.

The prototype is really promising as there is not much lag, good quality of image (I think it looks better than in JVC where dark image was very noisy). We made analysis of reference materials after mounting the new cam -- analyses are same thus z is the same.

I plan to make a raspberry pi "shield" with 2 amplified composite video outputs (that should take out thermal strain from processor, as else it needs to push up to 2V through 75ohms, and if two BNC connected thorough BNC T-connector that would be 2V through 33ohm (27mW at very small tiny spot in processor chip is a lot). and DC/DC converter, so 12V provided could power up that system. Also some case to tidy it all up and look more like cam, than some Mad Max stuff.

And now comes more interesting part I think which could be of interest for wider community.

I see that JVC had infrared light filter on the CCD. Most of video cameras comes with these filters mandatory mounted due to some social repercussions after one company made video cam's without such filter... Well, in microscopy we are not aiming these to humans, thus removing filters could give interesting effect. I probably will buy second module, and will try removing filter (where are some instructions available how to do that, and module is cheap enough to risk that) to try out, how much more information could be gathered using such IR-filterless video cam. What I expect is few things: 1) we would see beam spots on every sample, even if it would be not cathodo-luminescent; 2) we could observe the process of heating up of the sample and vicinity of the spot during analysis.

sem-geologist

... and that how my MacGyverish cam replacement looked initialy:

It was useing BNC composite output.

And now I had tied up things and it looks like this:

Now it is outputing video through HDMI (better resolution). HDMI splitter streams one output to the live monitor, other goes through HDMI2AV converter which converts it to PAL and sends to framegrabber on SX100 PC.

Quote from: sem-geologist on February 04, 2025, 11:23:30 AMI see that JVC had infrared light filter on the CCD. Most of video cameras comes with these filters mandatory mounted due to some social repercussions after one company made video cam's without such filter... Well, in microscopy we are not aiming these to humans, thus removing filters could give interesting effect. I probably will buy second module, and will try removing filter (where are some instructions available how to do that, and module is cheap enough to risk that) to try out, how much more information could be gathered using such IR-filterless video cam. What I expect is few things: 1) we would see beam spots on every sample, even if it would be not cathodo-luminescent; 2) we could observe the process of heating up of the sample and vicinity of the spot during analysis.

This is just to document my own stupidity, so no one would try replicate these stupid steps. I had tried the Cam module with IR filter temporary removed (removing whole plastic assembly with glued IR filter) and result was terrible with no hypothesized advantages. Failure to  see any advantage is probably because: 1) the sensitivity at IR is very low and cam is very weakly sensitive to soft IR. It is good enough for taking night photos of hot-blooded beings wondering in the dark, but not sensitive enough to register hot spots on the sample. 2) soft IR (if any) could be attenuated on its way to camera as there is 2 90° angled mirrors where one is half transparent. The disadvantage of having no IR filter is obvious in unpleasantly tinted view to orange and purple, and picture in normal lighted conditions lacks clarity.

However I think Raspberry pi + HQ cam could raise interest as it is quite versatile customisable device. For our purpoise we use raspberry pi zero v1.3, which is single core low power device with no WiFi or network. It can output either composite video or HDMI (not both simultaneously). However I think using raspberry pi 4 with native ethernet connection, it could be the most versatile cam as simultaniously could output cam view to composite or HDMI, or as USB cam, and could stream video over ethernet. That could be in particular useful for setups tailored for remote control, where video camera is kinda pain requiring to have some remote access also to the EPMA-control PC. With such camera it would be no more needed, optical microscope video could be streamed (in parallel to the video stream to EPMA-control PC) to the same subnetwork as PfS and accessed directly by remote end-user.