PhysComp: MidTerm – Let it Snow!

Nanou Dimachki and I were partnered-up to work on the MidTerm. Here is the link to her blog post documentation:

Serial communication Midterm project (team of 2)


Part 1:

Nanou and I began with the idea of detecting either specific words or pitches from a microphone and then write a P5.js program to create colors in different locations per the input.

This idea evolved into detecting a voice (per volume level) and having a P5.js face match the input of the sound as well as have one of those dancing fan guys respond to the voice as well. After we substituted the face for a wintery snowy scene (where your voice controls the wind) we were off to the races.

The setup is fairly straightforward.

Part 2:

As with most things that SEEM straightforward, they tend not to be.

Powering the Fan: We purchased a kit to step the voltage from arduino from 5V to 12V to power a 12V fan. Once we returned we saw that it required good soldering skills which neither of us have. We then searched online to find alternatives and came upon a was to power the fan with a separate 12V power supply and then use a transistor controlled by a PWM pin from the Arduino. Today, we weren’t able to get it working. We’ll try again tomorrow.

Microphone: The microphone gave us a different set of problems. We got it hooked up and registering output values, but once we took a closer look a lot of the values we saw should not have been possible from the input pin. We trouble shot with a potentiometer and everything worked great, so something is going on with our microphone input/readings.


Since Nanou was able to get functional readings from the microphone affecting her sketch we decided to see if her Javascript code setup could get the microphone blowing the wind… to be continued.

Part 3:

After getting inconsistent results from the microphone, Nanou got the snow to respond to a potentiometer. On Monday, we will probably go to Tinkersphere to purchase a vibration-sensitive piezo resistor. This will work for blowing as an input and we’d have to scrap voice.

With some expert sleuthing, and by that I mean stumbling upon it on the PComp website, I rediscovered the DC Motor lab which had a link to a full explanation of the circuit I was trying to build yesterday. Happy Day! I’ve attached a video of it working and being controlled by PWM and a potentiometer. I didn’t have all of these components attached on my original DC motor lab, so I’m lucky I didn’t fry my board I guess…

The motor started to sputter at higher values so I added the extra diode in parallel to the motor and that solved it. Also, the ramp up and acceleration work better with a higher than the prescribed 5V being sent to it. I do get the lovely smell of burning though so as a compromise we may cap the output from the Arduino at 200 instead of 255.

Part 4: 

We purchased the vibration sensor, tested its use individually and got it attached to our circuit. After bringing the piezo into the system, we started getting a weird response where once the motor was at full power it wouldn’t stop. After testing and testing and testing, we came up with several changes that eventually got the circuit functioning.

1. We added another resistor to Tom Igoe’s motor circuit that (I think?) is helping us drain the power.

2. We also originally set up the piezo with a 10 M Ohm resistor because the schematic-recommended resistor of 1 M Ohm  didn’t give us enough sensitivity. We replaced this back to a 1 M Ohm, which helped fix the problem a little.

3. The motor got changed back to the 12 V motor and is now being powered by a 9V battery with a max PWM of 225.

(Side note: Nanou had the idea to build a small little snow diorama and have the fan toss snow inside of it. I personally wanted to stick to the streamers, but in the end her idea beautiful, the most popular piece of the project, and clearly the right choice.)

Our mini-snow/styrofoam blower diorama wouldn’t work when we placed it over the fan. This setup included a glass cup with a screen on the bottom to keep the foam from falling through. After pulling out some ancient physics logic, I realized that, because the top was closed, the air had no reason to flow UP the glass and was just escaping out the sides. After we replaced this with an open top cylinder, our snow looked lovely.


Nanou also replaced my subpar P5 project with a great picture and awesome sound effects. After resizing the image we were ready to go.

This whole process with the piezo was actually incredibly painful, took several days, and was never completely solved. While the project works (fairly) consistently when tapping the piezo, it will work once or twice with blowing vibration and then won’t delivery enough of a signal to get the motor spinning again. This problem is alleviated after tapping it, so something is getting discharged/reset/loosened. Below is a final video of the pieces all working together.






Leave a Reply

Your email address will not be published. Required fields are marked *