Before we begin you may have the question why put your Python in a Bottle? Well in this case the Python is running on a Raspberry Pi and the RPi needs some protection. Why is the protection needed? The computer is going to live in a greenhouse and the environment there is hostile to electronics: there are wide swings of temperature and humidity ( and actually the computer is in the greenhouse to measure this data ) and often water will condense on objects in the greenhouse. My greenhouse consultant reports that radios in a greenhouse typically have a life of just a few months. So lets cover our assets and protect that RPi! And while we are at it I will tuck an Arduino in there too.
As a side note: I have looked at a lot of weather stations that might need this sort of thing as an upgrade; these:
clearly could not stand to be out in the weather.
Step 1: The Bottle
Like some of my other instructables pictures tell most of the story.
The bottle is actually a jar that originally contained nuts. I want it big because I am concerned with heat dissipation and want good surface area to remove heat. I may eventually cover it with Al foil to stop solar heating. The RPi is mounted on the lid as when the jar is open this gives better access to the RPi when open. For more information on my particular mounting bracket see: RASPBERRY PI PLATFORM
Step 2: Connections
I have 2 wires running from the outside to the inside. One is USB for power, the other is a piece of cat5 wire. The cat5 is broken out to Dupont pins inside, and is connected to some jacks on the outside ( still experimenting with them ). Both inside and outside the cables are connected to clamps to hold them in place and provide strain relief. The openings around them are sealed with hot glue.
Before mounting in the greenhouse electric tape is used to further seal the jar lid.
Step 3: Install It
I used zip ties.
Step 4: More Pictures
The Raspberry Pi uses a wifi connection and so we also have a wifi access point in a bucket.