# How to protect micro:bit for outside use?

**URL:** <https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482>\
**Category:** micro:bit\
**Created:** [July 25, 2023, 4:56pm UTC](https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482 "2023-07-25T16:56:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snacksolotl](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Snacksolotl](https://forum.makecode.com/u/Snacksolotl)\
**Post date:** [July 25, 2023, 4:56pm UTC](https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482/1 "2023-07-25T16:56:26Z")

</div>

Hi!

I want to use a micro:bit to record the temperature in different places outside for a long period of time. Since I can’t control the weather, I was wondering how I can protect my micro:bit and battery (holder) so that they are weatherproof.

Any suggestions?  
Thanks!

---

<div class="post-metadata">

**Author:** ![dsssssssss9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dsssssssss9/32/861_2.png) [@dsssssssss9](https://forum.makecode.com/u/dsssssssss9)\
**Post date:** [July 25, 2023, 9:09pm UTC](https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482/2 "2023-07-25T21:09:12Z")

</div>

Hi

Great to meet you!

I suggest Tupperware ( or similar ) containers

They come in a range of sizes & are relatively inexpensive

You might even already have something suitable in a kitchen cupboard!!

---

<div class="post-metadata">

**Author:** ![Snacksolotl](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Snacksolotl](https://forum.makecode.com/u/Snacksolotl)\
**Post date:** [July 25, 2023, 10:29pm UTC](https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482/3 "2023-07-25T22:29:08Z")

</div>

But if it’s inside a closed container, it will have an influence on the temperature, no?

In a sunny environment it will be much hotter inside the container then outside, so the input won’t be accurate.

---

<div class="post-metadata">

**Author:** ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)\
**Post date:** [July 26, 2023, 5:02pm UTC](https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482/4 "2023-07-26T17:02:30Z")

</div>

Hi @Snacksolotl

Those are good points! You can also try things like water food storage bags (zip lock), but even they will be a little prone to holding in temperature and slowing temperature transfer (also easier to damage/puncture if it’s in a place that could be disturbed).

The micro:bit’s temperature sensor is really meant to measure the temperature of its processor and isn’t a very accurate way to measure the temperature outside. It’s close to the outside temperature, but could be a few degrees off. In some tests it seems to have been up to 2.5°C off ([here](https://devzone.nordicsemi.com/f/nordic-q-a/70235/nrf52840-internal-temperature-sensor-accuracy#:~:text=The%20offset%20at%20room%20temperature%20(25%20%C2%B0C)%20is%20%2B/%2D%202.5%C2%B0C%2C)).

You might want to consider the combination of a box/storage bag and using an **external** temperature sensor that can be exposed to the elements and is more accurate. There are several available that work with the micro:bit.

You can even make your own out or just a few cheap parts: a DS18B20 sensor, a resistor, and some alligator clips. AdaFruit sells a “kit” with the resistor and sensor: [https://www.adafruit.com/product/381](https://www.adafruit.com/product/381) ($9) . I created a MakeCode extension for that particular sensor: [https://makecode.microbit.org/pkg/bsiever/microbit-dstemp](https://makecode.microbit.org/pkg/bsiever/microbit-dstemp)  
There are several parts sold as DS18B20 that are not truly DS18B20s. In my tests some of these “fake” versions are much less accurate/precise than authentic DS18B20s. I strongly recommend buying a DS18B20 from a reputable seller. In the U.S. I’d suggest AdaFruit, SparkFun, or DigiKey.

---

<div class="post-metadata">

**Author:** ![Snacksolotl](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Snacksolotl](https://forum.makecode.com/u/Snacksolotl)\
**Post date:** [July 26, 2023, 5:16pm UTC](https://forum.makecode.com/t/how-to-protect-micro-bit-for-outside-use/21482/5 "2023-07-26T17:16:06Z")

</div>

This might do the trick.

Thank you so much for the effort!
