Built this for Halloween: a talking witch hands out candy, one piece at a time, down a pipe in her sleeve.
Hardware:
Arduino Uno R3, powered over USB from a laptop indoors
NEMA 23 stepper (23HS5628, 2.8 A) + TB6600 driver (400 pulses/rev), 24 V supply
IR break-beam pair across the candy chute
HC-SR04 ultrasonic sensor on the witch to see visitors walk up
The Uno sits indoors in a printed case; the bucket is outside. They're linked by an Ethernet cable through RJ45 screw-terminal adapters (step/dir/enable, beam and sonar on the pairs).
How dispensing works:
The laptop sends a single 'd' over serial. The Uno steps the turntable until a candy breaks the IR beam, then stops and reverses for 1 s so the next candy doesn't wedge in the hole.
The talking part runs on the laptop in Python: speech-to-text, an LLM playing the witch, and text-to-speech.…