Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Sagebrush posted:

Just another way that the water analogy falls apart.

The water analogy works pretty well here too, though! Think of electron drift velocity as the fluid velocity and the speed of light in the medium as the speed of sound in the fluid. We could, say, take a large pipe and drill tiny holes into it, and cap one end and attach the other end to a valve whose other side is attached to a constant pressure liquid source. Say a huge reservoir at a fixed water level.

Ambient atmospheric pressure is like ground potential and the tiny holes function as high resistances to ground. The valve functions as a switch. The pipe leaks down to atmospheric pressure. You close the switch/open the valve. The diameter of the pipe is much larger than the holes so there's no appreciable displacement of the fluid inside, but the tiny holes all start spurting water, first near the valve then further from it. You can even watch the pressure wave propagate through the pipe much like you can watch an EM wave propagate through a transmission line, complete with reflections.

It's me. The hydraulic analogy defender has logged on. I just like having electrical analogies for mechanical systems. "Hydraulic ram pumps and boost converters work the same way" is an important realization to have at the right point in the development of your understanding of either. I'll grant there are electrical things impossible to explain with elegant hydraulic things. Magnetics other than water-hammer-as-inductance are a great example. Also almost everything about water flowing in pipes is more complicated than electrical analogies. Don't design your plumbing in SPICE or you might think you can suck water up to the 20th floor instead if pumping it up and accidentally build a barometer.

Adbot
ADBOT LOVES YOU

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

silence_kit posted:

I'm not really that mechanically inclined, so sometimes I try to understand mechanical things by using electrical analogies. I don't know if the following is correct, but in my head, a car's transmission is just a tunable impedance matching circuit from the engine to the car's wheels.

This is valid as well. Torque is the equivalent of voltage and rotational speed current. Gear ratios are like Vout/Vin for a DC-DC converter. The caveat when discussing mechanisms, though, is the circuit node. The only thing I can think of that obeys the equivalent of Kirchoff's current law is a differential. Having 2 components connected to a node is like having a shaft going straight through. A single shaft with multiple springs/brakes/etc is like a series circuit. (Flywheels are inductors! Vanes with air resistance linear in rotational speed are resistors. ratchets are diodes. Clock springs are capacitors!) If you want to connect more than one component to a node you'll need a differential, like the one on the rear wheels of a car. Having one wheel start spinning is like shorting the output of your power supply and having the voltage drop to zero and the current go to its limit until the short is removed.

A cruise control in this analogy is a constant current regulator. The car is like one hell of an inductive load, too. You'd dump a lot of energy as arcing if you were to just open the circuit up all of a sudden.

Stack Machine fucked around with this message at 02:43 on May 15, 2020

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Forseti posted:

My plan is to just point to point wire the top since I only have single sided PCBs but I'm not 100% clear on the reason for the little island in the middle. My assessment is that it's just for convenience of wiring up stuff since the perimeter simply encloses all the pads that need Vdd. The outer bit is ground. Does that sound about right? Not sure if it does some EMI function as well is why I ask. This is a 3.3V chip, I believe it runs at up to 133MHz for the MiSTer.



That's a power plane and is likely there just because it's considered a PCB best practice. Having planes for your supplies instead of just routes is great for a number of reasons. Inductance in series with a power supply is bad because you don't want current spikes on clock edges to cause your supply to dip. Capacitance on supplies is good for the same reason. Planes have less parasitic inductance and more parasitic capacitance than point to point routes. The planes also serve to, in combination with the routes over them, form a relatively controlled-characteristic-impedance transmission line and give the routes more capacitance to ground (or any supply. A cap to anything DC looks identical electrically to a cap to ground if the supplies are stable) than to each other. This reduces cross-talk by making the bottom side of the effective capacitive voltage divider large.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I'd be surprised if you had much trouble. Star topology on your grounds/supplies keeps inductance low too and as long as you place the decoupling caps near the power pin you're golden for that. That does mean caps should go on the same leg of the star as the IC they're decoupling though.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Forseti posted:

What is the best way to measure a solar panel anyway? I tested out a 6W one I got for peanuts off a promotion yesterday out of curiosity by wiring the panel directly to a 600F supercap and measuring the voltage on the cap.

