slopswap / emf badge / breadboard notes

Breadboard prototype and bench notes

How the badge's tuning chopper was prototyped on a breadboard at 5 V from parts on hand, with a Jumperless V5 as clock, supply and test bench.

Read this first

These are working notes, written to one person at a bench. Their numbers are simulation, not measurement. The circuit to make is on the main page, which came later and runs on the badge's own two cells.

Three things here have since changed. The 1 µF series capacitor, C1, costs bass in normal listening (about 11 dB at 120 Hz in simulation); 10 µF brings that within about 2 dB, and on the badge's own ±1.5 V the capacitor is not needed at all. The production switch is a 74HC4053, not the 74HC4066 named here. And a CMOS 555 works as the oscillator on the badge's 3 V; the note here against the NE555 is about the bipolar part.

The script, the simulation files and the handoff notes that the text mentions are not published here.

EMF Badge Chopper Test on a Jumperless V5

What this tests

The Jumperless stands in for the 74HC14 oscillator and one discrete MOSFET stands in for the 74HC4066. Every chopper setting on the options page can then be heard on the real badge. The extra parts are one transistor, one capacitor and one resistor.

On the options pageHow the Jumperless does itMode in the script
Badge as it is todayGate held low, MOSFET offNORMAL
Tuned chopper, Options C and E50% square wave on GPIO 1, 22 to 300 kHz, tuned with the wheelTUNED
Comb mode, Option ESame oscillator, but the signal passes only for a short pulse each cycle. Pulse width is adjustableCOMB
The slow automatic shift you asked forThe oscillator glides across the band by itself, or scans and parks on the strongest sourceSWEEP, SEEK
Pot value and taper for the dialA real pot read by an ADC and mapped through the RC oscillator's formulaDIAL
Dividers, Options A and BTwo CD4049 inverters square the signal up. A PIO program divides it by 4 to 512DIVIDE
Automatic pitch, the job of Option FThe squared signal is counted and the oscillator is kept just below the sourceTRACK
A known ultrasonic sourceSquare wave from GPIO 5 into a loop of wiretest tone

What it cannot test. Option D, the loudness stage for the dividers, and the 74HC4046 circuit of Option F. SEEK and TRACK show what automatic tuning feels like, but they are software. DIVIDE and TRACK need your CD4049; everything else needs only the transistor.

Where the bodge differs from the real circuit. These matter when you judge what you hear.

Parts and hookup

One MOSFET goes from the coil side of the badge's 100 Ω input resistor to ground, through a capacitor. Three clip leads reach the badge: that junction, AGND and the op-amp output.

Gate high sends the coil signal to ground instead of the amplifierOn the badge, unchangedpickup coil100 mHclip here100 Ω100 kΩ ‖ 100 pF231−+NJM2115to jackclip leadC11 µFQ1BS270R1100 kΩrow 13 ← GPIO 1oscillator, from the scriptclip leadR24.7 kΩC210 nFrow 20 → ADC 0level meter, USB audio, speaker bufferEvery ground symbol is one node: badge AGND, joined to the Jumperless GND rail by a wire.
hookup schematic · one MOSFET, three clip leads

With the gate low, the coil current flows through the 100 Ω into the amplifier as it does today. With the gate high, it flows through C1 and Q1 to ground instead. R2 and C2 are only needed for the level meter, recording and the speaker.

PartValueNotes
Q1BS270Any small logic-level N-MOSFET. The BS270 suits it: its threshold is 2.5 V at most and it has no turn-off delay. A 2N7000 is marginal from 3.3 V. An NPN also works, wired as described under this table
C11 µF, not polarisedFilm or ceramic, 0.47 to 2.2 µF. It keeps the op-amp's DC offset out of the chopping. Without it the output can sit against a rail
R1100 kΩHolds the MOSFET off whenever the script is not running
R2, C24.7 kΩ, 10 nFA 3.4 kHz low-pass ahead of the ADC, which samples at 48 kHz with no filter of its own
Test loop1 kΩ and a few turns of wireOptional. From the test-tone row to the GND rail, held near a pickup coil

An NPN in place of Q1. A 2N3904, PN2222 or similar small switching transistor works, because C1 blocks its saturation offset. Put the collector in row 12, the base in row 13 and the emitter in row 14. Set ROW_GATE = 16 and put 1 kΩ from row 16 to row 13. It turns off roughly 0.2 to 0.5 µs late, so treat COMB pulses under 1 µs as unreliable. This version is untested too.

Where to clip on the badge

  1. Junction. The end of a 100 Ω input resistor that goes to its pickup coil, not the end that goes to the op-amp. A meter reads under 1 Ω from it to one coil leg.
  2. AGND. The battery midpoint.
  3. Audio. The op-amp output for the same channel. The NJM2115 pairs are pin 2 in with pin 1 out, and pin 6 in with pin 7 out. Follow the resistor to see which pair you are on.

On the breadboard

Twist the junction and AGND leads together and keep them short. Keep the badge 20 cm or more from the Jumperless, whose LEDs and converters are an EMF source themselves. That also makes the Jumperless a handy first thing to listen to.

Breadboard drawings of every circuit, and the parts that can stand in for each one: Wiring and substitutes

LTspice and Falstad simulations of all four, with what they showed: Simulations

Building the switch out of a real part, with the Jumperless as the test bench: Building it for real

Loading and running

The script is one file, emf_chopper.py. Set the row numbers at the top, copy it to the board, and start it from the terminal or the wheel.

  1. Settings. Check the block headed settings at the top of the file. Only ROW_GATE is required. ROW_AUDIO = 20 switches on the level meter and SEEK. Every other feature is off until you give it a row.
  2. Copy. Press U in the Jumperless terminal and the board mounts as a USB drive. Put the file in python_scripts, then eject the drive.
  3. Run. Type /python_scripts/emf_chopper.py in the main terminal. From the wheel it is Click, then Files, then the file. From the Python REPL, exec(open('/python_scripts/emf_chopper.py').read()) does the same.
  4. Stop. Press q or Ctrl+Q. The script drives the gate low, so the badge is back to normal, and removes the connections it made.

The script clears whatever was connected to the rows it uses before it starts. It was written against firmware 5.7.11 and has not run on real hardware yet. The last section lists what that leaves open.

Controls and modes

Hold the wheel for the next mode, turn it to adjust, and click to choose what turning adjusts. The OLED shows the mode and the oscillator frequency on its first line.

ModeGate driveWheelWhat you hear
NORMALLowThe badge as it is today
TUNED50% square waveCoarse, 2% a detent. Click for fine, about 20 HzA source sounds at a pitch equal to its distance from the oscillator. Tune through it and the pitch falls to zero, then rises
COMBHigh, with a short low pulse each cycleCoarse, fine, then pulse widthSources near every harmonic of the oscillator at once, all quieter
SWEEPSquare wave gliding from 22 to 300 kHzSeconds per pass. Click freezes it into TUNEDEach source whoops down and back up as the oscillator passes it
SEEKScans the band, parks on the strongest source, rescans when it fadesTrim while parked. Click rescansOne source held at a steady pitch. Needs ROW_AUDIO. Experimental
SHUNTHighA check. Sound above about 1 kHz should nearly vanish
DIALSquare wave set by a real potClick changes the taperThe feel of the real knob. Needs POT_ROWS
DIVIDELowDivide ratio, 4 to 512The source's frequency divided down, as a square wave. Needs the CD4049
TRACKSquare wave kept just below the sourcePitch. Click starts overAny source glides to a steady note. Needs the CD4049

