This Instructable will show you how to build a Blinquencer- a semi-random optical melody generator that uses three blinking LEDs shining on a pair of light dependent resistors to control the pitch of two simple audio circuits to create melodic and rhythmic patterns. If that sounds technical don't worry, it's a really simple project that gives impressive results and it's a great introduction to noise circuits and generative music. It also makes a cool nightlight. Check out the video and see what it does and how it sounds and read on to see how to build your own.

Aside from a couple of ICs, a few LEDs and a fresh protoboard (less than $1 worth of stuff), I used all recycled and repurposed parts and materials for this project. It is designed to run from batteries for portability or a recycled wall wart for use around the house. While you could build a similar device from all new parts, I wish to demonstrate that money doesn't have to be a factor in electronics exploration and creation- save your money for better tools!

When I got into noise circuits, one of the first interfaces I learned was using a light dependent resistor to control the pitch of an oscillator. Basically, an LDR acts like a light controlled potentiometer- the brighter the light falling on the sensor, the lower the resistance. The darker it is, the higher the resistance. Total darkness blocks practically all current, acting like a switch. By using a LDR for the resistor in a typical R/C inverter oscillator, you can control the rate or pitch of that circuit with light.

I began to experiment with various light sources such as TVs and monitors, Christmas lights, strobes, flashlights and anything else that blinked, glowed or lit up. I eventually saw the Bleep Labs' Thingamagoop with its blinking LED on a flexible wire stalk that used a photosensor to affect the sound produced. This inspired a lot of my own projects like the one featured here. By having the LED on the end of a semi-rigid wire, you could use distance and position of the light source to control the amount of light falling on the sensor. If you have multiple stalks with LEDs you can switch them on and off and get different notes from a sound circuit with an LDR.

This project uses a CD40106 chip. This is a basic CMOS logic gate which is one of the building blocks of modern computers and digital devices. This is a digital circuit. Digital circuits read and create signals which turn off and on at controlled times. This creates a series of 'on' and 'off' signals, which can represent a binary code. While CMOS logic gates are primarily used for computations and data routing, they can be used to create sounds*. This circuit uses oscillators, circuits which turn off and on at an even, controllable pace. At slower rates these circuits are called clocks and can be used to measure divisions of time. If you listened to the signal created by a low speed oscillator it would sound like a steady stream of even clicks. If we sped this oscillator up the clicks would get closer and closer together until it created a steady buzz, like a snare drum roll. If you continued to speed the signal up it would begin to sound like notes- the faster the oscillator, the higher the note. By carefully controlling the speed of the oscillator we can get specific notes and even melodies.

The CD40106 consists of six inverters. An inverter has an input and an output. If you put an 'on' signal (called a '1' in binary language) into the inverters input, it will give the opposite output- in this case an 'off' (or '0'). In very simple terms, our circuit detects a 0 (power off) on its input pin and gives a 1 (power on) on its output pin. This 1 (power on) goes through a simple resistor/capacitor combo that builds up a charge and then releases it back to the inverter's input. This is read as a 1, or 'on' signal, causing the inverter to change its output to 0 or 'off'. This causes the R/C circuit to drain and stop discharging to the input pin, causing it to read as 0 again. This happens over and over again. The values of the resistor and capacitor used will control the speed at which the oscillator cycles back and forth between on and off, 1 and 0. This even on/off signal is called a square wave and is the basis for many synthesizer and sound circuits as well as many non-audio circuits.

Since the CD40106 has six separate inverters we can use it to make six independent oscillators that cycle at different rates. We will use three inverters with potentiometers to control the rate of three blinking LEDs. These LEDs shine onto two light sensitive resistors which control the pitch of two audio oscillators built from two more of the inverters. The final inverter is used to build an LFO or low frequency oscillator that turns the output of the two audio oscillators on and off quickly for tremolo and rhythmic effects at a rate controlled by a potentiometer. By carefully adjusting the pitch of the audio oscillators, the speed of the three blinking LEDs and the rate of the LFO, interesting musical and tonal patterns evolve and change over time.

Sound fun? Here we go...

* A note on CMOS sounds-

For a look at what CMOS logic chips can do check out this short clip of my Lunetta synthesizer. Lunetta's, named for creator Stanley Lunetta, use CMOS logic chips and an open patchable system of connections to create tones, patterns, control voltages and raw, amazing sounds. Lunettas are the opposite of traditional synthesizers- while a Moog is used to create sounds, a Lunetta is used to discover them. There's an amazing community of enthusiasts over at electro-music.com who are more than happy to introduce you to the wonderful world of digital noise and generative music.



Step 1: Gather your materials

Here's a basic list of materials I used for my build. Feel free to modify or substitute these materials any way you want. I tend to be stubborn about recycling whatever I can, but you can use new parts and materials just as easily.