So for example I measured on the capacitor a start V of 31.7mV at 14:14:15 and an end V of 62.0mV at 14:17:20. So I calculated

<snip>

This is not ideal because it's all over the V-I curve of the panel. It starts at a short circuit delivering no power and ends at 0 current, also delivering no power. So you are underestimating the power your panel is capable of producing. There's a sweet spot for a given illumination in this curve called the maximum power point where the product of voltage and current is maximized. If you connect your panel to an inverter that includes an "MPP controller" it finds this sweet spot and continuously adjusts the load to hit it, but it has to have something to deliver the power to, either a battery charger or the power grid. If you have an inverter like this you can just slap an ammeter in series with your panel and a voltmeter in parallel and multiply them to get power from the panel.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
The I-V curves and I-P curves look like this one from a Q-Cell datasheet. They look kind of like current limited voltage sources with a little series resistance, if that makes sense.


The good news is that you know you have more power than you compute with the cap method and less than Vopen*Ishort, so you at least have ways to bound the power without fancy controllers or adjustable loads.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
They don't all have visual indications of power connectivity. I got one of these for 5 bucks at a flea market as a kid:



There's a slightly larger space next to the screws in the middle but the only real clue was the little staples of hookup wire the previous owner had inserted that served as a clue to the discontinuity.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

taqueso posted:

do all of those things

Looking at the trajectory of my own recent hobby projects, I went from using shift registers on the PC parallel port to programming PIC16s with the same to using Lattice ICEstick FPGA boards with the ICEStorm toolchain, and it's not like each replaced the others. This is a palette of techniques to draw from where each is appropriate for a different set of requirements. Depending on what your first project is, any or none of these may be appropriate. I've only ever used arduinos for work as kind of a cheap universal adapter/interface cable but they have a really quick learning curve if you're comfortable in C. The PIC16 I mentioned is super cheap and sips power at 32kHz but its instruction set is so limited that it's not really practical to program with anything but an assembler. FPGAs are also better at precise timing if you're generating a video signal, RF, or some other timing critical data. Something like the MCP4221 is great if you just want to toggle relays and read slowly changing data from a USB port. Also don't forget that the Raspberry Pi has programmable GPIO pins if you want your very own Intranet-of-Trash.

The Arduino is a great place to start for baby's first flashing LED, but there's a whole world out there of interesting bridges between code-land and wire-land that are very cheap and won't take up much space in your lab. Start a few projects and play with a few options.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
That's good news. I love my "make && make prog && minicom" one-liner and assume I'm not the only person who feels this way. I also get the impression that if I ever needed to automate any of the process it's more obvious how to do it with the open source tools.

The Icestorm toolchain does not seem to perform register retiming though for whatever that's worth.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I know the ice40 one, Icestorm, has Debian packages, which means anybody can live the dream of running an entire FPGA dev environment on a Raspberry Pi.

For Verilog simulation in open source land you can get Icarus Verilog and gtkwave to view the waveforms. Packages are available for these too so you can really have the height of EDA in 1995 or so on a toy computer.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Does Verilator still require a C++ program as a top-level? I guess if you're a programmer learning electronics that's OK, but it requires a little more setup and willingness to slog through bullshit than the likes of Icarus. It is really impressively fast though. Faster than commercial simulators for synthesizable designs.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Are you trying to detect whether the can is TOTALLY empty? Seems like you could set up a fan just strong enough to blow away the empty or nearly empty cans and leave the full ones undisturbed.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I was thinking of blowing air over sealed cans. I can see how you wouldn't just want to crank whatever's floating around the room right into totally open beer cans. I really like density/weight-based solutions for this because they're robust to room lighting changes etc. But for your actual question I second Arduino. I think most of them give you 3.3V and 5V from a USB supply. I assume you don't need guaranteed PPM failure rates or anything because this is presumably a pilot project and qualification etc comes later, but no matter what you set up don't expect low error rates off the bat unless somebody sold the solution to you and guaranteed that in writing.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I assume you're in the US so this is an appliance with a 4-prong L1/L2/N/G outlet. The total power is the sum of the currents in the 2 hot wires times 120V. There's probably not much flowing through the neutral so you could likely cheap out and measure one leg and multiply the current by 240 but the two leg method will work no matter what the load looks like.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
If you are sure the third wire is a ground and not a neutral and the appliance is functioning correctly there is guaranteed to be 0 current flowing in the ground, so the currents in the two hot legs will be equal and you can just use a single current transformer on either hot wire and multiply that by 240 (less accurate) or the measured voltage (more accurate) to get your power usage.

