4.5
Inside and Out
Inside and Out
What to expect
In this activity, you will prepare your weather station for collecting climate conditions outside. Then, you will add indoor air quality (IAQ) reporting to your weather station console. You will be able to measure and view indoor and outdoor conditions in real-time on your OLED display.
Connections
You worked with the IAQ board to capture and display indoor conditions in the previous unit.
Materials
Plastic container (electronics enclosure)
Cable a.k.a. “zip” ties and zip tie mounts
Double-sided velcro
1 micro:bit with the battery pack connected (TX)
Docked to weather:bit
Attached to UV sensor
1 micro:bit
Docked to IAQ board (RX) with batteries installed
Instructions
Part 1 of 2: Making the Weather Station Outdoor Ready
Mount the rain gauge as shown (and described) here. Note: you may want to position the holder over the seam in the two metal pipes for additional rigidity.
2. Place two zip tie mounts straight down the center of the outside of the lid of the plastic container (peel off the back layer to expose the sticky backing). It is important to position them in a straight line because you will use these mounts to zip tie the container to the metal pipe.
3. Cut out two small portions of the velcro strips and attach them onto the center of both the back of the weather:bit and the back of the UV sensor.
4. Position the micro:bit docked in the weather:bit with the battery pack attached on the inside of the lid of the plastic container. Position the UV sensor next to the weather:bit on the inside of the lid of the plastic container. The zip tie holders should still be positioned vertically on the outside of the lid. Make sure there is ample space between the bottom of the weather:bit and the lower end of the plastic lid to be able to attach sensors.
5. Draw dots on the top of the plastic lid where the velcro on the back of the weather:bit and UV sensor rest. These will be used as guides for the next step.
6. Cut out two more small pieces of velcro. Attach the sticky side of the velcro on the inside of the plastic lid, over the dots you marked on the outside of the lid.
7. Next, feed the plugs for both the rain gauge and the wind sensors through the pre-drilled hole on the side of the plastic container. You will have to feed the plugs through one-by-one due to the small size of the hole.
8. Attach the velcro on the back of the weather:bit and UV sensor to the velcro attached to the inside of the plastic lid. Attach the plug for the wind sensors and rain gauge to their corresponding sockets. Secure the lid of the plastic container onto the container.
9. Thread a zip tie through each zip tie holder on the lid of the plastic container. Make sure that the raised side of the head is facing the plastic container otherwise the zip ties will not work.
10. Position the metal pipe flush the front of the zip tie holders. Thread the tail of the zip tie through the head and pull TIGHTLY.
11. Cut the tail of the zip ties off.
12. Your weather station is now weather proof and fully constructed!
13. An image of the completed weather station is included below to give you an overview of the completed project.
14. Carefully take your weather station outside. Try to find a place within 100-200 feet (200 feet is roughly the length of six school buses) of where you will be receiving the data. If you are having a tough time making this work, you’ll learn about a potential workaround in a later activity.
15. Make sure that your station won’t tip over due to strong winds while you are testing it out. If needed, find something that can hold the base in place for now. You’ll also want to make sure that your TX radio can send a strong enough signal back to the RX device. The “final” positioning of your weather station isn’t critical for now, you can always update it later. You can now leave your weather station setup outside and head back inside to finalize the RX program.
16. You may want to consider a more long-term mounting condition for your weather station later, such as placing it at a higher position, making sure that it is attached or weighted down so that high winds won’t knock it over, etc. You might consider mounting it to a flagpole, other existing structures, etc. You’ll likely have to get creative here based on your location and resources. In any case, should you need to make adjustments to the code or change the batteries, you’ll want to have a way to access it later.
Part 2 of 2: Including Indoor Climate Information on the Console
Duplicate your last RX activity “4.4.3.2 RX w UV and Rain” that uses the OLED display on the IAQ board and name it “4.5 Inside and Out”. MAKE SURE TO COPY NAME EXACTLY BECAUSE SPECIFIC MAKECODE PROJECT MAY BE REFERENCED LATER BY NAME!
Add the ability to display indoor climate sensor data on demand. An example is shown here.
3. You may remember from previous activities that the gas sensor must be setup and run once to be able to use that data. If you would like to get and display gas sensor data, you’ll need to come up with a way to include it in your program. (Hint: there are unused buttons or other ways you could call for the setup. There is room on the OLED display to show this data.)
4. You can make changes to the logic that calls for a reading of the weather station every minute if you want. Notice that specific numbers have been used in the code but not yet applied to a specific purpose. This is intended to give you some future flexibility in your design.
5. Download and test your program to make sure that everything is working…
Wrap-up
Congratulations! You now have a fully functioning wireless smart weather station that monitors and displays climate data inside and out!
Up for an additional challenge? Log your climate data as a CSV (See activity 4.1 for a refresher).
Feedback Link
How did you feel about this activity? Change the emoji to show your feelings.
Next Activity
The remaining activities are designed to enhance and supplement your weather station project.
Acknowledgments
Activities from this unit utilize the SparkFun micro:climate kit. Activities have been adapted and/or derived from https://learn.sparkfun.com/tutorials/microclimate-kit-experiment-guide
This project is intended for experimental and academic purposes only.