1
\$\begingroup\$

I want to switch (toggle) two devices using one GPIO pin and basic components. To achieve that I designed circuit containing one FET driving first device and two FET transistors for driving second device using inverter circuit. Design presented in attached picture:

Proposed circuit

I would like to figure out practical aspects about this circuit:

  1. Is this correct solution for this simple problem? What can be improved?

  2. Do I need resistors between GPIO and transistor gates? Or maybe pull down resistors for every gate? How will circuit behave when GPIO signal is floating (e.g. microcontroller boot time)?

  3. What is the switching time between devices? Can I safely assume that only one device is always ON? Or maybe I should expect current spikes when devices are switching?

\$\endgroup\$
3
\$\begingroup\$
  1. Is this correct solution for this simple problem? What can be improved?

Given that you have 300 \$\Omega\$ resistors and what appear to be LEDs the current will be about 10 mA. This is within the capability of most micros' GPIO pins in sink or source.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Simplest switching circuit.

2a. Do I need resistors between GPIO and transistor gates? Or maybe pull down resistors for every gate?

Not relevant in this configuration.

2b. How will circuit behave when GPIO signal is floating (e.g. microcontroller boot time)?

Both LEDs will glow dimly. There may be 2 or 3 mA flowing through the combination.

3a. What is the switching time between devices?

As quick as the micro GPIO.

3b. Can I safely assume that only one device is always ON?

See 2b.

3c. Or maybe I should expect current spikes when devices are switching?

There will be a current dip when switching as the two R-LED combinations are in series.


Back to the original question regarding the OP's circuit:

Is this correct solution for this simple problem? What can be improved? [And from comment:] What if there is something with higher currents than 10mA?

I don't play with FETs much but it looks OK except that your bottom FET isn't doing anything except posing a shoot-through risk during switching. Leave it out.

\$\endgroup\$
  • \$\begingroup\$ You're the king of simple circuits. \$\endgroup\$ – Bradman175 Jun 6 '16 at 23:38
  • \$\begingroup\$ I like your answer, but I'm missing information if this what I have designed is correct? What if there is something with higher currents than 10mA? \$\endgroup\$ – abuszta Jun 7 '16 at 5:26
  • 2
    \$\begingroup\$ I don't play with FETs much but it looks OK except that your bottom FET isn't doing anything except posing a shoot-through risk during switching. \$\endgroup\$ – Transistor Jun 7 '16 at 6:39

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.