Learning how to calculate values for circuit components

Thread Starter

Scott Johnson

Joined Jan 11, 2019
6
During my teenage years I spent a lot of time building circuits off of diagrams. These diagrams already had the part numbers of the resistors, transistors, or other parts that I needed to build them. So this is new territory for me but I've always loved electronics....

Now that I'm an entrepreneur and breaking off into consumer products (I'm a developer and system's/network engineer).

Attached is a circuit diagram I want to build and experiment with.

I know R1, R2, and R3 are 10k ohm resistors based on the original author's notes.

I'm looking at this page to try calculating out the values to select a transistor:
https://electronicsclub.info/transistorcircuits.htm

It looks like the type of transistor I need is a NPN

I know the circuit is 12v and the current is 1.0 amps.

However, neither lc(max) or hfe(min) are in digikey when I look at transistors so I'm not sure how that's related...?

I also don't know how to calculate what I need for LEDs or the piezo buzzer voltage wise. How would I figure that out?

Thanks a ton for helping me learn.
 

Attachments

Alec_t

Joined Sep 17, 2013
14,313
Welcome to AAC!
In that circuit all of the transistors are indeed NPN.
All are being used as simple switches, so a rule of thumb is to assume each requires a base current 1/10 of its collector current (i.e assume hfe = 10).
Given those values of R1,2,3, even if you assume the piezo buzzer and the LEDs have negligible resistance the collector currents through Q1, Q2 and Q3 will be very small. BR-549 has given you a clue in the above post. Accordingly, almost any small signal NPN transistor will suit. You don't need to get bogged down in checking Ic(max) and hfe(min) values.
 

Thread Starter

Scott Johnson

Joined Jan 11, 2019
6
That would be ohm's law right? I = V/R ?

So 12/10,000 which is .0012

So that would be 1.2mA?

But I'm not sure how that applies to the LED or piezo...? Current isn't one of the items that Piezos are sold by (at least in digikey)

So what you are saying, a standard 2n2222 npn transistor would work...
 

BR-549

Joined Sep 22, 2013
4,928
Right.....that tells you that only 1.2 ma can flow. Procure the data sheets for LED1 and 2. And for the buzzer.

From those sheets.....can you decern the current needed for the units to function? The LEDs are current devices and are current rated. So the proper resistance value will set that current. Personally, I think LEDs are too bright as status indicators. So I would run them at a lower current than recommended....but that's just me.

The buzzer on the other hand might be voltage rated, with a certain current. A resistor might not be needed. But some buzzers can draw more current than others and might need a heavier transistor. Study sheet.

Does that get you started? You also need to study data sheet of IC outputs.
 

Thread Starter

Scott Johnson

Joined Jan 11, 2019
6
I'm with you on LED brightness...

It seems one of the mindset changes I'm going to have to make is with programming everything needs to be exact. It seems electronics is more of an "art" when you don't necessarily need volts = x or current = x. That's going to be hard for me....

So for the LED's, I'll want to find ones that are under 1.2mA; not necessarily at 1.2mA?
 

Thread Starter

Scott Johnson

Joined Jan 11, 2019
6
Oh wait, that would be over 1.2mA...

I made my own circuit boards and assembled the circuits to do things using schematics as a teenager (30+ years ago). But my profession has been programming. But with all the Arduino stuff out there I want to play with electronics again because there are so many cool things to try.
 

MrChips

Joined Oct 2, 2009
30,806
Electronics is an art as well as science, as well as engineering.
Electronics is heavily dependent on a working knowledge of mathematics.
In programming, you say that everything needs to be exact.
In electronics, you can use the math to give you exact values. However, electronics have tolerances. From experience, you will learn where to apply those tolerances and how much tolerance to apply, i.e. how much leeway you are allowed for the circuit to still function the way you want it to function.

Take a 9V battery.
You want 20mA flowing through and LED.
R = V/I = 9V / 20mA = 450Ω

You don't have a 450Ω resistor, but you do have a 470Ω resistor. Apply that to the math. How does that affect the current?

What happens if you increase the resistor to 1kΩ?
How does the current change?
How does this affect the brightness of the LED?

(I have not included the voltage across the LED in order to keep this exercise simple.)
 

BR-549

Joined Sep 22, 2013
4,928
Ok....well......LEDs work with current. They are current controlled. So we match the current to the LED. Not the LED to current.

