Pages: [1]   Go Down
Author Topic: NJM2521 audio switch help  (Read 1480 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
ulfur
Logged

-------http://ulfurhansson.com/

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

-------http://ulfurhansson.com/

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ::
« Last Edit: January 14, 2013, 02:40:30 pm by dataplex » Logged

-------http://ulfurhansson.com/

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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.
Logged

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I work in SMT every day..

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

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Bob
Logged

--> 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

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 17, 2013, 05:59:30 pm by dataplex » Logged

-------http://ulfurhansson.com/

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: January 17, 2013, 10:30:20 pm by db2db » Logged

Pages: [1]   Go Up
Jump to: