I am working with the STM32 MCUs and I wish to step up a 5V pin to a range between 7V and 12V. In summary I wish to power the second Board from the first board. Thanks for any reply.
I am working with the STM32 MCUs and I wish to step up a 5V pin to a range between 7V and 12V.
I see several major problems here.
First: the "5V pins" on a STM32 MCU are 5V tolerant. They can accept a 5V input signal without damaging the MCU, but they will only output VDD (usually 3.3V) as a high output, just like all the other general-purpose output pins on the device.
Second: The GPIO pins cannot source or sink a useful amount of power. The absolute maximum current draw from a GPIO pin on a representative STM32 device (STM32F103C8) is 25 mA, with an additional maximum of 150 mA for the entire device. Attempting to draw 500-800+ mA from the chip (per your comments) will destroy it.
Given the constraints you've described in your comments, you need a secondary power supply for your 7-12V board. The power supply available to your STM32 is insufficient, and the STM32 is not capable of producing or transforming power in the way you believe it to be.
Assuming that the power requirements at the higher voltage are modest, you can program the microcontroller to output a square wave at one pin, Vsq, and use a voltage-doubling rectifier stage afterwards. Look at this Wikipedia link and the Greinacher circuit.
A similar idea, with some improvements, is Philips Application note AN10218 which suggests a circuit like this:
- The original application note uses an astable circuit to generate the square wave. I suggest that your microcontroller code does this additionaly to its usual operation. The waveform does not need a 50% duty cycle. In fact, it does not even need to be strictly periodic.
- The frequency of Vsq does not need to be 1 MHz.
- Circuit element values can be tuned accordingly. Schotky diodes would be better, but I have not bothered to search any of them