Waterproof camera for terrarium?

Hi,

I’m looking to set up a Mycodo to monitor and control a terrarium for carnivorous plants.

The terrarium will be fairly humid (~ 80%), and I’d like to setup a camera to watch it from the inside.

I saw that MyCodo can support both a Raspberry Pi camera, or a USB webcam.

I’m curious what people are using in terms of waterproofing for their cameras? I saw for the Rasberry Pi camera, there are cases available:

https://www.innaturerobotics.com/product-page/weatherbox-for-raspberry-pi-camera-v2 (This one looks a bit dinky - low-res 3D printer?)

Has anybody tried those? Or are there USB webcams that can be easily waterproofed?

Also - how would you extend the cable for a Raspberry Pi camera? (I assume for the USB webcam, this is easy to extend using a normal USB extension cable?).

Or would a standard IP camera (e.g. used for CCTV) be a better option, and expose this over the same network as the MyCodo device?

Thanks,
Victor

1 Like

To extend the cable of Raspberry Pi camera you could buy a flex ribbon extension cable like this one.

I can’t help about waterproofing the cameras, in my case i have my RPi camera outside my terrarium looking inside, but i’m also interested in updating my camera setup, even including more than one. Does Mycodo support IP cameras?

1 Like

To extend the Raspberry Pi camera cable I use these adapter boards that allow you to use a standard HDMI cable in place of the ribbon cable. The ribbon cable can have very bad signal interference at lengths over 24 inches. HDMI cables are shielded and will let you place the camera 15-20 feet away with a good HDMI cable.

As far as waterproofing the camera, find a good case, try vendors who sell underwater remote vehicle and drone parts. You can also waterproof to some degree using conformal coatings, but you have to be careful not to get the coating on any connector pins, contacts, the photo sensor itself, or the lens. The biggest problems with cameras in humid environments is moisture getting inside lens assemblies and causing condensation or mold on the lens elements. The only way I know of to avoid this is to make sure the entire camera and lens are inside a water proof case (with a desiccant pack), or make sure the lens itself is rated as waterproof.

1 Like

Hey, another possibility would be an old/broken waterproof smartphone - you can set it up as IP camera with quite a few apps, IPwebcam being a good starting point. The main issues with such a solution would be constant charging of the phone, hence the battery might not last long, but frankly i’ve used huawei mate 20 pro for a year nonstop and it only downgraded the battery by 6 7%.

1 Like

Thanks all for the suggestions!

For extending the distance of the Rasberry Pi camera, it seems it’s basically down to either converting to HDMI or Ethernet:

(If you just use the flex ribbon cable, with the normal CSI2 standard the Raspberry Pi uses, I believe it’s only specced to 25cm or so - reference).

Arducam make the CSI-to-HDMI converter (This is the one @Lucid3y3 suggested above).

Thine makes one that goes CSI-to-Ethernet - however, the receiver board seems much larger than the HDMI version:

(Link removed - apparently new users can only do 2 links per post).

@Lucid3y3 you’re using those HDMI adapter boards, right? Have you found a good case that can fit both the Raspberry Pi camera itself, as well as just the adapter board?

(The Entaniya case I found above only seems to fit the camera module - I’m not sure if it will fit the HDMI adapter board as well in there).

Thanks,
Victor

2 Likes

I typically don’t bother with cases unless the board might be subject to water splashes, condensation, or excessive heat. I don’t own a 3D printer so I can’t just make a custom case whenever the mood strikes. If the board might be subject to water or condensation I usually use a spray or paint-on conformal coating to protect the electronics where needed… but it’s usually not needed for hydroponics setups. In my setup I simply screwed the HDMI adapter board to the outside of the thermal case I have on the Pi. The camera is also not in a case, the adapter board and camera are screwed to an aluminium bracket that is just clipped to my lights. They have been running like this for well over a year with no issues. I just need to dust off the camera board and clean the lens once in a while.




1 Like

Aha - in my case, there will be a mistking system inside the tank/greenhouse - so there’s a chance of water splash.

Also, the humidity will be around 80% - so I’m guessing that’s not too great for electronics?

I can look into the conformal coatings - it seems there’s acrylic vs silicone ones, I’ll need to do some more research here. Also, I assume it won’t protect the connectors (e.g. CSI2, or the Ethernet ones), so I assume I’ll still need to find a case that will protect the CSI2 to Ethernet adapters.

Also - one other thing I didn’t consider - the Raspberry Pi only has a single CSI2 camera connector - so I will need to find out some way to multiplex multiple cameras to it, and still have that be supported by MyCodo.

I did look into PoE IP cameras - however, most of those are not designed for close focusing (e.g. 10-20cm - which the Raspberry Pi cameras can do), but instead from say 0.5 to 1.0m or more.

Yeah, misting systems and RH above 70% will also cause condensation, so you’ll need a waterproof case, or conformal coating (and a waterproof lens). As far as conformal coatings and connectors… conformal coatings usually dry and form a contiguous shell around the electronics, which is why you can’t get the coating on any contacts that need to be plugged & unplugged or switched on or off, or any pads that may need to be soldered in the future… the coating is sometimes a real pain to remove if you need to solder anything on that board again. However, you CAN use dielectric grease to waterproof most connectors, and then wrap them in some electrical tape or heat-shrink tube for extra protection if needed.