In a terminal the keys are 1 to 9 for modes, m next mode, + - coarse, . , fine, ] [ pulse width, x test tone, ? help and q quit.

The level number on the display is a rough loudness of the badge output between about 400 Hz and 2 kHz, close to millivolts. It ignores hum, which makes it useful for comparing modes on one source. The frequency shown is the one the hardware actually produced.

For DIAL, put any pot across rows 40 to 42 with its wiper in row 41, and set POT_ROWS = (40, 41, 42). The pot is only read as an angle. The oscillator it imitates is set by DIAL_R1, DIAL_RV and DIAL_C, which start at Fig. E's values.

Listening

Headphones in the badge's own jack are the best way to hear this. The speaker and USB paths are quieter or coarser, and are there for sharing and recording.

PathSettingWhat to expect
Badge headphonesNoneFull quality. Nothing on the badge changes
Jumperless buffer to a speakerROW_SPEAKER = 6Unity gain through crosspoints. Faint on a bare 8 Ω speaker. A piezo disc or a powered speaker suits it better
USB audioUSB_AUDIO = TrueThe board appears as a microphone called JL Audio In. Fine for spectrograms, coarse for quiet sources

Speaker. Put the speaker between row 6 and the GND rail. The script routes the audio row into BUFFER_IN and BUFFER_OUT to row 6. BUFFER_IN is also the probe's analog line, so the probe is unpowered while the script runs. Unplug it or flip it to measure, or its LED supply loads the signal. You know this path better than I do. I only have the firmware source to go on.

USB audio.

  1. Set USB_AUDIO = True and run the script. The first run switches the microphone on and the serial port drops for about two seconds. Run the script again.
  2. Choose JL Audio In as the input in Audacity, QuickTime or a DAW, and record.
  3. Left is the chopped channel. Right is ROW_REF, if you wire it to the other op-amp output: the unchopped channel, for comparison.
  4. usb_audio_teardown() in the REPL hides the microphone again.

Two limits apply to the USB path. The ADC is 12 bits across about ±9 V, so one step is about 4.5 mV and a 100 mV badge signal gets only four or five bits. And the ADC samples at 48 kHz with no filter, so without R2 and C2 the chopper's own switching shows up as a whistle that moves as you tune. For a clean recording, a cable from the badge's jack into a line input will beat it.

With the CD4049

Two of its six inverters, biased as amplifiers, turn the badge's ultrasonic signal into a logic square wave. With that on a GPIO the Jumperless can divide it and count it, which adds DIVIDE and TRACK.

Two CD4049 inverters square the field up for the Jumperless to countfrom op-amp pin 7,the unchopped channelC3 1 nFR4 10 kΩR5 1 MΩU1A32C4 1 nFR6 1 MΩU1B54R7 4.7 kΩR8 10 kΩrow 50 → GPIO 4counter and dividerCD4049UB: pin 1 to the top rail (5 V, set by the script), pin 8 to the GND rail, 100 nF across them.Tie the unused inputs to GND: pins 7, 9, 11 and 14.
squarer schematic · two inverters as amplifiers

Each 1 MΩ resistor holds its inverter at the switching point, where it amplifies by roughly 20. The 1 nF capacitors keep hum and ordinary audio out. R7 and R8 bring the 5 V swing down to 3.3 V for the GPIO. Feed it from the channel you are not chopping, so the chopper cannot disturb its own frequency reference.

Settings. ROW_SQUARE = 50 and ROW_TONE = 60. The script puts 5 V on the top rail while it runs and restores it afterwards.

DIVIDE is Options A and B. A PIO program divides the squared signal by 4 to 512 and sends it out of row 60 as a 3.3 V square wave. Put a speaker from row 60 to the GND rail. For headphones, run 1 MΩ from row 60 to the inverting input of the chopped channel, the same injection Fig. A uses.

TRACK is the automatic mode. The script counts the source's frequency ten times a second, puts the oscillator just below it and follows slowly. A source therefore glides in and settles on a steady note, with loudness intact.

SourceNote it lands on
Below 15 kHzNot shifted. The chopper stops and the sound passes straight through
20 kHz400 Hz
80 kHz800 Hz
320 kHz1.6 kHz, reached on the oscillator's third harmonic

The wheel moves the whole scale up or down. TRACK_SPREAD = 0 gives every source the same note, and TRACK_GLIDE_S sets how slowly it follows.

What to expect from the squarer

A real knob instead. Rewired, three of the inverters make the actual RC oscillator, for the true analog dial.

In simulation it covers about 24 to 100 kHz, and its 5 V swing turns Q1 on harder than the GPIO does. Build this or the squarer, not both. They use the same inverters.

Test plan

Work down the list in order. Each step proves one thing before the next step depends on it.

  1. NORMAL. The badge should sound as it did before the leads went on. If there is new hash, move it away from the Jumperless and twist the leads.
  2. SHUNT. Sound above about 1 kHz should drop to a few percent. If nothing changes, the junction clip is on the wrong node or Q1 is not turning on.
  3. Test tone at 40 kHz. Set ROW_TEST = 30, wire row 30 through 1 kΩ and the loop to the GND rail, and press x for 1.00k with the loop held near the coil. In NORMAL the badge should hear that buzz directly, which proves the loop, the leads and the audio path. Then press x until the display reads 40k. In TUNED, tune from 38 to 42 kHz. A clean tone should fall to zero at 40 kHz and rise again.
  4. Test tone at 100 kHz. Tune to 33.3 kHz. The tone should reappear, fainter. That is the third-harmonic window.
  5. Real sources in TUNED. Try a phone charger, a laptop supply, an LED bulb, an induction hob, a wireless charging pad and the Jumperless itself. Note where each is loudest.
  6. COMB on the same sources. Start at 3 µs and compare the level with TUNED. Widen the pulse until it is loud enough and note the width.
  7. SWEEP. Decide whether a whoop every few seconds tells you enough. Try 3 s and 15 s passes.
  8. SEEK, or TRACK with the CD4049. Move between two sources and time how long it takes to find the new one.
  9. DIAL, or the CD4049 oscillator. Tune to one source with each taper. Note how touchy the top of the dial is.
  10. Record one source in NORMAL, TUNED and COMB over USB audio, to compare later.

A table like this is enough to carry the results back. Add a row per source.

SourceOscillator where loudest, kHzLevel, NORMALLevel, TUNEDLevel, COMB at 3 µsNotes
Test tone, 40 kHz
Phone charger
Laptop supply
LED bulb
Jumperless

Carrying the results back

Four findings from the bench set the parts of the real circuit.

What you foundWhat it setsHow
The lowest and highest oscillator frequency worth havingR1, RV1 and C1 of the oscillatorf = 1 / (k × R × C). The highest uses R1 alone and the lowest uses R1 + RV1. k is about 1 for a 74HC14 and about 2.2 for the two-inverter CD4049 oscillator. Measure it on one chip
The pulse width that sounded best in COMBR3 and C2 of the pulse shaperThe width is roughly R3 × C2. Fig. E's 10 kΩ and 330 pF give about 3 µs
The taper that tuned most evenlyWhich pot to orderA reverse-log pot, or a log pot turned backwards, if revlog felt better than lin
Whether SWEEP alone was enoughWhether automatic needs a microcontrollerSWEEP could be a slow second RC oscillator pulling the first, from a spare gate. I have not drawn that. SEEK and TRACK need a counter, which in a product means a small microcontroller acting as the oscillator

Two more things are worth judging while you listen.

Troubleshooting and what is unverified

The script has not run on a Jumperless. I checked every call against the firmware 5.7.11.5 source and ran the control logic against a simulated board. Neither is a substitute for the bench.

UnverifiedWhy it might not workWhat happens, or what to do
Oscillator through machine.PWMStock MicroPython PWM on GPIO 1, chosen for exact pulse widthsThe script falls back to the pwm() builtin by itself and says so
PIO counter and dividerTwo small programs on PIO0 that have never run on hardwareDIVIDE and TRACK switch themselves off with a message. Everything else still runs
Q1 from a 3.3 V gateA BS270's threshold is 2.5 V at most, which should be enough. A 2N7000's can be close to 3 VSHUNT barely mutes. Use a BSS138, a 2N7002 or an NPN, or drive the gate from the CD4049 at 5 V
Buffer into a speakerI do not know its drive strengthUse a piezo or a powered speaker
SEEKIt listens through a coarse ADC and can lock onto the chopper's own aliasFreeze SWEEP by hand instead, or use TRACK
Squarer gain and squelchEstimated from typical CD4049UB behaviour, not measuredSee the notes in the CD4049 section
Wheel directionIt may tune backwardsSet WHEEL_DIR = -1

Symptoms

Sources

Breadboard wiring and substitute parts

Four drawings show where each part goes on the Jumperless breadboard. The tables after them list what can stand in for each part.

The chopper with the BS270

The chopper itself needs only rows 10 to 15 on the top half. The audio tap, the test loop and the pot are optional, and each sits on rows of its own.

The chopper sits on rows 10 to 15; the taps and the pot are optional+−+−16101213141517182029303140414260AGND leadjunction leadC1 1 µFDGSQ1 BS270R1 100 kΩGPIO 1audio leadR2 4.7 kΩC2 10 nFADC 0test loop1 kΩGPIO 5speakerBUFFER OUTpot, 10 kΩ or more,wiper to row 41DAC 1 · ADC 2 · GNDThe − rails are GND. Outlined rows are the ones the script connects. The thick edge of Q1 is its flat face.
Breadboard view of the chopper with a BS270. Row numbers are the ones printed on the Jumperless; the five holes in a row are joined.

Three clip leads come from the badge: the junction (the coil side of the 100 Ω input resistor) to row 10, the op-amp output to row 18, and badge AGND to the − rail. Rows 15 and 17 are stepping stones: R1 and C2 end there and a jumper carries each row to the − rail. Either part can go straight into a rail hole instead.

The test loop is a few turns of wire from row 29 to the − rail, laid next to the coils, with 1 kΩ between rows 29 and 30. The speaker on row 6 is only for listening through the Jumperless buffer. With a powered speaker on the badge's own headphone jack, leave it out and keep ROW_SPEAKER at None. Rows 21 to 28 stay empty, because the CD4049 sits there in the last two drawings.

The settings that match this drawing:

ROW_GATE = 13
ROW_AUDIO = 20
ROW_SPEAKER = 6
ROW_TEST = 30
POT_ROWS = (40, 41, 42)

Leave out any part you did not build and keep its setting at None.

The NPN version

If no small MOSFET turns up, a small-signal NPN does the same job. Only the drive changes: GPIO 1 moves to row 16 and reaches the base through a 1 kΩ resistor, and R1 is not needed.

With an NPN, GPIO 1 moves to row 16 behind a 1 kΩ base resistor+−89101112131415161718junction leadC1 1 µFCBEQ1 2N3904RB 1 kΩGPIO 1ROW_GATE = 16E to GNDThe thick edge is the flat face. A 2N3904 or PN2222A goes in this way round; turn a BC547 the other way.
Rows 8 to 18 with an NPN in place of the BS270. The rest of the board stays as in the first drawing.

Set ROW_GATE = 16. Check the pin order of your transistor before pushing it in. From the flat face, the 2N3904 family reads E B C and the BC547 family reads C B E, so the two go in opposite ways round. Either way the collector ends on row 12 and the emitter on row 14.

An NPN turns off roughly 0.2 to 0.5 µs late, so treat COMB pulses under 1 µs as unreliable.

The CD4049 squarer

The squarer turns the badge's audio into a logic square wave on GPIO 4, which DIVIDE and TRACK count. It uses two of the six inverters. The chip straddles the centre gap on rows 21 to 28 and 51 to 58, notch to the left, so pin 1 lands on row 51.

Squarer: two inverters on the lower half, 5 V from the top rail+−+−151617181920212223242526272829304546474849505152535455565758596016115214313412511610798CD4049UB5 VC5lead from op-amp pin 7C3R4R5C4R6R7R8GPIO 4GPIO 3tone outunused inputsto GNDPins 7 and 8 are joined by a short wire. Pin 8 and C5 go to the − rail, which is GND.
Breadboard view of the CD4049 squarer: rows 15 to 30 above the centre gap, rows 45 to 60 below it.

The input lead comes from the output of the channel you are not chopping: op-amp pin 7 if the chopper is on the pin 1 and 2 channel, pin 1 otherwise.

PartValueFromTo
C31 nFrow 47row 49
R410 kΩrow 49row 53 (pin 3)
R51 MΩrow 52 (pin 2)row 53 (pin 3)
C41 nFrow 52 (pin 2)row 55 (pin 5)
R61 MΩrow 54 (pin 4)row 55 (pin 5)
R74.7 kΩrow 54 (pin 4)row 50
R810 kΩrow 50− rail
C5100 nFrow 51 (pin 1)− rail

Six wires finish it: row 51 to the top + rail, which the script holds at 5 V while it runs, row 57 to row 58, row 58 to the − rail, and rows 23, 26 and 28 to the top − rail.

ROW_SQUARE = 50
ROW_TONE = 60

For DIVIDE, a speaker goes from row 60 to the − rail. ROW_TONE is 60 here, not the 55 in the script's comment, because row 55 is now the chip's pin 5.

The CD4049 oscillator

Three inverters and a pot make a real RC oscillator that drives Q1's gate, so the chopper runs without the Jumperless making the clock. In simulation the pot tunes it from about 24 to 100 kHz. It uses the same inverters as the squarer, so build one or the other.

Oscillator: three inverters on the lower half drive Q1 directly+−+−151617181920212223242526272829304546474849505152535455565758596016115214313412511610798CD4049UB5 VC5pot, 20 kΩ:wiper and one endR10R9C6to Q1 gate,row 13unused inputsto GNDSet ROW_GATE to an unused row first, so GPIO 1 is not also driving row 13.
Breadboard view of the CD4049 oscillator. The chip sits where it does for the squarer.
PartValueFromTo
R94.7 kΩrow 56 (pin 6)row 60
Pot20 kΩ, wiper and one endrow 60row 59
C6680 pFrow 54 (pin 4)row 59
R1022 kΩrow 57 (pin 7)row 59
C5100 nFrow 51 (pin 1)− rail

Eight wires finish it: row 55 to row 56, row 53 to row 54, row 52 (pin 2) to row 13 for Q1's gate (through 4.7 kΩ if OUT shows edge spikes), row 51 to the top + rail, row 58 to the − rail, and rows 23, 26 and 28 to the top − rail.

Two things differ from the other builds. Set ROW_GATE to an unused row such as 1, so GPIO 1 is not also driving row 13. The script raises the top rail to 5 V only when ROW_SQUARE is set, so raise it yourself first: at the main prompt, > dac_set(TOP_RAIL, 5.0, False). That one-liner is untested, like the script.

With this build the Jumperless only listens. The level meter, the speaker and USB audio work as before, and the script's tuning modes have no effect.

Substitutes for Q1

Q1 has to turn on fully from a 3.3 V gate and add little capacitance. Small N-MOSFETs with a threshold of 2.5 V or less do both. Pin orders are left to right with the flat side facing you. I gave them from memory except for the BS270, so check a datasheet before trusting one.

FitPartsPinsNotes
BestBS270, VN2222LL, VN10KM. BSS138 or 2N7002 on a SOT-23 adapterBS270: D G SThreshold 2.5 V or less and a few picofarads of gate capacitance
Usually fine2N7000, BS1702N7000: S G D. BS170: D G SThreshold can be as high as 3 V. If SHUNT barely mutes, try another one
Works, noisierLogic-level power MOSFETs: IRLZ44N, IRL540N, IRLB8721, FQP30N06L, AO3400, IRLML2502TO-220: G D SThey switch hard, but 10 to 100 times the gate capacitance couples more of the switching into the signal
Works with a base resistor2N3904, PN2222A, 2N4401, 2N4124, 2N5551, S8050, S9013, S9014E B CWire it as the NPN drawing. Turns off roughly 0.2 to 0.5 µs late
Works with a base resistorBC547, BC548, BC549, BC550, BC337C B EThe same, turned the other way round
Works with a base resistor2SC1815, 2SC945E C BThe base is an outer pin, so the three rows change
Fastest NPN2N2369, MPS2369, PN2369CheckA true switching transistor, with almost no turn-off delay
NoStandard power MOSFETs: IRF510, IRF520, IRF540, IRFZ44NThreshold of 2 to 4 V. They will not turn on from 3.3 V
NoDarlingtons and power NPNs: MPSA13, BC517, TIP120, TIP31, 2N3055Too slow, or too much saturation voltage
NoAny PNP or P-channel MOSFETThey need the opposite drive
Not as drawnN-channel JFETs: J111, J112, J113, 2N5457, MPF102They need a negative gate voltage to turn off. A capacitor and a diode on the gate can provide it, but I have not drawn that
The real circuit74HC4066, 74HC4053, 74HC4051These build the series-and-shunt switch on the options page. Tell me and I will redraw. A CD4066 or CD4016 is too resistive at 5 V

A plastic part marked 2N2222 needs a check: some are E B C and the P2N2222A is C B E.

Substitutes for the other parts

None of these values is critical. The last column says what to hold onto when you swap.

The chopper, the taps and the pot

PartDrawn asWhat else worksWhat matters
C11 µFAnything from 0.47 to 10 µF: ceramic, film, tantalum or electrolyticIt sees only a few millivolts, so polarity and voltage rating do not matter here. Bigger means less bass leak and more hiss. 0.1 µF only works well above about 60 kHz
R1100 kΩ10 kΩ to 1 MΩ, or nothingIt only holds Q1 off while nothing drives the gate
RB, NPN only1 kΩ470 Ω to 2.2 kΩLower gives a better switch and draws more from the GPIO. Do not go below 470 Ω
R2 and C24.7 kΩ, 10 nF10 kΩ with 4.7 nF, 3.3 kΩ with 15 nF, 2.2 kΩ with 22 nF, 1 kΩ with 47 nFA corner of 2 to 5 kHz, from 1 / (2πRC). Keep R at 10 kΩ or less
Test loop resistor1 kΩ330 Ω to 2.2 kΩLoop current is 3.3 V / R
Test loopA few turns of wire5 to 20 turns of hookup wire round a pen, a small choke or open inductor, a relay coil, a small speaker or earbud, a spare 100 mH pickup inductorIt needs an open magnetic path. Toroids and shielded inductors radiate very little
DIAL pot10 kΩ linearAny linear pot or trimmer from 1 kΩ to 1 MΩIt is only a position sensor. A log pot would skew the taper you are trying to judge
SpeakerA piezo disc, a small 8 to 32 Ω speaker, earbuds, a powered speaker or a line inputThe buffer has unity gain, so a sensitive or powered load is best
Clip leadsAn IC test clip on the 8-pin op-amp, mini-hooks, or soldered wiresShort, with the junction and AGND leads twisted together

The CD4049 circuits

PartDrawn asWhat else worksWhat matters
C3, C41 nF470 pF to 4.7 nFThey set how low the squarer hears: about 3 kHz with 1 nF
R410 kΩ4.7 kΩ to 47 kΩ. 100 kΩ to cut the gain
R5, R61 MΩ470 kΩ to 10 MΩBias only
R7, R84.7 kΩ, 10 kΩ2.2 kΩ with 4.7 kΩ, 3.3 kΩ with 6.8 kΩ, 5.6 kΩ with 10 kΩR8 about twice R7, under 20 kΩ in total. It keeps the GPIO at 3.4 V or less
C5100 nF47 nF to 1 µF ceramicSits right at the chip
R94.7 kΩ3.3 kΩ to 10 kΩSets the top frequency, with C6
Oscillator pot20 kΩ10 kΩ gives about 38 to 100 kHz. 50 kΩ gives about 12 to 100 kHzSimulated. The textbook 1 / (2.2 × R × C) reads 10 to 40% high here
C6680 pF470 pF to 1 nF. 1 nF gives about 17 to 72 kHzA C0G ceramic or a film capacitor drifts least
R1022 kΩ10 kΩ to 47 kΩProtects the inverter input. Larger values slow the oscillator

Substitutes for the CD4049

The two jobs have different requirements. The squarer needs unbuffered inverters, because only those can be biased as amplifiers. The oscillator will run on almost any logic gate.

JobWorksDoes not workNotes
SquarerCD4069UB, MC14069UB, HEF4069UB, 74HCU04, or a CD4007 wired as inverters74HC04, 74HCT04, 74LS04 (buffered, they oscillate when biased this way). 74HC14 and CD40106 (Schmitt). CD4050 (does not invert)These are 14-pin parts with power on pins 14 and 7, so the drawing's pin numbers change. A 74HCU04 can run from 3.3 V, which makes R7 and R8 unnecessary
Squarer, a different circuitA comparator with a little hysteresis: LM393, LM339, LM311LM358, LM324 (too slow at these frequencies)Not drawn. Tell me which one you have
OscillatorOne Schmitt gate with one resistor and one capacitor: 74HC14, CD40106, CD4093, 74HC132. Two ordinary inverters: CD4069UB, 74HC04. A 555, ideally a CMOS one such as a TLC555 or ICM7555. The oscillator inside a CD4046 or CD4060The 74HC14 version is the Fig. E oscillator itself. The output has to swing at least 3 V to drive Q1
Dividers, in place of the PIO programCD4040, CD4020, CD4024, CD4060, 74HC4040, 74HC393. CD4013 or 74HC74 for a divide by 2 or 4. CD4017 for a divide by 10Clocked from the squarer, these are Options A and B in real hardware

If you turn up any of the dividers, comparators or a 74HC14, say so. Each one moves a piece of this test from the Jumperless onto real parts, and I will draw that version.

Simulations

Each of the four circuits in the wiring tab now exists as an LTspice schematic and as a Falstad circuit. The LTspice files, with netlist copies and a README, are in emf_chopper_sims.zip, sent in the chat. The Falstad circuits open from the links below.

Open them

CircuitFalstadLTspiceWhat to try
BS270 chopperOpen in Falstad1_chopper_bs270.ascMove the LO slider. A 40 kHz field chopped at 39 kHz is a 1 kHz tone at OUT
NPN chopperOpen in Falstad2_chopper_npn.ascThe same, with a 2N3904 and a 1 kΩ base resistor
CD4049 squarerOpen in Falstad3_cd4049_squarer.ascSlide the input level down until GPIO4 stops being a clean square
CD4049 oscillator and chopperno Falstad link in the original4_cd4049_oscillator.ascSlide the pot. It is slow in the browser, about half a millisecond of circuit time per second

In LTspice, open a .asc and press Run. Each schematic carries its own models. If one does not open cleanly, the .cir beside it is the same circuit as a netlist.

A fifth schematic, 5_chopper_series_shunt, is the real switch from Building it for real: two BS270s, the inverted drive from the CD4049, C1 and the cancellation capacitor C3. LTspice only, no Falstad version. Its numbers are in that tab. The bundle in the chat has been updated to include it.

What they show

The test signal is 50 mV induced in the pickup coil at 40 kHz. The LTspice column is the schematic's netlist run in ngspice.

MeasurementLTspice netlistFalstad
TUNED, chopping at 39 kHz: 1 kHz tone at OUT, BS27072 mV48 mV
The same with the 2N390472 mV47 mV
NORMAL: the 40 kHz field at OUT, unheard73 mV
SHUNT: what is left of it2.2% with the BS270, 3.7% with the 2N3904
39 kHz switching feedthrough at OUT97 mV with the BS270, 320 mV with the 2N3904
Squarer gain at 40 kHz19 for the first stage, 354 for both20 for the first stage
Squarer: smallest input for a full logic swingabout 5 mV peak
Squarer supply current2.1 mA
Oscillator range with the 20 kΩ pot24 to 100 kHz38.8 kHz at 10 kΩ, against 38.3 kHz
Oscillator at 39.1 kHz driving the chopper: tone at OUT900 Hz, 54 mV1160 Hz, 46 mV with the pot at 10 kΩ

The two simulators agree when they model the same thing. With the op-amp made ideal, ngspice gives 47.8 mV for the first row and Falstad gives 48.0 mV.

What changed because of them

The oscillator's parts. As first drawn, with R10 at 100 kΩ and C6 at 1 nF, the simulated range was 15 to 52 kHz, not the 18 to 97 kHz the textbook formula gives. R10 works against the first inverter's input capacitance, which the inverter's own gain multiplies. With R10 at 22 kΩ and C6 at 680 pF the range is 24 to 100 kHz. Both tabs of the guide now show those values. The gate capacitance in the model is an estimate. With it 2.5 times larger the range is 22 to 88 kHz, so expect to trim C6 on the bench.

A resistor in the oscillator's gate lead. Driven straight from the CD4049 at 5 V, each gate edge puts a spike on OUT, which then swings from -0.54 to +1.11 V and comes close to the 1.2 V limit. With 4.7 kΩ in series the swing is -0.05 to +0.61 V and the tone drops from 73 to 54 mV. The wiring tab now suggests it.

The NPN is noisier above the audio band. It gives the same audible tone as the BS270, but 3.3 times the 39 kHz feedthrough. That is not heard. It does use headroom: OUT swings from -0.16 to +0.87 V.

The op-amp's speed matters. The NJM2115's 12 MHz gain-bandwidth changes the tone from 48 to 72 mV compared with an ideal op-amp, because the stage's noise gain is near 1000 while the shunt is on. Falstad's op-amp is ideal, so its tones read about a third low.

C1 does its job. With 1 mV of op-amp offset, OUT sits at 0.28 V in NORMAL, SHUNT and TUNED alike. That figure rests on the assumed 250 Ω coil resistance. The DC level at the real badge's op-amp output would calibrate it.

How far to trust them

Sources

Building the chopper for real

The first tabs use the Jumperless as a stand-in for the switch. This tab builds the switch out of a real part, with the Jumperless as clock, supply and test bench.

Where this fits

The badge hears 20 Hz to 20 kHz. The goal is a tunable window above that: a chopper slides a band from the 20 to 100 kHz region down into the audible range, and a knob sets where the band sits. Two parts make it. The switch is the mixer, and the oscillator is the dial. On these pages the Jumperless stands in for the oscillator, so the switch can be tested with a clock that is easy to change; the knob version, further down, replaces it with three inverters and a pot and needs no Jumperless at all.

The chip on the board is the CD4049UB hex inverter, not a 4066. The 74HC4066 is the switch the final version would use, and it is in the table at the end. The chopper itself needs one inverter, to give the shunt the opposite phase from the series switch. The rest of the chip has two possible jobs, and they are alternatives: three inverters as the RC oscillator (the knob), or two as the squarer from the first tab. The squarer is the feedback loop: it turns channel B's output into a square wave, the Jumperless counts it and parks the clock 1 kHz below, which is the TRACK mode. That is automatic tuning on top of the window, not the window itself, so it comes last.

Ten drawings follow: the schematic and the whole board, the switch rows close up, the two stand-ins for the second BS270 as a schematic and on the board, the knob version as a schematic, on the board and with its one NPN close up, and the CD4053 version as a schematic and on the board.

What changes when the switch is real

The first tabs put one MOSFET across the coil as a shunt and let the Jumperless pretend to be the chopper. That hears the effect, but it is not the circuit: the coil never opens, bass leaks through unchopped, and the mute is a few per cent short of silent. Option C on the options page is a series switch that opens the coil path, with a shunt that grounds the coil while the path is open.

This tab builds that from parts already on the bench: two BS270s, one inverter of the CD4049UB, and a handful of passives. No new ICs. The Jumperless stops being the switch and becomes the rest of the bench. It makes the clock, powers the inverter, listens through the audio tap and measures what it can.

It costs one solder joint on the badge. The coil end of channel A's 100 Ω input resistor has to be lifted, so the switch can sit between the coil and the amplifier. Left in place, the badge's own coil would stay wired to the amplifier around the switch.

The ETA7460 board

As far as I can find, the part is ETEK's ET7460H. Nothing called ETA7460 turns up in any catalogue I can reach, the ET7460 marking is sold on the kind of WLCSP breakout you describe, and ETEK's own pages and datasheet cover it. If your board says something else, tell me and I will look again.

It is a dual SPST switch made for routing speakers and power in phones, and its datasheet reads like one:

ET7460HWhat the chopper needs
On-resistance0.1 Ω typical at 200 mAanything under about 20 Ω
Signal range−13 to +18 Va few millivolts around 0 V
Turn-on time15 µs typicalunder 0.5 µs
Turn-off time5 µs typicalunder 0.5 µs
Charge injectionnot specifiedsmall, and it will not be: the FET is sized for 800 mA
On capacitance40 pFnot critical
Control0.9 V logic high, 600 kΩ pull-down, EN pina 3.3 V GPIO is fine
Supply2.7 to 5.5 V, 180 µAthe 3.3 V rail

Not the chopper switch. At 40 kHz a half-cycle is 12.5 µs, so the switch would still be turning on when told to turn off. Even at 20 kHz, the bottom of the band, 15 of the 25 µs half-cycle go on turning on. And a gate big enough for 0.1 Ω carries nanocoulombs; the spikes it would put into the amplifier would be larger than the coil signal. Its strengths, 0.1 Ω and ±13 V, are for speakers, not for millivolts of coil current.

Where it would fit: anything slow. Option D's tone gate runs at 0.5 to 4 kHz, where 15 µs is 1 to 6 % of a half-cycle. A NORMAL/mute bypass switch. Routing the badge's headphone signal. Keep it for those.

To see it on the Jumperless, with no badge involved: VCC and EN to the 3.3 V rail, GND to GND, S1 from DAC 0 at 2 V, D1 through 1 kΩ to GND, IN1 from a GPIO making 50 % PWM, and ADC 1 on D1. Average a few hundred adc_get reads. At 500 Hz the average on D1 is about 1.0 V. Raise the PWM to 20 kHz and then 40 kHz and watch it fall, as the turn-on time eats the on half-cycle. A switch fit for the chopper reads 1.0 V at all three. How far it falls depends on how the datasheet defines its 15 µs, so the fall is the result, not its size.

The circuit

This is Option C's switch with two BS270s in place of the 74HC4066. M1 sits in series between the coil, node A, and the amplifier. M2 grounds node A while M1 is open, so the coil always works into a low impedance, as it does on the stock badge.

M1 passes the coil while LO is high; M2 grounds it while LO is lowOn the badge: lift the coil end of the 100 Ωpickup coil100 mHlift100 Ω100 kΩ ‖ 100 pF−231+NJM2115to jackAAD 1G 2S 3D 1G 2S 3910BM2 BS270shuntM1 BS270seriesC11 µFC3 15 pFcancels the gate charge, try 10 to 221 kΩ100 kΩ1 kΩ100 kΩCD4049one inverter, 3.3 VLOBGPIO 1row 28row 19 ← GPIO 1LO, from the scriptBoth gates swing 0 to 3.3 V. Pins: BS270 1 D, 2 G, 3 S; NJM2115 channel A; CD4049 inverter D, pins 9 and 10.
The series-plus-shunt switch on channel A. One inverter of the CD4049 gives the shunt the opposite phase from the same GPIO.

Three parts need a word.

C1 stays, and for a different reason than before. With the series switch, the op-amp's input offset would see 100 Ω to ground half the time and an open circuit the other half, and come out of the amplifier as a square wave at the LO frequency. C1 blocks the offset altogether. In simulation the output then sits within a few millivolts of zero in every mode, where the stock stage sits at 0.28 V.

C3 is new. M1's gate-to-source capacitance couples the LO straight into the amplifier's summing node, and the 100 pF in the feedback turns that charge into voltage: in simulation, 280 mV of 39 kHz at the output, three times what the shunt bodge leaked. Inaudible, but it eats half the headroom. The inverted drive is the same square wave upside down, so a small capacitor from it into node B cancels the charge. 15 pF brings the leak down to 48 mV in simulation. It is a trim: try 10, 15 and 22 pF.

RG1 and RG2 slow the gate edges a little and keep the GPIO and the inverter happy driving the gates through a crosspoint. Any value from 470 Ω to 2.2 kΩ works.

PartValueJob
M1BS270, pins 1 D, 2 G, 3 Sseries switch, drain to node A, source to node B
M2BS270, pins 1 D, 2 G, 3 Sshunt switch, drain to node A, source to GND
RG1, RG21 kΩgate resistors
RP1, RP2100 kΩhold the gates low while nothing drives them
C11 µF, any typeblocks the op-amp offset
C315 pF, 10 to 22cancels M1's gate charge
C5100 nFCD4049 supply, at the chip
UCD4049UB at 3.3 Vone inverter: pin 9 in, pin 10 out; unused inputs to GND

What the simulation says the real switch changes, against the shunt bodge:

Shunt bodgeSeries and shunt
1 kHz tone from a 40 kHz field chopped at 39 kHz72 mV61 mV
Mute: 40 kHz left at the output2.2 %nothing measurable
LO leaking to the output97 mV281 mV, 48 mV with C3
Output swing while chopping+0.07 to +0.51 V−0.25 to +0.23 V with C3
Bass below 1 kHz in TUNEDpasses unchoppedchopped like everything else

The LTspice schematic and netlist are 5_chopper_series_shunt in the simulation bundle. The models are the same simple fits as the other four.

On the breadboard

The switch takes rows 10 to 19. The CD4049 straddles the gap on rows 21 to 28 and 51 to 58 as before, notch to the left, with pin 1 on row 51. The audio tap moves to rows 31 to 35 because the switch now owns row 18.

Two BS270s and one CD4049 inverter make the real switch+−+−191011121314151617181929303133354041426016151413121110912345678CD4049UBAGND leadDGSDGScoil leadR leadRP2M2RG2C3M1RP1C1RG1LOBGPIO 1LOBGPIO 1unused intest loop, 1 kΩGPIO 53.3 VC5pins 3, 5, 7 and 8 to GNDaudio leadR2C2ADC 0pot, wiper to row 41DAC 1 · ADC 2 · GNDBS270 pins 1, 2, 3 are D, G, S; the thick edge is the flat face, toward the centre gap. A 2N7000 reads S G D and faces the rails instead.Outlined rows are routed by the script: GPIO 1 to rows 19 and 28, row 27 to row 13, ADC 0 to row 33, GPIO 5 to row 30.
Breadboard view. The chip and the CD4049 wiring are where the earlier drawings put them, so the squarer can be added later on the same chip.
PartFromTo
coil lead, from the coil end of the lifted 100 Ω padbadgerow 10
R lead, from the lifted end of the 100 Ωbadgerow 18
AGND leadbadge− rail
M2, pins 1 D, 2 G, 3 Srow 10rows 11, 12
wirerow 12− rail
RP2 100 kΩrow 11− rail
RG2 1 kΩrow 11row 13
C3 15 pFrow 13row 16
wirerow 10row 14
M1, pins 1 D, 2 G, 3 Srow 14rows 15, 16
RP1 100 kΩrow 15− rail
RG1 1 kΩrow 15row 19
C1 1 µFrow 16row 18
CD4049 pin 1row 51bottom + rail, set to 3.3 V
C5 100 nFrow 51− rail
wires: pins 3, 5, 7, 8rows 53, 55, 57, 58− rail
wires: pins 11, 14rows 26, 23top − rail
audio lead, from op-amp pin 1badgerow 31
R2 4.7 kΩrow 31row 33
C2 10 nFrow 33row 35
wirerow 35− rail
test loop and its 1 kΩ, potas in the first drawingrows 29, 30, 40 to 42

Both BS270s face the same way: drain on the lower-numbered row, flat face toward the centre gap, so pins 1, 2 and 3 read D, G, S from left to right. A 2N7000 reads S G D and faces the rails instead; a BS170 reads D G S like the BS270. The LO reaches the inverter's input on row 28 and the shunt's gate resistor on row 13 through the Jumperless, not through wires: the script connects GPIO 1 to rows 19 and 28, and row 27 to row 13. A crosspoint is about 40 Ω, which the 1 kΩ gate resistors swallow.

The switch rows, close up+−91011121314151617181920AGNDcoil leadR leadRP2 100 kΩRP1 100 kΩ1 D2 G3 S1 D2 G3 SM2 BS270M1 BS270RG2 1 kΩRG1 1 kΩC3 15 pFC1 1 µFLOBfrom row 27LOfrom GPIO 1The thick edge is the flat face. Both BS270s face the centre gap, which puts pin 1, the drain, on the lower-numbered row.Row 12, RP1 and RP2 go to the − rail, which is GND. Rows 13 and 19 are fed by the crossbar, not by wires.
The switch rows close up: rows 9 to 20, pins numbered, both flat faces toward the centre gap.

The same rows at twice the size, with the pin numbers on each transistor. The three leads from the badge arrive from above; the two outlined rows carry the clock and its inverse.

The settings that match this drawing, once the script has the changes listed in the handoff:

SWITCH = "series"
ROW_GATE = 19
EXTRA_LINKS = ((GPIO_1, 28), (27, 13))
RAIL = (BOTTOM_RAIL, 3.3)
ROW_AUDIO = 33
ROW_TEST = 30
POT_ROWS = (40, 41, 42)

If you have only one BS270

Give it to M1. The series switch is the one that makes the mute and the tone: it has to pass millivolts through a few ohms and then block them completely, and the BS270's low threshold keeps it doing that from a 3.3 V gate. The shunt only has to hold node A near ground while M1 is open, so almost anything that switches will do, and the simulation says what each one costs.

Shunt1 kHz toneLO at the outputOutput swingVerdict
Second BS270, as drawn61 mV281 mV, 48 mV with C3−0.25 to +0.23 Vthe reference
2N7000 or BS17061 mV72 mV, with no C3−0.23 to +0.23 Vthe one to use. Simulated with the worst-case 3 V threshold. Leave C3 out: with this shunt it adds leak instead of cancelling it, 152 mV with 10 pF
Small NPN, 2N3904 or BC547, with 1 µF in series with its collector46 mV172 mV−0.12 to +0.91 Vworks, with an 800 Hz spur at 16 mV. The capacitor is not optional: without it the base current flows through the coil, the output swings to 1.1 V and a 400 Hz spur at 70 mV appears
None189 mV240 mV−0.88 to +0.54 Va stopgap for hearing the effect. The mute leaks 11 mV and a 2 kHz spur at 31 mV rides on the tone

The other way round also works in simulation: a 2N7000 as M1 with the BS270 as M2 gives a 60 mV tone and 108 mV of leak, 19 mV with C3 at 22 pF. An NPN in the series position does not work at all; its base-emitter junction rectifies the coil signal.

Two stand-ins for the shunt, M2: the rest of the circuit is unchangedA. 2N7000 or BS170 as M2coilto M1AM2 2N7000shunt, no C3D 3G 2S 1RG2 1 kΩ100 kΩLOBSame circuit; only the pin order differs. LOB high = shunt on.B. small NPN as M2, with C4coilto M1AC4 1 µFnot optionalM2 BC550Cor S9013, 2N3904CBERG2 1 kΩ100 kΩLOBWithout C4 the base current flows through the coil.Pins, flat face toward you: 2N7000 S G D; BS170 D G S; BC550C C B E; S9013 and 2N3904 E B C.
Schematic of the two shunt stand-ins. Everything outside the panels is the main schematic.

Which NPN. Between a BC550C and an S9013, the BC550C. It is the smaller, faster die: fT about 250 MHz against 100 to 150 MHz, 2.5 pF collector-base capacitance, and 75 mV saturation at 10 mA, which is far more current than the coil ever asks of it. The S9013 is a 500 mA driver and brings nothing the shunt can use. Both are driven hundreds of times harder than they need to be, so both turn off a few hundred nanoseconds late; the smaller one less so. The BC550C reads C B E from the flat face, so it goes in the other way round from the 2N3904 in the drawing, with the collector still on row 9. The S9013 reads E B C and goes in like the 2N3904. RG2 stays 1 kΩ; with the BC550C's gain of 400 or more, 4.7 kΩ also works and shortens the turn-off a little.

Pin orders, flat face toward you and leads down, left to right: BS270 1 D, 2 G, 3 S. BS170 D G S. 2N7000 S G D. 2N3904 E B C. BC547 C B E. A 2N7000 in M2's place goes in with its drain on row 10 like the BS270, which puts its flat face toward the rails.

With an NPN shunt the transistor moves to rows 7 to 9, so the capacitor has somewhere to go, and rows 11 and 12 stay empty:

PartFromTo
2N3904, pins E B Crows 7, 8, 9emitter on row 7, collector on row 9
wirerow 7− rail
RP2 100 kΩrow 8− rail
RG2 1 kΩrow 8row 13
C4 1 µFrow 9row 10

With E B C on rows 7, 8, 9 the 2N3904's flat face is toward the centre gap. A BC547 reads C B E, so it faces the rails to land the same way. Everything else, M1 included, stays where the drawing puts it, and the LO polarity does not change: the inverter output on row 13 goes high while M1 is off, which is when the shunt should conduct, MOSFET or NPN alike.

One BS270 only: two stand-ins for the shunt, M2+−3 D2 G1 Scoil leadRP2 100 kΩM2 2N7000RG2 1 kΩto M1LOB91011121314A. 2N7000: pins S G D, flat face toward the rails. No C3.+−EBCcoil leadRP2 100 kΩM2 2N3904C4 1 µFRG2 1 kΩto M1C3 on to row 16LOBE to GND7891011121314B. 2N3904 on rows 7 to 9: pins E B C, flat face toward the gap.A BS170 reads D G S and goes in like the BS270. A BC547 reads C B E and faces the rails to land like the 2N3904. C4 is not optional.M1, RG1, RP1, C1 and everything from row 14 on stay as drawn above. Rows 11 and 12 are empty in B.
Shunt stand-ins when there is only one BS270: a 2N7000 the other way round, or an NPN on rows 7 to 9 with its series capacitor.

Both panels show rows 7 to 14 only. M1 and everything to its right are exactly as in the main drawing.

These numbers come from the same ngspice runs and simple models as the rest of this tab. Treat them as a ranking, not as readings; none of the substitutes has been on the bench yet.

What the Jumperless does now

Clock. GPIO 1 still makes the LO: PWM from 22 to 300 kHz, 50 % for TUNED, narrow pulses for COMB, swept for SWEEP and SEEK. The polarity flips, because the switch now passes when the gate is high: NORMAL is LO held high, the mute is LO held low, and a COMB pulse is a short high. That is a small change to the script, listed in the handoff.

Fan-out. The crossbar replaces two long jumpers: GPIO 1 reaches the inverter's input on row 28 as well as row 19, and the inverter's output on row 27 reaches the shunt's gate resistor on row 13.

Power. The bottom + rail at 3.3 V runs the CD4049. The script only touches the top rail, and only for the squarer, so for now set it by hand at the main prompt: > dac_set(BOTTOM_RAIL, 3.3, False). The handoff asks the code session to add a setting for it.

Listening. Your powered speaker on the badge's jack is the main ear. The audio tap on row 33 feeds the level meter, SEEK and USB audio as before.

Measuring. The Jumperless can read DC levels on any row, count a logic frequency with its PIO, estimate a resistance with the DAC and current sensor, and see audio-band tones through the tap. It cannot see the 40 kHz waveform or the gate-edge spikes: its ADC samples at 48 kHz. There is one way round that, untested: with the test tone off, run the LO at 47 kHz. Whatever LO leaks to the badge output aliases to 1 kHz in a 48 kHz sampler, and a second ADC channel clipped straight to the audio lead, ahead of R2, reads it at full size. Trim C3 for the smallest reading. If a real scope is within reach, use it instead.

Bring-up and test

Each step has a pass mark. Stop at the first one that fails; the later ones depend on it.

StepDoPass
1. Inverter aloneBuild rows 21 to 28 and 51 to 58 only. Rail to 3.3 V. Drive GPIO 1 high, then lowRow 27 reads 0 V, then 3.3 V. Supply current a few µA
2. GatesAdd the two transistors and their resistors. GPIO 1 high, then lowRow 15 reads 3.3 then 0 V; row 11 the opposite. The crosspoint and 1 kΩ drop nothing you can see
3. Switches, no badgeMeasure between rows 14 and 16 with GPIO 1 high, then low. Then between row 10 and GND with GPIO 1 low, then highA few ohms plus the crossbar's own 40 to 80 Ω, against open. Judge on versus off, not the absolute reading
4. Badge onLift the 100 Ω. AGND lead first, then the coil lead to row 10, the R lead to row 18, the audio lead to row 31. Speaker volume low. NORMALThe badge sounds as it always did. If it is silent, M1 is not on: check row 15
5. MuteLO lowSilence, hum included. The bodge left the hum
6. Test toneLoop on the coil, 40 kHz, NORMALSilence
7. TUNED39 kHzA 1 kHz tone, about 60 mV at the op-amp output in simulation, a little quieter than the bodge
8. C3 trimTest tone off, LO at 47 kHz, read the alias as described aboveThe reading falls with 10, 15 or 22 pF fitted; keep the smallest. Without a scope or the alias trick, fit 15 pF and move on
9. COMB, SWEEP, SEEK, DIALAs beforeAs before. COMB pulses are now highs, so ] and [ still widen and narrow the window
10. CompareSwitch the script between the bodge rows and these rowsTwo audible differences: the mute is total, and bass no longer leaks around the chopper in TUNED

Channel B is untouched throughout and keeps feeding the jack normally, as it did with the bodge.

The knob version

This is the tunable window with nothing but parts: the switch, three CD4049 inverters as an RC oscillator, and a pot. The Jumperless makes no clock. It still routes three links, sets the rail and listens, and once those links are wires it can go. The oscillator is the one from the first tab, unchanged; in simulation the 20 kΩ pot takes it from about 24 to 100 kHz, so anything from the low 20s to about 100 kHz can be brought down to a tone.

The knob version: three inverters make LO, a fourth makes LOB, no Jumperless clockOn the badge: lift the coil end of the 100 Ωpickup coil100 mHlift100 Ω100 kΩ ‖ 100 pF−231+NJM2115to jackAAD 1G 2S 3D 1G 2S 3910BM2 BS270shuntM1 BS270seriesC11 µFC3 15 pFtrim 10 to 22RG1 1 kΩ100 kΩRG2 1 kΩ100 kΩinverter DLOBLOLOrows 19 and 28RC oscillator on inverters C, B, A: about 24 to 100 kHz in simulationXR10 2.2 kΩR9 4.7 kΩpot 20 kΩC6 680 pF765432CBALO, pin 2row 52Chip at 5 V: pin 1 VDD with 100 nF to pin 8 GND; pins 11 and 14 to GND. Both gates swing 0 to 5 V.LO reaches rows 19 and 28 through the crossbar, or through two wires once the Jumperless is gone.
Schematic of the knob version: the switch as before, four inverters of one CD4049 at 5 V, and a 20 kΩ pot as the dial.

The pot and R9 set the frequency with C6; R10 only protects inverter C's input. Inverter A buffers the loop so the gates do not load it. The same pin 2 drives RG1 directly and inverter D, whose output drives RG2.

The knob version as built: one BS270, one BC550C, pot on rows 43 to 45+−+−1789101314151618192930313335434445505916151413121110912345678CD4049UBAGND leadEBCDGScoil leadR leadRP2E to GNDM2C4RG2C3M1RP1C1RG1LOBLOLOBLOunused intest loop, 1 kΩGPIO 55 VC5R9R10C6Xpot 20 kΩ, wiper 44 to 45LO out, pin 2audio leadR2C2ADC 0Routed by the script: row 52 to rows 19 and 28, row 27 to row 13, ADC 0 to row 33, GPIO 5 to row 30. At 1 MHz, wire the first three.Bottom + rail 5 V. Row 59 is node X; row 60 is free. For the 47 pF band, M2 becomes a MOSFET on rows 10 to 12 as in the main drawing.
The knob version as built: BC550C shunt, BS270 series switch, the CD4049 oscillator, and the pot on rows 43 to 45. The Jumperless routes the clock and listens.

As built: M1 is the BS270 on rows 14 to 16, M2 is the BC550C on rows 7 to 9 behind C4, and the oscillator's 20 kΩ pot sits in the free space on rows 43 to 45, wiper on 44 joined to 45. The clock comes out of pin 2 on row 52 and reaches both gates through the crossbar. Node X is row 59; rows 10 to 12, 40 to 42 and 60 are empty.

The two transistors, close up: BC550C shunt, BS270 series switch+−78910111213141516171819203 E2 B1 CM2 BC550CE to GNDRP2 100 kΩC4 1 µFcoil leadRG2 1 kΩ1 D2 G3 SM1 BS270RP1 100 kΩC3 15 pFC1 1 µFR leadRG1 1 kΩLOBfrom row 27LOfrom row 52Thick edge = flat face. BC550C: pins 1 C, 2 B, 3 E, flat face toward the rails, so C lands on row 9 and E on row 7.BS270: pins 1 D, 2 G, 3 S, flat face toward the centre gap. An S9013 or 2N3904 (E B C) faces the gap. Rows 11 and 12 stay empty.Row 7, RP1 and RP2 go to the − rail (GND). Rows 13 and 19 are fed by the crossbar; at 1 MHz, by wires.
The two transistors as you are building them: BC550C shunt on rows 7 to 9 with C4, BS270 series switch on rows 14 to 16.

With one BS270 and the BC550C this is the switch block: the BC550C sits on rows 7 to 9 facing the rails, its collector on row 9 behind C4, and rows 11 and 12 are empty. LO on row 19 and LOB on row 13 come from pin 2 and pin 10 of the CD4049.

Change from the main drawingDetail
Clockpin 2 (row 52) feeds RG1 on row 19 and the LOB inverter's input on row 28
Supplybottom + rail at 5 V: dac_set(BOTTOM_RAIL, 5.0, False). Both gates then see 5 V, so C3 stays 15 pF and the switches turn on harder
Shuntthe BC550C on rows 7 to 9 with C4, as the close-up shows; good to about 200 kHz. For the 47 pF band it becomes a MOSFET on rows 10 to 12
Potthe oscillator's 20 kΩ pot on rows 43 to 45, wiper 44 joined to 45; rows 40 to 42 and 60 are empty
ScriptROW_GATE to an unused row, EXTRA_LINKS = ((52, 19), (52, 28), (27, 13)). TUNED, COMB, SWEEP, SEEK and DIAL do nothing; the knob is the dial
Unused inputspins 11 and 14 to GND as before. Pins 3, 5 and 7 are now in use
PartValueFromTo
wirerow 53 (pin 3)row 54 (pin 4)
wirerow 55 (pin 5)row 56 (pin 6)
R94.7 kΩrow 56 (pin 6)row 43, the pot's far end
pot20 kΩrows 43, 44, 45wire from row 44 (wiper) to row 45
wirerow 45row 59, node X
C6680 pF, C0G or film (150 pF and 47 pF for the upper bands)row 54 (pin 4)row 59
R102.2 kΩ (22 kΩ is fine below 100 kHz; see Going to 1 MHz)row 57 (pin 7)row 59
C5100 nFrow 51 (pin 1)row 50, and row 50 to the − rail
wirerow 51 (pin 1)bottom + rail, 5 V
wirerow 58 (pin 8)− rail

Bring-up. Do steps 1 to 7 above with the GPIO clock first, so the switch is known good. Then add the oscillator rows, raise the rail to 5 V and check row 52 before linking it to anything: a 5 V square wave that the pot moves over roughly 24 to 100 kHz. The script's frequency counter, the one TRACK uses, can read it if ROW_SQUARE is pointed at row 52; that use of it is untested. Then swap the clock, ROW_GATE to an unused row and the three links in EXTRA_LINKS, and step 7's tone should come back at the same frequency and follow the pot. Step 8, the C3 trim, cannot use the 47 kHz alias trick here, since the clock is not the script's; fit 15 pF, or trim with a scope.

TRACK instead of a knob. The squarer is the other way to set the frequency, and it needs the Jumperless clock, so it belongs with the main drawing, not this one. The two are alternatives: TRACK exists to replace the knob. Its two inverters, pins 3 to 2 and 5 to 4, go where the first tab's squarer drawing puts them, rows 47 to 55, and share the chip with the LOB inverter at 5 V. That changes three things. C3 comes down to about 10 pF, because LOB then swings 5 V while LO swings 3.3 V. The 3.3 V GPIO into pin 9 is below the CD4049's guaranteed 3.5 V input high at 5 V; typical parts switch near 2.5 V and step 1 shows whether yours does, and a 74HCU04 run from 3.3 V removes the question. And the squarer hears the chopper's own clock, which is the hunting the first tab warns about, so the script should count with the LO parked high for a few milliseconds at a time. That last item is a script change for the code session, and untested.

Going to 1 MHz

The window can go to 1 MHz. Three things change, and one of them is the shunt.

What does not change: the mixing and the amplifier. The coil works into a low impedance, so its current is the same for the same field at any frequency, the switch chops current, and the amplifier only ever sees the 1 kHz difference. In simulation the same field gives the same tone at 40 kHz, 200 kHz and 1 MHz: 60, 61 and 62 mV with an ideal switch. (This run also connected the coil's 30 pF self-capacitance, which the earlier decks had left floating; it changes nothing below 100 kHz.)

The oscillator reaches 1 MHz once R10 drops. 22 kΩ against the chip's 15 pF input capacitance was the limit, not C6. With R10 = 2.2 kΩ, R9 = 4.7 kΩ and the 20 kΩ pot, three values of C6 cover the range:

C6Pot at 20 kΩPot at 0
680 pF28 kHz123 kHz
150 pF111 kHz459 kHz
47 pF277 kHz1.06 MHz

Simulated at 5 V. The top of each band is set by the inverter delays as much as by RC, so expect 30 % spread between chips there. C0G or film for C6; 820 pF or 1 nF pulls the bottom band down to roughly 23 or 19 kHz (scaled, not simulated). Node X swings about 2 V past both rails; R10 at 2.2 kΩ keeps the protection-diode current near half a milliamp.

The gate drive just about keeps up. The CD4049 sources about a milliamp and a BS270 gate takes about a nanocoulomb, so at 1 MHz the rising gate edge is a good fraction of the 500 ns half-cycle. In simulation it still works: 66 mV of tone with RG at 1 kΩ, 69 mV with RG at 100 Ω plus 1 kΩ pull-ups from pins 2 and 10 to 5 V. The cost is headroom. The 1 MHz leak and the charge each edge injects swing the output about ±0.3 V, inaudible but a third of what the amplifier has; a 74HC4066 in place of the two MOSFETs brings that to ±0.09 V. Fit the pull-ups; RG can stay 1 kΩ.

The shunt is where the NPN stops. The BC550C as the shunt is fine to 200 kHz (55 mV), half gone at 500 kHz (27 mV) and dead at 1 MHz (8 mV). That is storage time, not drive: less base current does not help, and in simulation neither does a speed-up capacitor. For the 47 pF band the shunt has to be a MOSFET (a second BS270, a 2N7000, a BS170), a 74HC4066, or a real switching NPN such as a 2N2369 or PN2369 (56 mV at 1 MHz). So: build with the BC550C and use the 680 pF and 150 pF bands; when the 47 pF band goes in, change the shunt too.

1 MHz field, same field as the 40 kHz runs1 kHz toneOutput swing
Ideal switch, reference62 mV±0.08 V
Two BS270s, CD4049 drive, RG 1 kΩ66 mV−0.30 to +0.33 V
Two BS270s, RG 100 Ω, 1 kΩ pull-ups69 mV−0.24 to +0.42 V
74HC4066, CD4049 drive64 mV±0.09 V
BC550C shunt, BS270 series8 mVfails
2N2369 shunt, BS270 series56 mV−0.47 to +0.39 V
BC550C shunt at 200 kHz55 mV±0.5 V
BC550C shunt at 500 kHz27 mV±0.5 V

Settled values, read from 10 to 14 ms of each run; the first few milliseconds drift while the injected charge finds its level on C1.

On the bench at 1 MHz. Use wires, not the crossbar, from row 52 to rows 19 and 28: a 5 V square wave at 1 MHz through two crosspoints is untested. The test loop needs the script's GPIO 5 PWM at 1 MHz, which the RP2350 can make; check the script's upper limit. The Jumperless can count row 52 but cannot see any waveform here, so a scope is the tool for the gate edges and the C3 trim. Everything in this section is simulation. The coil above its self-resonance (about 90 kHz for 100 mH with 30 pF) is modelled and is fine in current mode; ferrite loss at 1 MHz is not modelled, and it is the thing most likely to cost sensitivity.

The simplest version: one CD4053

The CD4053 in the new kit is a triple SPDT analog switch, and one of its three switches is the whole chopper. The common pin is node A, the Y throw goes to the amplifier through C1, the X throw goes to ground, and the select pin is LO: select high connects the common to Y. That is the series switch, the shunt, the inverter and break-before-make in one package, with no gate resistors, no pull-downs, no C3, no C4, and nothing to orient. The oscillator stays exactly as built; only inverter D goes idle.

The CD4053 version: one SPDT switch, chopped by the same oscillatorOn the badge: lift the coil end of the 100 Ωpickup coil100 mHlift100 Ω100 kΩ ‖ 100 pF−231+NJM2115to jackAABCD4053, switch A14Y 13X 1211, selectC11 µFLO, row 7select high: to Y (amp); low: to X (GND)RC oscillator on inverters C, B, A: 28 to 123 kHz with 680 pF, other bands in the textXR10 2.2 kΩR9 4.7 kΩpot 20 kΩC6 680 pF765432CBALO, pin 2row 52CD4053 at 5 V: pin 16 VDD with 100 nF; INH (6), VEE (7), VSS (8) to GND. For 1 MHz, VEE at −5 V from DAC 0.CD4049: inverter D is unused now, so pin 9 goes to GND with pins 11 and 14. LO reaches row 7 by the crossbar, or one wire.
Schematic of the CD4053 version: switch A of the CD4053 is the whole chopper; the oscillator is the one already built.

What the datasheet costs: 470 Ω on-resistance at 5 V (1050 max) and about 450 ns to switch. The resistance does not matter here. The coil is a current source and the switch chops current, so in simulation the tone is 60 mV at 40 kHz and at 200 kHz, the same as the MOSFETs, with a quarter of their leak at the output. The switching time does matter: at 5 V, about 300 kHz is the comfortable top. For the 47 pF band, feed VEE (pin 7) from DAC 0 at −5 V instead of ground. The chip then runs on its 10 V figures, 180 Ω and 160 ns, and the simulation gives 66 mV at 1 MHz; the select input is still 0 to 5 V logic, so pin 2 of the CD4049 drives it as before.

The CD4053 version: one chip does series, shunt and the inversion+−+−110122930404142434445505916151413121110912345678CD4049UB16151413121110912345678CD4053BE, rows 2 to 9 and 32 to 39coil leadR leadAGND leadC7C1LO5 VXB, Cunused in: 14, 11, 9test loop, 1 kΩGPIO 5INH, VEE, VSS to GND5 VC5R9R10C6Xpot 20 kΩ, wiper 44 to 45LO out, pin 2audio leadR2C2ADC 0Routed by the script: row 52 to row 7 (select A), ADC 0 to row 41, GPIO 5 to row 30. Both + rails at 5 V. At 1 MHz, wire 52 to 7.Select high joins the common (14) to Y (13), the amplifier; low joins it to X (12), GND. For 1 MHz, DAC 0 at −5 V on row 38 instead of GND.
Board for the CD4053 version: the CD4053 on rows 2 to 9 and 32 to 39 replaces rows 7 to 19; the audio tap moves to rows 40 to 42; pot and oscillator stay.
PartFromTo
CD4053BE, notch left, pin 1 on row 32rows 2 to 9 (pins 16 to 9)rows 32 to 39 (pins 1 to 8)
coil leadbadgerow 4 (pin 14, common A)
C1 1 µFrow 5 (pin 13, AY)row 10
R leadbadgerow 10
wirerow 6 (pin 12, AX)− rail
row 7 (pin 11, select A)from row 52crossbar, or one wire
wiresrows 3, 8, 9 (common B, selects B and C)− rail
wirerow 2 (pin 16, VDD)top + rail, 5 V
C7 100 nFrow 2row 1, and row 1 to the − rail
wiresrows 35, 37, 38, 39 (common C, INH, VEE, VSS)− rail; row 38 to DAC 0 at −5 V for the 47 pF band
CD4049 pin 9row 28− rail, since inverter D is unused
audio taprows 40, 41, 42audio lead to row 40; R2 40 to 41; C2 41 to 42; 42 to the − rail
AGND leadbadge− rail

Rows 7 to 19, the transistor switch, come out. The pot, the oscillator, the test loop and the CD4049 do not move.

Script: EXTRA_LINKS = ((52, 7),), ROW_AUDIO = 41, ROW_GATE parked, both + rails at 5 V (RAIL for the bottom one, dac_set(TOP_RAIL, 5.0, False) for the top). For the GPIO-clock proof, run both rails at 3.3 V first: the select wants 3.5 V on a 5 V supply, and a 3.3 V GPIO is a clean high on a 3.3 V supply. For the −5 V trick, dac_set(DAC0, -5.0) then connect(DAC0, 38), with row 38's ground wire removed.

The rest of the new kit, in one line each:

Other switches

If a drawer turns up one of these, it replaces the two BS270s. The circuit is the same; only the pins change.

PartWhat changesNote
74HC4066Nothing: the production part. One switch in series, one as the shunt, from the same two drivesAbout 30 Ω on at 5 V, 50 Ω at 3.3 V. Lower gate charge than a BS270, so C3 shrinks or goes
74HC4053, 74HC4052One SPDT does series and shunt together, break-before-make, so the inverter and RG2 goAbout 50 Ω at 5 V. Run it from 5 V and divide the GPIO drive, or accept 3.3 V and a higher on-resistance
DG419, DG411 family, ADG419SPDT or quad SPST, 10 to 25 Ω, sub-microsecond, built for exactly thisMost want ±5 V or more. Check the supply pins
2N7002, BSS138 on an adapterDrop-in for the BS270Similar gate charge; no gain over the BS270
2N7000, BS170Drop-in for the BS270. A BS170 reads D G S like it; a 2N7000 reads S G D and goes in the other way roundThreshold up to 3 V, so only 0.3 V of overdrive from 3.3 V. In simulation the worst-case part still works in either position, because the coil current is microamps. If the mute is weak, that is why
CD4053, CD4066, CD4016The CD4053 is the simplest build of all; see its section above470 Ω on at 5 V, harmless in current mode. 450 ns switching caps it near 300 kHz at 5 V; −5 V on VEE lifts that
ET7460HNo15 µs turn-on

A second pair of BS270s and one more CD4049 inverter put the same switch on channel B.

Sources