Showing posts with label stem. Show all posts
Showing posts with label stem. Show all posts

01 October 2017

Building sndpeek on Ubuntu 16.04

I've been quite impressed with the selection of real-time audio spectrogram applications available on Android, my favorite being Spectroid. But finding something equivalent for Linux has been challenging. The best I've come up with to date is sndpeek from Princeton University. It took some doing to get it to compile, so I thought I would document what I needed to do to get it done since the page I found to help me out was written over six years ago.

I built sndpeek 1.4 on an Ubuntu 16.04 box, and there were some library installs, and source and makefile modifications that needed to be done. The standard suite of developer tools were already installed on my box (gcc, make, etc.).

The following libraries needed to be installed for me to be able to build sndpeek: sndfile, asound, glut, and xmu. They were but and apt install away.
$ sudo apt install libsndfile1-dev libasound2-dev freeglut3-dev libxmu-dev
I had to include stdlib in marsyas/LPC.cpp to get it to compile by adding the following near the top of the file:
#include <cstdlib>
I did not have to modify the other source file mentioned in the other reference.

Finally, I had to add pthread to the list of libraries in makefile.alsa.
LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lpthread -lsndfile
I was building with the ALSA libraries. If you're using a different sound library, you may have to modify a different makefile.

Once I made those changes, I was able to successfully build a working copy of sndpeek 1.4 by running make in the src/sndpeek directory of the downloaded sndpeek project.
$ make alsa
Sndpeek runs quite sprightly on my system. It is very responsive to inputs. A limiting factor is that I cannot play sounds on the same computer as sndpeek is running, making demonstrations of sound visualization a multi-device project. I am still comparing generating sound on my computer and chromcasting Spectroid, and generating sound on the Andorid device and projecting my computer screen to see which would work better.

15 June 2016

STEAM: End of the Year





At my last STEAM activity for the year, the class presented me with a very nice booklet of thank-you messages written by the students. In it, many of the students mentioned their favorite activity. Being the numbers-driven engineer that I am, I decided to chart it and see if my perception of their interest levels per subject matched what the students professed.

Here are the results:



Every activity got mentioned, so there were no duds (phew!). Stomp rockets was the clear winner, as I expected. And the Transit of Mercury was more popular than I expected it would be.

Things that Spin wasn't mentioned, obviously, because the messages were written before that activity.

All in all, a successful freshman foray into being a STEAM educator.

Will I continue to volunteer to do STEAM activities next school year? If the teacher will have me, absolutely.

13 June 2016

STEAM: Things that Spin


For the final STEAM activity of the year, I wanted to steer things towards active experimentation instead of just build and play (Transit of Mercury notwithstanding). I did not want to lose the sense of wonder I've been nurturing, however, so quantitative experimentation was discarded for qualitative. Experimenting with something with a surprising property seemed like a good idea as well, so I decided to base an activity on things that spin.

Spinning things, if you've not observed them before, can be very non-intuitive. The simple act of imparting angular momentum gives rise to stability, in most cases, and very unexpected behavior in others. To demonstrate the different behaviors, I assembled a small collection of spinning devices.

They're not toys. They're educational tools.
I started with an Euler's Disk acting as a very large and heavy coin. The "coin" at rest on its edge is inherently unstable and wants to fall over. But when it's spinning, it does not just fall over. The act of spinning the "coin" makes it want to stay upright.

Next, I used the top to reinforce this idea. The top wants to lay on its side when it's at rest. But if it's spinning, it will remain upright.

I then asked if anyone knew how to tell the difference between a raw egg and a hard cooked one (neither shown in the picture), then demonstrated the answer. I also showed that once you've got the raw one going, it doesn't want to stop, even if you halt its rotation momentarily.

I used the plastic egg to demonstrate when you spin an egg-shaped object fast enough it wants to stand on end.

The celt (rattleback) was then pulled out because it is vaguely egg shaped, but it does not act at all like an egg when spun. Especially in the wrong direction.

The dynamic celt was used to explore the action of the celt.

And tippe top was there to keep them guessing.

I then asked the class what they have learned about spinning based on observations of all the items, guiding them to the idea that spinning exerts a force, and the force is proportional to the rate of spin.

