Bag O' Bones
About the project
A skull in a 'bag of bones' that sees you, plays a random tune and moves using a PicoW!
Estimated time: 2 hours
Items used in this project
I knew I had to buy it and one day make a project with it, it took a couple of years but eventually I started putting together something with a motor and a Raspberry Pi Pico and the idea came to me to make a human-detecting, bone-shaking, random-tune playing Bag O' Bones.
The Bare Bones
I started some work on a normal Pico, but then notched things up to an Inventor 2040 W from Pimoroni:
This would make it easier to attach things, things such as the motor, the PIR sensor for detecting people and the speaker required to make the main skull shake and make noises.
So I put a motor on it as well as a speaker, screwed it to a small project box that would hold the other bits.
Looks creepier broken.
I then strapped the motor to the base of the inside of the box as well as drill a hole for the motor to fit through.
You can also see I have fitted the micromotor to Lego adaptor that allows me to add a sort of counterweight to the motor to unbalance it and much like a rumble controller, allow for it to shake and move.
I drilled another hole for the speaker wire and another hole for the motor cable to fit out. Then stuck the speaker to the inside with some Blu-Tak.
I also put some Blu-Tak on the PIR sensor ready for it to fit inside the eyeball of the skull.
Then hooked it up to the board.
The inventor board can be powered by battery also, for more portability:
Next up is modifying the skull in the Bag Of Bones itself - so I opened up the bag, extracted out the Skull and started drilling and cutting to allow for room for the PIR, room for the electronics and a little hatch that may or may not work to hold it all in.
I also drilled some holes in the side to allow for a screwdriver to adjust the sensitivity of the PIR sensor.
And here it is with the eyeball hot-glued in and back in the bag:
With the Skull all ready on the hardware side it's time for...
You can grab the code from my GitHub here.
This is fairly basic and most of it has been taken from Pimoroni's own code over here so thanks to them.
It just runs a loop that checks the PIR for movement, and upon detection it starts the tune (which is my failed attempt at translating Toccata and Fugue in D Minor) moves the motor a bit, moves it a bit more then stops.
It also lights up one of the RGB LEDs to help with debugging and stuff.
Then once no more movement is detected from the PIR, it stops and waits to detect something again.
Here's a quick video of it working, with some bad acting:
Pretty effective, eh. Even the music sounds a bit scary - someone let me know if you can use the code from Pimoroni to make a simple Toccata and Fugue in D Minor and I'll keep it in mind for a future project.
Also you can see I had to downgrade the counter-weight a bit; the original was really effective at making the skull move a lot but I found it was too large and would sometimes get stuck/twist up the wires from the PIR.
But it does indeed work correctly for the most part; when I walk into the room that it's in it detects me and plays the music while moving the motor, which is definitely noticeable even with the smaller counter-weight.
I have noticed that the PIR sensor requires a little time to settle and during that time it can be a bit odd and not detect properly; but once it's past that settling it runs pretty consistently.
I think I will need to re-work the box and/or buy a bigger skull if I decide to continue this project on to a 2.0 model, as the current skull was a bit cramped inside; you can hear the internal weight bashing against the inside of the skull as room was at a premium in there.
So this has been a pretty fun little project and it's finally given me an opportunity to make something with the Pico, for various reasons I have fallen behind on projects but I have plenty of tech laying around and loads of ideas for new projects!
I love how the second core on the Pico easily allows for multiple things to happen at once, and Pimoroni's custom boards with the Pico on really allow for the creation of some cool things that can easily be attached. So I will definitely be making some small cool robots and stuff with them in future.
So keep an eye out for an upcoming Cyberpunk inspired project which will be aptly released late and buggy.
I also picked up some more skeleton friends from the shops the other week - so you will probably see these coming up in 2023 and 2024!
Here's one arriving home in the car:
And they are very excited to star in a future project!
And they both already contain hollowed out heads and technology inside, so should be easier to add more tech!
Actually a bit scary.