Driving a MOSFET with PWM.

Driving a MOSFET with PWM.
Схемотехника

In one of my previous articles we looked at how to choose a mosfet operating in switching mode, but it said nothing about the power losses that occur when the switch toggles, the so-called dynamic losses. Now the same thing in plain language: imagine we have a small motor and want to turn it on; to do this, we need to apply voltage to it. If we want to turn...

How to Get a DC Voltage from PWM.

How to Get a DC Voltage from PWM.
Схемотехника

Every beginner electronics enthusiast knows how to get a DC voltage from PWM. It's simple: pass the PWM through a low-pass filter (in the simplest case an RC network), and you get a DC voltage at the filter output, right? In fact, I think it's all much more interesting: when trying to get a DC voltage from PWM, the following questions arise: How do you choose the values...

STM32 PWM.

STM32 PWM.
STM32

PWM on STM32 is generated using timers; the documentation says a lot about them, but PWM turned out to be quite easy to configure. We'll generate PWM using channel 4 of timer 1. First, we need to find which pin is responsible for channel 4 of timer 1; to do this, open the Technical DataSheet for your MCU (mine is the STM32F103VET6) and find which pin has...