I recently acquired a new oscilloscope and I'm eager to conduct some tests. I'm particularly interested in simulating a brownout condition to observe its impact on an ATtiny microcontroller. My goal is to use the oscilloscope to visualize the brownout, perhaps around 1.8V. Can anyone provide suggestions on methods or setups to effectively simulate a rapid voltage drop akin to a brownout in a controlled manner? Because simply reducing the voltage on my lab power supply is not what I'm searching
Do you mean the ripple on/off of the MCU when it's close to the minimum voltage? You can produce it with a small battery (or a small supercapacitor) and the MCU activating a relative high load when it boots. Take into account that maybe the MCU won't enjoy it a lot.
But the brownout prevention functionality of some MCU is there just to prevent it, at a some degree, and sometimes can be deactivated.
You could take a second microcontroller, output a PWM signal and run it through an R/C filter. Then use that filtered "DAC" signal as the input for an opamp buffer, and feed the ATtiny from this opamp buffer. Most opamps will easily supply 10mA or so, which should be enough to run a bare ATtiny (don't drive anything current-hungry with the ATtiny).
This way, you can programmatically simulate a variety of voltage fluctuations, at least within the boundaries that the PWM resolution and R/C filter frequency will allow.
Set R7/C1 to obtain the desired filtering. You can add another R/C pole if you want to smooth things out further. R8 is a bleeding resistor to discharge C1 which will improve the transient response when 'dialing down' the voltage using PWM.
U1 is any general purpose opamp, preferably with a fairly beefy output, and rail-to-rail capability.
Edit2: if you need more output current than the opamp can supply, you can use the opamp as the input to a series pass regulator using a power transistor of your choice.
You're welcome, I hope it meets your requirements.
A few notes on the R/C filter: this is a compromise between filtering out all ripple and responsivity. You could calculate things, but I prefer to just simulate it to see how it 'feels' and then decide how to proceed. If you need to test very fast transients, this approach won't be very effective and I'd look in other directions. However, the benefit of this 'programmatic' approach is that you can fire pretty complex fluctuation patterns on your test setup and see how it responds.