As far as multiplexing (hard-wired) cameras, you can do that with the USB ports and some cheap web-cams. They also make some multiplexer boards that allow you to attach more than one raspberry pi camera board to one pi simultaneously, but I don’t know if Mycodo can support this kind of camera multiplexer.

The other option (which I’m experimenting with right now) is to use separate wifi cam modules like the esp32-cam.

They usually come with a 2MP sensor which gives a half decent picture at 1600x1200, but they will support up to a 5MP sensor at 2592 x 1944 (with an M12 lens mount).

You can “tie them into” mycodo using the “URL (requests)” camera setting on the mycodo camera page to pull images off the wifi cam and into Mycodo. I still haven’t been able to get video streaming with the “URL (urllib)” camera setting to work right… so you can only do stills and time lapses with the “URL (requests)” module. But using external wifi cams would theoretically let you ‘multiplex’ an indefinite number of cameras using Mycodo.

Thanks for the tip about dielectric grease - I will definitely look into this. It also sounds like it’s easier to remove the grease if I make a mistake (e.g. accidentally get it onto the electrical contacts) versus a conformal coating spray, which I assume will be a pain to rfemove.

I did think about wifi cameras - however, they would need a power supply of some sort (e.g. Google/Nest cams are wireless, but take a USB power supply), or you would need to keep charging the battery regularly. I figured a wired camera would be more reliable and simpler, assuming you could solve the waterproofing issue.

I did find a vendor (ELP), who have a UVC camera that sounds like it could work:

  • ELP-USBFHD01M-DL170

It’s USB 2.0 - which means the maximum cable length is 5.0m (assuming passive cables). Apparently the close focus distance is 0.1-0.5m. And the above model has a 170 degree lens, which is fairly wide FOV. (Not quite as wide as the fish-eye lenses I ordered from Entaniya, but still decent). However, ELP say they can also make a PoE version of this camera - this would get me around the USB cable length limitations.

A UVC camera would get around needing to figure out a way to multiplex multiple RaspberryPi cameras.

Between PoE and UVC - what are your thoughts?

A PoE camera I could connect into my existing NVR system - and record footage through that. Then I assume MyCodo could also grab the stream through RTMP?

I didn’t see any mention of RTMP support in MyCodo currently - @KyleGabriel would you have any idea how hard it’d be to add RTMP camera support to MyCodo? That would let you use any existing IP cameras?

Sorry for the confusion. Dielectric grease is meant to be used in contacts like plugs an connectors. It does not dry out like a conformal coating… it is not meant to be used like a conformal coating all over a circuit board, it’ll make a mess if you do that since you’ll get it everywhere when handling the board. Only a little bit of dielectric grease is meant to be used in the plugs and contacts to keep them from getting wet… use a drying conformal coating on the rest of the board. Normally what you would do is mask the parts of the board that you don’t want to get the drying conformal coating on (like plugs and connectors) and then spray the board and let the coating fully dry, then remove the masking and use the dielectric grease in the connectors only. This should protect your camera board pretty well from everything but a full submersion.

USB (UVC) cameras are fine, they come in a case already, and some even have waterproofing ratings. Anything with an IPX4 rating or higher will probably be fine in a mushroom chamber. But beware, if you are growing photo-period plants like cannabis, you do not want a camera with bright infrared lights on it as they might disrupt your flowering periods.

I did finally get both of the Mycodo URL modules to work grabbing stills and video streaming from an IP camera. They work just fine without the need for RTMP. I just was having problems getting them to work on a camera with password authentication, I simply removed the password on the camera for now and it seems to work fine… I’m not worried about security since the camera is only accessible from my LAN and not the internet.
Hope this helps clarify things.

@Lucid3y3 Got it - thanks for clarifying. I’ll look into possibly using a combination of conformal coatings and dielectric grease then, using the masking trick you mentioned.

UVC does seem like it’d work out of the box.

However, IP cameras with RTMP would make it easier for me to integrate this camera with normal NVR software as well.

@Lucid3y3 Would you be able to share the config examples of how you used the URL modules to grab stills/videos from your camera?

ELP actually got back to me about a camera they could make.

Model is ELP-IP4180VR-L170POE, I’ve attached the datasheet they gave me below.

  • Close focusing distance is 0.1-0.5m
  • IP66 rated for dust/water.
  • 150 degrees wide-angle FOV
  • UVC or POE (RTMP/ONVIF support).

Price is USD 46.50 for a OV2710 sensor, or USD 58 for a Sony sensor.

However, they’re saying MOQ is 50 pieces for a run. I’m trying to get some units to test, and can report back.

@KyleGabriel Do you know how to find out if there are other people possibly using MyCodo, who might be interested in this kind of thing?

I was thinking it might be a good camera for monitoring greenhouses, grow tents, mushrooms =), or other similar things? What do you think? Would a group buy work at all?

Sorry, forum said new users can do only do one attachment per post.

Page 2 of datasheet:

Page 3 of datasheet: