# Homemade outside enclosure for TTN gateway (DIY)

**URL:** <https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538>\
**Category:** Ideas\
**Tags:** gateways\
**Created:** [October 23, 2022, 2:49pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538 "2022-10-23T14:49:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 23, 2022, 2:49pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/1 "2022-10-23T14:49:03Z")

</div>

Hi,

if anyone will build a homemade enclosure, here is my idea.

First, I buy an enclosure of dimensions [180x130x60](https://si.farnell.com/fibox/ul-pc-150-100-ht/enclosure-multipurpose-pc-grey/dp/2779101) mm. I think that is the smallest you can buy to fit everything inside.

It is to fit pycome 8-channel LoRa gateway. [Pygate](https://pycom.io/product/pygate/), [wipy](https://pycom.io/product/wipy-3-0/) and [antenna](https://pycom.io/product/lora-868mhz-915mhz-sigfox-antenna-kit/) with EU shipping cost me 108 € + import fee 36 €.

Than I buy small things, like [ventilation plugs](https://www.aliexpress.com/item/10000159210338.html?spm=a2g0o.productlist.main.13.37027774hQvRcy&algo_pvid=40d22259-a5fc-4a92-943a-9eed55898f85&algo_exp_id=40d22259-a5fc-4a92-943a-9eed55898f85-6&pdp_ext_f=%7B%22sku_id%22%3A%2212000025412815718%22%7D&pdp_npi=2%40dis%21EUR%2112.96%2112.31%21%21%21%21%21%40211bd4cd16665337461921333d074a%2112000025412815718%21sea&curPageLogUid=bG1pleL0LGPa) for heat to go away, cable inlets, [ventilator](https://www.aliexpress.com/item/1005001294015160.html?spm=a2g0o.order_list.0.0.54281802FYKYnn) (must be 4-wire) for it to work with temperature speed [controller](https://www.aliexpress.com/item/1005001714477262.html?spm=a2g0o.order_list.0.0.54281802FYKYnn). Also half a meter usb-c [cable](https://www.aliexpress.com/item/1005003040504687.html?spm=a2g0o.order_list.0.0.54281802FYKYnn) and other [small](https://www.aliexpress.com/item/1005001459277190.html?spm=a2g0o.order_list.0.0.54281802FYKYnn) [things](https://picclick.co.uk/AC-DC-Converter-AC-110V-220V-230V-to-DC-254051164006.html).

Well… when you put all the things together it looks nice. Here are some pictures:  
 ![IMG20221023152806](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/f/6f92e678a09915c8e284d88fe4b97f07007a2201.jpeg)  
 ![IMG20221023152857](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/b/5/b587144ea641a6217fea37c1839f867bf0bc0823.jpeg)

> **[IMG20221006175955](https://ibb.co/y08nN93)**
>
> Image IMG20221006175955 hosted in ImgBB

> **[IMG20221022171455](https://ibb.co/D7YCDWv)**
>
> Image IMG20221022171455 hosted in ImgBB

> **[IMG20221023152408](https://ibb.co/LxnRG0j)**
>
> Image IMG20221023152408 hosted in ImgBB

> **[IMG20221023152806](https://ibb.co/XJmxpNK)**
>
> Image IMG20221023152806 hosted in ImgBB

> **[IMG20221023152857](https://ibb.co/GTVchvX)**
>
> Image IMG20221023152857 hosted in ImgBB

> **[IMG20221023152901](https://ibb.co/6JsRc89)**
>
> Image IMG20221023152901 hosted in ImgBB

> **[IMG20221023155256](https://ibb.co/QCnYcqb)**
>
> Image IMG20221023155256 hosted in ImgBB

> **[IMG20221023155305](https://ibb.co/mckYnwN)**
>
> Image IMG20221023155305 hosted in ImgBB

Gateway works nicely from 6th floor. It reaches 2 km, 3 km on a sunny day.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [October 23, 2022, 4:25pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/2 "2022-10-23T16:25:14Z")

</div>

> [@lebang](#):
>
> It reaches 2 km, 3 km on a sunny day.

Looks nice. Tip, the antenna needs to be above the metal railing for optimal performance. Or at least 15 cm away from other metal in the horizontal plane.

---

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 23, 2022, 4:44pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/3 "2022-10-23T16:44:44Z")

</div>

Yes, I’m aware of that problem.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [October 23, 2022, 4:50pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/4 "2022-10-23T16:50:46Z")

</div>

Generic warning about working with mains electricity with an open PSU …

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [October 23, 2022, 5:18pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/5 "2022-10-23T17:18:23Z")

</div>

Is the fan exhausting externally or is it just pushing warm air around inside the case? …and expending energy/generating more interal heat in the process?

---

<div class="post-metadata">

**Author:** ![wolfp](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/wolfp/32/45304_2.png) [@wolfp](https://www.thethingsnetwork.org/forum/u/wolfp)\
**Post date:** [October 24, 2022, 6:42am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/6 "2022-10-24T06:42:47Z")

</div>

Thank you for showing us the pictures of your project.  
Here my recommendations:  
We all want, that you survive your projects. @descartes gave you an important hint - if you are using an open-frame power-supply take care of the safe-separation (safe-isolation) between mains-voltage and low-voltage.  
If you don’t know what “Safe-Separation” means, do yourself a favour and use an external (ready-made) power-supply.

As @kersing said, if you mount the antenna this way, the metal is in the reactive near-field of the antenna. The antenna will be strongly detuned, you lose much coverage.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 24, 2022, 9:06am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/7 "2022-10-24T09:06:42Z")

</div>

I would definetly suggest a change in the wire routing inside the box to maintain a seperation between the mains and low voltage wiring.

---

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 24, 2022, 9:47am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/8 "2022-10-24T09:47:08Z")

</div>

Good question, I don’t know. Should have a heat camera to look into that. If there is cold outside, the ventilator will work really slow.

---

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 24, 2022, 9:48am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/9 "2022-10-24T09:48:44Z")

</div>

I’m confused about safe-isolation.  
Do you recommend using something like [this](https://skross-shop.de/media/catalog/product/cache/1/image/500x661/9df78eab33525d08d6e5fb8d27136e95/u/s/us-usb-charger_2d_0009.png)?

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [October 24, 2022, 10:16am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/10 "2022-10-24T10:16:43Z")

</div>

> [@lebang](#):
>
> I’m confused about safe-isolation.

🚑 🏥 🩻 🩺 🥼 💊

It is as simple as dividing the box in to two - one section for mains power to USB, the other for the rest - no wires from one side looping around the other side - proper fixed connections for the mains cable - a tug on those connectors and something live could be exposed - and no part of the open frame board being finger accessible.

Preferably an isolation switch so when you open the box the mains is disconnected.

---

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 24, 2022, 1:41pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/11 "2022-10-24T13:41:21Z")

</div>

Yes, but it is all in an enclosure, with a “label” for an authorized person only. And I have a switch before that to shout off the power.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [October 24, 2022, 1:50pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/12 "2022-10-24T13:50:29Z")

</div>

“Yes but” can be quite painful.

Overall you’ve created a tidy solution that works for you.

But what **you personally** don’t want is to see a posting in a few weeks time from someone that was hurt because some of the key precautions that are highly advisable weren’t mentioned here.

And the antenna placement could end up with people thinking that is going to get them range - and there are sooooo many posts on getting full range.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 24, 2022, 2:10pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/13 "2022-10-24T14:10:17Z")

</div>

> [@lebang](#):
>
> Yes, but it is all in an enclosure,

Imagine a wiring error or insulation issue that put the metal work of the antenna socket ‘live’

---

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 24, 2022, 4:51pm UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/14 "2022-10-24T16:51:01Z")

</div>

Ok, agree, that solution is ok for me, but not for everybody 🙂

---

<div class="post-metadata">

**Author:** ![emxes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/emxes/32/35697_2.png) [@emxes](https://www.thethingsnetwork.org/forum/u/emxes)\
**Post date:** [October 29, 2022, 12:03am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/15 "2022-10-29T00:03:09Z")

</div>

Hi  
My recommends are: antenna has to be above metal frame (already mentioned) or distanced from wall. Why do you use high voltage? Better use power plug and wire with DC? temp sensor should be somewhere outside of the box and also distanced from the wall and shaded. USB cables and connectors are not designed for outside use, because of thin pins and possible easy corrosion. Direct connection or more robust connectors are better.  
Rgds

---

<div class="post-metadata">

**Author:** ![lebang](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lebang/32/46976_2.png) [@lebang](https://www.thethingsnetwork.org/forum/u/lebang)\
**Post date:** [October 29, 2022, 9:22am UTC](https://www.thethingsnetwork.org/forum/t/homemade-outside-enclosure-for-ttn-gateway-diy/59538/16 "2022-10-29T09:22:47Z")

</div>

Well yes, a lot of things depend on how it is the situation on the ground.  
In my case, I don’t have a socket nearby.  
Also, the case is [IP 67](https://cdn1.bigcommerce.com/server2300/43185/product_images/uploaded_images/ip-rating-chart.png), so that should be ok.
