Dancing fairy lights

Our CHRISTMAS LECTURES assistant Kate Mulcahy guides you through a musical example of how to hack your home and make your fairy lights flash in time to music.

What you'll need

  • TIP31c transistor – can be purchased online or from electronics stores
  • Set of standard battery powered fairy lights
  • Audio Jack - can be purchased online or from electronic stores
  • Short strands of thin wire
  • Electrical tape
  • Soldering iron and solder - optional


  1. Make sure you remove all batteries from the battery pack before you start work on the wiring.
  2. Identify the negative wire of the fairy lights by looking at the way the wires connect to the battery pack. The battery terminal which has a spring is usually the positive side. Therefore the wire which is connected to the springy side we shall call the positive wire.
  3. Disconnect the negative wire (non-springy side of the battery pack) of the fairy lights from the battery pack. If you have a soldering iron you can desolder where the wire is attached to the battery pack. If not you can simply cut it away and gently strip away some of the plastic coating.
  4. Connect the exposed end of the negative wire of the fairy lights to the central pin of the transistor.
  5. Connect the ground wire of the audio jack and the negative terminal of the battery pack to the right hand pin of the transistor.
  6. Connect the “left/right” wire of the audio jack to the left hand pin of the transistor.
  7. Reinsert your batteries.

For this very basic circuit we simply twisted stripped metallic ends of wires together and covered them in electrical tape. You could also solder the components of the circuit together if you wanted to make your musical lights more robust.

If you buy an audio jack that is not wired you will need to wire it yourself. To do this screw off the plastic covering that protects the terminals.

The two side prongs are the left/right terminals and the longer metal prong is the ground. For this project attach one wire to either of the side terminals - this will be your left/right wire and then attach another wire to the longer terminal - this is your ground wire. Thread the wires through the plastic casing and screw back in place.                   

You should now have a complete circuit connecting the fairy lights, the audio jack, the battery pack and the transistor.

  • fairy lights, christmas lectures

    Circuit diagram for the fairy lights hack

    Credit: Royal Institution

To use

Once your circuit is created, plug the audio jack into a speaker, laptop or computer and play music. You will probably need to turn it up very loud! The output from a smartphone is usually too low to allow this to work. If you are connecting the audio jack to a computer or laptop it can be useful to use a splitter and an additional speaker. This way you can hear the music and see your lights flash at the same time. Adjusting the volume of the music affects how the lights flash.


Please make sure that children are supervised by an adult at all times when putting this hack together and using the lights afterwards. Do not leave the fairy lights on and twinkling to music unattended, make sure you're around to dance along!

The engineering behind the hack

Transistors are one of the most important components in many electronic devices and are essential to microchips and computing.They can be used to amplify signal or as switches.

For this home hack the transistor is acting like a switch. A low voltage signal output is sent from the audio jack to the transistor. When this is output is strong enough the transistor acts like a switch which allows the larger DC current in the battery powered fairy lights to glow. The transistor switch is very responsive and so as the music and therefore the flow of current from the audio jack changes the fairy lights flicker and dim seemingly instantaneously.

Latest Posts