Skip to content

Instantly share code, notes, and snippets.

@rexxars
Last active October 8, 2025 09:52
Show Gist options
  • Select an option

  • Save rexxars/272be369ba930105e199359c5deaa556 to your computer and use it in GitHub Desktop.

Select an option

Save rexxars/272be369ba930105e199359c5deaa556 to your computer and use it in GitHub Desktop.
Ryan's microwave

Ryan's Microwave

An homage to Ryan Bonial's genious microwave (and extension cable that works really well with it).

Description

It's a 3D-printed "microwave", but instead of emitting 1000+ watts of power, it emits at most 100 milliwatts (through wifi). Inside it has an ESP32 S3 in Adafruit's "QT Py" configuration, as well as an N20 gear motor running at 5V. The whole thing is powered by USB-C. A cable that works really well with it is provided.

Usage

The motor spins for 15 seconds when pressing the button on the front panel, and an LED is also lit while running to reveal the contents. The cycle can also be triggered through HTTP, which means you can use it as an alarm or something:

Turning it on

curl 'http://ryans-microwave.local/switch/microwave_cycle/turn_on'

Turning it off

curl 'http://ryans-microwave.local/switch/microwave_cycle/turn_off'

Home Assistant

By installing ESPHome on your Home Assistant setup and making a slight change to the firmware (3 new lines!), it can be integrated and be triggered based on conditions/events from there!

# Enable Home Assistant API
api:
  encryption:
    key: !secret ha_api_encryption_key

Configuration

The ESP32 runs ESPHome. It tries to connect to a preconfigured wifi network, but if it fails to do so (as it should when gifted) it will set up a fallback wifi hotspot. The password is your mothers' maiden name (just kidding, will send it to you on Slack). This will allow you to reconfigure the wifi through a captive portal.

Wiring/Pinout

There isn't really a "Ryan's microwave pinout", but I can talk about the wiring:

See Adafruit for the ESP32 pinout. The firmware is referencing the GPIO number listed in yellow on there.

  • 5V on ESP32 comes straight from USB-C and is wired to the positive side of the N20 motor.
  • Across the motor is a flyback diode, as well as a small capacitor (wired directly on there).
  • GPIO18 (A0) is connected to a MOSFET (IRLZ44N) gate - when high, it will open up the gate.
  • GPIO17 (A1) is connected to an LED in the main chamber. Not ideal to run this straight from it's 3.3V, but should at most draw ~20mA and I was lazy.
  • GPIO8 (A3) is connected to a physical button on the front side of the microwave.

Firmware

See ryans-microwave.yaml.

The build

  • The top comes off. It can be held in place a bit better with a single M2.5x5 screw (provided), but friction also usually is enough.
  • The window slides out (with some fiddling/force). I originally was going to use fully translucent acrylic, but had a hard time cutting it, and the 3D printed version actually came out more realistic.
  • The bit that holds the motor and button in place can be taken out - it's held in place with two screws. It's quite fiddly to get back in place though, so wouldn't recommend it.
  • There are two gears - one underneath the electronics (motor), and one under the microwave "plate". The microwave plate is fairly easy to replace - I've included versions that has the Sanity logo glued to them, as well as a basic one if you want to put whatever else you want on there. There's a small metal washer that reduces friction but is not necessary. Falls out easily. If you hear something rattling around, it's probably that.
  • Fusion 360 files can be provided if you're interested - but they're not the most structured. There were a lot of iterations.

Caveats

  • There is no "door". I didn't have time to try and make any sort of hinges happen. Sorry not sorry :p
  • The button/panel fitting came out quite crap and I didn't have time to fix it. I apologize.
  • The soldering on the motor is attrocious - if the motor stops running, it's likely the motor wires having been dilodged.
  • It has magnet feet! You can pull them out if you don't want em. They're lightly glued.
esphome:
name: ryans-microwave
friendly_name: Ryans Microwave
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
# Enable logging
logger:
ota:
- platform: esphome
password: "<your-password>"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ryans-Microwave Fallback Hotspot"
password: "<your-password>"
captive_portal:
# Web control to trigger programatically. You can throw basic auth on here
# if you want, but keep in mind it's HTTP, not HTTPs.
web_server:
port: 80
# Outputs
output:
# For the LED inside the "chamber"
- platform: gpio
pin: GPIO17
id: micro_led_pin
# For the motor (well, for the MOSFET gate that allows 5V through)
- platform: gpio
pin: GPIO18
id: motor
# Onboard neopixel. Can't really see it unless you crank it up,
# and only then through the wall - but leaving it in because why not?
# Does slow down compilation though - so feel free to uncomment.
- platform: gpio
pin: GPIO38
id: neopixel_power
inverted: false # Required on QT Py boards
# Lights
light:
# "Chamber" LED
- platform: binary
id: micro_led
name: "Micro LED"
output: micro_led_pin
# See note on GPIO38 above. Not actually used.
- platform: esp32_rmt_led_strip
id: onboard_led
name: "Onboard LED"
pin: GPIO39
num_leds: 1
rgb_order: GRB
chipset: WS2812
default_transition_length: 0s
# Physical button
binary_sensor:
- platform: gpio
pin:
number: GPIO8
mode:
input: true
pullup: false
pulldown: true
name: "Button"
id: micro_button
on_press:
then:
- if:
condition:
- script.is_running: run_cycle
then:
- script.stop: run_cycle
- light.turn_off: micro_led
- output.turn_off: motor
else:
- script.execute: run_cycle
# Template switch for web/HA control
switch:
- platform: template
name: "Microwave Cycle"
id: microwave_cycle
optimistic: true # allows repeated toggles
turn_on_action:
- script.execute: run_cycle
turn_off_action:
- script.stop: run_cycle
- light.turn_off: micro_led
- output.turn_off: motor
# Microwave script
script:
- id: run_cycle
mode: restart
then:
- light.turn_on: micro_led
- output.turn_on: motor
- delay: 15s
- light.turn_off: micro_led
- output.turn_off: motor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment