Why You Should Be A Mad Scientist

Dr. Victor Frankenstein wanted to “banish disease from the human frame and render man invulnerable to any but a violent death.”

As far as we can tell, he was mostly successful, in that his monster died not from disease but rather immolating himself on a pyre so that none like him could ever be created again.

Frontispiece of the 1831 Frankenstein

Dr. Evil created multiple secret lairs, sharks with lasers on their heads, a moon with a laser on its head, and I assume lots of other laser things.

Eventually all his cool toys get destroyed and he unfortunately discovers he’s related to Austin Powers.

Dr. Evil

Doc Brown invented a time machine because he fell off his toilet and hit his head on the sink.

As far as I can tell he was the most successful one.

Doc Brown

What do these have in common?

  • Immense hubris.
  • Actually engineering, not science.
  • Ridiculous amounts of overengineering.
  • Unintended consequences.

(Yes, this is all as fun as it sounds.)

Today:

  • Moon bases are very hard to build.
  • But small-time mad scientist shit has become quite approachable!
    • Home Assistant
    • Arduino
    • AI
  • So let’s talk Mad Scientist 101.

Project One: Home Assistant

Problem: using light switches is uncool and makes you get off the couch.

Solution: intro level mad scientist bullshit

Home Assistant

  • Open source, locally-hosted smart home.
  • The nervous center. Schedules, “if this then that,” web hooks.
  • Automatic lights. Blinds that respond to the sunset.
  • Stop living in the 1900’s.

But isn’t it a pain in the ass?

  • Nowadays it’s just a one-click install.
  • Easier than Alexa, Google Home, etc.
  • Works with fucking everything.
Raspberry Pi running Home Assistant

Project Two: Escape Room

Problem: my teenager was having a birthday party that didn’t involve me

Solution: a mad scientist lair, or: an escape room

Bird Detective Agency:

The birds have been kidnapped!

Fortunately, one escaped, and has recruited you, the players, as detectives to rescue the birds and uncover the villain’s plan.

Players “interview” each bird for hints.

Stump with the wooden birds and hint notes

Core loop:

Each hint has:

  • an audio clip
  • an ambience change
  • other effects.

Puzzle example:

First bird talks about being out of it and seeing lots of oddly colored stars, while the room ambience changes.

Hue track lights in a color sequenceLockbox with painted keys

How’d it go?

  • They loved it.
  • Hanging out in a moody secret lair is badass.
  • Putting things on things and seeing something happen is super satisfying.

So how did I build it?

Hardware:

  • ESP32. Uses Arduino IDE, costs a few bucks, comes with wifi.
  • Microcontroller. No OS. Just does what you tell it.
  • Big community.
  • Easy to program (...for Claude).
  • Easy to wire.
  • Works with tons of stuff.
ESP32 dev board

Hardware, part 2:

  • RC522 RFID reader.
  • NFC stickers. 50 for 8 bucks.
  • Smart speaker.
RC522 RFID reader boardStrip of NFC stickers

A brief diversion into basic electronics wiring.

  • Claude can’t do this yet, sorry.
  • Breadboards let you do all your wiring before making anything permanent.
  • Your ESP32 and everything else plug right into it.
How breadboard rows are connectedESP32 on a breadboard

Putting it all together.

  • Still on the breadboard!
  • Easily powered with a battery.
ESP32 and RC522 reader wired inside the stumpNFC sticker on the bottom of a bird

Staples:

  • Breadboards, wires, phone battery.
  • Power drill+screwdriver.
  • Claude. Coding, debugging, wiring diagrams.
  • Amazon Prime.
Wiring diagram: RC522 RFID reader to NodeMCUESP32 on a breadboardRadio Shack listing: permanently closed

Props:

This part is super fun. Prior art is less important, do what you want.

  • I used corrugated paper for the stump.
  • Your favorite craft supplies. Paint, glue, etc.
  • Random gadgets and cool shit.
  • Science note: you are the vision holder. Don’t accept mediocrity.

This is Game Dev Light

  • Puzzle design
  • Environment design
  • Production
  • Zero to ship in a couple weeks
  • Full doc

Project Three: Cat Sprayer

Problem: neighborhood cats making my cats wake me up at 3am

Solution: a mad scientist superweapon, or: a cat sprayer

Totally innocuous storage bench

  • Not suspicious
  • At all
The cat sprayer: a storage bench with a nozzle

So how did I build it?

Main components

  • Another ESP32.
  • Camera.
  • Bucket.
  • Pump.
  • Hose and nozzle.
Inside the sprayer bench: bucket, pump and hose

Building on top of the escape room

  • Claude keeps helping with circuitry.
    • Transistor (MOSFET)
    • Schottky diode
  • ESP32, breadboards, wires, etc.
  • Home Assistant still connects everything.
Sprayer ESP32 boardCircuit diagram: ESP32 driving a MOSFET that switches the 12V pump

New: Camera Pipeline

  • I used Reolink, brand doesn’t really matter.
  • Frigate runs locally on your PC.
  • Excellent Home Assistant integrations.
  • Claude will configure it all for you.
    • Science note: you are the mastermind! Claude will try to trick you into swapping roles.
Frigate tracked object: cat detected

Some other new bits

  • WAGOs are incredible
  • IP65 boxes (+ hole saw)
WAGO lever connectorInside the sprayer IP65 box

Soldering

  • Eventually you may need to solder.
  • It’s not that bad!
  • The pull test is real.
Helping hands soldering stationHeat gun
Heat shrink tubingWeller soldering station

Shipping

  • Don’t shortchange the last couple percent.
  • Physical packaging. Hide the mess!
  • Github for source.
  • Don’t make work for future you!

Project Four: Knight

Problem: I’ve terrorized neighborhood cats, but not neighborhood children

Problem 2: I ended up with a suit of plate armor (long story)

Solution: a project of staggering hubris that will probably kill me, or: a giant, evil knight that stares at you

Disclaimer

  • Out over my skis
  • VERY in progress
  • Still kind of janky
  • Like games, ending with my worst content
The knight in progress, under a plastic cover

So how am I building it?

Repeat technologies

  • Claude for wiring and parts
  • ESP32, IP65 boxes, etc.
  • Camera and frigate
  • Home Assistant tying everything together

New thing: EMT conduit

  • ¾” or 1” pipe for protecting electrical wires
  • But we’re not going to use it for that
  • Burner staple
EMT conduit runsBar stools built from EMT
Outdoor movie screen frame built from EMTShade structure built from EMT

Why EMT?

  • Cheap and at every hardware store
  • Strong, bendable, not extremely heavy
  • Community and shared plans online
  • Lots of connectors
EMT base flange connectorEMT angle connectorEMT two-sided angle connector

The skeleton

  • Pieces of 10’ 1” EMT (use a pipe cutter)
The knight's EMT frame

New things: servo, turntable, wood

  • Servo rapidly turns to the angle you specify
    • Very easy wiring
  • Turntable for strength: servos are fragile
  • Wood! Cut to any size, screw shit into it, it’s perfect.
  • Also LED strips but everyone should use these all the time
Servo motorsLazy susan turntable bearing
Knight head prototype in a boxKnight head prototype, second view

Fleshing him out

  • pipe insulation / pool noodles for thickness
  • Thrift store clothes
  • …and the plate armor I mentioned earlier
Pool noodlesKnight legs with the camera
The knight in daylight, fully dressed

What went wrong, and where I am

  • Too much new stuff
  • Structural integrity and balance are real puzzles
    • Science note: Claude suffers no consequences for its actions.
  • Mechanical movement is tough
    • Sword arm got cut early
  • Software complexity: lag; vision; accuracy/centroid; smoothing
  • Humans take lots of arting
  • Crotch cam
  • He has murder in his gaze

Conclusion / Future / Q&A

Conclusion:

  • This is an amazing time for making fun, cool shit.
  • Your gamedev skills transfer incredibly well to making physical stuff.
  • Concept -> ship in weeks is super satisfying.
  • Build on top of your previous projects. Don’t add too much at once.
  • With immense hubris comes immense irresponsibility.