Bee Do! - Alerting with fireman bob (Part 1)

How I rewired a plush toy to be triggered remotely to catch our attention at work when our alerting system goes off. Or to annoy my colleagues.

Last year we were attending DockerCon in Copenhagen, and a colleague and I went into a toy store to find something for his kids. That's where I stumbled upon a plush toy of a minion, with working lights and sound effects.

I immediately had a use case in mind, but it wouldn't fit in my hand luggage. Time went on until I finally bought it two months ago.

How does this thing work?

The toy has a big switch on the front that mechanically rotates the LEDs in siren and triggers a sound and light effect. Switches on each hand play different sounds. Apart from the mechanical stuff, this thing obviously includes some kind of micro controller and a speaker.

The goal

The idea was to be able to trigger the effect you get if you push on the front. I'm more comfortable writing software, so I wanted to keep the hardware changes to a minimum. Ideally also minimizing the risk of breaking something.
So somehow I need to be able to trigger the switch, which in turn will trigger the micro controller controlling the effect.

Taking it apart

On the backside sits a handy velcro fastener, opening it reveals the battery panel. I had to remove some seams to access the wiring that leads into the box.

One can see 14 wires leaving the box. Those are probably:

  • 3 switches (each two wires) = 6 wires
  • 3 LEDs (each two wires) = 6 wires
  • speaker = 2 wires

Going deeper I opened up the battery compartment, and below the battery I found the controller board, pretty simple and with descriptive connections.

At this point I was becoming confident that this might work after all. Thanks to the descriptions, I could identify the wires related to the chest switch, they are marked as CHEST- and CHEST+.

Next steps

With the wires identified, I could easily trigger the effect by connecting them to each other. This thing is loud!

How do I make that connection using a micro controller? I'll use a transistor as a switch. (disclaimer: I might say stupid stuff, feel free to contact me if there are any issues).

This leads to these next steps:

  1. connect my controller and the existing one to the same power supply (I'll explain shortly)
  2. use a transistor to switch the current between CHEST- and CHEST+

Connecting my own micro controller

Initially I thought that I had to connect both circuits to the same base potential (GND), to make sure that the high/low levels in the electronic signals are the same. Now that it works, I'm not so sure about it anymore because I only ever switch the current between CHEST- and CHEST+ using the transistor.

Good thing I still had an Arduino around. The toy runs on two AA batteries and the circuit voltage was around 3.3V, so I could power the Arduino using an external power supply and grab the internal 3.3V from the board to power the toy itself. No more batteries needed!

Switching the current with the transistor

I picked a BC547C transistor because I still had many of them left from earlier endeavors and as a general purpose transistor, it seemed to be good enough. I connected a digital output pin of the Arduino to the base, and each of the chest wires to collector and emitter.
Uploading a small program on the Arduino to write to the output pin is all that was left (more on the software in part 2).

Wrapping things up

With a proof-of-concept working, it needed a few more tweaks to be handy. I wanted to remote control the toy and most of the modifications should stay hidden, both for visual impression as well as safety (don't want someone to accidentally rip things off).

I got myself an NodeMCU, a small board based on the ESP8266 chip, which offers multiple advantages for my project:

  • it provides WiFi out of the box, allowing easy remote control
  • cheaper than the Arduino
  • smaller than the Arduino

Now that the hardware is working, what remains is the software running on the NodeMCU. This post is long enough already, you can read more about the software in the second part.