Archives For Hacks

botastro

Hubot is an open source chatbot created by GitHub. It’s used by various companies, groups, and other techie types, to control systems, gather information, and put moustaches on things – all via chat interfaces. Hubot can be adapted to work via IM, GTalk, Twitter, IRC, and other platforms. ‘Chat Ops‘ is a growing trends, and because it is simple, and quite charming, I think it may stick around.

I’ve just finished an epic few days at the sixth .Astronomy event. This is my own conference series, and I’m gleefully exhausted from several days of talking, making, and hosting my favourite event of the year. More on that in a later post. During the .Astronomy 6 Hack Day (sponsored by GitHub in fact!) I worked on making an astronomical Hubot – which I’ve called ‘botastro‘ in honor of the #dotastro hashtag from .Astronomy itself.

@botastro exists only on Twitter (for now) and to interact you just tweet it. For example if you tweet

then @botastro will reply

You can can send multiple messages to the bot, but I have a growing list of other ideas too. Currently you can say things like:

  • @botastro sunrise Chicago
  • @botastro apod me
  • @botastro galaxify hello world
  • @botastro fun fact
  • @botastro moonphase
  • @botastro tell me about Jupiter
  • @botastro show me Perseus
  • @botastro gif dog
  • @botastro exoplanet me

Asking botastro to ‘galaxify’ something results in text made up of galaxies from Galaxy Zoo (thanks Stuart Lynn!) which is pretty

botastro_2014-Dec-11

and asking it to ‘exoplanet me’ gives you an exoplanet from the catalogue (thanks to Dan Foreman-Mackey and Geert Berensten). The results you get when asking it to show you something or tell you about something are sourced from Stuart Lowe‘s lookUP service, and the space gifs come from Giphy.

These may be silly and fun, but more complex actions become possible – especially once I get a bit more used to Coffeescipt, the language this bot is written in.

@botastro is open source (on GitHub, naturally) and I’d love it if people wanted to add functionality. If you want to try, you’ll need to fork the repo, create a new script, and submit a pull request. Hubot is outlined here, and you can look at botastro’s other scripts for examples too.

H₂O might be the most familiar chemical compound on the planet. Many people know that water is H₂O, but most wouldn’t think about what that means in a chemical sense. Water is a remarkable molecule made of two Hydrogen atoms bound to a single Oxygen atom: H, H, and O. Water’s special properties give us life as we know it, and we’re mostly made of it too. It’s less dense as a solid (ice) than as a liquid, which has major consequences for the planet and its climate. Water is also really good at storing heat, and it stays liquid over a wide range of temperatures, also very handy for life as we know it.

In short: water is amazing: but can we destroy it? Yes. With just two regular pencils and a 9V battery, you can actually break water down into it’s Hydrogen and Oxygen components, and watch them boil away as bubbles of gas. This is fundamental chemistry available to anyone at home, with stuff you might have lying around.

You’ll need some salt, a 9V battery, a drinking glass (or other transparent container), two pencils, and some wire. It ’s best to get some cheap cables with crocodile clips (I bought these ones from Amazon), since they make it much easier.

Pencil Electrolysis Kit

Pour some warm water in the glass and stir in a tablespoon of the salt. You should probably also open a window – or at least don’t do this in a tiny cupboard – a small amount of Chlorine may be produced as you do this experiment; it’s not dangerous as far as I can tell, but best to be safe.

Sharpen both the pencils at both their ends – so that’s four pencil points  in all. Connect both nodes of the battery to a different pencil using the crocodile clips.

IMG_3133

At this point I suggest you distract yourself by trying to touch the free pencil tips together to make small sparks! The electrons really ‘want’ to make a circuit and can jump across a short air gap, ionising the air and making a crackle and an electrical arc. It’s a 5mm lightning bolt on a pencil tip. But anyway, back to main point of this…

Put the free pencils ends into the water, and don’t let the tips touch. Now for the science! At this point the water becomes part of the circuit. Electrons flow down one pencil, across the water and back into the other pencil. This creates a circuit and electrons flow around it. You’ll know it’s working because this process quickly creates bubbles at the pencil tips in the water. It happens almost instantly.