To reinforce this idea, I used the gyroscope to demonstrate unusual behavior when things spin really fast. I spun the gyroscope with a Dremel tool (a high speed rotary tool, for those who aren't from countries where the brand name has supplanted the noun) with a felt polishing wheel attached, so I got really good action on it.

After the demonstrations, I told the class I wanted to explore what it is about spinning that creates force. I had the students return to their desks where they found five squares of card stock with a small hole in the middle of each, and a toothpick. "We're going to do some experiments by making a top," I said.
Top, deconstructed.
 The first step was to try spinning the toothpick by itself and observe what happened.

The next step was to add one square about 1/3rd of the way up the toothpick spin that, and observe what happened. I solicited hypotheses from the students as to what they thought would happen when the second square was added.

This process was repeated for all five squares. At the end, I asked the students what they thought was required to generate the stabilizing force in a spinning object.

After that, it was top spinning time. And Euler disk. And plastic egg. Pretty much everything I had brought with me. Fun was had by all, and I got some really good hypotheses from the students about spinning things.

As a total aside, after I had designed this activity, Physics Girl published a video on bizarre spinning toys on YouTube.


10 May 2016

STEAM: Transit of Mercury

With the end of the school year approaching, I was looking for one more STEAM activity I could do. I had relied on mathematics and physics so far because those are the things I am most familiar with. For the same reason, I had avoided chemistry and biology. What other areas of science could I tap into for a good STEAM demonstration for second graders?

Then it hit me: astronomy. It's tricky to do during the day, but if there were some astronomical phenomenon that happened to be timed right, it could be the basis for a good activity.

Searching the Internet, I discovered that a Transit of Mercury was going to happen soon. And it would be during school hours on a weekday! How could you pass that up?

I have been witness to the past two Transits of Venus, and they were pretty spectacular, in an amateur astronomy sort of way. There were just a few issues to overcome.

Astronomy for the Masses

How do you share a planet crossing the face of the sun with a class of second graders and one telescope? The obvious answer is solar projection of some sort. I was dubious about a pinhole projection working. I thought about eyepiece projection onto a large piece of paper, but then there's always that kid who will try to look through the eyepiece when you're not looking, which would be a seriously Bad Thing. Finally I wondered if it was possible to do a rear projection of the sun without blinding all the observers. According to the Internet, you can. And I found a solution that an entire class (or at least a large part of it) could use at the same time. The Sun Gun Telescope.

Okay, technically, it would be the Sun of a Gun, since I can't easily haul a large garden urn to an elementary school (or anywhere else, for that matter), but a five gallon bucket (with handle, no less) is a piece of cake. There were some design issues I didn't like, though.

First, the Sun of a Gun has the rear projection screen directly behind the telescope, so observers are facing the sun (see my comment about untrustworthy children two paragraphs up). Second, the bucket was mounted directly on the telescope, and that seemed a bit awkward. Especially since I was planning to go as cheap as possible in this build. Better to decouple the two. And since I was decoupling the rear projection screen and the projector (telescope), I could stick a right-angle adapter in the path, so observers aren't looking towards the sun.

Thermodynamics

Having never done this before, I wasn't all that comfortable with how much light I would need to gather to project a comfortable image for people to view. Everything I read indicated that as long as the aperture of the scope was 4-inches or less, I wouldn't be in danger of melting anything, but that didn't really answer the question.

So to hedge my bets, I opted to look for the intersection of price and aperture in achormatic refractors. My first inclination was to go with an Orion Short Tube 80mm f/5. I would have to buy a mount for it, but if it survived the solar viewing, I could use it to star hop from the driveway in my light polluted neighborhood.

Then I started reading about chromatic aberration with bright objects in this scope because of it's short focal length and started to second guess myself. That's when I stumbled upon the Meade Polaris 90mm f/10. It's a beginner's kit that comes with tripod, German equatorial mount, a few eyepieces, and a 2x Barlow. All for around US$200. Reviews were favorable. And if I smoked it, I wouldn't be out too much (relative to the cost of things in amateur astronomy). It was a little long in focal length for my liking, but if if survived its solar ordeal, it would be good for planet hopping and moon observing. Being slow, it wouldn't suffer from chromatic aberration as badly as the Orion.

Opening Pandora's Box

One thing I haven't mentioned up till now, but you may have been able to guess based on my writings: I was once an amateur astronomer. But I gave it up. Shortly after the 2004 Transit of Venus, actually. I donated my telescope and eyepieces to a school, managed to shut that demon muse into a cage and suppress the urge to look at the Universe from my backyard. Taking on this project would surely release the demon muse and suck me back in, subjecting me, once again, to aperture fever and gear acquisition syndrome.

I knew this when I started this project. I accepted the consequences. Planetary transits are a rare thing. The next Transit of Mercury isn't until 2019. And after that, you'll have to wait until 2032. A Transit of Venus won't occur in the next 100 years! Having to embrace or do battle with my amateur astronomy demon muse was the price of sowing the sense of wonder that drives scientist, mathematicians, artists, and engineers in the next generation. So be it.

The Build

I acquired the Meade Polaris 90mm from my friendly, neighborhood, telescope store, adding a mirror diagonal to the kit because I was dubious about the prism diagonal's ability to handle the full photon barrage of the sun. Figuring out the necessary eyepiece was a simple exercise in trigonometry, aided by the crib sheet from the Sun Funnel instructions.

After ordering parts for the rear projection bucket, I got to work on assembly. First was to create a light path. Since I wasn't mounting the bucket on the telescope, I opted to widen the hole to about three inches in diameter to give me some wiggle room.
 A paper template guided my cutting. At first, I started drilling holes around the circumference of my template, planning on connecting the dots to punch out a hole. Then I remembered I own a Dremel.
This could take a while...

The more correct tool for the job

 Once the hole was cut, some sand paper was used to smooth the edges and get rid of any hanging chads.
Next, I bolted on an Arca-Swiss-compatible dovetail on the bucket's side near its center of mass so I could mount the bucket on my photography tripod's ball head. To do this, I ground down the head-end threads on some 3/4-inch long 1/4-20 bolts, fed them through the dovetail, and secured them to the bucket with some washers and nuts.

In a pinch, I could probably use this as a smoke ring gun.
Attaching the rear projection screen was a matter of wrapping a large rubber band around the bucket and pulling the screen material taut. Et voila! Sun of a Gun.


To aid in aiming the telescope at the sun, I built a sun finder out of some business cards and plastic corner guard from the home store. The paracord is to secure it to the OTA.
Sun finder.
Hole side goes towards the front of the scope. Rotate the scope until the light dot is on the intersection of cross hairs of the rear card. Tighten things down. Take off the dust cover from the main lens. Fine tune. And start observing.
First light!
First light answered a lot of questions. 90mm is way too much aperture for this projector. I popped the 60mm inner cap of the lens cover for this test, and it was still too dazzling an image. Masking down to 35mm aperture seems to be the sweet spot.

The bucket needs to be baffled. See the orange background? That's light leakage, which means a lower contrast image. Some judicious placement of black card stock on the inside of the bucket solved that problem, and now the sun sits in a sea of black.
Second light!
I wasted a lot of energy worrying about heat. The eyepiece and diagonal never got warm, let alone too hot to touch (at 60mm).

The Meade Polaris 90mm is a cheap piece of crap. The tripod vibrates if you look at it funny. The right ascension motor gear slips inexplicably sometimes when it is being turned. Focus is hard to fine-tune because the gearing is too low. But at least the optics are acceptable.

If you're looking for a first scope (for general observing, not solar projection), I would have a hard time recommending the Meade Polaris family of telescopes. The Astronomers Without Borders OneSky 135mm Dobsonian looks like a much better option, though I've never used one. It's faster to set up (assuming you have a stable table), has a more light collecting ability, and all the reviews I've read say the optics are quite good.

The Transit

On 8 May, the weather forecast for the Transit wasn't looking good, predicting overcast skies. But when I woke up on the morning of the 9th, it was only partly cloudy, so I was hopeful. To prepare the students for what they were about to see, I explained that astronomy requires the use of one's imagination because the scale of things is so large, but the images we see are so small (especially though an amateur telescope).

Mercury is roughly 4900 km (3000 miles) in diameter -- roughly the size of the continental United States -- but would appear as a tiny dot on the image of the sun, one or two millimeters across if my setup worked. By the time I got done explaining to the class what we were going to try to see and got outside to set up the telescope, the sun was behind a cloud, obscured enough that my sun finder was useless.

Fortunately, by the time everything was set up, the cloud had moved sufficiently that I could point the telescope. Eventually, the sun peeked out from behind the clouds, and we got to see the little black dot on the face of the sun that was Mercury for five or ten minutes. After that, the clouds moved back in, and that was it.

Hopefully, some of the students found it interesting.

And now, once again, I really want a TeleVue-85.

04 May 2016

STEAM: Spool Racer

How do you top stomp rockets?

The answer is, you don't. Each activity should be judged on its own merits. I figured this out after this STEAM activity.

Searching the Internet for STEAM activity ideas, I came upon HowToons. Of their many projects, I thought the spool racers would be the easiest to do in a classroom, with the least amount of clean up afterwards.

At first I was going to talk about potential and kinetic energy, and maybe touch upon conservation of energy. Then I regained my senses and simplified things down to a single principle. A spool racer is basically an engine. What is an engine? It's something that converts one form of energy into mechanical motion.

I got the class to that point by asking for examples of things with motors or engines in them.

I then told them we were going to build an engine that converts energy stored in a rubber band into mechanical energy, all while winding up my sample spool racer. Then I let the racer go across the table, and the class was hooked.

After that, it was just a matter of building the spool racers, and letting the class play. A lot of spare rubber bands came in handy, too.

Honestly, after the stomp rockets, I thought this activity was going to bomb. Turned out, I was wrong. Feedback from my son was everyone had a great time and liked the spool racers a lot. Having a month between activities probably helped in this respect as well.

02 May 2016

STEAM: Stomp Rockets

For my third STEAM activity, I decided to leave the world of mathematics and enter the world of physics. Around the time of this activity, Scott Kelly was returning from his historic (almost a) year in space, so rockets seemed like a good idea.

Scientific American and NASA both have lesson activities around paper rockets with straw launchers. NASA also has an activity with stomp rockets. Stomp rockets seemed like they'd have more impact with the students, but I wasn't sure if we could go outside or not, so I emailed the teacher to ask, and prepared activities around both.

As it turned out, we could go outside, so I decided to do a classroom demonstration with a straw rocket, have the students build stomp rockets (hopefully taking into account the things they learned from my straw rocket demonstration), then go outside and watch them fly.

The activity started with a picture of Astronaut Scott Kelly, describing what he had just done, then asking the students how astronauts get to the International Space Station. With the answer, "rockets", given I announced that we were going to build rockets.

"A rocket is generally a long cylinder to hold all the fuel necessary to get the astronaut into orbit. So what happens if it's just a cylinder?" I asked, producing a pre-made straw rocket with no fins. I launched it across the room and watched it tumble. "Does that seem like a good way to get an astronaut to the International Space Station?" I asked. Everyone agreed that it was not.

"What if we put fins at the top of the rocket?" I produced a pre-made straw rocket with fins at the top of the rocket, launched it across the room, and watched it tumble. "That doesn't seem to help."

"What if we move the fins to the bottom of the rocket?" I again produced a pre-made straw rocket, this time with fins on the bottom and launched it. It flew in a nice, ballistic trajectory. "Does that seem like it could get an astronaut to the space station?" Everyone agreed that it did.

"So let's build some rockets," I said. "Only..." I looked at the straw rocket. "This seems kind of small." I reached into a paper grocery bag I had brought with me and pulled out a stomp rocket. "Why don't we build big rockets then go outside and launch them?" This was met with great enthusiasm.

I demonstrated how to construct a paper stomp rocket, handed out supplies, and let the class build. Once everyone was done (which took longer than I expected), we went outside. I quickly assembled six launchers, showed how they worked, and let the student go. The rest of the time was spent fixing launchers and handing out spare rockets that I had brought with me.

For the launchers, I substituted milk jugs for the two liter bottles that are called for because that was what I had. This turned out to be a bad idea because the jug does not fit well on a 1/2-inch PVC pipe. A two liter bottle seems like it would. The jug connection (I used the cap with a cut out hot glued and duct taped to the pipe) was the weak link in the system, and I was constantly repairing it.

At the end of the activity, I had a number of destroyed milk jugs, no more spare rockets, and a very happy teacher and students.

If you are planning a stomp rocket STEAM activity, bring plenty of spare rockets, and duct tape for repairs.

27 April 2016

STEAM: Mathemagic

For my second STEAM activity, I decided to teach a magic trick. Once again, Numberphile was the inspiration. This time, with Matt Parker.

Given the distribution of abilities in the classroom, I simplified the trick down to nine cards from 27. This reduced the number of decks of cards I had to purchase by a factor of three as well, so win!

In the nine card version of the trick, you only deal out the deck twice before the reveal, which makes things easier to remember. This is good for the students if they want to perform some magic for their parents later, and good for the presenter since there's less chance of screwing up.

For the STEAM activity, I asked the class who liked magic (everyone). Then I asked who wanted to learn a magic trick (everyone). I gathered the students around me, and told them I had a card trick that was based on mathematics. I did the trick for them, picking a random student to be the person being tricked. Then I showed them how the trick is done by replacing the "chosen" card with a red suited card, and having all the other cards be black. I sorted the deck before the activity so I could just grab nine cards off the top of the deck for the first demonstration, then deal off nine more cards to get the imbalanced set.

As a total aside, the fact that I could deal off nine cards and have only one of them be red turned out to be pretty impressive in and of itself. Preparation is everything. In the cooking world, it's called mise en place. Back to the story.

Once we ran through how to do the trick a couple times, I had the students pair up and gave everyone nine cards (from pre-shuffled decks), and told them to switch off doing the trick to each other. I never explained the mathematics behind the trick unless I was specifically asked. The next 20 minutes or so was the students practicing their magic, with me, the teacher, and my son walking around helping out.

At the end of the activity, as we were saying our goodbyes, I asked the students if they wanted to see one more trick before I left. They rushed up into a semicircle around me, and I performed the following on the teacher with all the students watching.

The look of befuddlement on the teacher's face at the end of the trick was priceless. And with that I left.

25 April 2016

STEAM: Geometry and Topology

I got ambushed at the parent-teacher conference for my son's second grade class. The combination of the teacher saying how nice it was that the other second grade class had Mr. Orlando to do STEM demonstrations and wouldn't it be nice if our class had some too, along with my spouse looking at me, off to my right, I felt like the hunter in Jurassic Park, surrounded by velociraptors ("Clever girl...").

I was trapped. There was no way out. Turned out, that was a Good Thing.

Researching STEAM (I will use the preferred acronym from now on), I quickly discovered my preference for the basic Sciences and Mathematics as opposed to blinky lights and circuitry of Technology and Engineering, so that's where I focused my research.

I would have no more than an hour for each activity, and second graders (seven and eight-year-olds in the United States) do not have the basis to discuss mathematics, or any of the other words in the acronym in depth. So the goal of STEAM in elementary school is not to explain how stuff works, but rather to demonstrate why I became an engineer.

Scientists, mathematicians, and engineers approach life with a sense of wonder. At least the good ones do. They see something novel (or not-so-novel) and think to themselves, "that's cool! I wonder why that is?" then go off and try and figure it out. It is this sense of wonder that STEAM activities are trying to sow.

I've found YouTube to be an invaluable resource in researching STEAM activities. Not only are there a lot of great ideas out there, but the video format lets you see the activity from the participant's standpoint. You get to see what works and what doesn't.

The instant stand outs were two Numberphile videos by Tadashi Tokieda on Geometry and Topology. Now, you may not think Geometry -- and certainly not Topology -- are suitable subjects for second graders. But that's probably because you're thinking of the way Geometry was taught to you back in High School. All definitions and theorems and proofs, sucking the life out of the beauty of mathematics because there was no basis presented for those things, or examples of what you can do with those theorems.

I think Geometry is a perfect subject for young children. It does not require an ability to multiply numbers together, or divide them, or a knowledge of trigonometry, or anything, really. It just requires shapes and objects and a willingness to play, which kids have been doing all their lives.

Tokieda gets this. He has an innate understanding of this. And it comes across in the videos.



Naturally, I ripped him off borrowed heavily from him for my presentation. Only instead of demonstrating, I had the students cut each figure for themselves.

Turns out, cutting paper can be more challenging for some second graders than others. I had not realized this going in, but there is a large distribution of abilities in the classroom. Things ran long, so I dropped the joined loop and Mobius loop from the activity and went directly to the joined Mobius loops. Maybe a third of the class got the chirality correct on their loops, resulting in the joined hearts. Heck, I didn't get the chirality correct when doing the demonstration! But I got the reaction I was looking for -- "that's so cool!" -- from at least a few students, so mission accomplished.