« Back to DIY

Dead-Bug Dragonfly

A CD4046 VCO - and a PLL that chases whatever you feed it · By Onion Madder · Mess O' Pedals

This is the chip that makes the other two playable. The 40106 gives you six oscillators you tune by hand. The CD4046 gives you one oscillator you tune with a voltage - which means a knob, an envelope, an LFO, another chip, or a cable from your other gear can play it. That's a real VCO, dead-bug, for about a dollar.

Build three in the dead-bug series, after the Dead-Bug Mosquito and the CD40106 drone box. Same rules, same vape-pack power, same no-breadboard stubbornness.

So what is a PLL?

Forget the textbook. PLL stands for phase-locked loop, and the 4046 is really two useful things in one package:

  • A VCO - a genuine voltage-controlled oscillator. Put a voltage in, get a pitch out. This is 90% of why we're here, and you can use it completely on its own.
  • A phase comparator - a circuit that listens to an incoming signal, compares it to the VCO, and nudges the VCO until the two match. That's the “locking” part: the loop chases the input until it locks onto it.

Wire only the VCO half and you have a clean, wide-range oscillator you can play. Close the loop and the chip turns into a dragonfly - feed it a guitar and it hunts the note, snapping and octave-jumping as it tries to keep up. That glitchy chase is the classic PLL guitar-synth sound. We'll build the VCO first, because it's the useful half, then close the loop at the end if you want the chaos.

⚠ Before you start tap to expand / collapse

Hot iron, obviously. 350°C of don't-grab-that. Ventilate, don't breathe the flux smoke, park it in its stand every time.

CMOS rule, again: no floating inputs. On this chip that means INHIBIT (pin 5) must go to ground or the VCO simply won't run, and any unused input (pins 3 and 14 in pure-VCO mode) gets tied to ground too.

Keep CV between 0V and V+. Pin 9 is a CMOS input - don't feed it negative voltages or anything above your supply. If you're patching in from other gear, a series resistor is cheap insurance.

Mind polarity on the electrolytic output cap and your power source.

If you power it from a salvaged lithium pack, the usual cell cautions apply - see Do You Want to Survive the Vapocalypse?

What you'll need

New to the parts? Each line notes how to spot it — the printed marking, the package, or the polarity clue.

  • CD4046 (CD4046B / HEF4046) phase-locked loop, 16-pin DIP — spot it: CD4046 printed on top, notch marks pin 1; count the pins (16, two wider than the last builds)
  • 0.01 µF ceramic — C1, the timing cap (sets the range). Spot it: a non-polar disc printed 103 (= 10nF = 0.01 µF)
  • 100K resistor — R1, the range resistor (bands brown-black-yellow, or meter it). A 100K pot + 1K series resistor here gives a coarse/range knob instead
  • 100K linear pot — the pitch knob (feeds CV into pin 9). Spot it: marked B100KB = linear taper (not A/log)
  • 0.1 µF ceramic — supply decoupling (printed 104)
  • 10 µF electrolytic — output DC-blocker. Spot it: a little can; stripe = minus leg, long leg is +
  • SPST toggle for on/off — a 2-lug switch
  • Output: a jack to an amp, or an LM386 (8-pin DIP) + speaker — same as the 40106 box
  • A power source — at least two vape cells in series (7.4V; three gives you 11.1V), or a 9V battery
  • Optional, for the PLL half: a 0.1 µF coupling cap (printed 104), a 10K–100K resistor, and an input jack
  • Solid-core hookup wire, enclosure, soldering iron, cutters, multimeter

Quick reference - the whole build on one card

Pinout plus every connection at a glance. The steps below go slowly; this is the bench card.

The only pins the VCO needs: 16, 8, 5, 6, 7, 11, 9, 4. Notch marks pin 1. Dead-bug (legs up) mirrors the map left-to-right.

Power (first)

  • Pin 16 → V+ (3–15V)
  • Pin 8 → ground
  • 0.1 µF across pin 16 ↔ pin 8
  • Pin 5 (INHIBIT) → ground - or nothing runs
  • Pins 3 & 14 → ground (unused in VCO mode)

