AnoyoClock, your morning's worst nightmare <3

Assignment 4 in IN5590 By Stavros Wolff, Pau Solsona Boada Printer: Nikola. Topic: Animatronichs

Assignment text can be found here.

Topic and motivation

The topic chosen is Animatronics. Many people switch off their alarm without really waking up, because the phone or clock is within reach of the bed. We want to build AnoyoClock: a small, round alarm clock with one eye and six spider legs that makes you get out of bed to turn it off.

When the alarm goes off, AnoyoClock walks away from the bed, turns around and watches you. If it sees a hand reaching for it, it scuttles away. The alarm only stops when you press the button on top of it. Our motivation is to build a robot with a clear everyday purpose, where the movement and the single eye give it a cheeky personality, so that chasing the alarm clock feels more like a game than a punishment.

Goals

Our goal is that a person lying in bed has to get up to turn AnoyoClock off, but can always catch it within 3 minutes. All tests are done on the floor next to a bed, with AnoyoClock starting within arm's reach.

# Goal Why it matters How we test it Deadline
1 Stability: walks with a tripod gait and does not fall over in 20 runs that include walking, turning and stopping A fallen robot is easy to catch We run the robot 20 times on the same route (walk 1 m, turn around, walk back, stop) and count how many times it falls over. 17 Nov (milestone 3)
2 Hand detection: detects a hand 20–80 cm from the eye in ≥ 90% of 50 trials at ≥ 15 fps, in both normal room light and dim light (one bedside lamp) Needed for every escape, also in a dark bedroom A person reaches toward the eye 50 times from different distances and directions, first with the ceiling light on and then with only a bedside lamp. The program logs whether each hand was detected and how many frames per second it processes. 18 Nov (milestone 4)
3 Walking away: walks at ≥ 0.10 m/s on a hardwood floor, and is ≥ 1 m away from the bed within 20 s after the alarm starts, in 9 of 10 trials Out of reach before the user is awake We start the alarm 10 times with the robot next to the bed. We time how long it takes to walk 1 m with a stopwatch, and measure with a tape measure how far from the bed it is after 20 s. 23 Nov (milestone 5)
4 Escaping: when a hand comes closer than 40 cm, starts moving within 300 ms and is ≥ 20 cm further from the hand after 2 s, in 8 of 10 trials Makes the user chase it A person reaches toward the robot 10 times while we film it with a phone in slow-motion mode. In the video we count the time from the hand passing a tape mark 40 cm from the robot until the legs start moving, and use tape marks on the floor to see how far the robot moved after 2 s. 23 Nov (milestone 5)

Sources of inspiration

1. Clocky[^1] — An alarm clock on wheels that drives away so you have to get up. Clocky moves randomly, while AnoyoClock watches you and reacts to your hand.

2. Plankton from SpongeBob SquarePants[^2] — Our first concept was based directly on this character. We now only keep the idea that a single eye can give a lot of personality.

3. The Omnidroid from The Incredibles[^3] — Inspired the silhouette of a round body on spider legs. AnoyoClock is much smaller and friendlier, with no claws, antennae or mouth.

References

[^1]: Clocky [^2]: Plankton [^3]: The Incredibles, Omnidroids

Sketch

Illustration of sketch

The sketch shows AnoyoClock from the front, side, top and at an angle. The body is the top half of a pill: a short cylinder with a round dome and a flat bottom. It holds the Raspberry Pi with the AI HAT+, the speaker, and the off button on top. The face has one eye with the camera in the pupil, and a grin that doubles as the speaker grille. The body sits on a round base plate that carries the six legs.

How it stands: each leg has two Dynamixels, one that swings the leg forward and back (hip) and one that lifts it up and down. That gives 12 Dynamixels in total. All of them are mounted on the base plate, so the heaviest parts are as low as possible. AnoyoClock walks with a tripod gait: three legs (front and back on one side, middle on the other) are always on the ground and form a stable triangle, while the other three step forward. Having control of each leg also lets it turn on the spot and crouch while it "sleeps".

How AI is used: a hand detection model runs on the AI HAT+ and finds hands in each camera frame. The size of the detected hand is used to estimate its distance, and its position in the image tells whether it comes from the left or right. When a hand is closer than 40 cm, AnoyoClock walks away in the opposite direction.

