Sanity check on using a transistor as a switch...

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
It may be a niggling point but the "ground" for the µC can be different than the motor ground, and that's a benefit of the opto, but it MUST be shared by the left-hand side of the opto so that the opto's LED can light.
So I understand, it's okay to have one common ground for all?
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
How did you come up with 56 ohms? That seems low to me. Beyond that, I'd agree that you're ready to roll.
Vf for the TPC817 is 1.2V
Vf for the 1N4148 is 1.0V
The I, according to the datasheet was 50ma.

And according to the formula from the previous post, I came up with 56Ohms.

Did I get it wrong? I told you guys that in my world, 1 + 1 = 10 lol
 

ebeowulf17

Joined Aug 12, 2014
3,307
Vf for the TPC817 is 1.2V
Vf for the 1N4148 is 1.0V
The I, according to the datasheet was 50ma.

And according to the formula from the previous post, I came up with 56Ohms.

Did I get it wrong? I told you guys that in my world, 1 + 1 = 10 lol
Ah, I see. The 50mA spec is from the "Absolute Maximum" section. These are numbers you never, ever want to reach. If any of these numbers are reached, the component may fail and the manufacturer will blame you, not their part.

If you look in the"Transfer Characteristics" section further down the page, you'll see some specs based on If (forward current) of 5 and 20mA. I'd calculate based on 20, but others here may have better advice. It's not always clear from datasheets if there's an exact best value for something, but you always want to avoid the Abs Max numbers!

Based on your other numbers, with the current adjusted to 20mA, that would mean 140ohm for R1.

IMG_3070.PNG
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
Ah, I see. The 50mA spec is from the "Absolute Maximum" section. These are numbers you never, ever want to reach. If any of these numbers are reached, the component may fail and the manufacturer will blame you, not their part.

If you look in the"Transfer Characteristics" section further down the page, you'll see some specs based on If (forward current) of 5 and 20mA. I'd calculate based on 20, but others here may have better advice. It's not always clear from datasheets if there's an exact best value for something, but you always want to avoid the Abs Max numbers!

Based on your other numbers, with the current adjusted to 20mA, that would mean 140ohm for R1.

View attachment 136927
I gotta tell ya, the person who completely understands everything on those datasheets is a freaking genius. It's probably a bad habit of mine to always look at the maximums. Mentally I figure if you account for that you'll be okay. But I will adjust the drawing to incorporate your suggestion. Thanks again. I've learned a lot on this one, and still learning.
 

ebeowulf17

Joined Aug 12, 2014
3,307
I gotta tell ya, the person who completely understands everything on those datasheets is a freaking genius.
I know what you mean. There's a lot going on, and I feel lucky on the days I understand even 10% of it. Slowly but surely, experience and failure are teaching me which specs matter most in my typical applications, but I'm just scratching the surface.
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
I know what you mean. There's a lot going on, and I feel lucky on the days I understand even 10% of it. Slowly but surely, experience and failure are teaching me which specs matter most in my typical applications, but I'm just scratching the surface.
Humbling
 

wayneh

Joined Sep 9, 2010
18,116
So I understand, it's okay to have one common ground for all?
Probably, but the answer depends on the two power supplies that are being connected at their grounds. If they’re both plugged in (and not isolated for instance a battery or wall wart transformer) the potential exists for current to flow through the ground connection.
 
Top