Even if it were a thing with L1/L2/N, the 120V paths are almost always very lightly loaded, e.g. only used for powering control electronics.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Speaking of PLCs, an interesting tidbit of electrical knowledge is the 4-20mA current loop used by industrial sensors. It's a 2-wire interface where the sensor controls the current in the wire and the PLC or other controller just regulates the voltage and reads the current. It's a damned elegant interface for its intended application:

It's easy to detect open/short circuit faults because they place the current outside the valid range.

Dirty contacts? Extra resistance in the circuit? Very long runs of cable to your sensor? No problem!

Need to power your sensor? Is 4mA enough? There are regulators just for that.

Faults won't start a fire readily unless the supply voltage limit is super high. 20mA at 12V is less than a quarter watt.

Parasitic inductance and capacitance will affect how fast the current can change but they won't affect the ability of the circuit to operate. This is something wired digital interfaces can't do.

If you do go the PLC route and get some "loop-powered" sensors, you'll only have 2 wires to connect for each sensor, which will both power them and carry the signal.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

silence_kit posted:

Ok, that is what he means. I understand that wiring can affect max signal speed. Don't forget about inductance. Sometimes you have to worry about the inductance of wires as well.

Don't many digital interfaces have adjustable clock speeds/data rates though?

The wire to the device is a distributed inductance and capacitance. The magic words to learn about this are "transmission line theory", but what it means practically is that there is a limit to transmission speed for non-terminated lines of a given length. Terminations give you fast digital at multiple wavelengths of length but burn power and limit cable length for a given wire diameter by forming a resistive voltage divider with the cable resistance itself.

Something like modbus gives you a configurable bit rate and terminated connections so you can transmit fast over a long distance. It's super attractive for a lot of applications. More than one sensor per bus, perfectly accurate data transmission with CRC. It's robust but complex. Current loop is robust but simple and perhaps a bit counterintuitive as a choice since few analog signals are represented as currents for transmission. I mentioned it here because its design solves common electrical problems very well with the application of very basic electrical principles, which seems like it may be of interest to people learning electronics.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

mobby_6kl posted:

Still this all seems pretty bad to me. Any ideas what could be going wrong here? The ESP ADC isn't great but it should be good enough for 10kHz at least, they have examples sampling at 70kHz.

I think your parallel tasks are not running in parallel. I think you're getting bursts of samples at your set rate followed by your micro switching to its main loop task. Try something simple. Just read a thousand or so samples into a buffer without a separate task then output them. Can you operate at higher speeds then?

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Differential signaling uses the difference between voltages on two wires. It's really good at rejecting common-mode noise (noise in both conductors relative to ground). Current loop is a current mode thing. The voltages in the wires are not relevant to the data being transmitted so what they do relative to ground is not really relevant either. There just has to be enough voltage between them to handle the drop at the sensor.

Re phase shift keying, modulation doesn't shrink the bandwidth of your signal. It just moves it around the spectrum. If the problem is that the high frequency content of your signal is getting lost, moving to a higher frequency will likely not help. Moving to a controlled transmission line like twisted pair and using a terminating resistor, however, will help.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
It is, in the sense that the current loop sensor drives the current to a value determined by the measured value and, say, an audio amplifier drives the voltage to a value determined by the sound pressure level. In fact, you can drive a 20mA indicator LED at a brightness proportional to the signal intensity by putting it in series with a current loop sensor and you can drive an incandescent bulb at an intensity proportional to the sound intensity if you connect it in parallel with an audio amp's speaker connection. The LED would easily burn up without a resistor on the audio amplifier output.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Sure, "voltage device" and "current device" may not be perfectly appropriate terms, but if you want to power an incandescent lamp you regulate a voltage and if you want to power an LED you regulate a current. If you want to drive a bunch of incandescent lamps at the same intensity you connect them in parallel so they see the same voltage. If you want to drive a bunch of LEDs at the same intensity you connect them in series to drive them at the same current. If you connect a voltage regulated power supply across an LED it may be too dim and it may blow up, but it's unlikely to be just right. If you connect a current regulated supply across an incandescent lamp, it may have trouble starting since the inrush current at the specified voltage is what it depends on to get up to temperature quickly.

So, like, I get that they have different V-I characteristics and the incandescent bulb has the added dimension of temperature but it's at least not unreasonable to say something like led is to current as incandescent is to voltage, to a first order.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Quick question: Are there any gotchas when wiring pins on microcontrollers? On the Rasperry Pi Compute, there are many things you have to connect. ~80 ground pins that must all be connected, ~15 power pins that must all be connected at 3 voltages, and each have a bypass cap. On the STM32 chip reference I'm looking at, it's got none of that: 4 ground pins all connected to the same ground, 4 power pins connected to the same power source with a fuse and voltage divider, and they're all on the same voltage. Is this normal? Simplest explanation is the Pi's just much more complicated . No gotchas in the datasheet so far. Mainly surprised vice the Pi, and even ADCs etc generally require a multiple resistors/caps for default usage.
1 decoupling cap on VDD should be fine. Lower clock rates mean lower resistive losses and less Ldi/dt on the power rails, and less ground bounce. Low power/low performance stuff is just simpler.

quote:

Related: If you're using a chip that accepts a flexible voltage range < 5V, but want to power it with 5V, would you use a (eg 3.3v) voltage regulator, or is a voltage divider with two resistors good enough?
Just the regulator. The voltage divider has an equivalent resistance of its two elements in parallel. Say the thing you're powering takes 3.3mA and you need less than 10% drop. You'd need a 100 ohm equivalent divider. You could do the math but that's going to burn 10s of mA probably to supply 3.3. It might be OK at these low power levels but it's never good (edit: efficient) and the voltage will never be well regulated even if your 5V is.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Gromit posted:

It has stopped cooling, and the leds on the front just flash rapidly, and the segmented temp display flickers gibberish. I'm assuming that the electronics are very simple, seeing as it just checks the temp and turns the peltier and 12V fan on or off as needed to match the set temp.

One piece of advice that has proven true time again for me is the 0th commandment: thou shalt check thine power supply. Your ICs will all have datasheets that will tell you which pins are supplies. You can check their DC values and AC values with a multimeter. Probing on that board while it's running is it's own :can: though. Find a way to probe it without touching it while it's plugged in if you can or use an isolation transformer if by some chance you have one. If the DC value is reasonable and the AC value is 0 your power supply is OK and you're in for suffering. If the AC value is high start checking caps. If the DC value is 0 something in the supply is dead.

"But it powers up" you say. There is likely more than one supply voltage on this board. It's possible only one has failed.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Re the cost of an electronics hobby, electronic components and assemblies for low power are very inexpensive and projects including them usually have a huge chunk of engineering effort but a tiny chunk of overall unit cost wrapped up in the electronics.

There are electrical and electromechanical things that are not electronic * (motors, solenoids, speakers, switches, etc.) and these can get pricey fast, but the electronics themselves are usually the cheapest part of a project, unless you're using high-end FPGAs, RF power amplifiers or something else exotic. An electronics hobby can be quite cheap but it's adjacent to a lot of expensive things. It's certainly not the electronics that make drones, robots, CNC machines, or whatever else expensive to build. These things are expensive even without the control boards. There are a ton of purely electronic projects to do, i.e. projects where the components are just semiconductor products and the few passive components required to make them function, but they're severely limited in scope by the fact that they can only interact with the physical world by sending signals down a wire, producing light, or changing a pattern on a display.

* I don't know if the distinction between "electrical" and "electronic" has been covered recently in this thread, but semiconductors or vacuum tubes are "electronic" and basically everything else powered by electricity is "electrical". ICs in particular are mass produced and tiny and thus cheap as hell despite their complexity.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

ante posted:

Where do you live, out of curiousity?


