myDryIceChimes: Making cool music with solid CO2
Demo Video: myDryIceChimes Playing the Game of Thrones and Pirates of the Caribbean Themes
Project overview
Q: What do you get when you put together some wind chimes, a bunch of solenoids, a myRIO and a block of dry ice?
A: Some very cool music!
I used a myRIO as a controller to send signals to solenoids attached to wind chimes, essentially making a robotic chime keyboard. But instead of the chimes being struck by a beater, they are being made to vibrate with a block of dry ice!
This barmy concept is easiest explained by seeing it in action, so check out the video below.
Wait, what's dry ice?
Dry ice is solid Carbon Dioxide, similar to how normal ice is solid H2O. You might have seen it before used on dancefloors or in films to make a fog effect by dropping it in water.
But unlike regular ice, dry ice is very cold - a chilly -78.5°C! This gives it some interesting properties that are demonstrated in this project.
The science: how it works
Metal is a good conductor of heat. Have you ever wondered why a room temperature piece of metal feels cold to the touch, but a room temperature piece of wood or plastic doesn’t? In fact they are the same temperature, but the metal conducts away the heat from your warm fingers giving the illusion of it being colder.
In a similar way, when a metal touches something that is very cold, the heat flows from the metal to the cold object. This heat is enough to ‘melt’ the dry ice at the point of contact: in fact there is no liquid phase involved and the dry ice jumps straight from solid CO2 to gas. This process is called sublimation.
But how does this create a sound? Well, gases have a larger volume than solids as the molecules are more spread out, so this puff of gas that is released is has enough pressure to lift the metal away from the ice. The metal then falls back onto the dry ice with a clang, and the process immediately repeats. The vibrations are fast enough that you hear a continous sound, sort of like a drumroll. By using different length chimes, you can play notes of different pitches.
I ordered some dry ice to experiment with and test this theory out. This demo with a 20p piece shows sublimation happening on one side of the coin and then the other, making it flap around! Compared to the chimes, the vibrations of the coin are quite slow because the amplitude is large.
What kind of sounds can I make?
The sounds that I am producing with the chimes remains at a constant pitch, but it is also possible to create a range of squeaks, screams and groans by pressing down on the metal. The pitch of the sound depends on how hard you are pressing (harder = higher) and the size of the piece of metal: the sound is now produced by the air escaping from the gap between the metal and the dry ice’s surface instead of gravity causing the metal to hit the ice as it falls. I chose to make my music with the chimes resting on the dry ice rather than pressing, as this creates a constant pitch which is easier to control.
The Build
After playing around with the dry ice and making some different sounds, the next job was to design a way mechanically manipulate the chimes. It seemed easier to move the chimes rather than the pieces of dry ice, as the size of the ice is constantly changing so it would be difficult to grip on to.
Here's a diagram of the solution I came up with:
1. Threaded rod assembly – to allow adjustment of positioning between dry ice and chimes.
2. Safety Guard – to prevent accidental contact between dry ice and the user.
3. Perspex platform – for aesthetic and structural reasons: it's nice to be able to see the components below!
4. Solenoid – lifts the chimes away from the surface of the dry ice when notes are not required.
5. Chime holder – to provide a pivot point for chimes without damping vibrations.
6. Power rail – provides a 12 V supply for the solenoids to draw upon when switched on. Each one takes a whopping 1 A of current, so powering it from the myRIO was out of the question!
7. Dry ice – to vibrate the chimes.
8. Relay board – uses the myRIO’s 3.3 V DIOs to switch on and off the solenoids.
I got all of the components either from hardware stores or (weirdly) stationary stores - I found that it was much easier to buy A4 plastic menu holders than cutting and drilling perspex myself. Shoutout to my Dad for help drilling all of the holes!
For a detailed description of the steps I took to make it, see this instructables post.
Here's a schematic of how I wired the myRIO.
The Software Design
Here's an overview of the overall architecture:
I wanted my instrument to be able to read MIDI files, so I used a pre-existing LabVIEW library to parse the files into a format that would tell me a) what notes are in the file (in the order that they are played), and b) their start and stop times.
The array produced looks like this, and is still fairly specific to the MIDI format:
To make sense of it, the 90s and 80s in 'Note Events' decode as start note and stop note respectively. And the 'Note' array decodes as follows:
I then wrote some LabVIEW code that queues these notes to be executed in Real Time, leveraging the accuracy (determinism) of the myRIO's Real Time Operating System. The architecture that I chose was 'Producer/ Consumer', which allows me to decouple processes that produce and consume data at different rates. The use of a queue ensures that note events are not missed.
Finally, the note events are compared with the chimes that are available, and converted to a boolean array which tells the myRIO's FPGA which digital outputs to switch on and off. These outputs correspond to which solenoids are active.
A deeper explanation of how the code works can be found within the comments on the VIs.
Try it out!
You will need:
Hardware such as a relay board, solenoids, chimes, dry ice etc. is nice to have but not essential - without these components you can still watch the lights flash on and off on the front panel.
To deploy the code on your own myRIO:
Why not use this code to develop your own awesome instrument? You could even submit it to Manchester Robot Orchestra if you're in the UK!
Thanks
Thanks to my housemate Henry for putting up with all of my electronics questions, Hannah and Rich for helping me get the dry ice, Jarene for letting me store it in her freezer, and everyone in the office for putting up with the mysterious ringing sounds from the lab.
About the Developer
My name is Leah Edwards and I am an intern at National Instruments in the UK. I’m studying for a masters in Mechanical Engineering at Loughborough University, and in my spare time I play the violin. I got the idea for this project after hearing dry ice sound effects on the radio – as a musician and engineer I was intrigued! It was great being able to get in touch with my creative side and apply my knowledge of LabVIEW and Physics to create something really unique.
Useful resources
Check out some other awesome projects created using myRIOs...
myMozart: A robotic piano player
myLaserHarp: Music with strings of light!
Contact me!
If you have any questions or feedback, do get in touch either directly or through the comments. I have plenty more info on the science that I'm willing to share!
A Final Encore...
myDryIceChimes plays Beat it by the King of Pop, Michael Jackson
Great job!
- You can never have too much dry ice...