Groumpf, optocouplers are looking more and more attractive ![]()
I read 5 different transistor tutorials and I am having a really hard time picturing how this all works... but I am getting there, you had me worried until I realized that my circuit had the base floating, which won't be the case when connected to the atmega pin driven LOW.
I find that the tutorials explain things in terms of quantities that we don't know or care about for a common emitter switch (e.g. Ib or current gain or Rb).
So, what I know is:
- when I switch on I will have Vbe = 3.3V
- I want Ic < 10mA (to protect the pin)
- I want to support Ic from 10uA up to 50mA
How do I use the equations to properly size the base resistance?
For Ic = 50mA I find
Ib = Ic / beta (75) = 0.66 mA
which is fine, and I will need
Rb = (Vb - 0.7) / Ib = 5K ohms
and 5K saturates my transistor with my led + 220ohms load, Ic is 3mA
Where I get lost is if I assume a much smaller load (sensor module), say 10uA. Then I will have
Ib = Ic / 75 = 0.13uA and
Vb = 0.7 + Ib * Rb = 0.7V + 650uV... but I expect Vb to be 3.3V??
Or is it that 0.7V is really Vbe at saturation and that I will have
Vbe = 3.3V - 650uV ?
Franck