Hi everyone. I’ve been using the Arducam ToF camera and I’m running into a few things I can’t figure out for an outdoor build. First, is the front side (lens side) waterproof at all? If I seal it in a casing, can it handle cold and wet weather like snow or rain? Also, is there some transparent glass or material I can put in front of the lens to protect it? And can I add another lens on top to get a wider FoV or more focus? Separately, one of my cameras had a flickering problem and I’m guessing the connection wasn’t solid. The other thing is I can only get videos out of the ToF, not the actual raw data — I need raw data at every time step.
Welcome to the forum. Could you share your exact setup? The video you’re getting is processed depth data — the raw frames come from a separate example in the repo (capture_raw.cpp). For timestamps you can pull them from the frame format in the loop. What Pi/camera wiring are you using? That’ll help with the flickering part too.
Setup is an Arducam ToF camera on a Raspberry Pi 4. This will be outdoors in cold and wet weather, snow and rain. For raw capture I found this example: Arducam_tof_camera/example/cpp/capture_raw.cpp at main · ArduCAM/Arducam_tof_camera · GitHub
For the timestamp I have this snippet:
FrameDataFormat format;
frame->getFrameDataFormat(FrameType::DEPTH_FRAME,format);
And I read that for raw frames I should use FrameType::RAW_FRAME, with the timestamp unit being 100ns. I’m also thinking of sealing the camera in a casing, and I need a designed enclosure for the ToF camera + Pi4 that can be 3D printed, mostly to fix the flickering connection issue.
Thanks for the details. A few things on your questions: the camera shell is not waterproof, and it hasn’t been tested in extreme conditions like cold, wet weather, snow or rain, so I can’t give an accurate answer for outdoor waterproof use. Covering the front of the lens with any material, including transparent glass, will make the distance measurement invalid. The ToF camera uses a stock lens that can’t be replaced, so an add-on lens to increase FoV or add focus isn’t supported. On the flickering, an improper connection is the likely cause, so a 3D-printed enclosure for the camera + Pi4 is a good idea. For raw data, the capture_raw.cpp example is the right place to look — the video you were getting is processed depth data.
Thanks. So no glass at all in front of the lens? What if I seal everything except the lens so the lens stays exposed and can be cleaned periodically with water? I’m trying to figure out if there’s any way to make this work outdoors without invalidating the depth data.
Right, don’t put glass or any transparent material in front of the lens — it interferes with the distance measurement. Sealing everything except the lens keeps the electronics and connector protected, which helps the flickering, but the lens itself still isn’t weather rated, and since the camera hasn’t been tested in wet conditions I can’t confirm whether cleaning it with water is safe.
Understood. Let me make sure I have the timestamp part right. For depth frames I use:
FrameDataFormat format;
frame->getFrameDataFormat(FrameType::DEPTH_FRAME,format);
and for raw frames I switch the parameter to:
FrameType::RAW_FRAME
with the timestamp in 100ns units. And for the flicker, would a printed enclosure that holds both the camera and the Pi4 be enough, or should I also re-check the cable?
That’s correct. Use FrameType::DEPTH_FRAME for depth data and FrameType::RAW_FRAME for raw frames; the timestamp field is in 100ns units. For the flickering, re-check the cable/connection first, then an enclosure that keeps the camera and Pi4 fixed together should help prevent it from happening again. The raw capture example is here if you need it: Arducam_tof_camera/example/cpp/capture_raw.cpp at main · ArduCAM/Arducam_tof_camera · GitHub
Okay, so my takeaways: the camera isn’t waterproof and hasn’t been tested in snow/rain/cold; putting any cover over the lens invalidates distance measurement; only the stock lens is supported, no add-ons; timestamps come from getFrameDataFormat with 100ns units, DEPTH_FRAME for depth and RAW_FRAME for raw. Thanks, that clears up most of it.
Summary for anyone reading along: the shell is not waterproof and extreme-condition testing hasn’t been done. Don’t cover the lens with glass or any transparent material, and don’t try to replace the stock lens or add another lens. For raw data, use capture_raw.cpp. For timestamps, call getFrameDataFormat in the frame loop — FrameType::DEPTH_FRAME for depth and FrameType::RAW_FRAME for raw — and the timestamp unit is 100ns. For the flickering, suspect the connection and use a rigid enclosure for the camera + Pi4.