This enclosure is not 100% waterproof but can reasonably survive rain while protecting your smartphone. This enclosure was used over a 5 day period including two days of rain and easily kept the camera dry.
Using this enclosure, you can take time lapse videos like this.
Step 1: Parts you will need
2. A few scraps of 1" thick wood or plywood
3. A smartphone with a time lapse application and built in camera
4. Small tripod
5. Charger cord for the smartphone
6. Miscellaneous screws
Step 2: Build the main box
Using a router, cut a slot on the inside top and inside bottom that is approximately the thickness of the smartphone. The phone will slide into the box in these slots.
Some smartphone cameras are very close to the edge of the phone. You may need to chisel out a bit of the slot to prevent obstructing the camera's view.
Use plexiglass for the front and back so the camera has a good view and so you can see the smartphone's screen to aim the camera.
Attach the front and back plexiglass to top and bottom wood pieces using the screws. Be sure to size the opening using the smartphone so that it slides smoothly into the routed slots.
To ensure the enclosure is waterproof, use some silicon between the wood and the plexiglass.
Step 4: Assemble one side
Attach the side with screws and use silicon if the box must be waterproof.
Step 5: Attach the tripod
Don't put unnecessary strain on the mounting point when aiming the camera.
Step 6: Fit the removable side to the box
Cut a small block of wood so that it snugly fits the distance between the inside of the top and the inside of the bottom of the box. Attach the small wood block to the side piece with a screw.
If it is loose, use a piece of duct tape to shim the small wood piece so it does not fall off. You can also use a larger piece of duct tape to hold the side in place.
Alternatively, you can use a screw at the top and bottom of the side and a bead of silicon where the sides touch the main box to make it more waterproof. Tighten the screws down once the smart phone is inside the box to ensure the silicon seals properly against the sides.