One maker, in a quest to create a cheap, fully animated object, has created a moving and speaking Sorting Hat from Harry Potter for only $22 (R314).

Jegatheesan Soundarapandian’s version of of the Sorting Hat was made with with some recycled materials, as well as five servo motors connected to an Arduino UNO.

He began by making the basic hat shape using card and cloth before animating select parts of the hat with the motors.

Using some custom code he can recorded and replay animations using a simple interface.

On the top of that another layer of cloth was added, along with some “artistic work” to make it look more accurate, and the job is done. Play some of the audio from the movie over the top, and it looks great.

Soundarapandian has made a very detailed guide on the steps he took to make his Sorting Hat. You can check that out on hackster.io. Make sure to look at the “Materials Required” list to see how it was built for so little money.

With those resources available we hope someone takes the project and improves upon it with a better material for the outside and maybe some custom audio. A real treat would be a way to change what the hat says on the fly when you pop it on different people’s heads. We’d upset people we don’t like by placing them in Hufflepuff.

Finally, if you want to relive the magic of the sorting hat scene from the original Harry Potter movie, we have the clip below.