Announcement

Collapse
No announcement yet.

Simple sound to LED circuit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple sound to LED circuit

    Hi all interested,

    I have built a small device to activate an LED strip depending on the amplitude of sound in a certain frequency range. It's inspired by various online schematics for color organs and similar circuits, but sort of hacked together...It looks like this, and it works fine on 9V:

    Click image for larger version

Name:	Screenshot from 2020-02-20 13-20-04.png
Views:	1
Size:	46.3 KB
ID:	876341

    So i basically just mix the L and R signal from a line-out of my mixer and then amplify it with a N3904 transistor. That is used at the base of the second transistor, a PNP BD810G rated for enough current/dissipation, to control the LED strip. I made R6 variable so that I can control the frequency of the low pass filter formed together with C2. That way one can "tune" on which frequencies the strip should light up.

    It works well on 9V, which I used to test the circuit. However, now I want to run it on a 12V supply. It doesn't work with 12 V, the problem is that the LEDs stay always on. Can someone point me in the right direction as to which calculations I need to perform, in order to adjust this circuit to work with 12V?

    My suspicion is that somehow my voltage difference between base and emitter on the PNP transistor is not in the right zone so that the circuit can't turn off the LEDs even when there is no audio signal.

    Or, could it be a problem that I am getting some kind of noise from the 12V Power supply opposed to a 9V battery? So the circuit is actually functioning correctly, but it's so noisy that the noise becomes overwhelming in the audio signal? Maybe I need to add some kind of filter in the beginning of the circuit when not using a clean battery supply?

    Thanks for any hints or ideas.
    Last edited by j-stylez; 02-20-2020, 09:17 PM.

  • #2
    Increase R4 to 22k or so.
    Experience is something you get, just after you really needed it.

    Comment


    • #3
      Doesn't D1 clamp R4 voltage to 0.7v?

      Comment


      • #4
        Originally posted by Mick Bailey View Post
        Doesn't D1 clamp R4 voltage to 0.7v?
        Yes, but that is the problem. At the higher supply voltage the current thru R4 is higher and therefore the drop across the diode increases. That causes Q1 to start to turn on. Increase R4, lower the drop, and it should be back to working.
        Experience is something you get, just after you really needed it.

        Comment


        • #5
          How much do you figure the drop changes? at 9v, we see 0.9ma through the diode, at 12v we see 1.2ma. SO would 0.3ma change the drop voltage that much? Not to mention the 10k base resistor in series with that difference to the transistor.
          Education is what you're left with after you have forgotten what you have learned.

          Comment


          • #6
            Originally posted by Enzo View Post
            How much do you figure the drop changes? at 9v, we see 0.9ma through the diode, at 12v we see 1.2ma. SO would 0.3ma change the drop voltage that much? Not to mention the 10k base resistor in series with that difference to the transistor.

            Enough! Let the OP try it and report back.
            Experience is something you get, just after you really needed it.

            Comment


            • #7
              Thanks for the feedback! I tried higher values of R4, but it still only runs on 9V. I also tried it without the diode, then it still works with 9V, but also not on 12V.

              I thought my voltage out of Q1 is not high enough in idle / when there is no Audio Signal, so the voltage at the base of Q2 is not close enough to the emitter of Q2 to open the switch.

              Comment


              • #8
                Clarification: without the led it is still responsive on 9v,but does not work as intended, as it does not go dark when the Sound Signal is low. I think without the diode it's the other way around.

                Proper function on 9V battery:
                https://youtu.be/OfgiFzY_C54

                Not working on 12V means the lights just stay on constantly and only a slightest flicker is noticeable at high Amplitude sounds.
                Last edited by j-stylez; 02-20-2020, 09:15 PM.

                Comment


                • #9
                  The R4/diode/Q1 is basically a crude current mirror. That is the current through R4 is mirrored to the collector of Q1. The current is not mirrored exactly due to the presence of R3 and the fact that the diode is not matched to Q1. R3 is there to stop the diode from loading the input.

                  So, at 9V the current through R4 will be (9-0.7)/10 = 0.83mA. That makes the drop across R5 roughly 0.65V. It's a far from perfect mirror so real life will be different. Note the divider of R6 and R7 load R5. The voltage on the base emitter junction will be about 0.4V so Q2 will be off.

                  At 12V everything will be roughly 12/9 bigger i.e Q2 will see about 0.55V that's close to turning on. Given the imperfection of the mirror it's no surprise to see that it is on. If you change R4 to 22K that voltage will be about half and Q2 will not be on ( in theory).

                  So, that is not happening for you. There's another anomaly and that is with the diode removed Q2 should be hard on so and so a very bright LED with no signal. Something is apparently amiss with your circuit.

                  So set R4 to 10k, supply to 12V, and with no signal measure and report the base-emitter voltage of Q1 and Q2. Repeat with R4 at 22K

                  Are you are sure you changed R4 and not R3?
                  Experience is something you get, just after you really needed it.

                  Comment


                  • #10
                    At 12 V, I read the following base-emitter voltages at Q1 and Q2:

                    Q1:
                    R4 = 10k: 0.65 V
                    R4 = 22k: 0.65 V

                    Q2:
                    R4 = 10k: 2.13 V
                    R4 = 22k: 0.93 V

                    Measured without any input signal.
                    Last edited by j-stylez; 02-21-2020, 06:50 AM.

                    Comment


                    • #11
                      The measurements are wrong. You'll never get more than 0.7V across the BE junction.

                      Try 33k or even 47K.
                      Experience is something you get, just after you really needed it.

                      Comment


                      • #12
                        Ok, I will remeasure. I built the thing so tiny, it's a bit tricky to get the probes in. I tried it with 33k and 56k already, but that also didnt achieve an improvement.

                        Comment


                        • #13
                          I correct the measurements:
                          Q1:
                          R4 = 10k: 0.65 V
                          R4 = 22k: 0.65 V
                          R4 = 33k: 0.66 V

                          Q2:
                          R4 = 10k: 0.62 V
                          R4 = 22k: 0.61 V
                          R4 = 33k: 0.61 V

                          ----- EDIT ------

                          Oh god...I found the error. I had the leads of the Q1 transistor reversed. Emitter and collector were reversed! Now it works on 12 V like a charm.

                          I thank you all for your help and I'm sorry for being so stupid... I guess what threw me off and stopped me from finding this error sooner, is that it just worked on 9V.
                          Last edited by j-stylez; 02-21-2020, 11:16 AM.

                          Comment


                          • #14
                            Welcome to a the hall of fame of people who once made a mistake i.e everyone.

                            Glad you figured it out.
                            Experience is something you get, just after you really needed it.

                            Comment

                            Working...
                            X