2
\$\begingroup\$

I am trying to build a more complex circuit but am having trouble starting off. I am using tone() to generate a frequency on my 5V Arduino Nano on D3. If I measure the frequency directly at D3 to GND, I measure a consistent 123.15hz which is what I'm looking for. Now, If I use an NPN transistor(I have tried a S8050 and BC337) the frequency jumps between 107hz and 123hz when I measure at the emitter. I am using a 1k ohm resistor in between D3 and the base of the NPN.

Any suggestions would be greatly appreciated.

Thank you.

?Basic NPN Diagram

\$\endgroup\$
2
\$\begingroup\$
  • 1st، as others have pointed out this problem, you have to change your wiring, connect the +5v wire to the collector (left side pin of the transistor in the schematic) & connect GND wire to the emitter (right side pin of the transistor)

  • 2nd, in this schematic, you are measuring the current of transistor's output, not it's voltage. Remove the measuring instrument, replace it by a resistor as your load, then connect the measuring instrument to the load resistor in parallel (connect measuring instrument to both pins of the load resistor).

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Thank you for your response. I understand I had the emitter and collector backwards. I have made the changes you suggested. I see the flaw in my drawing and testing method. I now have a steady frequency. \$\endgroup\$ – user3255843 May 8 at 2:13
  • 1
    \$\begingroup\$ Best of luck user3255843 \$\endgroup\$ – Hamid 'Smith' Salehi May 8 at 2:19
3
\$\begingroup\$

Your transistor seems to be connected backwards. What is that thing connected between the emitter and 5V, is that your measuring instrument? There needs to be a load between transistor and the power supply poles. Your set up just seems to be wrong.

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

Your NPN is reversed. The right way is collector on positive side and emitter negative. You also missed the loading resistor - usually its connected in collector side.

\$\endgroup\$
3
\$\begingroup\$

This was the correct way to wire and check the frequency.

Working Version

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I want an LCD with that font. \$\endgroup\$ – user_1818839 May 8 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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