Idea
In short
How do you build a black Pill 16-bit PWM LED dimmer?
A Black Pill sets an LED brightness from a knob with a timer set to a 16-bit period for very fine steps at low light. The LED has a series resistor on a 3.3 V pin. You need STM32 Black Pill (STM32F411CEU6), ST-Link V2 programmer (clone), LED 5 mm red, Resistor 330 Ω, Potentiometer 10 kΩ and Breadboard 830 Tie Points.
- Level
- Intermediate
- Time
- About 150 min
- Parts
- 6
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal
See why a longer timer period gives smoother dimming.
Parts list
- Development Boards
- Interfaces
- Semiconductors
- Passives
- Passives
- Prototyping
How to build it
- Set the timer period to 65535
- Read the knob with the ADC
- Map the reading to the compare value with a gamma curve
- Drive the LED through the resistor
- Compare 8-bit and 16-bit steps at low light
Common questions
What parts do I need for the black Pill 16-bit PWM LED dimmer?
STM32 Black Pill (STM32F411CEU6), ST-Link V2 programmer (clone), LED 5 mm red, Resistor 330 Ω, Potentiometer 10 kΩ and Breadboard 830 Tie Points.
How long does the black Pill 16-bit PWM LED dimmer take to build?
About 150 minutes for a intermediate maker.
