DIY Cardboard Rotating Globe with HDMI Touchscreen

DIY Cardboard Rotating Globe with HDMI Touchscreen: Weather, Countries, Time & Night Lights | Kids STEM Project
Kid-Friendly Cardboard STEM Project 🌎📱

A tiny cardboard Earth that spins forever — with a real touchscreen you tap to explore it

This version upgrades the spinning globe with a small HDMI touchscreen sitting in the base. A motor keeps the cardboard Earth turning non-stop, while tapping the screen cycles through four live modes — Weather, Countries, Time, and Night Lights — right on the display itself. Here's exactly how to build it, with the full circuit and code.

1

Why a touchscreen instead of a separate button

In this version, the display and the button become one part: a small HDMI touchscreen connected to a Raspberry Pi. Instead of wiring a separate touch pad and a separate OLED screen, you tap directly on the picture you're already looking at, and a tiny computer program instantly redraws it with the next mode's information.

Always spinning

One slow motor

A small geared DC motor turns continuously through an axle, so the cardboard globe never stops rotating.

Tap the screen

Touch = next mode

Tapping anywhere on the touchscreen cycles through Weather → Countries → Time → Night Lights → back to Weather.

One tiny computer

Raspberry Pi runs it all

A Raspberry Pi drives the HDMI touchscreen and the motor at the same time, using a simple Python program.

2

What you'll need

Mostly cardboard and craft supplies, plus a small Raspberry Pi electronics kit. Ask a grown-up to help with ordering and assembly.

Brain

Raspberry Pi (Zero 2 W or Pi 4)

Runs the touchscreen program and controls the motor and lights through its GPIO pins.

Display

3.5"–5" HDMI capacitive touchscreen

Connects over HDMI for video and USB for touch — one screen that shows and controls everything.

Spin power

Small 5V geared DC motor

Turns the axle slowly and steadily so the globe spins forever without wobbling.

Motor control

Motor driver (L298N or MOSFET)

Lets the Pi safely run the motor without overloading its GPIO pins.

Night lights

8-LED WS2812 ring

Glows warm and twinkly under the globe for Night Lights mode, and different colors for other modes.

Power

5V/3A USB-C power supply + separate battery pack

Powers the Raspberry Pi and touchscreen, while the motor gets its own battery through the driver.

Storage

MicroSD card (8GB+)

Holds the Raspberry Pi's operating system and your Python program.

Craft supplies

Cardboard, foam ball, paper world map, glue

Builds the spinning globe and the base stand around the electronics.

🛡️ Adult helper zone: Build and test with a grown-up nearby, especially for cutting cardboard, wiring the motor driver, and setting up the Raspberry Pi for the first time.
3

How the circuit works

The touchscreen plugs straight into the Raspberry Pi over HDMI (for the picture) and USB (for touch) — no extra wiring needed there. The motor and LED ring connect to the Pi's GPIO pins, with the motor drawing its power through a separate driver so it never overloads the Pi.

// Touchscreen Globe wiring map
   Raspberry Pi (Zero 2 W / Pi 4)
     HDMI port  ------------------> HDMI Touchscreen (video in)
     USB port   ------------------> HDMI Touchscreen (touch data in)

     GPIO18 (PWM) -----------------> Motor Driver IN (speed control)
     GPIO12       -----------------> WS2812 LED ring DIN
     GND          -----------------> Shared GND (driver + LED ring)

   Motor Driver (L298N / MOSFET)
     OUT ---------------------------> 5V Geared DC Motor ---> Axle ---> Cardboard Globe
     VMOTOR -------------------------> Separate battery pack +
     GND ----------------------------> Shared GND with Pi
🖥️ HDMI touchscreen = screen + button in one 🧠 Raspberry Pi = the brain 🎚️ Motor driver = the muscle helper ⚙️ Motor + axle = keeps it spinning 💡 LED ring = the night lights
⚠️
Give the motor its own power: motors can cause voltage dips that crash a Raspberry Pi. Always power the motor through its own battery pack and driver, sharing only the ground wire with the Pi.
4

Step-by-step build

Follow these in order — the base electronics get set up and tested before the globe is attached on top.

Set up the Raspberry Pi

Flash the Raspberry Pi OS onto the microSD card, boot the Pi, and connect it to Wi-Fi with a grown-up's help.

Build the base stand

Cut a sturdy cardboard box to hold the Raspberry Pi, touchscreen (facing up or forward), and battery packs, with a hole in the top-center for the motor shaft.

Connect the touchscreen

