1
\$\begingroup\$

I am using a sound board from Adafruit (this one) to play a small sound file.

What I would like to do is to close a transistor while the sound is playing, which will then close the circuit on a few LEDs. This will cause the LEDs to light while the sound is playing, and then turn off.

After finally finding the pin-out explanation there, I see that it has an ACT[ivity] pin which signals when audio is playing. While the board is on, the pin normally sits at roughly 3.35V, and then when the sound plays, the voltage drops by around 2 - 2.5 V. I see no change in amperage across the pin while the sound is playing.

As I understand it though, transistors switch when a positive voltage is applied to the base/gate. So I'm not sure what to do here. Is there a way to switch the transistor in such a way that when the ACT pin is sitting at 3.35V the transistor is open, and then closes when the applied voltage drops?

I tried to google on this, but all the articles and pages coming up have to do with the voltage drop across the transistor, nothing about switching the transistor based upon a voltage drop.

Below is the segment of my circuit I am trying to figure out at this point...

schematic

simulate this circuit – Schematic created using CircuitLab

Originally, I was planning on using the second speaker output on the board to switch my transistor, but that seems to have a constant voltage and amperage whether it's playing or not. Then I found the board's pin-out and the ACT pin, so I'm trying to make this work off of that now.

\$\endgroup\$
9
  • 2
    \$\begingroup\$ You'll want to look up the difference between NMOS and PMOS FETs and enchancement and depletion mode FETs. \$\endgroup\$
    – jramsay42
    Commented Feb 28, 2018 at 4:35
  • \$\begingroup\$ @jramsay42 that would be a PNP transistor? So far the handful I've been experimenting with are all NPN. For this usage, I should switch to a PNP? PNP transistors also, need to go up-stream from my LEDs, correct? \$\endgroup\$
    – eidylon
    Commented Feb 28, 2018 at 4:40
  • \$\begingroup\$ I'm not sure exactly what you are doing without seeing a schematic but yes a PNP BJT will turn on if you bring the base below the emitter. I mentioned FETs rather than BJTs just because they are more common in switching applications. \$\endgroup\$
    – jramsay42
    Commented Feb 28, 2018 at 4:47
  • 2
    \$\begingroup\$ Have a look at electronicshub.org/transistor-as-switch - there is a PNP used as a switch \$\endgroup\$ Commented Feb 28, 2018 at 4:47
  • 1
    \$\begingroup\$ PNP would work in that circuit to turn on at low voltage. at 3.3V on the base the emitter would be high enough to keep the LEDs dark. \$\endgroup\$ Commented Feb 28, 2018 at 10:49

2 Answers 2

1
\$\begingroup\$

So this turned out to be a LOT easier than I was making it. I did not need the transistor at all.

All I actually had to do was run the LEDs from voltage, to the ACTivity pin on the soundboard, and it did exactly what I wanted it to do.

\$\endgroup\$
0
\$\begingroup\$

"the second speaker output on the board to switch my transistor, but that seems to have a constant voltage and amperage whether it's playing or not."

Add a DC block, i.e. a capacitor in series with the output. It might be enough, but if you want to be sure, just connect some high enough resistor from the outside of the cap to the ground. This way if no music is playing you get 0V. If music is playing you will get the amplitude. As long as the amplitude is high enough, i..e higher than the threshold voltage of the transistor, the LEDs will shine. You can add a comparator between the cap and the transistor, which would allow you to tweak the point where the transistor starts to conduct. It has the another advantage that the switch - transistor in this case - will be driven with the "correct" binary voltages (on/off).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.