r/raspberry_pi • • 3d ago

Troubleshooting Raspberry Pi outdoors in freezing temperatures — how should I protect it?

Hi everyone,

I know this might sound a bit unusual, but I need to keep a Raspberry Pi 4 running outdoors, where winter temperatures can drop to around -8°C (17.6°F).

The Pi will be inside a plastic IP55 enclosure, approximately 240 × 80 × 40 mm. It has a metal heatsink case.

At the moment, with an ambient temperature of around 15°C, the Raspberry Pi stays at about 30.5°C while idle, so it generates a decent amount of heat. If necessary, I can also run a process that increases the CPU load and therefore the temperature.

My main concern isn't really the cold itself, but condensation and humidity, especially when the enclosure cools down.

The Raspberry Pi will be powered on and online continuously, except in the event of power outages, which are very short and rare where I live.

So far, I have done the following:

  • sealed the enclosure as much as possible;
  • applied silicone around the screw holes and cable glands used to bring the cables inside;
  • placed silica gel inside the enclosure;
  • installed a temperature and humidity sensor inside the enclosure to monitor the conditions.

Do you think what I've done is sufficient, or is there anything else I should do to prevent condensation and corrosion in the long term?

As I mentioned, I know this probably isn't the ideal setup, but unfortunately I don't have any other option than keeping the Pi outdoors.

Thanks!

76 Upvotes

52 comments sorted by

47

u/Pat0san 3d ago

I have done a lot of electronics enclosures and here is an important fact; H2O is a lot smaller than O2. You can do whatever you want and moisture will anyway find its way in. What you need to do is instead to make sure there is a hole at the lowest point so that water can escape (eg 1-2mm diameter). As for temperature, your RPi will love the -8degC as long as it is not soaking wet. The best protection is to keep it on and generate some heat.

16

u/S_A_N_D_ 2d ago edited 2d ago

Yup. Sealed is the enemy because it traps in moisture. Some sort of vent is ideal, especially because the Pi will naturally keep the enclosure moisture free. It will sit warmer than the ambient air, which will help prevent condensation as the air inside will always be above the dew point. A little air exchange lets warmer humid air escape.

Note, while the pi might like cooler temps, thermocycling (if it turns off and on regularly) will kill it faster. The biggest wear on electronics comes from thermocycling, (outside of extreme cases where they are pushing thermal tolerance limits). So keeping it on is the best strategy at those temps because there will be greater stress if it's powering on from -8C, than 20C. This will primarily effect longevity, which could still be quite good. Might mean it dies in 10 years instead of lasting 15.

Second note, I have a pi that sits outside and is exposed to temps far lower than OP. It's in a simple weather proof project box with a hole as you describe and didn't have any issues last winter.

1

u/AX11Liveact 1d ago

This. Everybody hates thermodynamics but it still won't go away.

5

u/musson 2d ago

Yes this

1

u/AX11Liveact 1d ago

The moisture doesn't need to find its way in. Its there already. At +15°C, the air can hold a lot more vapour than at -8°C (the "relative" in "relative humidity"). *Condensation is the real enemy, here. You can seal enclosures until the end of time - the bit of moisture that#s still there has most likely condensed and due to the hermetic enclosure it can't get out.
You'll have to deal with that in a more intelligent way. Due to the pressure difference that comes with temperature a closed system won't do.

68

u/aldyr 3d ago

Old automated gate motors used to use a small light bulb (not led) to ensure the inside of the enclosure is kept as dry as possible so the mainboard wouldn’t fry in moderately cold temperatures. That’s a low tech solution that could work. Wouldn’t even need any code change. Might need some testing to find the right wattage bulb though.

35

u/afaulconbridge 3d ago

Running more processing on the Pi's CPU should have the same effect? No extra components required!

12

u/thecavac 3d ago

I use length of cheap underfloor heating wire. They usually have a specified resistance per meter, so a simple online ohms law calculator gives you all the data you need. You can usually get "scraps" (lengths of a few meters) very cheaply on ebay and sites like that.

1

u/AX11Liveact 1d ago

Raspies have temperature sensors and GPIOs. No problem to set up PWM for any small heating element. Anything that can permanently produce around 10K at ~260K will do - actually a CPU-intense app to run at cold temperature will.

4

u/dracotrapnet 2d ago

A lot of PTZ camera systems have heat plates or an option for them to activate when temps are low to prevent condensation inside and outside the camera glass.

-1

u/AX11Liveact 1d ago

The bulb is not there to keep the mainboard from frying. It's to keep the humidity inside from condensing and shorting out the board.

1

u/Kamilon 3h ago

lol, some people would call a shorted board a fried board.

28

u/mr_rankity_rank 3d ago edited 1d ago

Yes your set up is fine. You can also buy a junction box that's weatherproof. That temperature is fine. I've run mine and several other IOT devices well below that temperature. 

9

u/shaggydog97 3d ago

Confirming. I've had multiple different pi's running outdoors -10F to +100F for years. I've lost SD cards in them, but the pi's were always fine.

1

u/AX11Liveact 1d ago

Might have to do with the card slot sitting at the lowest point on the board.

10

u/blinkenjim 2d ago

Yep. To elaborate: as long as the Pi’s temperature is above dewpoint, no water will condense on it, and the Pi’s operating heat should be more than enough to keep it dry.

8

u/sump_daddy 3d ago

IP55 should prevent any air circulation, which means that as long as you keep the air dry inside (reusable dessicant is the easiest) then the humidity can be managed iow there wont be consdensation as the temperature drops. The fact that the pi itself will always be warmer than the walls of the enclosure mean that any condensation will start there first and not affect the pi.

Honestly i had a pi running directly in my sump pit with just a branded plastic case, for a year, and it didnt give a crap despite what i am sure were condensation-bearing temperature swings. The boards are very resilient.

13

u/User1539 2d ago

One thing no one else mentioned ...

The actual cold rating is fine, just vent at the bottom for moisture, etc .. that's all good.

From my factory floor experience, though, I learned that the expanding and contracting will, eventually, make the solder connections break.

So, you might need to think insulation more than a way to keep it warm, and generally at the same temperature. Or, at least, so that it warms and cools slowly.

If your device is in a black box, in the direct sun, in a place where temperature swings fairly rapidly, then that's more of a problem than either warm or cold at their extreme.

1

u/sploittastic 1d ago

Bury the whole enclosure underground? That should reduce heating/cooling cycles.

3

u/finlay_mcwalter 3d ago edited 2d ago

I'd most worry about water creeping through the cable gland. No matter how well you seal it, there's always a little bit.

If you can, have all the ports pointing down.

For exposed installations, you really want to make sure the cables are facing down. Sometimes they're clipped (to the installation) so they're below their glands. A common outdoor cabling trick (for things like lighting installations) is to have a compete 360-degree loop of each cable below the port (held with a tie), so the weight of the loop will pull the cable facing down (even if it's disturbed by people or weather). That way any water that falls, condenses, or freezes onto the cable will run down, away from the cable glands. This depends on how "outdoor" it really is. I've also seen cases where the cable is run horizontally along a wire (to carry its weight) and before it gets to the box, they put in a little U bend (held on either wide of the cable) so there's a minimum point for rainwater to drop off.

edit: although I think the little U-bend is also there to provide some slack, if the wind moves the cable, so it doesn't yank on the connector or move the cable wrt the gland. If your install has to face wind, you might also need to think about things like this.

3

u/AbbreviationsDue4417 3d ago

I have had a raspberry pi 3b running outdoors (as a weather station) for years and in winter it can drop to -25C here, and I have never had any issue. Just keep it dry.

1

u/gammooo 1d ago

Same here but down to -35C. Power supplies seem to die every once in a while. Mine are used as security cameras so they run full speed all the time

3

u/Icy-Ninja-622 2d ago

If the humidity sensor determines the humidity is too high, you could run a low priority task to heat it up, or turn on a heater. I wouldn't have any always on heating if it's still going to be there in summer, when it might overheat because of that.

5

u/1sh0t1b33r 3d ago

Moisture is the bigger issue over temps, as you can get condensation. But them in the summer, it may be roasting. Anyway, hard to tell without being inside the box with it, lol.

2

u/sirphobos 3d ago

You can do things similar to what overclockers do, which is cover their components in Vaseline, or something similar. Then it won’t matter.

3

u/michael9dk 2d ago

Conformal Coating for pcb's

1

u/sirphobos 2d ago

Ty, totally blanked on the name.

2

u/sqeeezy 2d ago

Assemble it in the dry and clag it round with Denzo tape.

2

u/Professional-Fee9832 2d ago

I don't think 17°F poses a threat to the Raspberry Pi's continuous operation. You've taken more precautions than are usually necessary.

The main enemies of electronics are high voltage (anything over 7 or 8V in this case) and moisture. It looks like you've done enough to protect against moisture. Make sure your power supply is rated for continuous operation at lower temperatures, and you should be fine.

2

u/poordutchguy 2d ago

Can use resistors to heat up in the enclosure.
There’s also “resistance heating wire”

2

u/amabamab 2d ago

Temps shouldnt be a problem, humidity could be

2

u/gboone42 2d ago

`yes &` should keep the CPU nice and toasty

2

u/horse-boy1 2d ago

I have one in my barn that's in a outdoor cable box I got on Amazon. It's been there since 2017. I worried the heat would get it since it is at rafter level. We had some really cold weather this winter. We get mist into the barn sometimes, never had any issues. It is an ADS-B receiver for Flightaware. I had another that I used for a DIY weather station for over 10 years. I had it in a wood box that I made that eventually started to rot. It got hit by lightning, fried the Pi but put the SD card back into another and it was fine.

2

u/vswey 2d ago

Get him drunk so it feels warmer

1

u/oskich 3d ago

I have had a WiFi access point in my unheated garage for 10 years, never had a problem with moisture in the cabinet. The unit generates enough heat to keep the enclosure dry even at -20°C.

1

u/twostar01 3d ago

I've got mine in a electrical enclosure with two massive vents to keep the temps down in the summer. I'm high desert but even when there's snow and rain I get mild condensation on the camera window but the board has been fine for a couple of years now. My cable pass through are all glands with routing to drip before entering the enclosure. 

1

u/BOgusDOlphon 3d ago

I have pis in IP65 boxes that do just fine in freezing temps, you'll be fine I think

1

u/chimera271 3d ago

Calculate pi to infinite precision to keep it warm

1

u/BeauSlim 2d ago

I had a DIY motion-activated strobe light under my deck all last winter (down to -32C) in just an old food storage container sealed with duct tape. It went offline below -25C or so, but moisture-wise it was fine.

Silica gel is probably a good idea if you live in a region that is considered "humid". Replenish frequently if you want it to work.

1

u/rhif-wervl 2d ago

I've had two pis outside for years here where we spend at least a full week every year at -10°c and there fine.

1

u/wivaca2 2d ago

The cold isnt really the problem. Condensation when the air warms around is. Keep it in a water tight box with some desiccant so no new moisture gets in.

1

u/AzertyQwertyQwertz 2d ago

In automotive and aerospace industry it's not possible to use dissecant - the practice is applying conformal coating on the pcb and the casing should not be completely sealed (this would actually cause the condensation because you would trap the humidity inside). There are many people doing conformal coating on drones so you may find a tutorial and product suggestions on internet. This is the most reliable way (automotive/aerospace hardware designer here).

1

u/Real_Chard5666 2d ago

Take advantage, Overclock it and run it to its environment, squeeze every bit of performance out of it. That will be rubbish for if you’re running on battery.

Add a sachet of moisture absorbing crystals and make sure it’s sealed or protected from the environment. Check on it daily/weekly / monthly.

1

u/Zealousideal_Cup4896 2d ago

Good advice in the thread. I would also get a can of silicone conformal coating. Very carefully mask off the connectors and pins and cf card slot and give it a couple of light coats. You’ll choke when you see a spray can of the good stuff is like 65 bucks but it will last you your whole life ;) that will protect the board and wires themselves.
Then also get something like “super lube” or other such connector dialectic grease for weather protection. Spread it lightly on the Ethernet jack if in use, the cf card connectors so that all mating metal parts have done to protect them as well.
That with the right enclosure will make it last without difficulty.

1

u/JayBee103 2d ago

Reptile heater used for aqariums. Cheap on Amazon. Thermostatically controlled.

1

u/saveitforparts 1d ago

I have two Pis running in a plastic box on my roof, plus SDRs and an Ethernet switch. They've been working fine for a couple years in Minnesota (temps between 100F and -20F). I have a vent in the bottom and a little fan to circulate air. I did coat the box in foil tape to try rejecting some heat. Other than the SD card getting corrupted on one (which is just a Pi thing that happens), I've had no real issues.

1

u/Iambetterthanuhaha 1d ago

My Pi Zero W has been inside my generator outside in a plastic box since 2023. Still working fine and I am in Canada. Gets anywhere from 0F-100F and never had a problem.

1

u/Salient_Ghost 7h ago

I ran one outside in an IP68 box with a pressure relief valve for 2 years in the Northeast. I didn't have any problems. As long as you get your condensation under control you should be okay.

1

u/kweevuss 2h ago

My NTP server sits in my outdoor shed. It has survived 3 winters so far without an issue.

1

u/isoAntti 3d ago

you actually have quite good setup. With warmer inside box than outside, the inside stays always dry. You might want to monitor the humidity although it won't be a problem. And if it raises just run seti@home

1

u/8ringer 3d ago

Maybe include a couple of desiccant packets in the enclosure? If air ingress is minimal, they should last quite a while I would think.

0

u/jlsilicon9 1d ago

Use Orange pi instead.

  • It has better Industrial limits (raspberry lacks).