Experiment:The Dancing Cockroach Leg-Microstimulation of Neurons and Muscles
Backyard Brains Logo

Neuroscience for Everyone!


items ()

Experiment:The Dancing Cockroach Leg-Microstimulation of Neurons and Muscles

Electricity plays a critical role in how our nervous and muscle systems work. In this experiment you are going to stimulate a cockroach's leg muscles using the music output of your mobile phone.

Time 30 minutes
Difficulty Beginner

What will you learn?

In this lab you will learn about the history and use of microstimulation in studying the nervous system, and you will investigate the effect of frequency on the electrical excitability of cockroach nerves.

Prerequisite Labs

  • SpikerBox - You should do the SpikerBox basic experiment first to learn about neurons before doing this lab.


Long before scientists were able to record spikes, they were able to stimulate the nervous system using batteries (Leyden Jars). Since nerves use electricity to communicate, they can be manipulated with electricity as well. Luigi Galvani, an Italian scientist in the 1700's, discovered that electricity applied to the nerves of frog legs caused the large muscles to twitch.

Such discoveries led to debates at the time as to whether "animal electricity" was different from the electricity during lightning storms. Galvani also tested this by hanging frog legs off his back porch during thunderstorms & watching the legs twitch. These phenomena were the direct inspiration for Mary Shelley's "Frankenstein."


Eventually the scientific community discovered that while electricity can indeed stimulate nervous system and muscle tissue, the tissue itself generates electricity. This led to the beginnings of contemporary neuroscience which you are studying today.

In another famous experiment, German Medical Scientists Eduard Hitzig and Gustav Fritsch in 1870 applied electricity current to the exposed cerebral cortex (wrinkly part of brain) in dogs in their kitchens (yes, it was odd even back then), showing that stimulation of different parts of the brain can cause different types of movements.

Today, such techniques are used in patients, most notably those afflicted with Parkinson's disease.

By inserting a small, long electrode into a specific part of the brain called the subthalamic nucleus, the shaking and tremors associated with the disease can be lessened. Sometimes there are side-effects though, like increased gambling and other compulsive behaviors.



Video explanation of experiment.


  • Using your mobile phone or computer, plug your stimulation cable in the headphone jack
  • Attach the micro-clips from the stimulation cable to the needles placed in the cockroach leg.
  • Select a song with a lot of bass (we prefer anything from the album "Paul's Boutique"), turn your volume up half-way, and slowly increase the volume. At some point the leg should begin to "twitch" in time to the bass line of the song.
  • Now select a song with a lot of treble (such as J.H. Bach), and observe the cockroach leg. Does it move?
  • It would be ideal, of course, to have finer control over the stimulation than simply playing music. Fear not; there is an easy way to do this. Using free applications like ToneGen on your laptop, or FreqGen on your iPhone, you can control the frequency and amplitude of the stimulus you deliver to the leg. In humans with implanted devices like cochlear implants & deep brain stimulators, the signal (also called a "biphasic pulse train") looks like this:

  • Put your settings on "square wave," and adjust the rate (frequency)...

  • and volume (amplitude).

    Can you find a "sweet spot" of the lowest volume & best frequency to cause evoked movement? Use the table below as a guide.

    You can get a sense of what these frequencies mean, using the 88 key piano below.


    If you like, you can study microstimulation in an even simpler experiment, using only:

    First, some theory on how speakers work:

    The sound, represented by the electric current traveling through the wires, passes through a magnetic field in the speaker, which causes the cone/drum to move, pushing the air and creating the sound that you hear. For example, have you ever seen a bass woofer vibrate at a rock concert?

    This principle also works in reverse, and this is how microphones work. If you speak into a microphone/speaker, the movement of the cone/drum causes a current to flow in the wires. If we use a special speaker called a piezoelectric, we can generate quite large voltages (1-3 V), large enough to actually excite nervous & muscle tissue!


    Science Fair Project Ideas

  • What kind of music gets what kind of responses from the leg? Try a few different genres, as well as some pure tones. Why do you think certain frequencies generate different degrees of response?
  • How long can the leg maintain a constant flex from a constant stimulation? Does the level of stimulation change this time? What causes it to stop? How long after removal before the leg stops responding to music? If it stops moving to music, does it still produce spikes on a SpikerBox? Why might that be or not be the case?
  • Does the placement of the electrodes affect the response you get? Why might that be or not be the case?