IMG_3134

The energy of the electrons in the circuit is enough to break the water into Hydrogen and Oxygen ions: electrically charged versions of the elements themselves. These ions then flow to the oppositely-charged pencil tip, creating an electric current. This is known as electrolysis.

At the negative pencil tip (the anode) positively charged hydrogen ions (or just protons to some people) meet and form hydrogen gas (H₂) that bubbles to the surface. The positive pencil tip (the cathode) draws the negative Oxygen ions and form O₂. It’s a bit more complex than that, if you’ve been counting electrons, but that’s the overall result. This is electrolysis of water and it’s the world’s primary way of producing Hydrogen – for example for hydrogen fuel cells.

You might be wondering why we need salt. This could be done without salt, but it wold happen more slowly. Can should try it, to prove it to yourself. Salt dissolves into the water creating ions of its own. These flow around the circuit too (creating Sodium and a tiny volume of Chlorine gas) and helps increase the circuit’s overall flow of electrons. You might be able to smell the faint whiff of Chlorine if you do this for long enough.

If you want to take this further, you might think about how to collect the Hydrogen and Oxygen separately – and what you might do with them if you were doing this on an industry scale.

publications

Executable papers are a cool idea in research [1]. You take a study, write it up as a paper and bundle together all your code, scripts and analysis in such a way that other people can take the ‘paper’ and run in themselves. This has three main attractive features, as I see it:

  1. It provides transparency for other researchers and allows everyone to run through your working to follow along step-by-step.
  2. It allows your peers to give you detailed feedback and ideas for improvements – or do the improvements themselves
  3. It allows others to take your work and try it out on their own data

The main problem is that these don’t really exist ‘in the wild’, and where they do they’re in bespoke formats even if they’re open source. iPython Notebook is a great way of doing something very much like an executable paper, for example. Another way would be to bundle up a virtual machine and share a disk image. Executable papers would allow for rapid-turnaround science to happen. For example, let’s imagine that you create a study and use some current data to form a theory or model. You do an analysis and create an executable paper. You store that paper in a library and the library periodically reruns the study when new data become available [2]. The library might be a university library server, or maybe it’s something like the arXiv, ePrints, or GitHub.

This is roughly what happens in some very competitive fields of science already – only with humans. Researchers write papers using simulated data and the instant they can access the anticipated data the import, run and publish. With observations of the Cosmic Microwave Background (CMB) it is the case that several competing researchers are waiting to work on the data – and new data come sour very rarely. In fact that day after the Planck CMB data was released last year, there was a flurry of papers submitted to the arXiv. Those who got in early, likely had pre-written much of the work and simply ran their code as soon as they had downloaded and parsed new, published data.

If executable papers could be left alone to scan the literature for new, useful data then they could also look for new results from each other. A set of executable papers could work together, without planning, to create new hypotheses and new understanding of the world. Whilst one paper crunches new environmental data, processing it into a catalogue, another could use the new catalogue to update climate change models and even automatically publish significant changes or new potential impacts for the economy.

I should be possible to make predictions in executable papers and have them automatically check for certain observational data and automatically republish updated results. So one can imagine a topical astronomy example where the BICEP2 results would be automatically checked against any released Planck data and then create new publications when statistical tests are met. Someone should do this if they haven’t already. In this way, papers can continue to further, or verify, our understanding long after publication.

SKA Rendering (Wikimedia Commons)

SKA Rendering (Wikimedia Commons)

This is high-frequency science [3], akin to high-frequency trading, and it seems like an interesting approach to some upcoming data-flow issues in science. The Large Hadron Collider (LHC), Large Synoptic Survey Telescope) LSST, and Square Kilometre Array (SKA) are all huge scientific instruments set to explore new parts o the universe and gathering huge volumes of data to be analysed.

