Build a 3D Printed Arduino Weather Station: a Beginner's Guide to 3D Printing + Electronics
by Daniel DSouza in Circuits > Arduino
41 Views, 1 Favorites, 0 Comments
Build a 3D Printed Arduino Weather Station: a Beginner's Guide to 3D Printing + Electronics
What if you could design the housing for your electronics project, press a button, and have it physically appear in front of you a few hours later — perfectly fitted, no screws, no drilling, just a custom shell you designed yourself?
That is exactly what a 3D printer lets you do. And this project is designed to teach you both things at once: how 3D printing actually works, and how to use that knowledge to build something genuinely useful — a mini weather station that reads room temperature and humidity and displays it on a small OLED screen, all sitting inside an enclosure you 3D print yourself.
By the end of this Instructable, you will have:
- A working understanding of how FDM 3D printer's work
- Printed your first functional enclosure
- Assembled a live weather station using Arduino
- Learned about filament types, slicer software, and print settings
Whether you have access to a school or makerspace 3D printer or are considering getting your own — if you're in India, you can explore a range of 3D printers and filament options online before deciding what suits your budget and project.
Supplies
All the electronic components used in this project — Arduino Nano, DHT22, OLED displays, and jumper wires — are standard maker parts available at most electronics stores.
Understanding How a 3D Printer Works
Before you design or print anything, it pays to understand what is actually happening inside the machine.
The Technology: FDM (Fused Deposition Modelling)
The most common and affordable type of 3D printing is called FDM — Fused Deposition Modelling. Here is the process in simple terms:
- A plastic filament (like a long spool of wire) is fed into a heated extruder nozzle
- The nozzle melts the plastic to around 200°C
- The nozzle moves precisely in X and Y directions, laying down a thin line of melted plastic
- The build plate drops down slightly after each layer
- The next layer is deposited on top of the previous one
- This repeats — layer by layer — until your 3D object is complete
Key Printer Parts to Know
Part What It Does
Extruder Feeds and melts the filament
Hotend / Nozzle The tip where plastic comes out (usually 0.4mm)
Heated Bed Keeps the first layer stuck while printing
Print Head / Carriage Moves in X and Y axes
Z-axis Rod / Lead Screw Moves the bed down after each layer
Stepper Motors Precise motors controlling all movement
Control Board The "brain" running the printer firmware
What is Filament?
Filament is the raw material for FDM printing — plastic in wire form, usually 1.75mm in diameter, wound on a spool.
The two most beginner-friendly filament types:
PLA (Polylactic Acid)
- Made from cornstarch — biodegradable
- Prints at ~200°C nozzle, ~60°C bed
- Easy to print, low warping
- Perfect for enclosures, cases, decorative parts
- Best choice for this project
PETG (Polyethylene Terephthalate Glycol)
- Stronger and more heat-resistant than PLA
- Slightly harder to tune but excellent finish
- Good for parts that need durability
Tip: For your first print, always use PLA. It is forgiving, safe, and produces great results without fuss.
Choosing the Right 3D Printer for This Project
Not all 3D printers are the same. For electronics enclosures and maker projects, here is what to look for:
Printer Types
Cartesian (Bed-Slinger)
The bed moves in the Y-axis, the print head moves in X and Z. Most beginner printers like the Ender 3 are this type. Affordable, widely supported, huge community.
CoreXY
Both X and Y motion is handled by the print head; the bed only moves in Z. Faster, more accurate, but typically pricier. Examples: Bambu Lab A1, Voron.
Delta
Three arms move the print head. Fast for tall cylindrical prints, but harder to calibrate. Less common for beginners.
Specs That Matter for This Project
Spec Recommended Minimum
Build Volume 120 × 120 × 120 mm (our enclosure is ~90 × 60 × 40 mm)
Nozzle Diameter 0.4 mm (standard)
Layer Resolution 0.1–0.2 mm
Heated Bed Yes (needed for PLA adhesion)
Filament Compatibility PLA / PETG
What You'll Need — Full Parts List
Electronics Components
- Component Qty Purpose
- Arduino Nano 1 Main microcontroller
- DHT22 Sensor 1 Reads temperature + humidity
- 0.96" OLED Display (I2C, SSD1306) 1 Shows readings
- 10kΩ Resistor 1 Pull-up for DHT22 data pin
- Jumper Wires (M-F) 10 Connections
- Mini USB Cable 1 Power + programming
- Small Breadboard (optional) 1 Prototyping
3D Printing Materials
Item Spec
PLA Filament 1.75mm, any colour — white or grey recommended
Approx. filament used ~30g (well under 1 roll)
Tools
- Computer with Arduino IDE installed (free)
- Slicer software: Ultimaker Cura (free) or PrusaSlicer (free)
- 3D Printer (access via school, makerspace, or own)
- Soldering iron (optional — crimping or jumper wires work fine)
- Small Phillips screwdriver
Designing the Enclosure (or Using the Provided STL)
This is where 3D printing becomes genuinely exciting — you can design a case that fits your exact components, not whatever generic box happens to be available.
Enclosure Design Decisions
Our enclosure has:
- Two pieces: a bottom tray (holds the Arduino and breadboard) + a snap-fit lid
- Front face cutout: 26 × 14mm rectangular window for the OLED display
- Rear slot: 9mm wide for the USB cable (power input)
- Side vents: 4 × 2mm slots so the DHT22 can sense actual room air (not the heat from inside the case)
- Snap-fit clips: four tabs on the lid that click into the tray — no screws needed
If You Are New to CAD
You do not need to design from scratch. Use one of these free tools:
- Tinkercad (browser-based, perfect for beginners — just drag and combine shapes)
- Fusion 360 (more powerful, free for personal use)
- FreeCAD (fully open-source)
For this project, download the ready-made STL files here:
(STLs: weather_station_base.stl and weather_station_lid.stl)
You can modify them in Tinkercad if you want to change colours, add your name, or resize for different components.
Key design rule: Always leave 0.2–0.3mm tolerance on mating surfaces in FDM prints. Parts designed for exactly 26mm will be slightly smaller after printing due to shrinkage — design the cutout at 26.3mm and the OLED at 26mm and they'll fit perfectly.
Slicing Your Model — Turning a 3D File Into Printer Instructions
A 3D printer does not understand an STL file directly. You need slicer software to convert it into G-code — the actual movement instructions the printer follows.
Recommended Slicer: Ultimaker Cura (Free)
Download at: ultimaker.com/software/ultimaker-cura
Print Settings for This Project
Setting Value Why
Layer Height 0.2mm Good balance of speed and detail
Infill Density 20% Enough strength for an enclosure
Infill Pattern Grid or Gyroid Gyroid is slightly stronger
Print Speed 50 mm/s Safe default for most printers
Supports OFF The enclosure is designed to print without supports
Build Plate Adhesion Brim Helps with adhesion on the first layer
Nozzle Temp 200–210°C For PLA
Bed Temp 60°C For PLA
Walls / Perimeters 3 Gives the enclosure solid walls
Understanding Infill
Infill is the internal structure of your print. You don't print solid plastic — instead, the slicer creates a grid or pattern inside to save material while keeping strength. For a small enclosure:
- 10% infill = very light, slightly fragile
- 20% infill = recommended — good balance
- 40%+ infill = heavy, strong, uses more filament and time
Printing the Enclosure
Now it's time to print. Here's the sequence:
Step-by-Step: First Print Checklist
Before Starting:
- Bed is levelled (use paper-thickness test or auto-levelling if your printer has it)
- Filament is loaded and extruding cleanly
- First layer sticks properly — watch the first 3 minutes
- G-code is transferred to SD card or via USB
Estimated Print Times:
- Bottom tray: ~2.5 hours at 0.2mm / 50mm/s
- Lid: ~1.5 hours
- Total: ~4 hours for both parts
Common Issues and Fixes
Problem Likely Cause Fix
First layer not sticking Bed too far from nozzle Lower the nozzle by 0.05mm (live adjust)
Stringing between parts Temperature too high Drop nozzle temp by 5°C
Layer shifting mid-print Print speed too high Reduce to 40mm/s
Warping at corners Bed temp too low Increase to 65°C, add brim
Under-extrusion (gaps) Clogged nozzle or cold Do a cold pull or increase temp
Pro Tip: The first layer is everything in 3D printing. If your first layer looks like a flat, slightly squished line with no gaps — you are set. If it looks like spaghetti floating above the bed — stop, re-level, and try again.
Wiring the Circuit
With the enclosure printed, let's wire the electronics.
Wiring Table
DHT22 Sensor → Arduino Nano
DHT22 Pin Arduino Nano Pin Wire Colour
VCC (Pin 1) 3.3V Red
Data (Pin 2) D2 Yellow
NC (Pin 3) — —
GND (Pin 4) GND Black
OLED Display → Arduino Nano
OLED Pin Arduino Nano Pin Wire Colour
VCC 5V Red
GND GND Black
SDA A4 Blue
SCL A5 Green
How I2C Works (briefly)
The OLED uses a protocol called I2C (Inter-Integrated Circuit). It needs only two wires — SDA (data) and SCL (clock) — to communicate. The Arduino's A4 and A5 pins are hardware I2C pins. Multiple I2C devices can share the same two wires as long as they have different addresses. The SSD1306 OLED has a default address of 0x3C — the library handles this automatically.
Programming the Arduino
Required Libraries
Install these via Arduino IDE → Tools → Manage Libraries:
- DHT sensor library by Adafruit
- Adafruit Unified Sensor by Adafruit
- Adafruit SSD1306 by Adafruit
- Adafruit GFX Library by Adafruit
The Sketch
Code Walkthrough
- dht.readTemperature() — reads temperature in Celsius from the DHT22. Pass true for Fahrenheit.
- dht.readHumidity() — returns relative humidity as a float (e.g., 65.4)
- isnan() — DHT22 occasionally fails to respond. This check prevents garbage values from being displayed.
- display.clearDisplay() — clears the OLED buffer before drawing new values
- display.display() — pushes the buffer to the actual screen. Nothing shows until this is called.
- delay(2000) — DHT22 needs at least 2 seconds between readings; any faster and it returns errors.
Assembly — Fitting It All Into the Enclosure
With your enclosure printed and code uploaded, it's time to assemble.
Assembly Sequence
1. Test before closing
Before any final assembly, plug in the Arduino and verify the OLED displays temperature and humidity readings correctly. Much easier to fix wiring now than after closing the case.
2. Fit the OLED
The OLED slides into the front cutout. If you printed it correctly, it should be snug with the screen face flush to the case. You can use a small dot of hot glue or 3M foam tape on the back of the display to hold it in place.
3. Route the wires
Tuck the wires flat against the bottom of the tray. The DHT22 should sit near the side vent holes so it can sense actual room air.
4. Seat the Arduino
The Arduino Nano sits in the tray with its USB port aligned with the rear slot. The USB cable passes through this slot for power.
5. Snap the lid
Align the four snap-fit tabs with the slots on the tray and press firmly until you hear/feel each tab click. The lid should sit flush with no gaps.
6. Final test
Plug in power. OLED should show the startup screen, then begin displaying readings within 3 seconds.
Calibration, Improvements, and What to Try Next
Your weather station is running. Here's how to go further.
Calibration
The DHT22 is accurate to ±0.5°C and ±2–5% humidity — reasonably precise for a hobbyist sensor. If you have a reference thermometer, you can add an offset in the code:
Project Upgrades to Try
Upgrade What to Add
Data logging Add an SD card module — log readings with timestamps
Wi-Fi push Swap Arduino Nano for an ESP8266/ESP32 — send data to a Thingspeak dashboard
Battery powered Add a Li-Po battery + TP4056 charging module + boost converter
Multi-room Print more stations; use ESP-NOW to send data wirelessly to a central display
3D print a desk stand Design a tilted stand in Tinkercad for a better display angle
Add a buzzer Alert when humidity goes above 80% (mould risk)
What You Learned About 3D Printing
Take a moment to note what this project actually taught you:
✅ How FDM printers build objects layer by layer
✅ The difference between PLA, PETG, and which to choose
✅ Key slicer settings: layer height, infill, walls, bed adhesion
✅ How to design for printability (tolerances, no-support geometry)
✅ First-layer diagnosis and common failure fixes
✅ How to integrate a 3D-printed part into a real functional project
That is the real value of 3D printing for makers and engineers — not just producing plastic shapes, but designing purpose-built parts that make your electronics projects self-contained and professional.
Author Notes
This project is a great first step into combining electronics and 3D printing — two skills that reinforce each other significantly. Once you've done one enclosure project, you start thinking about every future build differently: "I could just print a case for that."
Have questions, found a bug in the code, or printed a modified version? Drop a comment below.
External Resources
- Tinkercad — Free Browser-Based 3D Design -https://www.tinkercad.com/learn
- TinkerCAD Tutorial (8 Steps) - https://www.instructables.com/TinkerCAD-Tutorial-1/
- All3DP — What Is PLA? Materials Guide - https://all3dp.com/2/what-is-pla-3d-printing-materials-simply-explained/
- Adafruit Learning System — DHT22 Sensor Guide - https://learn.adafruit.com/dht?view=all