Using an incandescent light bulb in series with a mains-powered device is a well known trick to limit the current used by the device. It's great for testing devices you're unsure of.
Unfortunately, incandescent light bulbs are hard to come by these days, and this solution isn't easily programmable. It requires the use of several light bulbs in series or parallel in order to roughly achieve a target current limit.
I was wondering what would be the better replacement option while remaining inexpensive. I'd like to find something easily programmable and that allows to keep the current flowing at a lower voltage when the current limit is reached instead of dropping it to zero like a breaker.
By programmable I mean: being able to set the current limit in advance. And ideally also allow transient spikes of a given intensity and duration.
A word of context FWIW: Nowadays I'm fixing my laptops power bricks. Keeping some current flowing would allow me to locate short circuits much more easily. And having the power source react in to the load in real time would be much more safe and less prone to user-error than adjusting a variac manually each time I test something.
This means that my requirement are not very demanding. I don't need an adjustable frequency and phase is irrelevant. A maximum power of 200 to 500W should be enough and more than 2kW would be useless. I don't necessarily need a great accuracy (we're replacing light bulbs here), anything more precise than 1% would be useless. Nor do I need a great stability with fast changing loads since I'll be mostly testing things manually, although for this one, the higher the better.
I was thinking of maybe rolling my own solution using a microcontroller and a PWM signal to control a switch at a high frequency. And then smooth it out with a low pass filter. But maybe that's not the best idea.
So, what would be the best way to limit mains current in a programmable and inexpensive way?