Even the deployment of Zooniverse-scale citizen science cannot get around the fact that instruments like the SKA will create volumes of data that we don’t know what to do with, at a pace we’ve never seen before. I wonder if executable papers, set to scour the SKA servers for new data, could alleviate part of the issue by automatically searching for theorised trends. The papers would be sourced by the whole community, and peer-reviewed as is done today, effectively crowdsourcing the hypotheses through publications. This cloud of interconnected, virtual researchers, would continuously generate analyses that could be verified by some second peer-review process; since one would expect a great deal of nonsense in such a setup.

When this came up at a meeting the other day, Kevin Page (OeRC) remarked that we might just be describing sensors. In a way he’s right – but these are software sensors, built on the platform and infrastructure of the scientific community. They’re more like advanced tools; a set of ghost researchers, left to think about an idea in perpetuity, in service of the community that created them.

I’ve no idea if I’m describing anything real here – of it’s just an expression of way of partially automating the process of science. The idea stuck with me and I found myself writing about it to flesh it out – thus here is a blog post – and wondering how to code something like it. Maybe you have a notion too. If so, get in touch!

———-

[1] But not a new one really. It did come up again at a recent Social Machines meeting though, hence this post.
[2] David De Roure outlined this idea quite casually in a meeting the other day, I’ve no ice air it’s his or just something he’s heard a lot and thought was quite cool.
[3] This phrasing isn’t mine, but as soon as I heard it, I loved it. The whole room got chatting about this very quickly so provenance was lost I’m afraid.

Yesterday was the Hack Day at the UK National Astronomy Meeting 2014 in Portsmouth. I organised it with my good friend Arfon Smith of GitHub, formerly Zooniverse. We wanted to try and start a new NAM tradition – it went well so maybe we did. I’m psyched that .Astronomy got to help make it happen – not just through my involvement, but the many .Astronomy alumni who attended!
Some of the hack projects have already started to appear online, such as Geert Barentsen, Jeremy Harwood, and Leigh Smith (Hertfordshire) who created a Martian Nyan Cat, which is planning to fly over the entirety of ESA’s Mars Express data archive in one continuous, two-day-long, flight. You also grab the code for Duncan Forgan’s beautiful ‘Music of the Spheres’ project, which sonifies the rhythms of planetary systems. Other projects are harder to place online, such as Jane Greaves’ knitted galaxy cluster – with dark matter contributed by many people during the hack day itself.

I spent much of the day working with Edward Gomez (LCOGT) on the littleBits Space Kit. littleBits is a modular system of circuits that let anyone try their hand at something that ordinarily requires a soldering iron. littleBits components may be switches, sensors, servos, or anything really, and they connect magnetically to create deceptively simple circuits that can be quite powerful.

IMG_2359

For example you could connect an infrared sensor and an LED to make a device that flashes when you press buttons on your remote. Or you could use a microphone and a digital LCD display to create a sound meter. The littleBits components are sturdy enough to withstand being bashed about a bit, and simple, and large enough, to let you stick on cardboard, homemade figures, or anything else you find around the house. I found out about littleBits when I met their creator, Aya Bdier at TED in March. She is a fellow TED Fellow.

We decided fairly quickly to try and built an exoplanet simulator of some sort and ended up crating the littleBits Exoplanet Detector (and cup orrery). There were two parts to this: a cup-based orrery, and a transit detector.

The cup orrery consisted of a rotating ‘planetary system’ fashioned from a coffee cup mounted on a simple motor component – we only had hack day supplies to play with – and a central LED ‘star’. Some more cups and stirrers were required to scaffold the system into a stable state but it was soon working.

The transit detector used a light-sensor component that read out to both a speaker and a LCD numerical display – Ed refers to this as the laser display board. With a bit of shielding from the buffet’s handy, black, plastic plates the light sensor can easily pick up the LED and you can see the light intensity readout varying as the the paper planet passes in front of the star. It was awesome. We got very excited when it actually worked!

You might think that was geeky enough, but it gets better. I realised I could use my iPhone 5s – which has a high-frame-rate video mode – to record the model working in slow motion and allow us to better see the digital readout. We also realised that the littleBits speaker component can accept an audio jack and so could use the phone to feed in a pure tone, which made it much easier to hear the pulsing dips of the transits.

Finally, we had the idea to record this nice, tonal sound output from the detector and create waveforms to see if we could recover any properties about the exoplanets. And sure enough: we can! We built several different coffee-cup planetary systems (including a big planet, small planet, and twin planets) and their different properties are visible in their waveforms. Ed is planning a more rigorous exploration of this at a later date, but you can see and hear the large cup planet’s waveform below.

Waveform for Large Cup Planet

Waveform for Large Cup Planet

So if you want to try something like this, you only need the littleBits Space Kit. You can buy them online and I’d love to see more of these kits, and to see them in schools. I’m now totally addicted to the idea myself too!

GitHub Stickers

Thanks to Arfon for suggesting that we do this Hack Day together; to the NAM 2014 Portsmouth team for being so supportive; and to GitHub for sponsoring it – where else would we have gotten all the cups?!

Today is the start of the UK National Meeting in Portsmouth. I’ll be there tomorrow, and running the NAM Hack Day on Wednesday with Arfon Smith – which is going to be awesome. Today at NAM, the nation’s astronomers will discuss the case for UK involvement in the Large Synoptic Survey Telescope project – the LSST. The LSST is a huge telescope, and a massive undertaking. It will change astronomy in a profound way.

A photograph and a rendering mix of the exterior building showing the dome open and road leading away from the site.

A photograph and a rendering mix of the exterior LSST building, showing the dome open and road leading away from the site.

With every image it takes, the LSST will be able to record very a large patch of sky (~50 times the size of the full Moon). It will take more than 800 images each night and can image its* entire sky twice a week! Billions of galaxies, stars, and solar system objects will be seen for the first time and monitored over a period of 10 years. Crucially it will use it’s rapid-imaging power to look for moving or ‘transient’ things in the night sky. It will be an excellent tool for detecting supernova, asteroids, exoplanets and more of the things that move from night-to-night or week-to-week. For example, the LSST could be used to detect and track potentially hazardous asteroids that might impact the Earth. It will also help us understand dark energy – the mysterious force that seems to keep our universe expanding – by mapping the precise location of billions of galaxies.

I’ve recently become LSST:UK’s Public Data Coordinator – think ‘chief hacker’ if you prefer. The LSST’s unprecedented archive of data will be a resource we can tap into to create new kinds of public outreach tools, data visualisations, and citizen science. In recent years, we at the Zooniverse have pioneered citizen science investigations of data in astronomy**. The citizen science and amateur astronomy communities around the UK, and the world, will be able to access the amazing data that comes out of the LSST both through structure, Zooniverse-style projects but also in a more freeform manner. The potential for discovery will be on a scale we haven’t seen before. It’s very exciting.

The LSST is a public-private partnership and is led by the United States. The unique scientific opportunities presented by the LSST have led to the formation of a group of astronomers from more than 30 UK universities. We’ll be asking for funding from the Science and Technology Facilities Council to support UK participation in the project.

Spinnaker Tower from the Gosport Ferry

Spinnaker Tower from the Gosport Ferry

If you’re at NAM this week, then I’ve love to talk about LSST, hacking on data, and Zooniverse. On Wednesday you’ll find me in the Park Building, at the University of Portsmouth at the GitHub/.Astronomy NAM 2014 Hack Day. I’ll also be at the GitHub drink up on Tuesday night at The White Swan from 7pm – where you can enjoy some of the finest cask ales, draught beers and wines in Portsmouth – and GitHub are paying! More details at https://github.com/blog/1849-github-meetup-in-portsmouth-uk.

* i.e. the sky visible from its location – not literally the entire sky
** We’ve now had more than 1 million volunteers pass through our digital doors.

Orbiting Links

May 6, 2014 — Leave a comment

Screenshot 2014-05-06 22.04.29

I’ve added a new section to Orbiting Frog today: Orbiting Links (http://links.orbitingfrog.com). This new page displays an automated set of URLs currently being shared by the astronomers of Twitter. This is a work in progress, but it seems to be producing good results so far.

Orbiting Links is created by taking a small set of my favourite astro-Tweeters, and following their tweets, and the tweets of the people they follow too. As links are shared, I store them and keep track of how often they are retweeted or posted elsewhere. Those that rise to the top in any 24-hour period are displayed on the page. Each URL that makes it to this page has some details attached to it, including the original tweet that the system spotted it in.

I’m tracking a bunch of my favourite go-to astronomers on Twitter. The accounts they follow are also monitored, up to about 5,000 accounts. It isn’t necessarily those people that will rise to the top here though – but more likely the sources of the links they share. I will continuously modify the list of source accounts, to maximise the usefulness of this page.

Why Do This?

To find interesting stuff! The topics will vary day-to-day, and sources of interesting links should rise to the top organically. I see this as an alternative news source, delivering material aligned with the interests of my peers on Twitter. It’s an experiment too – and a coding project I’ve been wanting to build for a while now. The source code is on GitHub, forked from the original OpenFuego repo.

Resources Used

This site has built on top of several other projects, many of which I have slightly modified. The back-end is written in PHP and the front-end is HTML+JavaScript.

  • OpenFuego: Created by Andrew Phelps of the Nieman Journalism Lab, OpenFuego is the open-source version of Fuego, a Twitter bot created to track the future-of-journalism crowd and the links they’re sharing.
  • Type & Grids: You can find many amazing website templates on Type & Grids. All of them are responsive and well-commented, and many of them are free.
  • Twitter: Microblogging site Twitter is still one of my favourite things about the web, even after all these years!

Future Development

The current to-do list for this project includes an RSS feed and a Twitter account, which will provide other ways to access the same set of links. If you have ideas for how this projects should evolve, please get in touch.

Note: This experiment involves sharp objects and should only be performed by children if under supervision. As long as care is taken, this is a fun experiment with effective results. It can be done without the razor blades, but the results are not as good.

Spectrometers are used, like prisms, to spread light out into the component colours. This enables us to understand the compositions of everything from stars to streetlights. Here I show you how to make your own spectrometer and give you a few examples of what you can see with it.


What You Need:

  • A cardboard tube (toilet roll or kitchen roll tubes are just perfect, in the pictures here, I have used more black card to make a tube myself.)
  • 2 square pieces of black card (approx 8cm x 8cm)
  • Black tape or masking tape (something that blocks out light)
  • Razor blades (nothing fancy just cheap blades that are not attached to anything)
  • A stanley knife
  • An old CD

Make a Diffraction Grating:

Cut a small square hole (approx 1cm across) in the middle of one of your 8cm x 8cm black cards. Break the CD into pieces, just snap it. You’ll need a section of the broken CD that can nicely cover the 1cm hole in your card.

Using a bit of sticky tape, peel away any cover remaining on the piece of CD, so that it is transparent. Use tape to stick it over the hole, creating a sort of window. This will be our diffraction grating.

Make a Very Fine Slit:

Using a stanley knife, cut a slit in the middle of the other piece of 8cm x 8cm black card. This slit should be about 2cm long and just a few millimetres wide. Tape the the two razor blades either side of the slit. They should make an even narrower slit, just 1mm or less if possible!

The aim is create a very fine, narrow slit though which light can travel. Make sure the blades are securely attached with tape for safety.

Make the Spectrometer:

This is the easy bit! You now attach the two square cards to either end of the tube using the dark tape. You have to attach it in such a way that no light is let into the tube accidentally (hence the dark tape). When you look through the diffraction grating, you only want to see light coming from the slit.

Testing Out Your Spectrometer:

The best way to see how this works is to use daylight. Just point the spectrometer toward a window during the day or up at a cloud if you’re outside. You should not ever look directly at the Sun. You should see a nice, smooth spectrum (rainbow) somewhere in your field of view in the tube. Here is a photo of a cloud taken through my own spectrometer. The bright white light is the slit and spectrum is just off to one side.

What’s Happening?

When light enters the tube though the slit it spreads out – all waves do this when passing through small slits. The CD then makes the separate colours visisble to your eye. You see a nice, even spectrum from daylight sources because daylight is made up of all the colours of visible light from the Sun. Once you can see this pattern, you can start trying to find the spectra of other things.

In our physics lab we have lamps of different chemical make-ups. These let us see pure light from different sources. Here are a few I took today, all photos taken by my own camera through my own, homemade spectrometer.

Here is the spectrum for Zinc, which you can see contains some red and blue but very little green.

Cadmium is very distinctive, with short sections of each of the three primary colours and very little between them. It is less spread out than Zinc. There is a big gap between the green and red sections.

Krypton is seen to be fainter than the others here, but the spectrum is still visible. The blue section has become much more violet or indigo here and the green is greener than it was in Cadmium.

The Astronomy Connection:

This is how astronomers know what stars are made of. They use advanced spectrometers to measure the spectrum of stars and pull out the ‘fingerprint’ patterns of colour that you see above. Each element has a unique set of spectral lines (colours) and these can identify the presence of different chemicals in stars, nebulae and just about everything else.

This is the whole spectrum of the Sun. It is so detailed that it had to spread onto multiple lines to see it properly! You’ll see that in fact it is not perfectly evenly spread out as I suggested earlier. This was taken with a very advanced spectrometer that has a greatly increased sensitivity compared to one made here, but its based on the same principles.

Things to Look At With Your Spectrometer:

  • Sodium streelights
  • Compare daylight to a lightbulb.
  • Different light bulbs look different (that’s why energy saving bulbs light up the room in a different way).
  • Neon signs.
  • TV  and computer screens.
  • LEDs from computers or remote controls (these give very pure spectra, often only one colour).

Have fun with your spectrometer and why not try and take a photo through it? It worked fairly well for me. I’d love to see any photos you take with it, or of it. Let me know how you get on. Thanks to the Science Made Simple team for this great idea!

 
 

 

I recently did a piece on measuring the speed of light using your microwave. Well here is some more physics you can play with in your kitchen. This time let’s create a vacuum and then use it to crush something. I like crushing things. Don’t we all?

What you will need:

  • A regular drinks can
  • A pot of cold water big enough to submerge the can
  • A pair of tongs
  • A kitchen hob (gas or electric is fine).

What to do:

Now you have to be careful with this one. The tongs have to be good or you’ll burn yourself. If you’re a child reading this, then make sure someone supervises you while doing this experiment. Reading though all the instructions before you start out is vital. I recommend having a couple of attempts, so maybe have two or three cans ready. So let’s begin:

Whilst you are filling up the pot of water why not drink the coke or whatever is in your drinks can. We don’t need any of the contents for this experiment, just an empty can. Once it is empty, rinse it out and place about two tablespoons of water in the can.

Now take your tongs and get a firm hold on the can. Hold it over the kitchen hob. We need to boil the small amount of water we have put in the can. This won’t take long and you’ll know when it’s worked because you’ll see steam coming out of the hole at the top of the can. Let it steam for a minute or two to be sure the water has all boiled.

Now here’s the cool bit. Keeping the can in between the tongs, take the can directly from the hob and dunk it, upside down, into the pot of water. The can will instantly and violently be crushed! It will happen very quickly so be ready. When I did it, it made a loud smacking sound as it went under water. I did it twice because I missed it the first time!

What is happening?

There is some great physics going on in this simple experiment. When you heat up the can and boil the water inside, the can fills with steam and pushes out all the air. Then when you dunk the can into cold water, the steam quickly condenses into water and there is no air pressure inside the can to support it. The can cannot resist the forces pushing on all sides from the water and air above it. Therefore it is crushed instantly!

Balloons:

Air pressure is also at work in balloons. When you blow air into a balloon you are artificially increasing the air pressure inside it and the rubber skin expands outward, forced by the force of the air molecules bounding around inside it.

You can ‘crush’ balloons by dipping them into liquid nitrogen. This condenses the air inside into a liquid and the balloon goes flat as a pancake. Here can see a video of a balloon that has been dunked into liquid nitrogen thawing out. The air boils back into a liquid and the balloon re-inflates. We filmed this last year in our first year undergrad physics lab.

Enjoy playing with air pressure and feel free to send me any images of your crushed cans!

Astronomers studying star formation, like myself, use telescopes that can see though the pretty, optical exteriors of nebulae into the dark interiors where very cold dust radiates in the submillimetre and microwave regimes.

Microwaves, fall on the electromagnetic spectrum, between radio waves and infrared waves. They are usually around the size of a few centimetres and you may well be very familiar with them as they are produced by the microwave oven that might just be sitting in your kitchen.

Microwave ovens use a particular microwave frequency to excite molecules of water. Since water is present in lots of food and drink, this means that microwaves heat up lots of useful stuff – and they do it quickly. The fact that microwaves are now readily available to most of us in the western world and they are only a few centimetres in length, means that you can measure the speed of light in your very own home.

What You Need:

Mallow Science

The quickest and tastiest way to perform this little experiment is with marshmallows, but chocolate chips also work. You’ll obviously need a microwave oven as well, and a large, microwaveable dish. You will need a ruler, too.

What to Do:

Get your large, microwaveable dish and place a layer of marshmallows at the bottom of it.Remove the turntable from the bottom of the microwave oven. If you don’t, then this experiment will not work at all. If your microwave doesn’t have a turntable, it means that the turning mechanism is elsewhere and you’ll need to find a regular microwave oven to try this experiment.

Cook the marshmallows on a low heat for a couple of minutes, or until you see parts of the marshmallows starting to bubble. When you do, remove the dish and take a look at the marshmallows.

Melting Marshmallows

You ought to see that they have not melted evenly. In fact you should be able to see a regular pattern has formed, drawn out in melted-mallow. It depends on your microwave oven, but you should see a melted/unmelted pattern across the dish in some direction. When I tried it at home, my oven created long melted strips next to long unmelted strips (see above).

standing_wave.gif

This regularity is caused by the same mechanism that heats up the food you place into your microwave oven. The appliance generates microwaves which very quickly form standing waves (see animation above) inside the cavity inside, where you put food. As the food rotates around, it passes through the standing wave nodes and this excites the water molecules, heating the food.

Measure the Microwaves:

Take your ruler and measure the distance between the melted parts of the marshmallows. You should find that there is an even pattern of melting and that the distance between them is something like 5 or 6cm. Why? Because that is the distance between the nodes of the standing waves.

Measuring Microwave Melted Marshmallows

Without the rotating mechanism, the food does not move around and cook evenly, instead it just heats at the nodal points. Using your marshmallows you have created a ‘map’ of the microwaves in your microwave oven!

Find the Frequency:

Finally you need to know the frequency at which your microwave oven operates. It is usually written on the back somewhere in small writing. Most standard microwave ovens operate at 2450 MHz. If you cannot find the value on the back of the oven, you can take it for granted that 2450 MHz is about correct.

Measure the Speed of Light:

Now you have what you need to measure the speed of light. You just need to know a very fundamental equation of physics:

Speed of a Wave (c) = Frequency (f) x Wavelength (L)

The distance between the melted sections of the marshmallow is in fact L/2, because there are two nodes for each wave (see animation). So if you have measured 6cm and your oven operates at 2450 MHz, then your measured speed of light is (0.12 x 2450,000,000) 294,000,000 metres per second.

Microwave Frequency 2450 MHz

The agreed value of the speed of light through a vacuum is 299,792,458 metres per second. See how accurately you can measure it? what could you do to make the experiment better, and thus get a closer answer?

Now You Can Eat the Gooey Melted Marshmallows:

…and make yourself sick. Yay!

I have updated and fixed the files for tracking satellites and the ISS on Google Earth. You are no longer offered driving directions to the satellites either.