P206 23:31:30 13 FEB
TURNING A STRESS TOY INTO A LLAMA BOT
01 JAN 2022

This project started with a burst stress toy llama that seemed too good to throw away. I decided to give it a second life as a singing, dancing robot, which turned a cute toy into a compact embedded engineering project involving electronics, power, motion, and control logic.

The finished llama bot from the side
The llama bot opened up to show the internal electronics and structure

Implementation

The electronics were built around an Adafruit Feather HUZZAH ESP8266, with a servo for movement, a buzzer for playing songs, and a rechargeable LiPo battery connected to the board’s micro-USB charging port. I also added an on/off switch by grounding the ESP8266 enable pin, allowing the toy to draw effectively no current while switched off instead of slowly draining the battery. Inside the llama, a structure made from cardboard, copper wire, and hot glue held the components in place and made the damaged toy sturdy enough to survive repeated movement.

The main software challenge was making the llama sing and move at the same time without real multithreading support. I used a protothread-style approach, with separate control loops for the servo and buzzer driven from the main Arduino loop. This allowed movement and playback to remain coordinated without blocking execution on note timing or servo delays. The finished program included a ten-song repertoire, with movements timed to make each performance feel more animated.

Reflection

The final result is playful but building it required the same practical trade-offs as any embedded project: fitting components into a constrained space, managing battery life, coordinating concurrent behaviour, and reinforcing the physical structure. At the end of the day, I have a fun new desk toy.

View the project on GitHub