0
\$\begingroup\$

I know that the question should be explained in more detail, but there is not really anything more to be said about the above-mentioned question.

Thanks for your suggestions

\$\endgroup\$
8
  • \$\begingroup\$ A resistor in series with the capacitor \$\endgroup\$
    – Big6
    Jul 27, 2020 at 17:16
  • \$\begingroup\$ Yeah, to limit the current flow, but is this a safe method? Coudn't the current/voltage flow back into the arduino and harm it's GPIO pins? \$\endgroup\$ Jul 27, 2020 at 17:22
  • 1
    \$\begingroup\$ The resistor limits current in both directions. \$\endgroup\$
    – Andy aka
    Jul 27, 2020 at 17:26
  • 1
    \$\begingroup\$ The voltage on the capacitor should never be higher than that of the GPIO pin, so no current should flow back. That is of course if the cap is not tied a higher rail, which I don't think it's your case. And if it was, still the resistor will limit that current flowing back as well \$\endgroup\$
    – Big6
    Jul 27, 2020 at 17:27
  • \$\begingroup\$ What kind of Cap? 1F or 1uF? \$\endgroup\$ Jul 27, 2020 at 17:36

3 Answers 3

1
\$\begingroup\$

I do this frequently for building cheap charge pumps. Here is an example...

https://wp.josh.com/2017/03/20/blinking-blue-powering-a-3-7-volt-led-from-a-2-4-volt-coin-cell-with-a-0-02-charge-pump/

The GPIO pins on AVR chips are very robust and I've never had any issues across thousands of commercial units over years of use.

\$\endgroup\$
0
\$\begingroup\$

That could apply for abrupt Vdd shorts causing latchup problems to drive caps on GPIO lines directly.

The ST32F family of devices are rated for 25mA max per port. Therefore the driver resistance for 3.3V would be 133 Ohms in series for a large bulk cap.

Then you must add a Schottky diode across the series R if there is a power glitch so that if you have a large output Cap voltage, it does not exceed the supply by 0.3V or according to Absolute Max specs.

Generally not done this way. For a large Cap it is wiser to use a high side inverting switch.

\$\endgroup\$
0
\$\begingroup\$

I found myself in a similar situation: I want to power a sensor and an accompanying bypass capacitor trough an IO pin. There is no room for a transistor on the pcb and adding a resistor would lead to an unstable power supply. My solution is configuring the GPIO pin as input with the pullup resistor enabled, which is between 20kΩ-50kΩ for the Attiny that I am using. After I detect a logical 1 on this input pin, the capacitor is charged to about 70% and I can safely configure that pin as output to provide a stable power supply for the sensor. Since I had some unused GPIO pins left, I connected three in parallel to increase the charging speed and current handling capability.

One has to keep in mind though, that shorting the main power suppy to ground would discharge the bypass capacitor through the protection diodes of the GPIO pins and damage the controller.

\$\endgroup\$

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.