You need the data sheet to the LEDs you have. Then you will give it the right current. You will do that by adjusting the resistor to the right value.

Are you with me so far?
 

dl324

Joined Mar 30, 2015
16,918
There's a problem with the schematic you posted:
upload_2019-1-11_13-1-51.png
There are no current limiting resistors on the base of the transistors. If that device has some internal current limiting, it should be mentioned on the schematic.
I also don't know how to calculate what I need for LEDs or the piezo buzzer voltage wise. How would I figure that out?
When using transistors as switches, the rule of thumb in the US is to have base current be 1/10th of the collector current. Then it's just arithmetic.

If you wanted a current of 10mA in LED2, the equation is:
\( \small R = \frac{V}{I} = \frac{12V-V_{LED2}-V_{CE_{SAT}}}{10mA}= \frac{12V-2V-0.1V}{10mA}=\frac{9.9V}{10mA}= 990 \Omega

R_B = \frac{V_{status2}-0.7V}{1mA} \)
 

dl324

Joined Mar 30, 2015
16,918
If A is current and B is the LED, A = B as well as B = A. I don't see a difference.
It would be helpful if you quoted the post you're replying to. I don't see an "A" or "B" referenced anywhere.

The units of A would be mA (or amps), but what is B? If it's not the current in an LED, then A can't equal B.
 

dl324

Joined Mar 30, 2015
16,918
Sorry, not used to this board software... I was referring to BR-549: "So we match the current to the LED. Not the LED to current."
  1. When you use the reply button for a post, the post is automatically quoted.
  2. If you only want to quote a (one) portion of the post, you highlight the portion and click the reply option that pops up.
  3. If you want to quote multiple sections in the same post, then select the +Quote option that pops up after you make a selection.
  4. If you want to quote sections of multiple posts, it's the same process as #3.
  5. If you use the quoting options in 3 or 4, you click on the Insert Quotes button under the text entry box.
 

Wendy

Joined Mar 24, 2008
23,421
Hi Scott,

Welcome to AAC. I am on of the bored folks helping beginners around here. If you ever want my help just type @Wendy and I will be flagged to read your post. If you under power an LED it will still light well enough and just last longer (always a good thing) I am a firm believer in building prototypes, I have occasionally branded a part number into my finger tip, that method of learning tend to stick with you. I started much the same way as you, then turned it into a career for over 40 years.

Wendy's Index
LEDs, 555s, Flashers, and Light Chasers

Be very careful not to advertise a commercial product here as spamming is not allowed and an automatic ban. Most of the folks here love talking shop, so if you are here to learn you have come to the right place.
 

DickCappels

Joined Aug 21, 2008
10,175
(some text removed for clarity) There's a problem with the schematic you posted:
There are no current limiting resistors on the base of the transistors. If that device has some internal current limiting, it should be mentioned on the schematic.
When using transistors as switches, the rule of thumb in the US is to have base current be 1/10th of the collector current. Then it's just arithmetic.
There are two reasons you might not need a resistor to limit base current:
1) Some transistors have built-in base resistors. If the manufacturer of the chip (did not say so then it is safe to assume you don't need those base resistors.

2) This one is more likely -the output of the chip can connect directly to the bases of the transistors because the output of the chip is current limited internally.

If you have the datasheet for the you should be able to tell with little doubt.

In about 1986 the fist time I saw a circuit that did not include current limiting for the transistor's base (it was the output of TTL) I nearly jumped down the engineer's throat until he calmly explained the internal resistor. Live and learn.

One other thing that might not be clear but is ok to repeat if it has already been explained is that the transistors in the kind circuit that drive LEDs and Buzzer the drive circuit are are used as "saturated switches" as such they are "on" in the sense that there is very little voltage, typically a couple hundred millivolts, across the emitter and collector -that is to say that enough current flows through the transistor to make iit look like an almost short circuit.

As noted, to assure that the transistor is operating in this mode the usual method is to make sure the base current is 10x (approximately) the collector current. This works with most small signal transistors.

We can talk about calculating base current after you get a chance to look at the datasheet to determine whether it is necessary.
 

dl324

Joined Mar 30, 2015
16,918
In about 1986 the fist time I saw a circuit that did not include current limiting for the transistor's base (it was the output of TTL) I nearly jumped down the engineer's throat until he calmly explained the internal resistor.
He could have avoided any confusion by simply putting a notation on the schematic. That's what I'd do.
 
Top