The minimum product is walking, hand detection, escaping, the alarm sound and the off button. If time allows, we will add an eyelid (hobby servo), taunting voice lines with a USB microphone, and an IMU to notice when AnoyoClock is picked up.

Component Goes into How it works What is needed
Raspberry Pi 5 4GB Inside the body, on the bottom The only computer on board. One Python program keeps the alarm time, reads the camera, gets hand detections from the AI HAT+, decides what to do (sleep, walk away, watch, escape), moves the legs, plays the alarm and reads the button. No Arduino is needed, since only the Pi takes the AI HAT+ and the camera. microSD card with Raspberry Pi OS, USB-C power supply, Wi-Fi so the clock sets itself
Raspberry Pi AI HAT+ (13 TOPS) On top of the Raspberry Pi (PCIe) Runs the hand detection model so the Pi's processor stays free for walking and sound. Camera images go in, and boxes around hands come out at ≥ 15 fps. A hand detection model compiled for the HAT; if none works well, the ready-made pose model, using the wrist as the hand
Raspberry Pi camera Raspberry Pi (camera port) Sits behind the pupil and looks straight ahead. It is the robot's only way of seeing the user. Camera cable for the Pi 5 long enough to reach the eye, lens hole in the printed eye
6x Dynamixel AX-12/18 and 6x Hobby Servos Dynamixel interface → Raspberry Pi (USB) We will split half of the hobby servos for leg side to side manuver, while the othe 6 whill be for vertical movement. All 12 are connected in one chain, each with its own ID, and the Pi sends new positions for every step of the gait. Dynamixel interface (e.g. U2D2), 12 V power supply (5–10 A), Dynamixel cables, brackets on the base plate and legs
Speaker Raspberry Pi (USB) Plays the alarm from behind the grin. The Pi 5 has no headphone jack, so it connects by USB. USB speaker, or a USB sound adapter for a speaker with a headphone plug
Button Raspberry Pi (GPIO) Sits on top of the dome. Pressing it stops the alarm and puts AnoyoClock back to sleep. Two wires to a GPIO pin; the Pi's built-in pull-up resistor
Hobby servo, USB microphone, IMU (extensions) Raspberry Pi Eyelid, reacting to the user's voice, and noticing when AnoyoClock is picked up. Only added if time allows

Bill of materials (BOM)

Item Description Quantity
1 Raspberry Pi 5 4GB 1
2 Raspberry Pi AI HAT+ (13 TOPS) 1
3 Raspberry Pi camera 1
4 Dynamixel AX-12/18 6
5 Speaker 1
6 Button 1
7 Dynamixel interface, e.g. U2D2 1
8 12 V supply for the Dynamixels, 5–10 A 1
9 Raspberry Pi 5 power supply, microSD card, camera cable for Pi 5 1 each
11 Hobby servo (extension: eyelid, legs) 7
12 USB microphone (extension) 1
13 IMU (extension) 1

Project Plan and Milestones

We will use an iterative approach and build AnoyoClock in stages, testing each version before adding new features. Milestones 2–3 (body and legs) and milestone 4 (camera and hand detection) are worked on in parallel, and the two parts come together in milestone 5.

MilestoneDateExpected result
1. Parts and setup10 NovAll parts are collected. The camera shows live detections on the AI HAT+, and all 12 Dynamixels move to positions sent from the Pi.
2. First steps13 NovThe printed robot stands on six legs and walks 1 m forward with the tripod gait in 5 of 5 tries.
3. Stable walking17 NovThe robot walks, turns and stops without falling over in 20 runs (goal 4).
4. Hand detection18 NovHands 20–80 cm away are detected in ≥ 90% of 50 trials at ≥ 15 fps, in both normal and dim light (goal 2).
5. Full alarm cycle23 NovThe alarm starts at a set time and the button stops it in 10 of 10 tries. In the same tests the robot walks ≥ 1 m away from the bed (goal 1) and escapes a reaching hand (goal 3). The baseline reaction time is measured.
6. Faster reactions25 NovThe reaction time is at least 30% faster than the baseline from milestone 5.
7. Final delivery30 NovDocumentation, demo video and presentation are finished.

After each milestone, we test the current prototype and decide what to improve. The main priority is that AnoyoClock walks reliably and reacts to hands. The extensions are only added if the milestones are met on time.