That's a distinction that I have vaguely heard from people in other countries, but doesn't exist in Canada as far as I can tell.

I'm in the US and I'm willing to accept that this distinction in terminology might not be universal but it is very common among electrical and computer engineers here at least. However it's called, I like having the distinction even if it's only to loosely guide my cost/engineering effort rule of thumb.

It may be an artifact of the past as much as anything. "Electronic" appeared alongside vacuum tubes to distinguish things which relied specifically on manipulating the kinetics of electrons. This distinction makes much more sense in tubes, where currents are flowing as electrons on a ballistic trajectory. As for whether all engineers make this distinction around the world or whether, say, a piezo transducer makes the cut, I have no idea. It's a useful distinction for me and a lot of other people but I'm certainly not going to go out of my way to gatekeep jargon.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Gromit posted:

Yeah, the leds power up and the PCB makes some whiny noises from somewhere near that coil, but nothing I would say was a stand-out problem (unless those things should be silent?) I'll try and check the voltages coming out of the supply and see if they are okay.

Re the whining sound, sound isn't really good for diagnosis in switching power supplies without some familiarity with the "normal" sound. They chirp audibly under a range of light load conditions (and the pitch changes with the load) and they also chirp audibly when they're completely shorted as they repeatedly try and fail to start.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
The original discussion was about an I2C-configured IC that used I2S for the actual audio data, I think?

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
The original spec and a lot of even modern hardware is max 400kHz, which is another reason people hate I2C.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

ante posted:

The two capacitors in parallel thing for different parasitic properties is also a myth. The same packages will generally have very similar characteristics, so you wouldn't really see any benefit.

If I make 1uF by jamming 2 500nF caps in parallel and both have the same ESL as the 1uF cap, I now have half the ESL and the frequency range over which the thing looks like a cap is twice as wide. The reality isn't quite this good, but even for the same package larger cap values typically have lower self resonant frequencies.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

ante posted:

I mean, sure, you're reducing the impedance at the self resonant frequency by half, but I'm talking about the myth of "use a 100nF and a 1uF in parallel to decouple everything". You'd be better off using two of the higher value (assuming you're using the same packages)



Ok, yes. Can't deny that. Those plots imply ESL of 400pH for all listed capacitance values, so using a smaller value cap in parallel instead if two larger caps would only make sense if some other design consideration stipulated less cap. I'll still point out that at very high frequencies where the inductance dominates the smaller cap values are "as good" as the larger ones in terms of impedance. There are cases where halving the impedance at 1GHz but only increasing the capacitive load presented to the power supply by 10% instead of doubling it is very desirable, but when you're that concerned with the cap on your power rail, you don't just wing it with a silly rule-of-thumb.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
You should be sure you're comfortable with the voltage drop. You can always use a higher-current-rated diode than necessary to get the drop down but you'll still drop hundreds of millivolts. The premium solution is to use an ideal diode IC. The application you're looking for is called "diode-or" and the datasheets will include application schematics like this:



This will take up to 5A from either input and drop practically nothing, so your nice regulated 5V rail stays nice over temperature and load.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Thank you. I'll go with something like that. Simple, but not too simple. It looks like based on availability and price, the TI LM2113 or 2115 are what I'm looking for. From the datasheets, it looks like the main diff is the 113 has a 120mΩ switch , while the 115 has a 84mΩ switch. For powering a low-current IC, does it matter which I use?

No. You're going to be drinking less than 100mA I'm sure. So you'll drop less than 10mV either way. A factor of 20 better than the a schottky diode.

ante posted:

There's a single P-MOSFET and diode solution. Better / cheaper / easier

I can't figure out what you're suggesting if the goal is to drop neither the battery nor the USB supply through a diode. That doesn't have to be the goal; ideal diode ICs are kind of baroque, but an ideal diode would at least need some sort of comparator.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Yes. This works if you don't mind the diode drop in Vusb and you are ok with potential damage to the circuit in the event of a brown-out of Vusb. Say it stays for a little while at a value less than Vbat but not low enough to turn the FET completely off so the FET starts to heat up... I think I like the classic diode OR better than this circuit.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Appreciate it. Now that I think about it, both sources feed into a voltage reg anyway, so this may be a moot pt.

Absolutely is. Ideal diodes are great when they're necessary but as long as your regulator is getting enough Vin an extra few hundred mV isn't going to hurt. If you need a little less drop, also remember you can use a schottky barrier diode (e.g. 1n5817) in your circuit.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dominoes posted:

Sweet. I think i'll just switch to a pair of schottkys. Thanks for the specific model rec; that helps. Would something like this also work? Going based on what's avail at the suppliers I'm using.

That'll work. Those are surface mount versions of the 1n581x series. Def opt for those unless you have a specific reason to prefer through-hole.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Unfortunately, it's very difficult to make CMOS integrated circuits tolerant to reversed power supply polarity. There is a ton of area comprised of wells doped to the opposite species of the substrate. I.e. the n wells in a p substrate forming the body for all of the P MOSFETs. The details of how all this works aren't really important, but what you wind up having is an enormous reverse-biased diode all over your chip. And if you ever forward bias it you just fuse open your power or ground bond wire and the IC is dead. Probably also reduced to slag before the bond wires break.

Reverse supply protection circuits are a great thing to have for this reason, since even otherwise very robust ICs likely can't handle this. An example of a simple supply protection circuit is just a fuse and a reverse biased diode from ground to power. In the event of a reversed power supply this diode takes all of the current instead of the ICs downstream. Another place to use a schottky since that will likely have a lower forward voltage than the silicon PN diodes in the ICs themselves.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

shovelbum posted:

Yeah, do you have a part number for a good through hole schottky to just buy a hundred of and keep around? It's really irritating when even something like an esp module has no onboard protection

2n5817 is the standard 20V "jellybean" schottky. Continuous forward current of 1A I believe. You can use something like a 1A polyfuse instead of an actual fuse too if you want the thing to be resettable. Or a series diode if you can stand the drop and don't want to blow a fuse/load your supply every time you connect the supply in reverse.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Do folks hanging out in this thread still see through-hole as "easier" than surface mount for beginners? (Leaded. I know BGAs and QFNs are kryptonite for a budding electronics hobby) Like, does a kit or design provided online being available in through-hole-only make it more accessible? Would it have been more approachable to you when you were starting out? I grew up in a time and place where it seemed everybody with an interest in electronics had the cheap radio shack soldering iron, a drawer full of perfboard, and racks and racks of 70s vintage through-hole components. I can't imagine using their setup for surface mount but I just don't know if that should even be a concern of mine in 2020, but I have a lot of interest in heathkit-style pedagogical electronics and I really don't want to throw up any hurdles for people reading my poo poo.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I like to suspend components/wires in the air in a helping hand/third hand. Just a bunch of alligator clips on articulated arms. Frees up my actual hands for holding the iron/solder.

Adbot
ADBOT LOVES YOU

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
If I'm reading this correctly, you shouldn't use this circuit with earphones on the output. It's designed to be used with high impedance line inputs. Loading the output will ruin its function. If you want to use it for that place it between your line out and your headphone amp (and I don't know... glue the volume knob on your headphone amp in a fixed position?) If you insist on scaling it up, remember that most headphones are 8 to 32 ohms and some fancy ones are 600 ohms. You also have to scale up your capacitance in the same proportion you scale down the resistors to preserve the function.

As for how it works, the caps and first 2 diodes form a peak detector. The central branch with the potentiometer sets how how fast that peak detector's output decays. Anything significantly louder than the most recent peaks gets divided down by about 20x by the 22k into 470k. Note that it doesn't really set an absolute limit as much as it just attenuates the highest peaks relative to the average waveform envelope. If you want to keep your headphones from damaging your hearing, maybe just 2 diodes with series 10 ohm resistors, one in each direction is better. If that's not loud enough you can do 2 back-to-back zeners.

E: as for where the current goes in the central branch, one of those caps is above ground and the other is below ground. As time goes to infinity the value of both of those caps goes to equal, and if the input is DC balanced (audio is. Otherwise it burns out your speakers) that value is 0V. Current flows from the high capacitor, dropping its voltage toward 0, to the low capacitor, raising its voltage toward 0.

Stack Machine fucked around with this message at 16:35 on Jun 11, 2020

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply