xthexder
@xthexder@l.sw0.com
- Comment on PWM resolution for switch mode power supplies. 1 week ago:
I see, yeah that seems like a decent design going through the interrupt. Since your load is static, the responsiveness of your IC interrupts shouldn’t matter too much, but if you were trying to drive a high bandwidth load, then it would start becoming an issue. 625kHz or even the effective 200kHz you have control over would be plenty accurate even for something like audio (which wouldn’t change faster than maybe 48kHz). You can size your output capacitor accordingly so that if you suddenly hook up a bigger load, the voltage drop is acceptable until the IC can catch up.
- Comment on PWM resolution for switch mode power supplies. 1 week ago:
I tend to agree with litchralee, changing the duty cycle is usually how these things are done rather than having multiple voltages.
From a control perspective, it’s much easier to turn a digital signal on for 1/4 the time than it is to generate 1/4 the voltage for the full time. But that’s just for basic PWM. If you’re trying to boost the voltage up from your source though, the mechanism for getting a target voltage is a bit different, and relies on “charging up” an inductor and disconnecting it to spike the voltage. I found this reference that seems to have some good diagrams of how it works: analogcircuitdesign.com/boost-converter/
In a boost converter, duty cycle and frequency should be tuned to the inductor so that energy isn’t being wasted after the inductor reaches steady-state and starts acting like a short circuit.
- Comment on PWM resolution for switch mode power supplies. 1 week ago:
I think in the context of a switching power supply, this is just called voltage ripple. Generally it’s measured as the amplitude and frequency of the noise relative to the target voltage.
- Comment on State of the Discord - A Lesson 2 weeks ago:
Honestly, every platform has the same problem, including real life countries. There’s always the possibility that whatever power is enforcing the rules is corrupted and doesn’t listen to anyone else. The mechanisms for fairly determining both what the rules should be and how to enforce them are always evolving as people find new ways to do bad things.
The fediverse is a nice system because it allows people to leave and make their own communities if the admins become toxic, incentivizing them to actually listen to users. I can only hope we don’t get overrun my AI slop like the rest of the internet.
- Comment on State of the Discord - A Lesson 2 weeks ago:
I think the only safeguard against that is to do your own moderation. The only tool I can think of that would even come close to detecting “power tripping” would be AI, and we all know that would end terribly. The best you can do is remove incentives (somehow, idk) so mods aren’t rewarded for a bad ban.
- Comment on Driving a logic level MOSFET with an ATtiny 3224 3 weeks ago:
After a little more thinking about the problem you’re trying to solve, an op-amp voltage buffer with an off the shelf DC-DC converter for the high voltage rail might be the simplest overall circuit. Unfortunately the ATtiny you’re using doesn’t have a digital to analog (DAC) output, so it’s hard to set the voltage reference with that setup. You could probably rig up something with a PWM channel and a capacitor on the output, and adjust the gain on the op-amp feedback so you can reach the max output voltage you want (6V ?)
Unless of course the goal is actually to learn how to build your own variable output buck-boost converter, in which case, all the power to you!
- Comment on Driving a logic level MOSFET with an ATtiny 3224 3 weeks ago:
Ah okay, I read a stat for max total current on a pin group, but I guess the single pin current is lower.
If you have a capacitor on your supply pin, it should reduce fluctuations due to changing outputs, but I found the stat you’re talking about: At 5.0V supply a 15mA load only guarantees 4.0V.
So for it to be reliable you’ll need to use another driver in-between. A single smaller transistor with a fast switching time and low voltage drop when saturated/on would be able to multiply that 5-10mA up to the 100mA you might want, and stay above the 4.5V threshold. You can probably find something within 0.4V.
In terms of switching time, I think the main thing is just picking a frequency outside the audible range, so something like 30kHz or above would work. You can probably figure out your own tradeoffs going to a higher frequency. I think the main benefit is you can use smaller capacitors and get less ripple on the output, but it makes the switching control harder to get right.
- Comment on Driving a logic level MOSFET with an ATtiny 3224 3 weeks ago:
The ATtiny datasheet has a lot of useful information about power dissipation for its IO pins. The input capacitance of your MOSFET gate seems to negligible effect the power usage compared to the 30 Ohm gate resistance. At 5.5V that’s 183mA and above the 100mA supply limit, so you’d only actually need a minimum of a 25 Ohm resistor (+30Ohm gate) in series (plus maybe a heatsink depending on your duty cycle).
If you can handle supplying 100mA, then you’d get roughly a 60ns rise time based on the 1nF capacitance, which should be plenty fast for switching anything under 100kHz. This scales linearly, so selecting a resistance to target 10mA would give you a 600ns rise time (thus lowering the switching frequency you can hit before overheating the MOSFET).