Go Down

Topic: NJM2521 audio switch help (Read 4955 times) previous topic - next topic


hey guys

i want to use this IC to switch a line level audio signal on/off, before it goes into a more powerful LM1876 amp :: http://semicon.njr.co.jp/eng/PDF/NJM2521_E.pdf

could anyone help me draw a simple schematic where the arduino digital pins do the switching? im worried about current draw, and don't really understand the test circuit demonstrated in the datasheet...

thank you!


Connect pins 2 and 4 to your arduino pins.
Page 2, look at the truth table (input control signal-output signal).

Pin 1, 3, and 5 are your analog inputs, use 10uf capacitor for signal coupling.


thanks for the reply!

i would be using pin 4 only for a stereo signal, right? mono signal and i would use pin one and pin 8 for ground?

like so:

(PCB is mirrored for printing)


This type of chip is usually used for "input selection"... AM/FM/TAPE/PHONO, that kind of thing. 

Maybe I'm missing something but why do you need to switch the signal lines on/off going to your amp? 
If you only have one source, why don't you just connect your signal lines directly and put an on/off power switch to your amp.


Jan 14, 2013, 07:55 pm Last Edit: Jan 14, 2013, 08:40 pm by dataplex Reason: 1
because this PCB is a part of a musical instrument, where each channel is one note, controlled by a keyboard. there will be 12 stereo amp chips, giving me 24 notes to play with.

thats why i need to be able to turn the channels on/off very rapidly, through a digital interface (the arduino)!

updated pcb with ground fill ::


It is fairly simple to understand the chip: it has 2 "logic" inputs to determine which one of the 3 "analog" inputs will be connected to the output.

It even has a truth table there for you.


Has anyone actually played with this chip?
Seems like there would be a pop/click each time it turns on or off if there's signal present.

Also, no issues with it switching negative signal?


I haven't looked at the data sheet, but most logic-controlled audio switches use a single supply, hence the need for decoupling caps, so yes there could be some noise associated with the DC offset switching.  It depends, and there's often text in the app notes detailing how to deal with this.

Most of these ICs use zero-crossing detection to avoid pops from the audio signal itself.  But again, this is a quick reply and I haven't read the data sheet to verify.

That said, I can't help but feel there has to be a better approach than this.  OP:  Would you be willing to detail more on the implementation of your instrument?


I saw nothing in the datasheet saying more, which is why I asked for real world feedback.

I see rail to rail audio switches, but the form factor is so hard these days. *Tiny* chips.


Yep.  Go SMD or go home.  I've noticed that.  I've already put together a $200 order of stock parts from Digikey to get started.


I work in SMT every day..

These are *tiny* UCSP packages - 9 pins in a 3mm x 3mm package.


A CD4016//66 is a 4 section N.O analog switch capable of switching any analog voltage. 0 to 5 or
+/- 12 V audio to low RF (even low power DC) signals and is 5 V logic level control. I have used them for MML (Mickey Mouse Logic) low audio and even to switch crystals in an old transceiver I owned once.
It's really a nice chip for those 'unusual' places where nothing will quite fit.
There are also 2, 4 and 8 position switches but for a mulltivoiced keyboard the quad spst N.O. are ideal.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


4066 will click when switching audio. Ok for a quick switchover, but not good for something like a musical instrument.


Jan 17, 2013, 11:53 pm Last Edit: Jan 17, 2013, 11:59 pm by dataplex Reason: 1
to clarify what kind of instrument this is:

the switch is a part of a musical instrument, where each channel is one note, controlled by a keyboard.

there will be 12 stereo LM1876 amp chips, giving me 24 notes to play with. the outputs of the amp chips dont go to speakers, but rather they go to 24 coils that drive steel strings through magnetic actuation. (its a harp)

the solenoids drive the 24 harp strings by a feedback loop (the input is a piezo pickup, on the bridge - through a preamp)

i have made a similar instrument before, seen here :: ulfurhansson.com.

thats why i need to be able to turn the channels on/off very rapidly, through a digital interface (the arduino)!

so, clicks and pops are fine - they actually could help the strings to start vibrating.

i got the chips from fedex today - for some reason this setup is NOT WORKING

any thoughts on what i might be doing wrong?

here is the datasheet : http://semicon.njr.co.jp/eng/PDF/NJM2521_E.pdf


Jan 18, 2013, 04:23 am Last Edit: Jan 18, 2013, 04:30 am by db2db Reason: 1
Is that a speaker hooked to 7 and 8 or a solenoid? Either way is troublesome because of the level of signal..

Is sw1 seeing 5v and sw2 low?

Go Up