ryanrs posted:One time I made a buck converter that hummed, even though the switching frequency was >100 kHz, and even under load (so not related to burst mode stuff). The circuit did work, but I didn't think it should be making any noise at all. Very likely the hum was just from the feedback loop being unstable, rather than from subharmonic oscillation (true subharmonic oscillation has nothing to do with the output capacitor). Adding ESR to the output capacitor typically improves stability margins, at the expense of higher output ripple.
|
|
# ? Nov 28, 2022 13:25 |
|
|
# ? May 9, 2024 03:59 |
|
What is a good resource to learn buck, boost, buck-boost converter design? The first and last time I built a power supply was for a college class project and unfortunately all of that knowledge has been lost.
|
# ? Nov 28, 2022 15:35 |
|
Salami Surgeon posted:What is a good resource to learn buck, boost, buck-boost converter design? The first and last time I built a power supply was for a college class project and unfortunately all of that knowledge has been lost. Do you mean designing your own to pass one of our hypothetical job interviews that came up a little while ago, or just using off the shelf chips? Cuz honestly I've never had a problem with just searching for a chip that says it does the thing I want (current / voltage / ripple / whatever) and then following the datasheet and app notes.
|
# ? Nov 28, 2022 16:49 |
|
Splode posted:Is it true that tantalum capacitors catch fire if they're exposed to too much voltage? Tantalum caps go short-circuit when they fail, which tends to be dramatic when they're placed across the power rails. I think they generally explode, rather than catch fire. The problem with tantalum caps is that there is a race between their internal self-healing chemistry and exothermic failure. So there are a pile of guidelines re. voltage derating to take into account stresses from inrush current, voltage surges, etc, and you end up speccing a tantalum cap with a voltage rating 2x the nominal circuit voltage. Most tantalum cap manufacturers have app notes that talk about this phenomenon. Here's one from AVX. Why All Capacitors Suck: Aluminum Electrolytic: electrolyte dries out over time, high ESR Aluminum Polymer: high leakage current Ceramic: nonlinear, capacitance changes with applied voltage & temp, big ones are delicate Plastic film: physically huge Tantalum: blows up Every type of capacitor sucks in its own special way.
|
# ? Nov 28, 2022 17:09 |
|
Splode posted:Is it true that tantalum capacitors catch fire if they're exposed to too much voltage? This is true of most things, as a matter of fact!
|
# ? Nov 28, 2022 17:10 |
|
In fact that's usually how we define 'too much.'
|
# ? Nov 28, 2022 17:25 |
|
That's true of the old true tantalum caps. The new tantalum polymer ones are fine. I intentionally killed a few to test, they just heated up and then politely desoldered themselves
|
# ? Nov 28, 2022 17:39 |
|
ryanrs posted:Tantalum caps go short-circuit when they fail, which tends to be dramatic when they're placed across the power rails. I think they generally explode, rather than catch fire. Tantalum also loses capacitance if it’s been sitting for awhile and the tantalum oxide layer needs to regrow through baking/voltage. Extra fun debugging when they pass incoming component test and then fail FCT during a build. Salami Surgeon posted:What is a good resource to learn buck, boost, buck-boost converter design? The first and last time I built a power supply was for a college class project and unfortunately all of that knowledge has been lost. If you want to build one for informative purposes, The Art Of Electronics. If you want to build one for practical purposes, just find an IC that does it for you.
|
# ? Nov 28, 2022 17:50 |
|
ante posted:That's true of the old true tantalum caps. The new tantalum polymer ones are fine. I intentionally killed a few to test, they just heated up and then politely desoldered themselves Leakage current is probably a lot higher though? (if you're losing the self-healing)
|
# ? Nov 28, 2022 17:53 |
|
PRADA SLUT posted:If you want to build one for informative purposes, The Art Of Electronics. But which edition? For the 3rd edition, the authors deleted a bunch of cool stuff that was in the 2nd ed (like weird capacitor facts). Pirated 2nd ed PDF is the best, IMO, though the microcontroller chapters are super out-of-date. e: and the big lebowski jokes in the 3rd ed date it as badly as the 68000 assembly in the 2nd ryanrs fucked around with this message at 19:20 on Nov 28, 2022 |
# ? Nov 28, 2022 19:14 |
|
FISHMANPET posted:OK, this is actually exactly what I was wanting to do, just not having any idea what it was called. Looking a little closer, it looks like a 555 (or 556 since I want two pulses) would do essentially the same thing? So a long time ago I asked about how to turn a signal into a pulse, basically, and got pointed to a couple of resources, one of them using a 555 timer in Monostable mode. The ultimate goal is that I have 2 momentary switches connected to my raspberry pi, and they need to be turned simultaneously to trigger something, so my idea was that each key switch would send a pulse into an AND gate and so you'd have to turn both keys at the "same" time to trigger the action on the GPIO. Like I said, it's been a long time (hard to get the energy to work on a project used for people to gather together in a room and do something during Covid) but I'm picking it back up, and I actually built the monostable circuit with a 555 on a breadboard. I've done the math so the pulse is about 1 second, and I've got it just hooked up to an LED right now. If I trigger it for a fraction of a second, it behaves like I expect: even after I've let go of the button, the light turns on for about a second and turns off. However if I hold the switch for say 2 seconds, the light stays on the whole time (though turns off immediately when I let go). From my vague understanding, it's "working as intended" it's just not what I desire. I found another circuit using a 555 except this one only triggers when the switch is closed, so you can hold the switch logger than you want the pulse to be. I haven't built it yet but I think that's what I want. However I was initially pointed at this circuit which claims to do what I want with no 555. Looking at that, it's got 7 components. The 555 that I've built has 4 components plus the 555, if I build out the version that only triggers on press I'm looking at 7 components plus the 555, so that circuit without the 555 starts to look a lot better. So, uh, what am I getting with the 555 that I don't get from just doing it myself? It doesn't seem simpler to use the 555, and in fact might be even more complex. Comedy option, looking at the datasheet for the 74121/74221 (since I actually need 2 of these) I could just go that route and have most of the work done for me on the chip, at the downside of paying $6 a chip and having to order from an electronics place, vs picking up piles of 555s on Amazon for a few cents a piece.
|
# ? Nov 28, 2022 21:00 |
|
Splode posted:I heard a similar story from an old boss.
|
# ? Nov 28, 2022 21:11 |
|
FISHMANPET posted:The ultimate goal is that I have 2 momentary switches connected to my raspberry pi, and they need to be turned simultaneously to trigger something, so my idea was that each key switch would send a pulse into an AND gate and so you'd have to turn both keys at the "same" time to trigger the action on the GPIO.
|
# ? Nov 28, 2022 21:16 |
|
Wow, that is a lot of words and then a link to even more words hundreds of pages ago. So to summarize: You have two momentary switches. When they are both activated within, say, 0.5 seconds, it turns on a GPIO for a Rasp Pi. For various reasons, you only have one GPIO available to do this. You also don't want to add a tiny 8-pin microcontroller to do it, heh. But you are in luck! You can definitely do this with a single 555 and some resistors and capacitors. I'll post a circuit in a bit.
|
# ? Nov 28, 2022 21:18 |
|
FISHMANPET posted:So a long time ago I asked about how to turn a signal into a pulse, basically, and got pointed to a couple of resources, one of them using a 555 timer in Monostable mode. The ultimate goal is that I have 2 momentary switches connected to my raspberry pi, and they need to be turned simultaneously to trigger something, so my idea was that each key switch would send a pulse into an AND gate and so you'd have to turn both keys at the "same" time to trigger the action on the GPIO. What is your end goal for this? Is a one second window what you're looking for? If so, that's ages for a microcontroller or your raspberry pi. If you want it to be a separate thing, just get a cheap PIC (like 80 cents) or atmega mcu and set up interrupts for each pin. Get an interrupt for one of them and then poll the other pin during your window to see if the other one activates.
|
# ? Nov 28, 2022 21:23 |
|
It turns out I do actually have multiple GPIO pins free on the Pi so I could do it all in software, I just don't have any idea how I would actually do that. The project itself is very stupid, it's a ridiculous amount of flashing lights and buttons that in the end, makes a single REST API call when a button is pushed. And to be clear that's not my repo/design, I'm building one myself based on that design with some slight modifications. What I'm trying to add is some "extra credit" that isn't part of the original design, but is inspired by it, and require two keys to be turned "simultaneously" as part of "initializing" it. So my thought was 2 boxes with momentary key switches in them, setup to send out a pulse instead of a constant signal (so you can't have one person hold a key in the "on" position while waiting for the other person to turn theirs) and then run that through an AND gate to output a single signal. So that's where the "1 second" comes from, that once one key is turned you have 1 second to turn the other one, and the AND would output a single signal that I can easily use in my code. I'm open to other ways to do it, since I'm just learning all of this as I go. E: I suppose the ultimate disclaimer here is that I'm also looking into this at this moment specifically because I'm avoiding doing my actual job and so "somewhat complicated" is a bit of a tiny bonus for me.
|
# ? Nov 28, 2022 21:43 |
|
Falstad: 555 + 2 buttons Operation: When you close one of the pushbuttons, the discharged 1.5uF cap sucks some charge out of the 1uF cap on the 555. But 1 switched cap is not enough to pull the trigger voltage below 1/3 Vcc. Meanwhile, the 470k resistor is recharging the 1uF and the 1.5uF switched cap. So to force the trigger voltage below 1/3 Vcc, both switches need to be flipped. And you need to do it before the 470k resistor can add much charge. Note the second 1.5uF can't drop the voltage as much as the first, because it's pulling charge off two caps (1uf + 1.5uF). If both switches are flipped within 0.5 secs or so, the 555 output will go high, and stay there until at least one of the switches is released, plus a delay. Notes: 1) There is a false pulse at startup after power is applied. It'll clear in under a second, which is probably less than your raspberry pi takes to boot. This isn't shown in simulation because it's kinda annoying when playing with the buttons. 2) When the switches are closed and re-opened, it takes 3-5 seconds to recharge them before they can be used for another activation. This feels like forever in simulation. 3) Use TLC555 or LMC555 or a similar CMOS timer. Not NE555. 4) Use reasonably accurate 5-10% tolerance film capacitors. Not ceramic or electrolytic. 5) The 10 ohm resistors are just to keep the simulator happy, though they probably save some wear on the switch contacts, too. Anything between 0 and 1k is fine. 6) If these buttons are at the end of several feet of cable, maybe multiply all the capacitor values by 10 and divide the 3 large resistors by 10. code:
ryanrs fucked around with this message at 01:08 on Nov 29, 2022 |
# ? Nov 28, 2022 23:23 |
Salami Surgeon posted:What is a good resource to learn buck, boost, buck-boost converter design? The first and last time I built a power supply was for a college class project and unfortunately all of that knowledge has been lost. There are lots of ways to approach it, depending on what your background is and what sort of circuits you only want to build. If you really want to get a grip on switchmode power, it's best to start with totally custom circuits on a solderless breadboard. Start at low power (<2A, <20V) and low frequency (10-20kHz). Use cheap jelly bean components, no fancy control or gate drive ICs. Use basic power MOSFETs like IRF540N, etc (but don't bother with using power BJTs). Follow app notes from Linear Tech and Texas Instruments. Horowitz and Hill also has some good tips on prototyping stuff, IIRC. Your results won't be nearly as impressive as with modern components with a good custom PCB, but you'll be able to actually experiment freely without having to worry about destroying your fancy-rear end Linear Tech controller IC with a 52 week lead time. You should be using LM339s and LM324s, go ahead and abuse them. Start with a simple buck converter (with a P-channel FET). Just run it open loop, directly controlling the duty cycle with a function generator (or make your own using op amps/comparators). Try and get 80% efficiency. When open loop becomes boring, try closing the feedback loop. Feedback in itself can become a very technical topic, if you want to push it... A boost converter is the next simple thing to try, but be careful with it. Without a significant load on the output, a boost circuit's output voltage can shoot up in an uncontrolled manner, resulting in potentially dangerous situations. Same applies to flyback and buck-boost converters, btw. Best to always run these with at least a basic feedback loop which will limit the output voltage automatically. When non-isolated converters become easy, your can try isolated converters with transformers. Magnetics design is a whole topic on its own.... And it's often very worthwhile to simulate things as well. Especially as your amps and volts increase and the cost of failure with real hardware becomes severe. LTspice is the hands-down best option for simulating simple SMPS circuits.
|
|
# ? Nov 29, 2022 05:43 |
|
FISHMANPET posted:It turns out I do actually have multiple GPIO pins free on the Pi so I could do it all in software, I just don't have any idea how I would actually do that. If you do want to do it in software, something like this should help: https://roboticsbackend.com/raspberry-pi-gpio-interrupts-tutorial/ You could set interrupts on each pin. When one goes pops off, record the current unix time stamp. Compare the time to the time when the other one was tripped, if they are within a second, do the thing, if not, do nothing. With this method, you can easily change how much of a time window you get, because it's just a simple" |a - b| < window" calculation that can be changed whenever you want. But if you do want to do it with hardware, what ryanrs suggests seems neat. Cojawfee fucked around with this message at 06:10 on Nov 29, 2022 |
# ? Nov 29, 2022 06:08 |
|
Don't use my 555 circuit if you have enough GPIOs to wire the switches directly.
|
# ? Nov 29, 2022 06:51 |
|
I need a Clever Solution from Smarter People. I have several vintage c7 and c9 incandescent strands of christmas lights I put up around the house. The bulbs in them are almost unobtanium at this point and they also run very hot at 120V. I've had them plugged into standard lamp dimmers that I leave set at about ~60V as read on a multimeter so that the bulb life is extended effectively forever and they are cool to the touch. I want to ~fancy~ up my capabilities by adding these strings to the rest of my Christmas iot hellscape which dims based on time of day. I am concerned about some glitch on a smart dimmer running them at 100% so I need some sort of way to guarantee they never break ~60V. My first thought was just a linear transformer, but I don't think that will play well with the triac dimmer in a smart plug (correct me if I'm wrong). Another option I thought of would be some sort of over voltage protection that cuts off at 60V, but I'm not even sure that's a thing at such low voltages. I'm willing to spend some money and time on an Interesting Solution, if there is one.
|
# ? Nov 29, 2022 18:40 |
|
Qwijib0 posted:I need a Clever Solution from Smarter People. I mean if you're using standard triac dimmers then I don't think it's actually putting out 60V, I think your multimeter is just getting confused because the waveform looks like this (ignore that it says like 300V, it's just a random picture I found on gis): So it's possible you're still getting the full peak mains voltage and the multimeter is applying the assumption that it's a normal AC sine wave and averaging it down to 60V. I think what you're actually looking for here is some kind of current limiter (since the thing that's actually going to heat up the bulbs when they're at full power is the current, not the voltage). The easiest answer would just be to measure the current they use and then put a fuse in line with them.
|
# ? Nov 29, 2022 18:57 |
|
the "as read on a multimeter" was meant to imply I know roughly what's happening, sorry if that wasn't explicit. The effect on an incandescent bulb i believe is identical when dimmed with a triac vs just getting less voltage. All the bulb life calculations are based on designed vs supplied voltage which is why that's the thing I'm fixated on here.
|
# ? Nov 29, 2022 19:20 |
|
ANIME AKBAR posted:There are lots of ways to approach it, depending on what your background is and what sort of circuits you only want to build. With no formal electronics training, and in my classic dive -headfirst-into-the-deep-end style, one of my first PCB designs was for a VFD tube clock, using an unused timer on an ATMega32u4 to drive a boost converter to make ~30v needed for the tubes from the 5v supply. Other than some beginner footprint mistakes, it worked well enough for the few mA I needed. I never did finish the clock, though. Too much scope creep and other shiny things distracting me from finishing the code side of things. So to reinforce what Akbar says, just start playing with things until it does what you want, then add features as needed.
|
# ? Nov 29, 2022 19:47 |
|
I have seen incandescent C9 bulbs online like earlier today, also led C9s that run on 120-220v. Maybe it was on AliExpress Oh almost forgot about these, C9 LED replacements https://tru-tone.com/vintage-style-LED-Christmas-bulbs-c9-size/ Technology Connections said good things about these His Divine Shadow fucked around with this message at 20:10 on Nov 29, 2022 |
# ? Nov 29, 2022 20:05 |
|
I have a bunch of tru-tones, I am a full believer in those as a replacement for regular c7/c9. My strands I am concerned with consist of 1930s era swirl C9s, and c7 Snowball bulbs which have no LED equivalent.
|
# ? Nov 29, 2022 21:39 |
|
Qwijib0 posted:I am concerned about some glitch on a smart dimmer running them at 100% so I need some sort of way to guarantee they never break ~60V. Put pairs of identical bulbs/strings in series. 120 / 2 = 60V, ta da! e: this also reduces the power-on stress by 75% ryanrs fucked around with this message at 21:59 on Nov 29, 2022 |
# ? Nov 29, 2022 21:45 |
|
Yeah ok with something as hard to replace as weird niche bulbs from the 30's I see your concern, I'd definitely go for something like putting them in series somehow just to make physically certain they only get lower voltages. Now if you wanna go super nuts you could also get a big ol' variable transformer and drive the wiper with a motor and a microcontroller instead of using the dimmer controller but that would probably cost more than your entire lighting setup. Would be fun though. e: Also from my understanding the filament in bulbs is under the most stress when it first turns on or abruptly turns off, so maybe also include some kind of logic to slooowly ramp them up and down too? I know you said it changes with the outdoors lighting though so maybe that covers it already. Shame Boy fucked around with this message at 21:53 on Nov 29, 2022 |
# ? Nov 29, 2022 21:51 |
|
Anybody ever see any lists of like, useful PCB designs for adapters/ small circuits to throw in your next order sort of things? I have to place an order from JLCPCB soon and I don't have anything else of my own to order, so I'm paying $20 shipping for a $2 pcb. Figured I could throw a couple extra little adapters or anything else handy while I'm at it, but feels like there should be a nice list of those somewhere.
|
# ? Nov 30, 2022 02:24 |
|
I had a 50x50mm design of a whole bunch of panelised assorted SMD breakouts once. Wish I still had it. I ordered 5 PCBs and I still have a few of the footprints in a bin somewhere, they ended up being absurdly useful and cheap
|
# ? Nov 30, 2022 02:26 |
|
Here's a laptop DC jack with seven different pins. Guess where ASUS decided the entirety of 6 loving amps should flow through? That's not their soldering, that's me trying to suck away their poo poo solder, hit it with a flux pen, and shore it back up with lead eutectic. Oh yeah, and that second solder pad half an rear end-hair to the left of that pad is negative on my multimeter. That's a precision driver bit for scale; it's hard to convey how pathetically small this is for being 120 watt input. I was getting constant "plugged/unplugged" pop-ups in Windows while gaming, with the plug securely in place, and two different power bricks were doing the same thing so I narrowed it to the port. Is there anything else I could possibly to in the future to bypass or reroute this bullshit if it gets worse? It's on the motherboard instead of a module like they easily could have used (and did for the HDMI on the other side of the laptop ffs)
|
# ? Nov 30, 2022 04:59 |
|
Zero VGS posted:Here's a laptop DC jack with seven different pins. Guess where ASUS decided the entirety of 6 loving amps should flow through? This is why I'm really glad laptops are going to USB C now. Laptop charging ports seem to be the prime mechanism for planned obsolescence. I'm not 100% sure about ASUS - do they have DRM built in so you can only use their chargers? If so it's probably going to be very difficult to bypass/replace the connector, at least without also slicing and dicing your charging cable too.
|
# ? Nov 30, 2022 05:13 |
|
Shame Boy posted:e: Also from my understanding the filament in bulbs is under the most stress when it first turns on or abruptly turns off, so maybe also include some kind of logic to slooowly ramp them up and down too? I know you said it changes with the outdoors lighting though so maybe that covers it already. A PTC resistor otherwise perhaps?
|
# ? Nov 30, 2022 05:42 |
|
Qwijib0 posted:I have a bunch of tru-tones, I am a full believer in those as a replacement for regular c7/c9. My strands I am concerned with consist of 1930s era swirl C9s, and c7 Snowball bulbs which have no LED equivalent. Those are pretty cool looking and I haven't seen the swirl patterns at all. I would've said a stepdown transformer and a PTC resistor to prevent inrush current, but two strings in parallel is a simple solution if you can swing it. It would be interesting to know what a transformer would do if hooked up to a dimmer, but you'd need a scope for that I guess. Bit OT, I'm in 230V land myself and just cannot get C9 style lighting here. I bought E27s instead, but they are pear shaped and way larger. Got 100 ft for the front of my house. I would like C9s though, but LEDs, but I think they're all made for the US market, I have been thinking of using a step down transformer though. I know in the past they resold american lights in Sweden at least, same string but the US plug was lobbed off and a 24V transformer was fitted, the lamps where 3volt lamps while US lamps where 15V, at least in a set of 8. My great aunt who is 98 has had an old style set for 60 years now, well I dunno what happened to it anymore, she's in a home since last year after she got covid.
|
# ? Nov 30, 2022 05:54 |
|
Splode posted:This is why I'm really glad laptops are going to USB C now. Laptop charging ports seem to be the prime mechanism for planned obsolescence. They don't use any DRM, just a barrel jack with a sense pin at the middle. When I was troubleshooting I got a Best Buy universal charger which was the same voltage and more amps, it worked fine. I don't even get how the sense pin works if the universal adapter only has 2 pins at the part of the plug where you swap different tips.
|
# ? Nov 30, 2022 07:37 |
|
Sense pin is probably a resistor to ground or similar. The resistor value will be specific to the laptop/brand, so it lives in the swappable tip, and only +/- go back to the charger board.
|
# ? Nov 30, 2022 08:35 |
Splode posted:This is why I'm really glad laptops are going to USB C now. Laptop charging ports seem to be the prime mechanism for planned obsolescence. I mean USB-C is sort of neato, and it's not as bad as USB micro (holy poo poo), but I'm honestly confused why some people are in love with it (unless you're using it as a general low-cost, high quality signal transmission cable, in which case ). ANIME AKBAR fucked around with this message at 06:32 on Dec 1, 2022 |
|
# ? Dec 1, 2022 06:28 |
|
ANIME AKBAR posted:I'm honestly confused why some people are in love with it (unless you're using it as a general low-cost, high quality signal transmission cable, in which case ). Literally all of my USB-C phones have failed at the port, and a rough survey of a bunch of people I know is that this is common, but people still defend it for some reason. Oh, they needed a new phone anyway. It's hosed. I actually like microUSB though. I've never had a port fail, and I've broken a couple cables in them by doing stupid poo poo. As it should be, the cable is the sacrificial part. I've been forced to update all of microUSB designs at work to USB-C and I hate it. And we've already run into a non-compliant power brick that refused to turn on with a light load and only passive power signalling.
|
# ? Dec 1, 2022 06:55 |
|
99% of the time, phone usb-c failure is from impacted pocket lint so the cable doesn't plug in all the way
|
# ? Dec 1, 2022 07:01 |
|
|
# ? May 9, 2024 03:59 |
|
That is another bad part of them, but also definitely not what I'm talking about Also that's what everyone says You're just like all the other USB-C apologists!!
|
# ? Dec 1, 2022 07:12 |