EYE SHOOTOUT: Contrasting Open Source and Big Retail Electronics

By Adafruit Industries

Courtesy of Adafruit

Guide by Phillip Burgess

Overview

It’s a fact: eyes are spooky, a Halloween staple. If eyes are windows to the soul, then fake eyes are windows to the Uncanny Valley.

eyes_1

There’s been a recurring theme of graphical blinking eyes in Adafruit projects. It’s practically a Halloween tradition each year, revisiting and evolving an earlier eyes project into something more realistic or more easily customized. It became the whole focus of two subscription boxes: Adabox 009: HALLOWING and Adabox 013: MONSTER M4SK.

components_hallowing_2

We were tickled then to finally see this style of eyes appearing in big-box-store Halloween items in 2020. It makes perfect sense…electronic eyes are more reactive than the mechanical equivalent and can benefit from automated assembly and ever-cheaper components.

bigboxitems_3

First to bat are some large yard animatronics sold by Home Depot, where they’ve trademarked the feature as “LifeEyes™.” It was obvious from the product photos and videos that someone involved in the design was at least aware of our work: the skeleton’s eyes borrow some graphics — the pattern of veins is an exact match, and I know the original graphics didn’t come from a third source…I took photos of a friend’s eyes myself. I was curious to see if the similarities ended there, or whether they also adopted some our code, and how something like this gets streamlined for mass manufacturing. Ordered the werewolf to experiment on…it’s both cheaper and fits in the house better than the skeleton…and I’ve been on a werewolf bender lately.

…Also learned that Costco has a similarly-priced offering in the shape of a dragon!

dragon_4

Photo credit: Costco.

But wait…can they do that? Aren’t you angry / going to sue? They took your idea!

Yes, they can do that, and no, not at all!

First, it’s not even an original idea…intellectual property rules might even call it an “obvious invention,” bound to come up when you have eye-sized displays. AIBO and Furby have used LCD eyes for some years now. Ours evolved from an earlier project with LED matrices, itself a well-trodden sci-fi trope.

furby_5

skull_6

robot_7

Second, Adafruit is an open source company. Whenever possible, we use very permissive open source licenses, allowing code and related materials to be used in others’ designs, even commercial ones, within some sensible rules. Quite a few projects have openly built on our work, it’s generally allowed, and we don’t discourage it.

As an engineering education company, we make great kits and offer parts. We don’t sell ready-made Halloween decorations, fun as they are, in the same way that, say, Apple doesn’t make toaster ovens: it would only be a distraction from our core focus, it’s not “lost profits.” So, we’re cool that someone else does, and happy if our stuff helps. A candle is not diminished by giving another candle light.

projects_8

So, let’s get inside and see how it’s made and how it works…

Teardown

This is not a full review of the werewolf prop. You’ll find plenty of customer reviews on these products’ web pages. But overall, as store-bought (not DIY) yard haunt items go, it’s an impressive amount of monster for the price. Though I did make a few small changes…

werewolves_9

Photo credit: Home Depot

  • Not a fan of the mangy-looking fur, I gave it all a good brushing out. I’m spoiled by luxurious Fabio-esque Van Helsing werewolves.
  • Added a tail…actually something I had around from a prior Adafruit project!
  • He’s awfully thin and I do plan to plump it up a little, with scraps of upholstery foam, or kitchen garbage bags stuffed with foam packing peanuts…anything lightweight, so the motors won’t struggle…and can pack away after Halloween.

The included power supply was a bit weak, and the motion trigger electronics would lock up whenever the head-oscillating motor kicked in.

Rather than try to explain to tech support, I just ordered a beefier 6V 3A 5.5x2.1mm tip-positive power supply on Amazon for about $7. Werewolf runs fine now.

power_10

If you plan to do your own experiments on these products’ eye electronics, do not use the main power supply directly! Use a multimeter to check the voltage and polarity at the plug leading to the eyes. On the werewolf I probed, this was 5V, tip negative. Yours might be different.

Getting Inside…

Looking up the werewolf’s neck into its skull, we can see the eye electronics are self-contained in two small boxes joined by a flat flex cable. Mounting screws are inserted from the outside, so it seemed necessary to peel back the fur and rubber skin to remove these. Some glue was cut around the perimeter of the eyes, where the skin meets these boxes.

inside_11

inside_12

inside_13

inside_14

Peeling back the fur also reveals the maker’s mark…Seasonal Visions International, who design pretty much all the big animatronic items at Spirit Halloween and other large retailers.

Eyes removed from the skull, then popped free of their housings.

As it turned out, the enclosures are snap-fit, so it is possible to access the electronics without all the above disassembly…just remove them from the back, keeping the skull and skin intact.

The eyes are both yellow in person…it’s normal with low-cost TFT screens that the colors shift a bit when viewed off-angle, as is happening here.

The silver Sharpie marks are my own notes, so I can reassemble this later.

removed_15

removed_16

Identifying Components…

Let’s see if we can figure out what’s inside, and what it might cost. Most of these are very rough ballpark guesstimates. And remember that the bill of materials (BOM) cost is just a small fraction of the expense in bringing a retail item to market…engineering, manufacturing, distribution and just keeping a business running all play a role. Focusing on the parts here though, as that can tell us something about how it functions

First there’s two 1.8" 160x128 pixel TFT color displays…a nice boost from the 128x128 pixels of our earlier eye projects. Possibly ST7735, or something similar…not too important, most small displays function very similarly.

Around $1-2 each in large wholesale quantities…probably the most expensive component of the eye electronics.

One display just has a passive adapter PCB with some connectors, while the other contains all the smarts…

displays_17

displays_18

The microcontroller was the hardest part to characterize. An AC19AP1Y201-13C1, which I eventually traced to ZhuHai JieLi “Jerry” Technology.

Couldn’t find more info as it’s not shown in their current lineup…but considering their most recent offerings with Bluetooth or Wi-Fi support are around $1, and if the eyes work the way I think, this is probably a barebones 32-bit MCU at a fraction of that cost.

micro_19

At least I could find a datasheet for the external flash, an XMC XM25QH16BZ16 — 16 megabits (2 megabytes) with single/dual/quad SPI interface. Couldn’t find a price, but a similar chip from Winbond is about 30 cents.

More interesting here is the red dot. This is a strong hint that all these “LifeEyes” creatures — the werewolf, skeleton and dragon — are using identical hardware, and each just has a different preprogrammed flash chip with that creature’s graphics. Red dot = werewolf. Maybe it corresponds to the red flannel shirt that all werewolves are required to wear.

flash_20

Remainder of the PCB is connectors and passives. Looks like power regulation at the bottom right, and TFT backlight driving at the top left. A few unpopulated pads that probably weren’t needed in the final design.

I was hoping there might be a couple secret jumper pads to unlock other features (like on the Tiny Arcade retro games), but no such luck here. It has one job.

remainder_21

So, we might estimate the total eye electronics BOM being roughly in the $5 ballpark, probably less, which seems sensible…it’s just one small feature of the overall animatronic…competing with motors, a steel frame, growling sounds, and molded parts.

At that cost, expect we’ll see blinky eyes incorporated in more modest Halloween decor in the future. Start with the big $200-300 animatronics, but it won’t be surprising when it appears in sub-$50 decorations and even masks…consider that the aforementioned Tiny Arcade units retail for around $20.

Having identified the major pieces now, we’ll take an oscilloscope to it, make some observations and try to guess how it works…

Analysis

It only takes a few seconds’ observation to recognize that it’s not our eye code…

leftright_22

Spotting the difference is nothing to do with shapes or colors…that’s all configurable in the HalloWing eye code. Rather, it’s the way the iris scales (or doesn’t) as the pupil dilates…on the left, it’s a diffuse circle pasted over the iris…on the right, we’d put painstaking effort into getting the whole iris to morph.

But that’s okay! While it would be neat to see our code out in the wild, I’ll explain in a moment why we’re each making smart moves in the long run for our intended audiences.

Probing Questions

Using an oscilloscope to listen in on some signals was sufficient for a theory of how it works. This focused on one of the display connectors, and the flash chip.

oscilloscope_23

Also, just looking at the screens as it worked…

For example, it’s easy to spot that the exact same image is being shown on both displays. The signals are simply split and sent to both connectors.

In our two-eyed projects, each is controlled separately, there are distinct left/right eyes…they have a particular shape, and they “fixate” — slightly crossed, as eyes normally do in reality, to focus on nearby subjects.

Here they’ve cleverly approximated fixation by making the plastic housings distinct for left and right, creating a physical stencil of the larger eye image.

housing_24

Didn’t think to take screen shots from the ’scope, but descriptions should suffice…

The TFT displays are receiving data over an 8-bit parallel connection. It’s unclear whether this was for cost (some displays might be cheaper with parallel vs a high-speed SPI interface), or that a wider-but-slower connection might have better immunity to interference from nearby motors, or if the microcontroller couldn’t drive SPI at sufficient speed.

The clock signal for this connection is running at 2.5 MHz.

2.5M x 8 bits = 20 megabits aggregate throughput.

Two signals, most likely chip select and data latch, could be seen blipping around 60 Hz — a likely screen refresh rate.

One screenful of data…160 x 128 pixels, most likely 16 bits/pixel…is 327,680 bits.

327,680 x 60 Hz = 19,660,800 bits/second … or about 20 megabits again, the math checks out. They can pump full frames to the displays at this rate, no messing with “dirty rectangle” techniques.

Turning attention to the flash chip…

On our MONSTER M4SK eyes, the flash storage is only accessed on startup to load some graphics into RAM, then everything else happens internally on the microcontroller, using lots of math. It was odd to see constant access to the flash on the werewolf eyes…

The clock signal to flash was found to be running at 10 MHz. Data could be seen on two channels — dual SPI.

10M x 2 bits = 20 megabits. Same as the screen, exactly 1:1.

And that’s all the info we need. Case closed.

There is no “eye code” here! It’s a video player. Its whole job is to move frames from flash storage to screen.

It becomes even more apparent as you watch it run. You can’t fit many frames in 2 megabytes, but they make good use of them. The eye only moves between five positions, always returning to the “home position” between moves. Never blinks or dilates when in motion, only at those locations. And the blinks and dilations are always symmetrical — the frames going into a motion match the frames coming out of a motion, just in reverse. The pattern repeats after about 15 seconds.

screen_25

So, at this point, if we wanted to take it to the next level, we could desolder or blue-wire to the flash chip, extract its contents (datasheet and app note can be found through the link on the prior page), decipher how the data is laid out and replace the graphics. Reject their reality and substitute our own.

In practice though…while that would be a neat hack, and I’m sure someone will do it…very few readers will have the tools and methods to follow along at home, so I ended the exploration there.

It would be significantly easier (and also better looking) to simply swap out the eyes for a MONSTER M4SK board, which can then be customized with your own graphics over USB. We’re done this exact thing in several other guides, so it’s easy to follow along!

customized_26

It’s pretty clever though. My only disappointment is that the eyes look so basic. With pre-rendered frames and no realtime computational bottleneck, the eyes could have looked phenomenal, all smooth, antialiased, and richly detailed, had someone just put in the work.

The manufacturer, Seasonal Visions International, has a U.S. office in Emeryville, California, a stone’s throw from Pixar. I mean literally…step out front, throw a stone, hit Pixar. You’d think they could bribe someone with a case of craft beer or something.

mfg_27

Conclusion

Our eye projects are over-engineered because that’s our bag. Our friends are cosplayers and coders and puppeteers, an audience that demands these details, that the eyes are asymmetrical and respond to inputs and light and never twice move or blink quite the same…they’re “alive.” Customizable, reprogrammable, or set them up for completely unrelated tasks, all through USB. We made something perfect for our needs.

A Halloween yard animatronic has different goals: scare the crap out of kids! This doesn’t require finesse, and few if any will notice it’s running in a loop.

More importantly though, had they programmed a chip to render the eyes procedurally — and the code was there for the taking — that’s all it would do. Eyes. What they made instead — a super economical video looper — could be adapted to many other mass-produced products, most outside the Halloween realm…toys, plush, greeting cards…never touching the microcontroller again, just substituting a different preprogrammed flash chip (and leaving out the second screen in some applications). The engineering costs could be spread for years among a dozen product lines, instead of just one. It’s stuck in a never-changing loop, but that works fine for the intended use. They made something perfect for their needs.

I see some parallels with last year’s Speak & Spell reboot. While this could’ve used the original’s exact voice — the code’s out there to emulate it — instead there’s just a large flash chip of newly-recorded spoken audio samples.

It’s disappointing from a technology purist’s perspective…but on the flip side, they had to balance being a nostalgia product while simultaneously a modern educational product where people expect affordability and higher voice quality now. Engineering is expensive. Not much of a technical hack, but a good dollars-and-cents hack. Both are valid.

speak_28

So, if you’ll excuse me, I need to hack this Speak & Spell into this werewolf now…

Key Parts and Components

Add all Digi-Key Parts to Cart
  • 1528-2683-ND
  • 1528-4343-ND
TechForum

Have questions or comments? Continue the conversation on TechForum, Digi-Key's online community and technical resource.

Visit TechForum