Plug the HDMI touchscreen's HDMI and USB cables into the Raspberry Pi, following the screen manufacturer's quick-start guide.

Mount the motor and LED ring

Glue the geared motor upright with its shaft pointing up through the base's center hole, and place the WS2812 ring around the shaft.

Wire the motor driver and LED ring

Connect them to the Pi's GPIO pins and separate battery pack, following the circuit map above.

Install libraries and run the code

Install the needed Python libraries, paste in the program below, and run it — confirm the motor spins and tapping the screen changes modes.

Build the cardboard globe

Wrap a foam ball with a printed world map, push a cardboard tube through its center, and slide it onto the motor shaft.

Decorate and finish

Set the program to auto-start on boot (see the FAQ), add labels, and trim any visible wires.

5

The Raspberry Pi code

This Python program shows a full-screen touch interface, keeps the motor spinning at a steady speed the whole time, and redraws the screen and LED ring every time you tap.

touch_globe.py
import tkinter as tk
import RPi.GPIO as GPIO
import random
from datetime import datetime
from rpi_ws281x import PixelStrip, Color

# ---- pins ----
MOTOR_PIN = 18
LED_PIN   = 12
NUM_LEDS  = 8

# ---- motor setup: spins forever at a steady speed ----
GPIO.setmode(GPIO.BCM)
GPIO.setup(MOTOR_PIN, GPIO.OUT)
motor_pwm = GPIO.PWM(MOTOR_PIN, 100)
motor_pwm.start(60)

# ---- LED ring setup ----
strip = PixelStrip(NUM_LEDS, LED_PIN)
strip.begin()

modes = ["Weather", "Countries", "Time", "Night Lights"]
mode_index = 0
countries = ["Japan", "Brazil", "Kenya", "Norway"]
weather_icons = ["Sunny", "Rainy", "Cloudy", "Snowy"]

def set_ring(color):
    for i in range(NUM_LEDS):
        strip.setPixelColor(i, Color(*color))
    strip.show()

def update_display():
    mode = modes[mode_index]
    if mode == "Weather":
        label.config(text=f"WEATHER\n{random.choice(weather_icons)}")
        set_ring((80, 180, 255))
    elif mode == "Countries":
        label.config(text=f"COUNTRIES\n{random.choice(countries)}")
        set_ring((80, 220, 150))
    elif mode == "Time":
        now = datetime.now().strftime("%H:%M")
        label.config(text=f"TIME\n{now}")
        set_ring((255, 255, 255))
    else:
        label.config(text="NIGHT LIGHTS")
        for i in range(NUM_LEDS):
            c = (255, 210, 120) if random.random() < 0.4 else (0, 0, 0)
            strip.setPixelColor(i, Color(*c))
        strip.show()

def on_touch(event):
    global mode_index
    mode_index = (mode_index + 1) % len(modes)
    update_display()

# ---- full-screen touch window ----
root = tk.Tk()
root.attributes("-fullscreen", True)
root.configure(bg="black")
label = tk.Label(root, text="", font=("Helvetica", 44), fg="white", bg="black")
label.pack(expand=True)
root.bind("<Button-1>", on_touch) # any tap on the touchscreen counts as a click

update_display()

def refresh_loop():
    if modes[mode_index] == "Time":
        update_display() # keep the clock ticking
    root.after(1000, refresh_loop)

refresh_loop()
root.mainloop()
🧩
Make it your own: try changing 60 in motor_pwm.start(60) to spin faster or slower, or add a real weather lookup using Python's requests library and a free weather API for live data.
6

Frequently asked questions

Do I need to know Python already?

No. The program above is ready to run as-is. Learning happens by changing small pieces — like the country list or the LED colors — and seeing what changes on screen.

How do I make the program start automatically when the Pi turns on?

You can add the script to the Raspberry Pi's autostart settings (found in its desktop configuration or a startup script), so it launches full-screen every time it boots — a grown-up or an online Raspberry Pi guide can help with this one-time setup.

Why does the motor need its own battery pack?

Motors can briefly pull a lot of current when starting or under load, which can cause voltage dips strong enough to reboot a Raspberry Pi. A separate battery through the motor driver keeps the Pi's power steady.

Can Weather mode show real weather?

Yes — since the Raspberry Pi has Wi-Fi, you can extend the code to fetch real weather from an online weather service instead of picking a random icon.

Built for curious young makers 🌍 — always build with a grown-up, and keep it spinning!

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
Young inventors love it!
🖨️
3D Print
All parts
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course