Set the range

  • C1 = 0.01µF between pin 6 ↔ pin 7
  • R1 = 100K from pin 11 → ground
  • R2 (pin 12) - leave open for now
  • Bigger cap or bigger R = lower pitch

Play it (CV in)

  • 100K pot: one end → V+, other end → ground
  • Pot wiper → pin 9 (VCO IN) = pitch knob
  • Or: CV jack → 100K series → pin 9
  • Keep pin 9 between 0V and V+

Out

  • Pin 4 (VCO OUT) = square wave
  • Pin 4 → 10µF (+ to pin 4) → volume → amp / jack
  • Pin 4 also = clock for a CD4024

Step 1 Pin the bug down

Same drill as always: flip the CD4046 belly-up, legs in the air, and glue its back to a scrap of wood, a bottle cap, a bit of copper-clad. One difference - this one's a 16-pin chip, not 14, so count carefully from the notch. Miscounting by two pins is the single easiest way to waste an evening here.

Step 2 Power rails - and the pin that catches everyone

Run your V+ and ground buses, hook up the power pins, decouple right at the chip. Then the one that will get you: INHIBIT (pin 5) must be tied to ground. It's an active-high disable - leave it floating and the VCO just sits there silently while you check every other joint twice. Ask me how I know.

In pure-VCO mode you're not using the phase comparators, so pins 3 and 14 are unused inputs - tie them to ground as well. The comparator outputs (pins 1, 2, 13) and DEMOD (pin 10) can be left open; they're outputs, they don't float.

Power & housekeeping
ConnectToWhy
Pin 16V+Supply positive (VDD)
Pin 8GroundSupply negative (VSS)
0.1 µFPin 16 → Pin 8Decoupling, right at the chip
Pin 5GroundEnables the VCO. Floating = silence
Pin 3GroundUnused input (VCO mode only)
Pin 14GroundUnused input (VCO mode only)

Step 3 Set the range - C1 and R1

Two parts decide what octave this thing lives in. C1 bridges pins 6 and 7 - that's the timing cap. R1 runs from pin 11 to ground and sets the top of the range. Bigger cap or bigger resistor → lower pitch. Start with 0.01 µF and 100K; that lands you in a nice screamy audio range, roughly a kilohertz-ish at mid-knob.

R2 (pin 12) sets the floor - the frequency the VCO idles at when your CV is at zero. Leave it open to start, so the pitch drops all the way down as you close the knob. Add a 1M–10M there later if you want a “never fully stops” floor.

Range setting
ConnectToPart
Pin 6Pin 7C1 = 0.01 µF (the timing cap)
Pin 11GroundR1 = 100K (or a 100K pot + 1K series = range knob)
Pin 12-R2 - leave open (optional 1M–10M floor)

Swap C1 to taste: 0.1 µF drops it into low growls, 0.001 µF takes it up to whistles, 1 µF+ turns it into an LFO you can watch instead of hear.

Step 4 Give it a voice you can play

Here's the whole reason for this chip. Pin 9 (VCO IN) is the control voltage input: whatever voltage you put there sets the pitch. To get a pitch knob, wire a 100K pot as a voltage divider - one end to V+, the other to ground - and run the wiper into pin 9. Now the knob sweeps 0V to V+, and the oscillator sweeps with it.

That same pin is your patch point. A CV jack, an envelope, a slow 40106 oscillator - anything that makes a voltage between 0V and V+ can drive it.

Pitch / CV input
ConnectToPart
Pot end 1V+100K linear
Pot end 2Ground-
Pot wiperPin 9= your pitch knob
optional CV jack tipPin 9~100K series resistor; sleeve to ground

Step 5 Take the output

Pin 4 is the VCO output - a square wave swinging nearly rail to rail. Block the DC, run it through a volume pot, and out to an amp or a jack. Like the 40106, this is a little CMOS output: it won't drive a speaker hard on its own, so give it an LM386 or let a real amp do the work.

