0
\$\begingroup\$

I've built something like this

Schema

for using MCU pins as a joystick controller for a Sega Master System (and the pins are driven from a USB HID device connected to the MCU, but that doesn't matter).

The question is: what is the lower current to drive T1 (I'm using a C1815 because I had this one but I can change it)?

Is it better to keep current as low as possible?

Do I need R2 at all (the standard button seems to have 0-20 Ω resistance)?

The posted solution is working fine as is; I just want to know if I can make it better.

edit: MCU side is 3.3V, max pin current is 16mA Errata: R1 is 20k not 20M

\$\endgroup\$
1
  • \$\begingroup\$ There is an error on image and R1 is 20k not 20M \$\endgroup\$
    – Selvin
    Commented Mar 14, 2022 at 17:37

2 Answers 2

1
\$\begingroup\$
  • assume internal pullup is 10k to 5V = 0.5 mA
  • assume switch gain = 10 to 20 MAX for Ic/Ib when saturated as a switch or 10% of linear hFE Max
  • choose Re=0
  • compute Rb = 10% of 0.5 mA = \$ I_B= 50 uA => R_B= \dfrac{3.3~V - 0.6~V_{=V_{be}}}{0.05 ~mA }=54 ~k\Omega \$ will probably work but with capacitance on cable, use 1k to 10k
\$\endgroup\$
1
\$\begingroup\$

R2 can be 0 ohms so removed and replaced with a short circuit.

R1 is at least 1000 times too large and can be one 10000th in value. Just use something like 2k to 10k.

\$\endgroup\$
1
  • \$\begingroup\$ Acctually there is an error in image and R1 is 20k \$\endgroup\$
    – Selvin
    Commented Mar 14, 2022 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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