Skip to main content
Clarifications.
Source Link
TonyM
  • 23.8k
  • 4
  • 40
  • 65

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package (see below diagram from datasheet).

If needed, itIt will run from your 5 V supply and without a decoupling capacitor at the low speeds an LED will use. It may end up close to some decoupling you already have, anyway. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're already dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package (see below diagram from datasheet).

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package (see below diagram from datasheet).

It will run from your 5 V supply and without a decoupling capacitor at the low speeds an LED will use. It may end up close to some decoupling you already have, anyway. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're already dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

Clarifications.
Source Link
TonyM
  • 23.8k
  • 4
  • 40
  • 65

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer ICsingle-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package (see below diagram from datasheet).

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package.

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package (see below diagram from datasheet).

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

added 1 character in body
Source Link
TonyM
  • 23.8k
  • 4
  • 40
  • 65

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package.

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematicschematic

simulate this circuitsimulate this circuit – Schematic created using CircuitLab


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package.

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

What you appear to want is a same-polarity buffer that can drive an LED on a different rail, using the function: GPIO LOW for LED lit.

You can use a single-gate 74LVC17 buffer IC, a cheap and readily-available part in a tiny package.

If needed, it will run from your 5 V supply without a decoupling capacitor at the low speeds an LED will use. Its logic input accepts your 3.3 V GPIO and can drive 24 mA or sink 24 mA. Note that these currents cause a small voltage drop in the driver output stage, which is fine as you're dropping much more across the LED resistor.

The logic input also has hysteresis for improved noise rejection. This has no downside in your application and you may decide that it helps there.

schematic

simulate this circuit – Schematic created using CircuitLab


The following answer was posted for the original version of the question, for LED lit when GPIO high...

You can use a load switch IC, of which there are many around. A good example is the tiny and low-cost FDC6330L which has Vin of 3..20 V, Iout(max) of 2.3 A and Vsw(on) of 1.5..8 V.

A circuit for using an FDC6330L to drive one LED is shown below. Note that the single IC contains the two MOSFETs shown boxed. (Circuit diagram is a modified Fig. 3 from its datasheet.)

The 22 kΩ pull-down on GPIO is not absolutely necessary. It stops the LED lighting on MCU start-up, while the MCU is going through reset then configuring its GPIO as an output. Until then, GPIO is usually an input with a weak leakage output current. This resistor can be removed if the GPIO already has an internal pull-down, the board already has a pull-down or you'd rather save a resistor and don't mind the LED flash.

enter image description here

ADDED: THIS IS A GOOD ANSWER TO THE ORIGINAL QUESTION. It assumes that the LED is lit when the GPIO drive pin is high - as originally implied. - RM (moderator)

Revised answer for revised question.
Source Link
TonyM
  • 23.8k
  • 4
  • 40
  • 65
Loading
added 189 characters in body
Source Link
Russell McMahon
  • 152.1k
  • 18
  • 218
  • 402
Loading
Source Link
TonyM
  • 23.8k
  • 4
  • 40
  • 65
Loading