Output stage
ConnectToPart
Pin 4Volume pot (top)10 µF (+ toward pin 4)
Volume wiper1K → jack tip / LM386 insleeve to ground

Pin 4 is also a perfect clock - run it straight into a CD4024 and you get sub-octaves of whatever you're playing.

Step 6 Power up

Toggle it on and sweep the pitch knob. You should get a clean, wide square-wave sweep - far smoother and far wider-range than the 40106's hand-tuned squeal. Then do the thing that makes this chip worth it: touch a wire from a slow oscillator to pin 9 and watch the pitch move on its own.

Voltage note tap to expand / collapse

The CD4046 is CMOS: 3V to 15V. At least two vape cells in series (7.4V — three gives you 11.1V) or a 9V battery.

Worth knowing on this build specifically: the CV range runs 0V to V+, so whatever you power it from is also your CV range. More volts = a wider window to play in.

Step 7 If it won't sing

  • Dead silent? Pin 5. It's pin 5. Tie INHIBIT to ground. This is the number-one CD4046 bug and it has eaten many evenings.
  • Still silent? Confirm C1 actually bridges pins 6 and 7 (not 6-to-ground), and that R1 goes from 11 to ground.
  • One fixed pitch, knob does nothing? Your pot isn't wired as a divider. It needs V+ on one end and ground on the other, wiper to pin 9. Two-lug wiring won't work here - unlike the 40106, this pot makes a voltage, not a resistance.
  • Pitch only covers a sliver of the knob? Normal-ish - the response isn't linear-to-your-ear. Try a bigger R1, or run a higher supply for more range.
  • Screaming way too high? C1 too small. Go up to 0.1 µF.
  • Buzzy, unstable, or weird? Floating input (pins 3/14), or you skipped the decoupling cap.

Going further: close the loop (the dragonfly part)

Everything so far used half the chip. Now let's make it chase something. Feed an external signal into SIG IN (pin 14), wire the VCO's output back to COMP IN (pin 3) so the chip can compare them, and run a phase-comparator output through a simple filter into VCO IN (pin 9). That closes the loop: the VCO now hunts until it matches the input.

PLL mode - changes from the VCO build
ConnectToPart / note
Input jack tipPin 14 (SIG IN)0.1 µF coupling cap - un-ground pin 14 first
Pin 4 (VCO OUT)Pin 3 (COMP IN)un-ground pin 3 first - this closes the loop
Pin 2 (PC1 OUT)Pin 9 (VCO IN)through a 10K–100K resistor
Pin 9Ground0.1 µF - together with the resistor, this is the loop filter
Pitch pot-Disconnect it from pin 9; the loop drives pin 9 now
  • Which comparator? Pin 2 is PC1 - it happily locks onto harmonics and gets noisy when the input fades. That “wrong,” octave-jumping, gargling behaviour is exactly the classic PLL guitar-synth sound, so use it. Pin 13 is PC2 - it only locks to the true frequency and stays put. Cleaner, more boring, better if you actually want tracking.
  • The loop filter is the personality. That resistor and cap set how fast it chases. Small values = twitchy, snapping, glitchy. Big values = slow, gliding, portamento-ish. This is the knob worth making a knob.
  • Feed it something loud and simple. PLLs track a fat single note far better than a chord. Guitar into a fuzz first, then into the PLL, is the traditional recipe - the fuzz squares it up and the loop finds it much easier.

Where it fits with the other two

  • 40106 → 4046. Run a slow 40106 voice into pin 9 and you've got sirens, warbles, and dying-robot wobble - an LFO for free.
  • 4046 → 4024. Pin 4 clocks a CD4024, which hands you sub-octaves and stepped patterns of whatever you're playing.
  • 4046 → the APC. The square out makes a fine trigger source for the Dead-Bug Mosquito's one-shot.

Get the VCO singing, wire a knob to pin 9, and you've got the first thing in this series you can actually perform. Show me what you make.

The 4046-as-VCO and the PLL guitar-synth trick are long-standing folk knowledge of the DIY-synth and circuit-bending world. This write-up, wiring, and words are my own. Build it, bend it, make it yours.