I'm using a Bobbi Brown cosmetics gift box made from heavy paste board that my wife brought home from work. My wife manages a beauty department in a high end retailer and always brings me cool boxes for my projects. Use whatever you have at hand or build something from scraps. Cigar boxes work nice.

Electrical components*- I use recycled components whenever possible, but you can get them wherever it's convenient.

6- 50k potentiometers

1- 10k potentiometer

2 spdt toggle switches

1- 1/4" audio jack

1- CD 40106 hex schmitt inverter

1- PC817 opto-isolator (or a DIY photo bridge with an LED nad a photoresistor sealed in a blacked-out tube)

2- light dependent resistors (photoresistors, photocells, CdS cells, etc.)

2- LED holders

6- 2.2k resistors

2- 56k resistors

1- 4.3k resistor

1- 330 ohm resistor

3- 100uf capacitors

2- .47uf capacitors

1 47uf capacitor

1- 10uf capacitor.

3- LEDs

1- 9v battery

You will also want to gather the following tools and materials or their equivalents-

A few scrap pieces of Romex or similar stiff copper wire.

A small amplifier

Hand drill and bits

Hobby knife

Soldering iron

Wire cutters/strippers

Small pliers


Small breadboard


Scrap wood




Heat shrink tubing

Hookup wire

Various fasteners (old fashioned screw jar)

Get all your tools and supplies together on a clean, flat surface. When using solder and glue work on some kind of mat to keep the table or desk clean. Solder is hot! If you are new to soldering check out some of the tutorials found on the web and come back when you can solder- it shouldn't take very long at all. Solder in a well ventilated area. Be careful with hot, sharp, heavy, toxic or electrified things. Use your head. Plan your work and work your plan. If you screw up try again. Be careful and use common sense and don't blame me for any misfortune experienced while trying to emulate this project.

*A note on components-

When I first got into electronics I had limited resources. The online parts distributors had good prices but the jargon and variety made finding the parts I wanted very daunting. Radio Shack had a good basic selection of components, but their prices were high. I wanted a large selection of components in many different values in order to experiment freely. That's when I saw the ad that changed my life- Harbor Freight had a dual temperature heat gun on sale for $7.99. I had tried to salvage parts from old circuit boards with a soldering iron but it was time consuming and often resulted in damaged parts. I figured eight bucks was cheap enough to take a chance.

Sure enough I could strip a whole board in minutes with a putty knife and a heat gun. The heat was distributed in a wider area so the parts survived the process much better. I soon had piles of components and spent a few nights identifying and sorting them. They were put into small zip lock bags and stored in boxes. I built hundreds of circuits from parts recycled from the garbage!

I now buy parts in bulk from China and I keep a good supply on hand at all times but for these Instructables projects I want to use as much recycled materials as possible to show that money is not a stumbling block to creativity. Many of the parts I used for this project came from an old 16 channel mixer that I was given. Each channel had a separate board with capacitors, resistors, pots, push button switches, diodes and opamp chips. There were also knobs, 1/4" jacks, slide pots, wire and other components. There were over 120 pots in several values! That would cost close to $500 at Radio Shack, and that's not even counting the other parts.

<p>This looks so cool :), please share a video.</p>
<p>Here's the video- </p><p>https://vimeo.com/99430409</p>
<p>Thank you so much and sorry to bother you so much. You have put lot of efforts. An your project is awesome.</p>
<p>The new video isn't working either. I'll upload it to Vimeo and post a link. </p>
<p>OK I shot a new video and uploaded it- it's just waiting to process. Hope this one works, fingers crossed!</p>
I think this one absolutely needs a video with it. I'd love to hear the results.
<p>I loaded one but apparently it's corrupt so I'll make a new one really soon.</p>
<p>This is some serious stuff! keep it up bro!</p>
<p>Wow I love the look of this thing. I like the idea of random sound, well only in small amounts but still. Very good instructable, the picture looks great and your explanations are even greater </p>
<p>With careful adjustment you can actually get pretty musical results.</p><p>I posted this as an introduction to getting complex sounds from simple CMOS chips. I plan to do a series of Instructables detailing the various modules of a Lunetta synthesizer. These awesome DIY sound machines use various CMOS logic chips in an open patch configuration to produce really complex and evolving sounds and rhythms. I built one a few months ago and I'm having a lot of fun with it. Keep an eye out for more cool sound projects- I have a plate reverb, an analog ribbon synth and a few recycled acoustic instruments in the works.</p>
<p>Do you have a full schematic? I find it easier to visualize that way</p>
Very detailed instructions, easy to follow the design parts while still learning new stuff from the explanations. Great project.

About This Instructable


118 favorites


Bio: I build cool things from trash and recycled materials. I like noise and sound circuits. I live with my wife, a chihuahua named Monkey and ... More »
More by Chuck Stephens: Intel Edison and Ridemakerz RC Chassis Robotics Platform Eureka!Factory Atari Punk Console v2 Jitterbugs! Vibrating Robotic Bugs
Add instructable to: