text
stringlengths
83
79.5k
H: Idea behind current mode control in DC-DC converter I am learning about control strategies for DC-DC converters. While I find voltage mode control easy to understand, I struggle to understand current mode control. Is the idea here to control the output voltage by controlling the inductor current? If so, what is the relation between them? AI: It is a vast subject to discuss but, basically, with voltage-mode control, the error voltage delivered by the compensator directly sets the duty ratio \$D\$. By doing so, you adjust the output power delivered by your converter, according to its dc transfer characteristic like \$V_{out}=DV_{in}\$ for a buck converter: The duty ratio is elaborated via a pulse-width modulator (PWM) block made of a comparator and an artificial ramp pulsing from 0 to a peak value \$V_p\$. When the ramp intersects with the error voltage (a flat dc level in theory), then toggling occurs, turning the main transistor off. By changing the dc error voltage - the loop does that by monitoring the deviation of \$V_{out}\$ from its target - you directly adjust the duty ratio and ensures regulation. In this mode, you don't need to consider the inductive current \$i_L(t)\$ to operate the converter. You actually implement a current limit but for safety reasons and not for regulation purposes. In current-mode control, it is different. The sawtooth is replaced by the inductor current which is also a ramp. This current can be directly observed by a current transformer or via a resistive shunt which delivers a voltage image. The error voltage will now set the inductor peak current cycle-by-cycle and will adjust the value based on the operating point: a high peak for a large output power, a low value in light-load conditions: In this mode, you control the inductor peak current and indirectly the duty ratio \$D\$. If you operate the buck converter in voltage- or current-mode control, \$D\$ will be identical between the two converters for a similar operating point. It is only the way this duty ratio is elaborated that changes between the two. This time, you must monitor the inductor current cycle-by-cyle and it provides inherent protection to the converter. Below is a quick summary between the two techniques and each bullet is a subject to expand in itself : ) You can have a look at my last small seminar on the subject:
H: Power amplifier SST12LP14-QVCE I was reading about this IC and its applications I looked in the schematic I understood what the pins are except for 2 pins, the detection pins. What are they and what they connect to? I'm not that great in these things but trying to improve. Thanks in advance. AI: Those pins are for power detection. The Det pin outputs a voltage proportional to power of the RF signal being amplified. They connect to an external meter, or other control circuitry. Here is a great resource to learn about this: Solving the RF Power-Detection Challenge
H: What happens if the Input voltage and the output voltage are same in a boost converter? I'd just like to know what would happen if the Input voltage and the output voltage are same in a boost converter. I have a feel that it might not work. But would like to understand the effects that will happen on the inductor and the switching MOSFET. This converter is an example. AI: In general anything can happen, it's up to the chip. Your data sheet specifically says it is unstable if Vin > Vout.
H: Overvoltage protection circuit transistor draws 2x load current then suddenly stablizes I've built an over voltage protection circuit according to this schematic by Maxim: If the load is low power consumption like MCU or other ICs, it works just fine. If the load is higher for example, 350mA (maybe DCDC circuit,) the circuit starts to draw 2x current of the load (would be up to 700mA) in a constant speed upon power up. At the same time Q1 is generating heat (I guess this is where the extra current goes.) Once it reaches around 700mA it suddenly drops back to around 440mA then it is stable. I initially thought it was the load circuit causing this, but if I power the load circuit without OVP it doesn't have this behavior. Question: Why does the current ramp up? How can I avoid this? In the stable condition is the 90mA difference consumed by Q1? AI: The circuit you are using is intended for low current use. From the Maxim application note: The measurements for Figure 3 were conducted using a sensor signal conditioning IC, the MAX1455, as the load circuit with a 1uF decoupling capacitor across the IC power-supply pins. The nominal current draw of the IC circuit during the test was 3mA. At low current there is a voltage drop across Q1 of only a few millivolts. At the far higher current you want to use in your DC-DC converter, the voltage drop will be much higher. If the DC-DC converter needs 5V as an input voltage, then it will not get it while using this circuit. The voltage to the DC-DC converter will be closer to 4V (possibly lower) at start up. The converter will have to draw more current to try to get its output to the correct level - that will drop the input voltage even more. As the converter reaches steady state (its output voltage reaches its set level,) it will draw less current and the voltage drop across Q1 will be smaller. Because less voltage is dropped across Q1, the converter will be able to operate better - it will draw less current. This circuit isn't made for what you are trying to do with it. It cannot work with high current, where "high current" means more than a few milliamperes. It is possible that Q1 will start to oscillate in combination with the heavy load. Q1 is essentially the same as the pass transistor of a low drop out linear regulator. Such regulators are notorious for oscillating when the capacitance on the output is not right (too much, too little, not enough series resistance, etc.) You might have similar problems with this circuit.
H: Why am I getting different simulation results in KiCad every time I run the program? I feel like there is something wrong with my circuit. I'm trying to do an AC sweep simulation to find the transfer function frequency response from input to output. AI: I think you do indeed have an error in your circuit: You have the output of the op-amp connected to ground. That's probably not what you wanted. Given the messages you mention in the comments ("doAnalyses: AC: Timestep too small; frequency = 0: trouble with xopamp1:jx-instance j.xopamp1.j2") you may have a problem with the simulator setup and the op-amp model, as well. I haven't used the KiCAD simulator, so I can't help you with that.
H: Is it possible to stabilize every system with an integrator I was wondering if it was possible to stabilize every system with an integrator. From my point of view, an integrator can be used for applying a dominant pole strategy. If I place the pole at very low frequency, the phase shift will be 90°C for the low frequencies part of the system. Then at higher frequencies, whatever the phase shift is, the gain will be lower than 0. Would placing the pole at very very very low frequency, an integrator should stabilize every system? AI: No. If the system you want to control itself contains an integrator, adding another integrator will make it unstable, no matter how low you choose your pole to be. This is because the pole of the system is at omega=zero, so you can't insert a dominant pole. You can't go lower than 0 Hz, after all. The phase lag through the feedback loop will be 180° or greater, making it oscillate. The way to stabilize such a control loop would be to omit the integrator and use proportional and differential gain only. (Depending on the order of the integrator in the system, you might even go for a 2nd order differentiator, aka two cascaded differentiators.) I've had to work with such a system lately at university: a model maglev train. The physical system integrates force (from an electromagnet) into velocity, and velocity into position, making it a 2nd order integrator that can't be compensated with a dominant pole as its two poles are at 0 Hz.
H: How to convert encrypted PSpice model into LTspice model? I want to simulate the model in this link: https://www.diodes.com/part/view/AL8860Q/#tab-details under the header of the Technical documents and Spice Model on the right-hand side. The problem is that it is encrypted for PSpice simulation. I was wondering if there is a way to decrypt it and use it in the LTspice simulation? AI: I was wondering if there is a way to decrypt it and use it in the LTspice simulation? Short story: you can't decrypt it. Longer story: LTspice can use encrypted models (specifically designed for LTspice) just as micro-cap does with it's specifically encrypted model files. You are personally prevented from decrypting them i.e. you cannot have visual access to the raw data because suppliers regard it as their IP. See this answer on how to do it in LTspice. It refers to an ON semi document that has the instructions but, the procedure should be the same for any encrypted model from any supplier (within reason).
H: RF choke DC block cancels my small signal totally in LTspice I am building a common source amplifier as shown below. As you can see below, the Vsource signal is good sine, but after the capacitor the sine is totally canceled and I get only the DC bias. I am supposed to see the sine with a DC offset after the C2 capacitor. Where did I go wrong? AI: I am supposed to see the sinus with DC offset after the C2 capacitor. Where did I go wrong? Short story: totally inappropriate values for C2 and L1. Longer story: - Your sine wave input has a frequency of 10 kHz but, the 1 nH choke (L1) has an impedance (at 10 kHz) of 63 μΩ and, this means your signal will be thoroughly decimated. Try making the L1 choke a million times bigger in value like 1 mH Your input capacitor (C2) is 1 pF and, that has a blocking impedance at 10 kHz of 16 MΩ so try using a 1 μF instead. The values you currently have are more suited to 5 GHz and not 10 kHz.
H: Utility of a load resistance for measuring another resistance In this paper they need to measure the value of an unknown resistance RS, whose value is the output signal of a sensor. However, instead of measuring this resistance directly with a multimeter, they place a load resistance RL in series with it, connect the circuit to a DC current, and read the voltage VL across that resistance: simulate this circuit – Schematic created using CircuitLab Then, the value of RS can be found using the following expression, where Vc is the applied voltage and Vout the voltage VL across the load resistance: I wonder what the utility of introducing this load resistance is. Why don't they measure directly the resistance Rs connecting it to an ohmmeter? Would it improve the precision of the value of RS obtained? AI: I don't understand why they did it either: on the one hand they have a high quality meter, and on the other they are measuring very high resistances. According to your cited paper: To allow a more sensitive detection of gas in our set-up, we used a load resistance RL. Input voltage, VC, of 1 V was applied from DC power supply ... RL is connected in series with the sensor and its value is 491.3kΩ. The output voltage, Vout, was measured across RL. ... output signal (voltage) was recorded using Fluke Digital Multimeters 287/289" The resistances are pretty high for one of their sensors (400 GΩ per first graph of figure 6.) which appears to be off the range of the Fluke meters. In the potential divider arrangement (approx 500 K / 400 G) they should see about a microvolt, also off the range. (And surely susceptible to noise?). It's possible they were not measuring the ZnO sensor with the circuit they show. For the second sensor Na:ZnO they have about 3 MΩ easily measured by the meter. It's not clear what advantage this potential divider has over using the meter directly. In passing the meter has a slightly better accuracy for voltage (0.025%) than resistance (0.05%) according to their datasheets (Fluke 287, 289).
H: Why does my oscilloscope display a lot of noise at high sample rates / time windows < 25 us? I have a Tektronix TDS640a scope that overall works very well for its age. I also have OEM 500 MHz probes, P6139B. When sampling at or above 25 us, my waveforms look "normal": nice flat signals, with maybe 1 or 2 pixels of "noise". I have the bandwidth filter on here, but I don't really need it for this signal. Generally, everything "works normally" at this time window. However, when I reduce the time step by one "tick", down to 10 us, my signal gets very noisy and chaotic, practically unusable for making any sort of fine measurements. I've used the averaging method before, and that helps some for repeating signals, but for one-shots like capturing switch bounce, that isn't very helpful. I know the scope has many years on it, but I can't imagine it was intended to operate like this. I've observed this on all 4 channels, with 6 different probes (4 OEM, 2 some off brand unspec ones), generally regardless of settings (including the bandwidth filter). What's causing the major increase in noise at these small time windows? AI: All signs point towards this being a problem with the oscilloscope itself. It appears that when you change timebases from 25 μs/div to 10 μs/div, the sample rate also changes from 2.00 MS/s to 5.00 MS/s (the scope says so, on the top line of the screen). Clearly, there's something wrong with the vertical circuit that only shows up when the ADC is sampling at 5 MS/s. This could be as simple as a bad capacitor on power supply, preventing the ADC's supply voltage (from which the reference voltage is surely derived) from recovering fast enough at higher sample rates. Electrolytic capacitors do tend to go bad with age, so I wouldn't be surprised if this is the fault. Fortunately, the TDS640A is from the era where you can expect a detailed service manual with troubleshooting flowcharts to be available, and indeed one is, right here. Try following the troubleshooting steps there (starting on page 225) and see if that can't lead you to the problem. If you have a computer with a serial port, or a USB-to-serial adapter cable, you may be able to get the scope to just tell you what's wrong with it (very fancy, for the time!). The troubleshooting steps all seem to end in "replace the X module/cable/board", which is likely no longer possible to get easily, but it shouldn't be too hard to hone in on the source of the problem with the X module/cable/board and replace the faulty part. Edit in response to some comments: At this point, I'd recommend you just open up the scope and replace all the electrolytic capacitors in the thing, outside the CRT drive circuit at least. Electrolytics from the 90s are not going to be in good shape some 20+ years later; they degrade with time, whether used or not. It should be fairly cheap and easy to get equivalent capacitors today from Digikey, Mouser, Newark, or whatever supplier you prefer. (I implore you not to get them from Amazon, Ebay, or Aliexpress, though.) I recommend going with capacitors from a recognised manufacturer like Nichicon, Nippon Chemi-con (aka United Chemi-con in the US and Europe Chemi-con in Europe), Rubycon, Panasonic, or Würth Elektronik; the very cheapest ones from no-name manufacturers tend to have quality problems in my experience. I specify not to replace them in the CRT drive circuit not because those are less likely to need replacing or anything (they're not), but because working on a CRT is dangerous. The whole circuit is enclosed in a separate box with high voltage warning labels for a reason--lethal voltages can and do remain on capacitors (particularly the CRT itself, whose anode can store lethal amounts of charge at upwards of 10 to 15 kV), and should absolutely not be opened unless you know what you're doing--and should almost never be opened when you do know what you're doing, either.
H: Replacement fuse specification I have a lighting fixture with a blown fuse on the PSU PCB. The blown fuse fitted was a "T3.15AL250C" 932 (red-coloured) box fuse. I replaced it with a "T3.15A 250V CQ MST" of the same form factor (but black.) The fuse blows instantly. Before I start investigating if there's a fault elsewhere on the PCB, I'm trying to establish if I've fitted a different fuse that is blowing during a "normal" condition. Could anyone help to say if there is a difference? The breaking capacity ('L') isn't mentioned on the new fuse. I'm not sure if that is related. AI: The old fuse had low breaking capacity, that is what the "L" means So the new fuse can't really have lower breaking capacity. There is a fault in the circuit.
H: Inverting op-amp unexpected voltage shift I'm trying to create an op-amp circuit that attenuates a 5 V input signal down to a 1 VRMS Vout signal (1.414 V Vout). I need to shift the output signal by 2.5 V so that it can be fed into a unipolar ADC. Below is my current inverting op-amp circuit in Multisim: As can be seen above, the Vout signal amplitude is spot on: (4.6338 - 1.7895) / 2 = 1.422 V (roughly 1.414 V). The problem is that the blue Vout signal appears to have shifted much further than expected. The midpoint should be on the purple 2.5 V line but it is actually at (4.6338 + 1.7895)/2 = 3.211V. Does anyone have any idea what's causing the unexpected voltage shift, and how to fix it? My circuit on Multisim AI: Your voltage divider applies 2.5V to the non-inverting input of the OpAmp. To see what's happening there, just set Vin=0 and draw the circuit again: simulate this circuit – Schematic created using CircuitLab It should be easy to see that this is a non-inverting OpAmp amplifier circuit with a gain of about 1.286. As a result, if you apply 2.5V DC to the non-inverting input, you get around 3.2V DC at the output. That's exactly what you're seeing in your simulation. If you want 2.5V at the output, you have to apply 2.5V / 1.286 = 1.944V at the non-inverting input instead.
H: Tracing to see if IC is TM1650 or something else I am tying to determine where the PCB traces are going in order to figure out if this is using the TM1650 or something else. Most of these (this is from a pool pump) uses the TM1650 but there are some that use some other chip. From what I can gather, since the chip is covered in silicon, is that two of the pins (SCL/SDA) are on the correct pins of the chip. Those being pins 2/3 respectively. The others coming from the LED segment do not seem to match the TM1650 pin positions. I have tried to trace them the best I could: The original image without my color traces: The front of the PCB: Here is the schematic of someone who has already done something like this - allthough they had a different version than I do: I'm not sure where the C, DP, A, and B traces are going to. With my current traces it looks like this: It would be great if someone who knows more about traces and such on PCBs to lend me a hand with determining if it's the TM1650 pinout or not and if my traces are even correct as-is. AI: It certainly looks like it to me. Tracing can be tricky from photos because of hidden tracks, focus, reflections and so on, but as far as I can tell ... SCL, SDA and power and ground all look right. Tracing the digit selects too seem correct. (You made a couple of errors in your tracing, specifically red which appears to drop down across the wire link to pin 1 of chip.) The seven-segment display appears to be wired with the segments remapped, which just changes the software. Your circuit diagram appeas to be of an different board, perhaps intended to connect to this one: note that while the DISPLAY BOARD signals appear to match your board, the pinout does not. And if the LED and switches aren't connected as expected by the transmitting end, it's likely to display incorrectly and/or misunderstand the key presses. This is what I believe the circuit to be, but some of it is just guessing (especially which switch is on which segment line.) On J1, I've labelled GND as Pin 1, but who knows which is Pin 1 on your equipment. R3, R4, R5, R6, R7 all are marked 0 ohms, hence omitted. This is the tracing as far as I can make out.
H: How can I clip a voltage upper limit in an analog signal? This is a theoretical question since I've come across this type of problem many times. Suppose an amplifier is powered between 12 V and -12 V, so the signal output can reach a maximum of 12V. If I am not expecting my signal to be more than a few hundred millivolts, then I should be able to safely read it on my Arduino Nano (or UNO). To be safe if I want to make a filter that blocks all voltages above, say 3.3V, just to be safe, how do I do it? Are there semiconductor devices that could perhaps become high resistance over a particular voltage? AI: Many ICs have input protection diodes that will become conductive when the input falls outside the bounds of the power supply potentials (one or the other diode becomes forward biased), having a voltage "clamping" effect (left): simulate this circuit – Schematic created using CircuitLab R1 is usually inserted to prevent a lot of current flowing during such clamping. This also prevents diode forward voltage from excceeding 0.3V or so, keeping the actual potential applied at the IC input to between \$-0.3V\$ and \$V_{SUPPLY}+0.3V\$. When input potential is within bounds, the diodes are reverse biased, passing negligible current as if they weren't even there. The IC's high input impedance means that resistor current is negligible, with no appreciable potential difference across it, so the IC "sees" the potential at IN. If your device doesn't have those diodes, or the datasheet doesn't mention them, nothing's stopping you from doing this yourself, with your own diodes (shown above right). Sometimes you wish to avoid dumping current into the positive supply rail, preferring that it go to ground instead. For that you can use a zener diode to clamp to ground: simulate this circuit Above left, a single zener diode prevents the voltage at its cathode from rising above 3V, by conducting strongly in that condition. It is otherwise a regular diode, so it also prevents its cathode from becoming more negative than -0.7V. On the right we add a schottkey diode to clamp closer to zero, at -0.3V. In both cases, clamp current is directed to ground, and won't interfere with the positive supply in any way. If for some reason the IC's input must not go negative at all, you can use the above zener diode trick, but against the positive rail, or you can clamp against something other than the supplies. Both of the following examples will allow OUT to approach, but not reach, 0V: simulate this circuit The diode clamping solutions above all require a resistor to limit clamp current, but that might be a problem. For instance, reverse-biased diodes leak some current, which must traverse the resistor, causing a small voltage drop across it. That's a big problem if, say, you're trying to measure a potential with millivolt precision, using a 16 bit ADC. It may be necessary to avoid clamping altogether. You can use resistor potential dividers to scale and offset the source, producing a potential compatible with the ADC: simulate this circuit Sometimes you want as little impedance as possible between the source of signal you are measuring, and the input to the ADC. Some ADCs, particularly high speed or high resolution ones, can have appreciably low and variable input impedance. This will draw current via any impedance in the source, resulting in a voltage drop across that impedance, messing up your measurement. A simple potential divider on its own may not be an appropriate source for direct connection to an ADC, because it becomes an additional impedance between the original signal source and the ADC itself. However, using an op-amp, with negative feedback, you can produce a near-zero impedance signal, suitable for direct connection to even the most troublesome ADC input, while simultaneously scaling and offsetting the signal: simulate this circuit Alternatively, you can buffer a signal with high source impedance (such as the output of a potential divider) using a voltage follower: simulate this circuit OA2 is a FET input type, with extremely high input impedance (1012Ω) and insignificant input bias currents (a few picoamps), which won't load the potential divider output at all. Crucially, it has near-zero output impedance (due to negative feedback), and will guarantee the ADC sees the signal you want it to see (op-amp input offset voltage notwithstanding). As a bonus, by powering the follower with supplies of 0V and +3.3V, since the op-amp is physically incapable of outputting anything outside that range, you have an additional layer of security for your expensive ADC. Update I neglected to show you one of the most useful clamps I've come across, for signals under 400mV. It uses a diode-connected bipolar transistor, instead of a regular diode, to clamp signals to under 700mV. Where a diode will begin to conduct significant current at 200mV or so, the transistor wont begin to conduct until the signal reaches 400mV or so: simulate this circuit A diode-connected transistor is just like a diode, but with much more "ideal" behaviour. As such, you can connect them in series to produce maximum forward voltages of any multiple of 0.7V. You could also use a PNP transistor, in the same configuration, to clamp negative-going signals to ground: simulate this circuit Update 2 I recently answered another question, in which I used yet another technique which is worth mentioning here. It allows you to specify quite precisely an arbitrary upper limit, using a relatively high impedance reference voltage, that you could derive using a potential divider, for instance: simulate this circuit Beware of reverse-biasing Q1's base-emitter junction though! This solution really only works for clamping to 5V or less, since a 0V input would reverse-bias that junction enough for it to begin conducting. Update 3 I was reminded that JFETs have extremely low gate leakage current, and can be used as regular PN junction diodes: simulate this circuit The 2N4117 seems particularly good in this respect, passing only 10pA or so when reverse biased to 15V. Be careful not to exceed the maximum gate current for the device, when the gate junction is forward biased, which is 50mA for the 2N4117, closer to 10mA for most JFETs. With such low leakage current, you can use a JFET instead of a normal diode in the role of clamping, without it loading the source impedance while it's not clamping: simulate this circuit
H: Is a fast op-amp more difficult to stabilize than a slow one? Suppose I want to make a simple non-inverting amplifier with a bandwidth sufficiently low. Is it harder to make a stable non-inverting amplifier with a fast op-amp? When I read some documentation on the internet it seems that very fast op-amps like the OPA837 are more difficult to stabilize than a slow one. I do not really understand why. Why is the fastest not better than a slow one for doing the same job? AI: Op-amps in flat bandpass-to-DC amplifiers get unstable because of parasitics, including parasitic output to input coupling, capacitive loading, and excessively high source impedances combining with parasitics. By default they should be stable and have gain margin per what datasheet indicates. Some op-amps are not unity gain stable, but the datasheet is explicit about it. In any case, instability with docile loads hints at a design too close to margins, and can be improved, before having to kill the gain loop too much by overcompensating the feedback loop. Why is the fastest not better than a slow one for doing the same job? Because, unless the load is variable, all that loop gain at high frequencies and fast slew rate capability contributes to quiescent current consumption and not much more, compared to a much slower op-amp in the same process. Even though modern op-amps are often faster and lower current than legacy types, although they often can't take as high a supply voltage. Loop gain excess to requirements doesn't improve performance, because you just stated that you don't care about high frequency out-of-band performance, and I had perhaps erroneously assumed that the op-amps are driving docile inputs with constant impedance and no periodic charge injection. Now, an op-amp that's fast usually settles much faster - even orders of magnitude so - than the typical "1MHz, 1V/us" ballpark general-purpose types. That means that it will do much better driving variable loads. Any multiplexed A/D input is a variable load, unless there are internal buffers between the input pins and the MUX. Such "open mux" inputs are nasty and hard to drive while retaining accuracy, even when the overall bandwidth is small. They are even harder to drive when significant cabling is involved, since the cabling is usually mismatched to the source and load, and the mux transients treat the cable as a transmission line and happily try to do a job of a TDR on the cable, signal source, and interconnects. I have had applications with DC-500Hz bandwidth where the op-amps driving the ADC had to settle in <<1μs, or else there'd be crosstalk between A/D channels, and additional nonlinearity. The op amps had to be 5+ orders of magnitude faster than 500Hz itself would suggest, and had to slew faster than you'd think too - about 25V/μs IIRC. it seems that very fast op-amps like the OPA837 are more difficult to stabilize [...] ... if the design makes them unstable to begin with. That particular op-amp has splendid performance given its minuscule current consumption relative to bandwidth, and sure - if you're trying to use it on a breadboard or protoboard, it'll be harder to keep it stable. But on a well-designed PCB, it takes no more care than with any other op-amp. I have plenty of circuits where you could substitute OPA837 for a much slower op-amp in use, and the circuit would remain stable and often the overall specifications of the system it's in would not be degraded. Just for kicks, I've had an opened up late 1970s vintage power supply on my bench, and replaced a random 741 with a 30MHz part on a DIP adapter. No oscillation. The feedback loop on the 741 was already suitably compensated well enough in spite of through-hole construction. It does oscillate with a 150MHz part though - the foil capacitor used for feedback, and its trace loop, have too much inductance it'd seem. Bypassing it at the socket with a snubber made of 100pF in series with 5kΩ made it quiet again. So, I wouldn't necessarily call it hard to stabilize in suitably designed circuit that doesn't destabilize it to begin with.
H: How to estimate electrolytic capacitance from foil area I opened a failed 1000 μF electrolytic capacitor. It contains 2 foils coiled with paper and some wet dielectric. With reasonable assumptions (to me), I can not derive marked capitance from this formula: $$C =\varepsilon _o \varepsilon _d \frac{A} {d}, \mathrm{~where}$$ $$\varepsilon _o = 8.85 \times 10^{-12} \mathrm{~F/m}$$ $$\varepsilon _d = \text{dielectric constant, say 100}$$ $$A = 0.25 \mathrm{~m} \times 0.013 \mathrm{~m} = 0.00325 \mathrm{~m^2}$$ $$ d = 0.00001 \mathrm{~m}, \text{ just a silly guess}$$ But foils are coiled, so do I double area? The foils are etched to increase the effective area, I'll say by a factor of 100. $$ C = \frac {8.85 \times 10^{-12} \times 100 \times 0.00325 \times 100} {0.00001}$$ $$ C \approx 29 \mathrm{~\mu F}$$ How do they get 1000 μF? AI: The electrolyte is the cathode, metal is the anode, oxide layer on metal is the insulator. The d in case of electrolytics has not much to do with distance between the foils, but distance from conductive electrolyte through the oxide layer to aluminum metal. The oxide layer thickness for low voltage capacitors is on the order of 0.1μm..0.01μm. So, your assumptions were a bit off mark, but quite reasonable given how you thought the capacitor worked. Here are ballpark values: Relative permittivity of the oxide layer ε is between 10 and 40. Oxide layer thickness d, is obtained during forming - between 1 and 2nm/V of forming voltage. The dielectric strength, giving minimum dielectric layer thickness needed, is 700..1000V/μm or 1.3nm/V of rated working voltage. Source: Wikipedia. But foils are coiled, so do I double area? Each side of the aluminum foil contacts the electrolyte retained in the paper(-like) spacer. So indeed, both of the foil surfaces need to be considered. So, for a 50V rated aluminum electrolytic capacitor with crystalline oxide, relative permittivity 13, having 800V/μm dielectric strength, assuming safety factor 1.5 on the dielectric strength... ... a rough ballpark would be $$C \approx \frac {8.85{\rm\,pF/m} \times 13 \times 2\cdot0.00325{\rm\,m^2} \times 100{\rm\,m^2/m^2}} {50{\rm\,V} \times 1.5 \times 1.3{\rm\,nm/V}} \approx 0.8{\rm\,mF}.$$ Looks better, doesn't it? :) Your guess of the effective area multiplier was quite close!
H: Some problems about the BJT in the resonant Royer (or Baxandall) circuit This question is a continuation of my previous post about the resonant Royer (or Baxandall) circuit. I have built a prototype to verify the circuit. The parameters are as follows: The parameters of the transformer are as follows: Except for the BJT I choose is ST13005, other parameters in the real prototype is very close to the parameters in the simulation pictures shown above. The measured 30kHz resonant frequency is very close to theory and the simulation, but I have some problems with the BJT. The input voltage is 37V~50V. When the input voltage is 37V, the voltage Uce is as follows, which looks perfect: When the input voltage is 50V, the voltage Uce is abnormal. There is a large overlap between the C-E voltages of the two BJTs, which greatly decreases the efficiency (only about 32%). Does anyone have any idea why it happens? AI: I have never loaded this circuit and its relatives with half wave. Try full wave and try choke filter and reduce feedback winding turns. See how low the supply volts can be whilst the circuit still works, you will be amazed at how low you can go. This little test gives you an idea of how much you can reduce the feedback.
H: What kind of PSU is this? I collect PSUs. But one is different compared to all others. It doesn't have an output voltage written on it. When I measure the output it's 0V DC and also 0V AC. Also I didn't find anything about the output voltage in the data sheet. So what kind of PSU is this? (The word "Eingang" on the photo is German and means input.) AI: It's not a power supply, in the sense of what you might generally understand as a power supply, even if this powers a lamp. It's a ballast for PL type compact fluorescent light tubes with integrated starter. Which actually reads on the device, "FOR: PL 1*11W LAMP". So technically the output voltage is same as input voltage but with current limiting. Please note the output is mains-referenced so it is not safe to touch. If it had no output at all, the fuse may be blown, and depending on which way the unit is plugged to mains outlet, it might have been neutral that directly passes trough the module.
H: Equivalent circuit problem I need to find the values E1,E2,R1,R2,R3 such that circuit (b) becomes equivalent to circuit (a) according to nodes a,b,c. Using the superposition theorem I found that the potential difference between the nodes a and b is 5V. Thus, E1=95V and E2=90V. What should I do to find the resistor values? AI: If the 2 circuits are equivalent, you should have the same resistance between any 2 selected terminals. For eg., the resistance between terminals a & b in both circuits should be the same. Likewise resistance between b & c and between a & c. You will thus get 3 simultaneous equations (one for each pair of terminals) and there are 3 unknowns (R1, R2, R3) so, you can solve this. While calculating resistance between 2 terminals, you can replace the voltage sources in the circuit with a short. I am just giving you an idea as this is your homework. Not solving it fully.
H: Minimum and maximum input voltage for boost converter for reliable operation I'd like to know the minimum and maximum input voltage for a MCP16251/2 boost converter for reliable operation. Can someone tell me the input voltage range for this boost converter for reliable operation? AI: From what I understand from the schematics given on p.2 of the schematic, it's 0.9V for 3.3V output, and 3V for 5V output. And the datasheet defines a start-up voltage of 0.82V but the related note indicates that it's for 3.3V output. The datasheet also defines a minimum operating voltage of 0.35V after start-up. This means that, once the device starts to operate (i.e. with the minimum input voltage of 0.82V) it can work with input voltages as low as 0.35V. But, again, this is given for 3.3V output.
H: Do multiple USB 1.1 devices on a bus require a hub? Can I simply attach multiple USB1.1 slave devices to a bus like I can with I2C (config A), or does the spec require a USB hub IC (config B)? Power in this application will come from a separate bus. AI: Can I simply attach multiple USB1.1 slave devices to a bus like I can with I2C (config A), or does the spec require a USB hub IC (config B)? USB is a point-to-point system and not a multi-slave or multi-peer system so no, config A is invalid.
H: Instant flux density calculation of flyback transformer with airgap How to calculate the instant flux density of a flyback transformer with airgap? I am trying to understand airgap is enough or not? Does the instant flux density reach saturation value or not? Also, how to calculate \$N_{primary}\$ of the transformer with respect to airgap? I have these variables: \$L_{primary}\$, \$\ell_{gap}\$, \$I_{primarypeak}\$, \$I_{primaryrms}\$, \$V_{primarymax}\$, \$V_{primaryrms}\$, \$f_{switching}\$, \$A_{effective}\$, \$D_{max}\$ AI: How to calculate the instant flux density of a flyback transformer with airgap? There is a fundamental equation that relates flux density (\$B\$), core permeability (\$\mu\$) and magnetic field strength (\$H\$). That equation is: - $$B = \mu H$$ You may have seen that relationship expressed as a graph (known as a BH curve): - Image from here. The curve also indicates the magnetic hysteresis associated with many magnetic materials. The dotted line is when beginning the plot (no remnant of magnetism in the core). Note that \$H\$ is the driving force of magnetism. It accounts for current, the number of turns and, the distance of the flux path. So, you need to know the cores magnetic permeability if you are to find flux density. I am trying to understand airgap is enough or not? If you know the permeability of the ungapped core and, you know the effective mean length of the core (as per the diagram below) you can calculate the effect of an air-gap: - The mean length is that shown by the dotted green line and is detailed in the data sheet for the core you are considering. Image from here. So, the formula the relates the gapped and ungapped permeabilities is this: - $$\mu_{gapped} = \dfrac{\mu_{ungapped}}{\frac{\ell_{gap}}{\ell_{mean}}\cdot\mu_{ungapped}+1}$$ And, this tells you the gapped permeability (also called effective permeability). Then you use this new value in the first formula to calculate the gapped value of flux density. A good choice for peak flux density is around 200 mT for most ferrite materials. Also note that once you have lowered the permeability by introducing a gap, you will probably need to restore the inductance by adding more turns. This increases the H-field as per my previous answer to you entitled Why is the air gap important in a flyback transformer. how to calculate \$N_{primary}\$ of the transformer with respect to airgap? The core data sheet will give you a value for \$A_L\$ and, \$A_L\$ multiplied by \$N^2\$ tells you the value of primary inductance. So, if the gap reduces the permeability by (say) ten, then \$A_L\$ also reduces by a factor of ten. So, you know the current in your coil and, you know how many turns you need (ungapped and gapped) and, you know the mean length of the magnetic core so, you can calculate what value the H-field is. It's just a tiny bit of number crunching to find the peak flux density.
H: Clock Fanout Buffer Circuit I need a clock fanout buffer to drive 3 components with same clock, and I have found this reference design but could not understand the reason of using the inverter in the middle. Can I directly connect the tcxo clock to fanout buffer? AI: The square wave generator is running of 1.8V while the rest of the circuit is 3.3V. The datasheet for the NB3N551 states that a high level clock input requires at least (VDD / 2) + 1V, which makes 2.65V, so it won't recognize the square wave generator's 1.8V output as logic high. The Schmitt trigger inverter is acting as a level translator of sorts. R8 and C16 form your classic Schmitt trigger inverter oscillator. When the output is high C16 charges and when the input trigger level is reached the output will go low and the same thing will happen in reverse. The square wave generator's 1.8V output is capacitively fed into this to push the Schmitt trigger's input up and down so it oscillates in sync with the square wave generator.
H: Does USB3.0 support reverse polarity in SSTX and SSRX? Is it possible to Sawp the +/- pins of SSRX and SSTX to make the routing easier and avoid using vias? Does USB3.0 support this reverse polarity? AI: According to section 6.4.2 of the USB 3.x specification, the superspeed lanes support automatic "Lane Polarity Inversion". The receivers must detect an inversion during the training sequence and automatically correct for it if detected. The _p and _n can therefore be reversed during routing as you suggest, as this constitutes a polarity inversion which is automatically corrected in the receiver. For Gen1 this is done during TSEQ ordered sets. If polarity inversion has occurred, the D10.2 symbols within the TSEQ ordered set will be received as D21.5 instead of D10.2 and the receiver shall invert the polarity of the received bits. For Gen2 a similar check is done during the SYNC training sets.
H: Pin header connector In my project I make use of 3 PWM I²C-boards, each having 3 x 16 pin connectors. My initial thought was to use jumper connectors to connect LEDs to the pins but they are not reliable enough. I would rather not de-solder 144 (3x16x3) pins, Is there a connector that can securely connect to these pins? Wishlist: If at all possible, no de-solder of existing pins on board. Secure connection (mild vibrations occasionally) 48/24/12/3-pin connector, all acceptable No pre-made connector wire. I want to be able to tailor-make the wire length Screw terminal is ok but not at all required Connector available to buy in Europe/Sweden my background: beginner in electronics, hence the aversion to de-solder 144 pins. its gonna take me a year! beginner in electronics, so if the solution / connector is blatantly obvious, please have patience with me. I looked at TME and Mouse websites and there is literally a million different connectors available but I lack knowledge to find a fitting connector. AI: According to my Select-a-conn - connector selection utility, there is only one female plug out there that has 3 rows of sockets with a 0.1" pitch: TE AMPMODU Mod IV such as part number 86308-1. https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/86308-1/295279 https://www.te.com/usa-en/search.html?q=86308-1&source=header {Digikey} However, it's "available to order". I.e., it's not actually made unless someone orders 3200 of them. The reason that they don't make 3-row unshrouded plugs is that it's impossible to reach the inner row to extract a socket. Therefore, what I propose is to use 6-circuits 2.54 mm unshrouded plugs turned 90 degrees. They must be perfectly prismatic and unkeyed, so that they do not interfere with each other when stacked side-by-side. (The Dubox that someone else proposed is not, so two side-by-side would interfere with each other.) {Molex C-Grid III 90143, Digikey} This includes: MANUF. - SERIES Harwin - M20 plug 2r - digikey Molex - C-Grid III 90143 - digikey TE - AMPMODU Mod IV 2r plug - digikey
H: SD card does not responds to CMD8 command I'm trying to communicate with SD card. However I'm stuck on CMD8 - when I send CMD0 (400000000095) I got 0x01 after one cycle. When I send CMD8 (48000001aa87) I got nothing (everything I read is 0xFF). My process of initialization is as follows: Set speed of bus to 100 kHz After SD card is detected wait 2 ms Set CS high Write 0xFF to bus for 100 cycles (800 bits) Set CS low Write 0xFF to bus for 100 cycles (800 bits) Write CMD0 to bus Read until response is not 0xFF and parse it Write CMD8 to bus Read until response is not 0xFF (this does not happens) What am I doing wrong? EDIT: Here's code: bitflags::bitflags! { #[derive(Eq, PartialEq, Clone, Copy)] struct Status: u8 { const IDLE = 0b_0000_0001; const ERASE_RESET = 0b_0000_0010; const ILLEGAL_COMMAND = 0b_0000_0100; const CRC_ERROR = 0b_0000_1000; const ERASE_SEQUENCE_ERROR = 0b_0001_0000; const ADDRESS_ERROR = 0b_0010_0000; const PARAMETER_ERROR = 0b_0100_0000; const BIT_7 = 0b_1000_0000; } } impl defmt::Format for Status { fn format(&self, fmt: defmt::Formatter) { defmt::write!(fmt, "STATUS {{ "); if self.contains(Status::BIT_7) { defmt::write!(fmt, "BIT_7 "); } if self.contains(Status::PARAMETER_ERROR) { defmt::write!(fmt, "PARAMETER_ERROR "); } if self.contains(Status::ADDRESS_ERROR) { defmt::write!(fmt, "ADDRESS_ERROR "); } if self.contains(Status::ERASE_SEQUENCE_ERROR) { defmt::write!(fmt, "ERASE_SEQUENCE_ERROR "); } if self.contains(Status::CRC_ERROR) { defmt::write!(fmt, "CRC_ERROR "); } if self.contains(Status::ILLEGAL_COMMAND) { defmt::write!(fmt, "ILLEGAL_COMMAND "); } if self.contains(Status::ERASE_RESET) { defmt::write!(fmt, "ERASE_RESET "); } if self.contains(Status::IDLE) { defmt::write!(fmt, "IDLE "); } defmt::write!(fmt, "}}"); } } enum Error { Timeout, Status(Status), SpiError(spi::Error) } impl defmt::Format for Error { fn format(&self, fmt: defmt::Formatter) { match self { Error::Timeout => defmt::write!(fmt, "Error::Timeout"), Error::Status(status) => defmt::write!(fmt, "Error::ErrorStatus({})", status), Error::SpiError(_) => defmt::write!(fmt, "Error::SpiError(Unknown)") } } } impl From<spi::Error> for Error { fn from(value: spi::Error) -> Self { Error::SpiError(value) } } trait Command { type Argument: Into<[u8; 4]>; type Response: Response; const CODE: u8; } trait Response: Sized { const LENGTH: usize; fn from(raw: [u8; Self::LENGTH], expect_idle: bool) -> Result<Self, Error>; } struct ZeroArgument; impl From<ZeroArgument> for [u8; 4] { fn from(_value: ZeroArgument) -> Self { [0; 4] } } struct CMD0; impl Command for CMD0 { type Argument = ZeroArgument; type Response = R1; const CODE: u8 = 0x40; } struct CMD8; #[derive(defmt::Format)] enum CMD8Voltage { Voltage3V3, #[allow(unused)] LowVoltage } struct CMD8Argument { pcie_12_v: bool, pcie_availability: bool, voltage: CMD8Voltage, check_pattern: u8 } impl Command for CMD8 { type Argument = CMD8Argument; type Response = R7; const CODE: u8 = 0x48; } impl Default for CMD8Argument { fn default() -> Self { Self { pcie_12_v: false, pcie_availability: false, voltage: CMD8Voltage::Voltage3V3, check_pattern: 0x00 } } } impl From<CMD8Argument> for [u8; 4] { #[allow(clippy::identity_op)] fn from(value: CMD8Argument) -> Self { bitfield::bitfield! { pub struct ArgEncode(u32); u8; pub get_check_pattern, set_check_pattern: 7, 0; pub get_voltage_supplied, set_voltage_supplied: 11, 8; pub get_pcie_availability, set_pcie_availability: 12; pub get_pcie_12v_support, set_pcie_12v_support: 13; pub get_reserved, set_reserved: 31, 14; } let mut encode = ArgEncode(0); encode.set_check_pattern(value.check_pattern); encode.set_voltage_supplied(match value.voltage { CMD8Voltage::Voltage3V3 => 0b0001, CMD8Voltage::LowVoltage => 0b0010 }); encode.set_pcie_availability(value.pcie_availability); encode.set_pcie_12v_support(value.pcie_12_v); let mut result = [0; 4]; result[0] = ((encode.0 >> 24) & 0xFF) as u8; result[1] = ((encode.0 >> 16) & 0xFF) as u8; result[2] = ((encode.0 >> 8) & 0xFF) as u8; result[3] = ((encode.0 >> 0) & 0xFF) as u8; result } } struct R1; impl Response for R1 { const LENGTH: usize = 1; fn from(raw: [u8; Self::LENGTH], expect_idle: bool) -> Result<Self, Error> { let status = Status::from_bits(raw[0]).unwrap(); let error_state = !(status - Status::IDLE).is_empty(); let unexpected_idle = status.contains(Status::IDLE) != expect_idle; if !(error_state || unexpected_idle) { Ok(Self) } else { Err(Error::Status(status)) } } } #[derive(defmt::Format)] struct R7 { command_version: u8, voltage_accepted: Option<CMD8Voltage>, pattern: u8 } impl Response for R7 { const LENGTH: usize = 5; fn from(raw: [u8; Self::LENGTH], expect_idle: bool) -> Result<Self, Error> { let first_byte = [raw[0]]; let R1 = <R1 as Response>::from(first_byte, expect_idle)?; bitfield::bitfield! { pub struct RespEncode(u32); u8; pub get_command_version, set_command_version: 31, 28; pub get_reserved, set_reserved: 27, 12; pub get_voltage_accepted, set_voltage_accepted: 11, 8; pub get_pattern, set_pattern: 7, 0; } #[allow(clippy::identity_op)] let response = RespEncode( ((raw[1] as u32) << 24) | ((raw[2] as u32) << 16) | ((raw[3] as u32) << 8) | ((raw[4] as u32) << 0) ); Ok(R7 { command_version: response.get_command_version(), voltage_accepted: match response.get_voltage_accepted() { 0b0001 => Some(CMD8Voltage::Voltage3V3), 0b0010 => Some(CMD8Voltage::LowVoltage), _ => None }, pattern: response.get_pattern() }) } } impl<'d, T: spi::Instance, CS: gpio::Pin, DET: gpio::Pin> SD<'d, T, CS, DET> { // ... async fn send_command<C: Command>(&mut self, argument: C::Argument, expect_idle: bool, mut timeout: Option<u32>) -> Result<C::Response, Error> where [u8; C::Response::LENGTH]: Sized { let mut command = [0; 6]; command[0] = C::CODE; let argument: [u8; 4] = argument.into(); command[1..5].copy_from_slice(&argument); let mut digest = CRC.digest(); digest.update(&command[0..5]); command[5] = (digest.finalize() << 1) | 1; defmt::info!("Sending command: {:02x}", command); self.spi.write(&command).await?; let mut buffer = [0u8; C::Response::LENGTH]; loop { if let Some(ref mut timeout) = timeout { if *timeout == 0 { defmt::error!("Timeout on command"); return Err(Error::Timeout); } *timeout -= 1; } self.spi.read(&mut buffer[0..1]).await?; if buffer[0] != 0xFF { break; } defmt::info!("Still no response"); } self.spi.read(&mut buffer[1..]).await?; defmt::info!("Got response: {:02x}", buffer); <C::Response as Response>::from(buffer, expect_idle) } async fn spi_wait(&mut self, cycles: u32) -> Result<(), Error> { for _ in 0..cycles { self.spi.write(&[0xFF]).await?; } Ok(()) } async fn on_insert(&mut self) -> Result<(), Error>{ defmt::info!("Waiting for voltage to settle"); Timer::after(Duration::from_millis(2)).await; defmt::info!("Putting SD into SPI mode"); self.cs.set_high(); self.spi_wait(100).await?; self.cs.set_low(); self.spi_wait(100).await?; loop { defmt::info!("Attempting to reset"); match self.send_command::<CMD0>(ZeroArgument, true, Some(8)).await { Ok(R1) => { break; } Err(Error::Timeout) => {}, Err(e) => Err(e)? } } defmt::info!("Reset"); defmt::info!("Sending voltage selection"); let arg = CMD8Argument { check_pattern: 0xAA, ..Default::default() }; let response = self.send_command::<CMD8>(arg, true, Some(8)).await?; defmt::info!("Decoded response as {}", response); Ok(()) } } AI: I'm not familiar with Rust, so I can't say anything about the code itself and have to go by your description. But I can see two potential problems: The CS pin shouldn't be kept low in between commands. According to the official SD specification, the CS line should be low for “NCS + Command bytes + NCR + Card Response + NEC”. Otherwise it should be high. I'm not sure if this is the issue here, but that's what standard says. You have no NCS bytes. Most cards don’t need NCS padding bytes in my experiance, but I’ve personally encountered one card (SanDisk Industrial XI), that won’t work without at least one byte of padding.
H: Li-ion battery voltage monitoring tl;dr How to pick resistor (or component) values to alter the triggering voltage level for the second circuit? Hello everyone. I have First Person View (FPV) goggles whose battery I lost. But since I have a spare 3S battery I was intending on using a buck converter to step it down to 5 V to power the goggles. The issue with this approach is that I can't read off the voltage on my goggles screen since the converter will always keep a constant output. To solve this, I was betting on building a typical power supply (attached below) and have the output driving an astable 555 timer RESET pin and beep a buzzer when I get to a critical voltage. A few scrolls down the LT1017 datasheet, I came across the power monitor circuit below. It occurred to me that this design eliminates the need for a 555 since it has a pulsed output; I can just connect a buzzer instead of flashing an LED. The only issue with the second design is that I don't understand how the to pick the resistors to change the triggering voltage. May someone help with the approach/formulae? AI: Your approach won't work because the voltage of a Li-ion battery is a poor indicator of its state of charge (SoC). The voltage of a Li-ion battery changes more due to the current than it does due to the SoC. Also, it's the voltage of the lowest capacity cell that determines when the battery shuts down, not the voltage of the entire battery. Therefore, the battery is likely to shut down before the total battery voltage is low enough to trigger your circuit. Therefore, even if you solve your proximate problem (your low-voltage detector circuit), it will not solve your ultimate problem (knowing when the Li-ion battery is about to run our of "juice"). Regardless, to answer your question: how to pick the resistors to change the triggering voltage Increase the value of the 390 k resistor. R = 120 k * Vin / 1.2 V - 120 k
H: How is it possible that HDDs are mechanically so robust? Hard disk drives (HDDs) rely on a small read-write-head which hover about 70 nm over the platter 1, 2. The physical effect on which this hovering is based seems to be the ground effect 3, so it seems as if there is no electronic closed-loop control involved for vertical positioning. Nonetheless, it seems that HDDs are actually quite resistant to physical shocks. I probably accidentally kicked my computer below my desk already a hundred times with running HDD and nothing bad happened. Also, HDDs for laptops would be practically impossible if the mechanical robustness was extremely low. But how does this work? Physical shocks in the nm range are probably quite often, and are hard to observe without special measurement equipment. Actually, I would expect head failures much more often than they actually occur. Is the "air cushion" on which the head is hovering already good enough for achieving such great robustness or are there special tricks involved? AI: The head positioning system is a voice-coil actuator. This is simply a coil of wire between two very strong magnets, identical in operation to a speaker's voice coil. Where a speaker is intended to faithfully reproduce acoustical movements up thousands of times per second, a hard drive's voice-coil accurately positions the heads anywhere within the defined range thousands of times per second. It achieves ultra-high accuracy by continuously re-calibrating itself. This re-calibration eliminates drift from temperature changes, as temperature causes microscopic expansion and contraction of everything inside the drive, otherwise leading to alignment issues. Older drives which used stepper motors for the head position had difficulty adapting to temperature changes. So a modern drive is constantly readjusting itself for best performance. The heads are "docked" or "parked" off the platter, using mechanical guides to lift them away from the platter. The heads are spring-loaded to exert some (small) amount of force towards the platter. Depending on the drive, it may spend most of its life in "parked" mode, where a kick wouldn't do it any harm. When accessed again, they move out of the parked area, complete the operation, then park again. It may sense a misalignment and recalibrate immediately, or wait for the next scheduled recalibration, which happens in milliseconds with one tiny blink of the indicator LED (if it even reports this as "activity.") Some drives may use a "parked" area and an "idle" area, which is on the disk surface but not used for storage. That would obviously be faster so may be more common. Even if a kick happened during a read-write cycle, the "cushion of air" is already pushing against the spring pre-load tension of the head, so a fairly strong kick is needed to cause a "head crash." That is where the head "dives" into the coating on the platter and physically scratches it off. That, for one tiny spot somewhere random on the disc would mean a slew of "bad blocks" congruent to the scratch length and width. Barring any other damage, such areas would be marked "bad" by a (long, "surface") disk format and the rest would work normally. But if this happened on track 0, master boot record, partition table, or other special areas, the disk could be totally unusable. The voice-coil can be seen briefly in this video. P.S. In the past, it used to be that the physical components of a hard disk were more advanced than the electronics. Thus, a hard drive failure was usually a physical defect, and data was only recoverable in a cleanroom environment by swapping out the failed component(s) with good ones. But today, the control electronics are far more advanced, and fail about as often (if not moreso) than the physical components. Er.go. if a spinning-platter hard disk doesn't work today, there is a 50/50 chance that replacing the controller board (which is fairly easy to do and doesn't require a cleanroom) will get it running again. Of course, a controller failure could have thrashed and abused the physical components, so any such working repair should immediately recover the data and assume the drive may die again at any time. And, cooling the disk also sometimes works, by microscopically shrinking everything inside. But this should be considered a destructive process, because room moisture condenses on cool objects and that's true inside the disk as well - get the data before it dies.
H: What do the waveforms in a buck converter look like just after turn on? Below is the circuit diagram of buck converter. I am studying about the buck converter. What I observed is everywhere it is explained with the help of waveform in steady state. I have a couple of questions: What is stopping the capacitor from charging up to Vin? What does the capacitor waveform look like just after turn on? What does the inductor waveform look like just after turn on? AI: What is stopping the capacitor to charge up to Vin. The presence of the inductor and, the duty cycle being less than 100% prevents the capacitor charging to the full value of Vin. This is what buck converters do; they let energy through to the capacitor in a controlled way: - In the 1st charge cycle the voltage will only normally rise to a few percent of \$V_{IN}\$. Then, when the switch disengages, the capacitor continues to charge by swallowing up the stored energy from the inductor via the free-wheel diode. All the energy can be taken from the inductor and, the free-wheel diode prevents discharge back into the inductor. . In the 2nd switching cycle, the capacitor begins charging from where it left off at the end of the 1st cycle. Subsequent cycles will raise the capacitor voltage up to the desired level and, at this point, an external control-loop (something that is needed) will regulate the duty cycle to ensure that \$V_{OUT}\$ remains at the desired value. Here's the voltage waveform on the capacitor (no load and no closed-loop control): - What does the capacitor waveform look like just after turn on? The charging capacitor voltage follows a square law; it gradually starts to rise and progressively, the slope gets steeper until the switch disengages. This is all over in a few microseconds normally: - What does the inductor waveform look like just after turn on? The inductor's voltage waveform is the applied voltage (caused by the switch being engaged) minus the voltage waveform of the capacitor.
H: Question on LED current and voltage This is regarding this battery charger IC. In the below image, the output low voltage on the STATx pin is given as 1V, but that is for 4mA of sink current. That translates to around 0.25ohm of internal resistance/impedance.  If the LED's forward current (LEDs connected to the STAT pins) is higher than the 4mA, then subsequently, the maximum output voltage on the STAT pins, would increase. How high can the output voltage go or be? Just want to understand how this works if the LED current is higher. AI: It's telling you about the output of the pin. The output isn't going to be a simple resistor, but it'll be something else, like a MOSFET or similar, with an open drain. So what it's saying is how low it can drive its output, and how much current it can sink. If you want to use it with an LED, then look at the datasheet, page 2, typical appliction circuit you can see how you should use these pins if you want to use an LED. To turn the LED on, it drives the voltage of the pin low, and sinks current through the LED. Lets say you want to use HLMP-1700 from broadcom, a red LED. Forward voltage is 1.7V, max current is 10mA. The STATT pin can definietly sink 10mA as that's less than its 16mA typical. So we just need to figure out our series resistor, assuming you're using a 5V, you do 5V, minus 1.7V for the diode, minus 0.4V for the statt pin 5 - 1.7 - 0.4 = 2.9V then with a known current and voltage you calculate your series resistance to be 2.3V / 10mA = 289 Ohms. You might choose a 330Ohm resistor as that'll be more available, and it's better to have slightly less than maximum current than slightly more. Say you want to use L-53HD from kindbright instead, a brighter LED. Forward voltage is 2.25V, but the recomended forward current is 20mA. This it between the typical rating of 16mA and the maximum rating of 35mA. You could still use this LED, but you might find that it doesn't light quite as brightly as you might expect, and you might find a difference between pins, or different boards if you make more than one.
H: A circuit which charges and uses a lithium ion battery I am designing a circuit which will utilise a lithium ion battery. The circuit would ideally be plugged into a power source the majority of the time, butI would also like it to be portable. I have been doing some research into battery charging and management ICs and circuits. They all seem to be aimed towards charging removable batteries. How would I go about wiring in a lithium ion battery so that it can be charged and used within the same circuit? AI: There are battery charger ICs that can handle the case of a load and battery connected. This is not a specific recommendation for this chip, but one example is the BQ21080. As you can see in the diagram the charger includes a Power Path Controller that automatically allows power to flow from IN to SYS (power source powers load), IN to BAT (power source charges battery), or BAT to SYS (battery powers load). This is the type of configuration that you would want for a permanently connected battery.
H: Can IR Sensor TCRT1000 and TCRT5000 operate at 12V? I asked chat GPT, and it said TCRT1000 and TCRT5000 are not suited for ops above 5V. But interestingly I have read a research paper where TCRT1000 has been used at 9V. I would like help decoding these datasheets and understanding whether its safe to use these sensors at 12V, I don't really trust Chatgpt, its lies ten times in a line. AI: Yes they can be operated at 12V. The data sheets say the other one is rated for 32V and the other for 70V.
H: How could I validate my battery management schematic? I drew a battery management system schematic based on this reference project found from a youtube tutorial The reference schematic is this: I tried to draw my own schematic and I have changed the original Q3, Q4, Q6, and Q7 MOSFETs 2SK3919 for the PSMN6R5-25YLC due to they are not available. I also changed the shunt resistor R25 and R26 (0R005) for the CSRL3-0R001F8 My schematic is: How could I simulate or validate my schematic before proceeding to route the pads in the PCB? Thank you! AI: I recommend that you reconsider. There are some great ICs out there for a 3S battery that are far simpler, guaranteed to work, have 1/10 as many components, and won't discharge your battery in a few days (which this circuit will). For example, consider the TI BQ7790521PWR.
H: Does it make sense to connect the MAX6675 to a Analog Plane? I'm currently designing a PCB with 4 Layers. The stack up is as follows: Signal - DGND Plane - AGND Plane - Signal. There are a ton of components connected to the DGND Plane, and I know that for using the MAX6675 the slightest interference can cause very different results. So I'm thinking, when I connect the chip to analog ground plane, to minimize interferences more. I don't know if the question is dumb because I'm not that long in this game. I would appreciate a opinion from someone with slightly more knowledge :) To the analog plane are currently connected my 3.3V buck/boost converter, and the camera interface. Current configuration is as follows: AI: I would connect the MAX6675 GND to an analog ground plane, if you decide to have one. The digital signals can tolerate several hundreds of millivolts difference. Apart from being standard practice in hybrid (digital+analog) ICs, the pin layout puts the ground pin on the same side as the analog part.
H: Heater (resistor) combination to achieve specific power I am designing a heating circuit composed of ceramic heating resistors. I have a 24 V supply and I am limited to 3 A, which allows me to disipate total of 70W, which is my target. I have a limited selection of heating resistors in my disposal: 3V rated resistors: 1.8Ω 5W, 0.9Ω 10W, 0.45Ω 20W 9V rated resistors: 16.2Ω 5W, 8.1Ω 10W, 4.05Ω 20W 12V rated resistors: 28.8Ω 5W, 14.4Ω 10W, 7.25Ω 20W 24V rated resistors: 115.2Ω 5W, 57.6Ω 10W, 28.8Ω 20W Other than that I can use any other circuit elements if it helps push me across the finish line. But most of the power must be produced by the heating resistors. I need the heating to be evenly distributed around the perimeter of the heated area which is a rectangle. Ideally it is divided into 8 segments similar in power output. And those segments must be connected only by a single wire - therefore in series. And each segment has to be connected only to its adjacent segments. Inside each segment, anything goes (for example resistor in parallel to modify the total resistance). I was playing with number for quite some time, but I think I overconstrained myself. My original idea was to use 6x 3V 0.9Ω 10W and 2x 3V 1.8Ω 5W but when they are all in series, the 10W resistors run only at around 6W while the 5W resistors run at 13W, which is way above their rating. Adding simple resistor in parallel to each 1.8Ω "side" heating resistor to decrease their total resistance to 0.9Ω of course helps with the power rating but then I am exceeding my total power limit because those simple resistors disipate power as well. Am I trying to do the impossible here? Since when I use non-equal resistors, I will always overload the lower rated resistors? Or is there some clever way to achieve this / calculate the most efficient variant. AI: If your supply is U=24V, and you want I=3A, then you don't have the choice, your total resistance has to be R_total=U/I=24V/3A = 8ohms. So the sum of your 8 segments needs to make 8 Ω. So the "easiest" way to do it would be 8*1 Ω resistors (rated at least 3*3*1=9W). The nearest thing you have, are the 0.9 Ω resistors. If crossed by 3A, they will dissipate P=R*I²=0.9*3²=8.1W (so within the 10W they accept). If you use 8 of those resistors, you get 8*0.9=7.2 Ω total resistance. So you will overload the supply a bit (I=U/R=3.33A, and P=UI=80W) So we need to add 0.8 ohms of resistance. To keep symmetric, lets try to split it in two, to put half of it on each "short" side of the rectangle. So we need 0.9+0.4= 1.3 Ω for the short sides. To get close to 1.3 Ω without overrating your resistors, the best solution I found is to put three 4.05 Ω resistors in parallel, to R_eq=R/3=4.05/3=1.35 So now, you have 6*0.9 + 2*1.35 = 8.1 Ω So the current will be I=U/R=24/8.1= 2.96A And the total power will be P=U²/R=24²/8.1=71W simulate this circuit – Schematic created using CircuitLab Or if you want each segment with exactly the same power, then the closest I can find is using 3 resistors for each segment : simulate this circuit R1 and R2 in series makes R1+R2=1.35 Ω (R1+R2) in parallel with R3 makes R_eq = 1 / (1/(R1+R2) + 1/R3) = 1/(1/1.35 + 1/4.05) = 1.0125 Ω So if you put 8 of those blocks in series (one per segment), you get 8.1 Ω resistance, and P=U²/R=71 W
H: ATmega328P 4-button turn on, auto power off using transistor I'm trying to create a basic 4-button battery powered remote. The logic behind it is that when one of the buttons is pushed it pulls the base of the PNP low thus turning on power to the circuit. The Arduino then takes over holding the base/gate down using a digital pin, it detects which of the 4 buttons is pressed, sends that info over LoRa with battery level using the RA-02 then pulls the PNP up turning everything off and conserving battery power. The current materials used: ATmega328, the same uC used in the Arduino Nano. RA-02 for LoRa communication. 4 momentary simple push buttons. PNP transistor or FET resistors and diodes and whatever other passive components you think is needed. simulate this circuit – Schematic created using CircuitLab In the above schematic the radio is ignored since it's unimportant for the question. I'm able to use each one of the four buttons to momentarily turn on the circuit, and keeping it on is not the issue. The issue appears when I make the connection between even one of the buttons to one of the digital pins of the Arduino: it partially turns on the circuit with 2-3 ma current draw (uCurrent ranger). Pin 5 of the Arduino keeps the circuit on while transmitting, pins 6-9 are for checking thd button state. I used diodes to prevent all pins of the Arduino from going low when one of the buttons is pressed. I used a 10 kΩ resistor to pull up the transistor to keep it off in a known state. I'm not really sure about why the circuit is "leaking" when I connect any one of the four connections between the ATmega328P and the buttons. I tried pulling the Arduino pins up using external resistors from 10 kΩ to 2 MΩ; it might vary the leakage but never resolves it. I tried adding resistors in series between the ATmega328P and the buttons instead of direct wires and that helped a lot, but it needed high value resistors like 1-2 MΩ and never stopped the issue completely; I stil get a few μA leakage which to me is not really a circuit that is off. I have seen other answers on here but they're all using one button, and the main question is auto off in that case, whereas here it's a partially turned on circuit. I don't want to leave the circuit in sleep mode since I might add other sensors that are power hungry even in sleep so I really would love it if someone has an idea to resolve the issue. AI: The current leaks through base into AVR, and also secondarily via diodes into AVR. It gets powered via the IO pin. And if current flows via base, it will turn the transistor on. You have no base resistor, so pushing a button should simply damage the transistor by shorting the base to ground via diode. If the AVR pulls base low, the AVR output is basically shorted to base so the AVR output can also be damaged.
H: Trying to make a HASEL actuator I was told that if I apply high voltage to a zip lock bag filled with baby oil with tin foil paper on the end it'd make it contract and act as a HASEL actuator. I'm afraid of measuring the exact voltage if the device because I don't want to break my voltmeter but I read it's atleast 40 kV, and that is above what is required for a HASEL actuator I think. I'd like help and clues as to what I should do next. Here is the link with the experiment: The attempt AI: Simply laying loose sheets of tin foil over a plastic bag will likely not achieve much of an effect. Many of the simple internet examples depicting this effect seem to be a bit exaggerated just to show the concept. According to one reference you can try using conductive paint to create sort of a parallel plate capacitor on opposing sides of a flexible polymer bag containing a dielectric fluid. Energizing the plates with an opposing high voltage should causes the plates to attract each other and this displaces some of the fluid. If properly shaped the bag may distort from the displaced fluid and this can mimic the action of a natural muscle. Having the bag flat and the conductive plates fairly close together will likely allow the effect to be seen more easily. Here is a paper explaining the HASEL actuator concept with some actual examples: https://arxiv.org/ftp/arxiv/papers/2102/2102.13039.pdf While the effect is simple electrostatics you could get a similar effect (with low voltage) using a flat steel plate laying over a bag of fluid with an electromagnet placed under it.
H: Is there any chance to configure DDR3L SDRAM on Digilent Arty A7 FPGA development board to Dual Channel memory? There are 256MB DDR3L SDRAM installed on Digilent Arty A7 FPGA development board. Dual Channel memory is popular nowadays in a PC. So I was wondering if there is any chance to configure the DDR3L SDRAM on Arty A7 board to Dual Channel (or even Quad Channel) memory architecture? If it is possible, do you have a reference Verilog code for me to study? I'm new to this area. Reference manual of Digilent Arty A7 FPGA development board is here. Dual-channel memory is explained here. AI: No. Multi-channel memory requires completely independent memory ICs and buses. The Arty fails simply because there is only a single memory IC. If there are multiple ICs, there are three possible different configurations: multiple channels: all signals are separate wide interface: the data signals are separate multiple ranks: only the chip select and clock enable signals are separate All of these are hardware configurations, and cannot be altered after the board has been manufactured. A typical PC will have up to four channels of nine 8-bit lanes and up to four ranks, and it is allowed to leave channels or ranks unpopulated, so installed RAM is detected at boot. The Arty has one channel of two 16-bit lanes, single rank, and the RAM is soldered in, so the full configuration is known and fixed.
H: Transistor as switch that can handle a high base current Which cheap, simple transistor can handle a high base current and doesn't need a base resistor to use it as switch? AI: Note that - as a precondition for switching applications (saturation) - the potential at the collector must be smaller than the base potential (npn case). That means: Both pn junctions are forward biased - the B-E junction as well as the B-C junction (due to a large voltage drop across the collector resistor Rc). As a result, the current into the base consists of two portions and, hence, is much larger than anticipated by the relation Ib=Ic/B (for linear applications). Therefore, it is not really necessary to have a resistor Rb between the switching voltage Vs and the base node - as long as this voltage Vs has the "correct" value to drive the BJT into saturation (Vs in the region 0.65...0.75 volts). But - how can we be sure about this "correct" Vbe value? But in practical applications, the switching voltage Vs has a value of several volts (typical value Vs=5 volts). As a consquence, we need such a resistor Rs with a value of Rs=(Vs-Vbe)/Ib. It is common practice to implement some margin into this calculation by using Vbe=0.7 volts (or a similar value) and for Ib approximately 10% of the required Ic value.
H: Interaction between PCB surface finish (ENIG vs HASL), wave soldering, and manual final assembly I am developing a PCBA that is (for me, an amateur) fairly complicated: 4 layers, double-sided, mixed SMT/THT assembly. It is a fairly dense layout with ~150 total components including all the passives on a 100x55mm board. The top side will hold some fine-pitch SMT devices (narrowest is TSSOP, 0.65mm pitch, 0.24mm pad clearance), which leads me to believe I should order the boards with ENIG finish. There will be some 0603, Kemet tantalum cap Case B (3528), SOT-23-3, and SOD-123 components mounted on the reverse side of the board. There are a modest number of THT components like multi-turn pots to be assembled as well. I believe the PCBA shop (I use JLCPCB) uses wave soldering for this process. In expectation of that, I have laid out the underside SMD elements all perpendicular to the intended process direction. Finally, there are certain THT components that I will need to assemble myself after receiving the PCBAs: a tempco resistor that must be attached by long leads and thermally bonded to a particular transistor on the board, and two rows of THT headers that will be soldered "upside down" relative to the mounting direction for the rest of the THT parts. (This board will be mounted underneath another board.) I have a few inter-related questions regarding these circumstances, which (hopefully?) each have short answers. Are there any issues with this finish/process combo? I read a blog post that offhandedly suggested that ENIG was not an appropriate finish for wave soldering, and that HASL is preferred -- but did not elaborate further, and I can't find further guidance elsewhere. I am also concerned that the fine-pitch devices being reflow-soldered might not adhere to an uneven HASL surface. I understand that ENIG is a very solder-rework-friendly surface, so it also seems good for the soldering I will perform myself when I receive the PCBAs. Is this still the case after it has been immersed in a solder wave? Is there any surface prep I should do before the final board rework, beyond washing the pads with flux, or anything else to do differently when soldering? Are there any issues in general with passing a board through a wave soldering process with some THT mounting holes left empty, for assembly later? Will the wave process close up those holes with a solid thin film of solder? These are 0.9mm diameter holes with 1.65mm diameter pads, 2.54mm pitch. I have added thief pads on the underside of the board on either end of the rows of THT pads. For space reasons, these are "surface mount" thieves, basically 1.5mm test pads on the wave-contact side of the board only, rather than drilled holes accessible on both sides of the board. I have also seen caution to use "larger" pads on the wave side for SMD components. Is that necessary for all SMD components, or only for very small sizes like 0402 and below? Which is to say -- can I get away with "standard" footprints for 0603 and up? (KiCad's library uses 0.90x0.95mm pads for 0603.) I don't actually know if JLC would wave solder the underside SMD elements, or whether they are reflowed first and only THT parts get bonded during the wave process. Nor have I found definitive guidance on how large these "larger" pads should actually be? Thank you! AI: I can't say whether ENIG or HASL is better for wave soldering. HASL is a cheaper and easier process. The pads will be covered/plated with solder and levelled with hot air. There's going to be imperfections i.e. the pad surface can be uneven. But if they are not ridiculously uneven then there's going to be no problems. The main problems can come from gluing and temperature profiling. Regardless of being HASL or ENIG, the main material underneath is still copper. So those two are only "plating" processes. The adhesion between the copper and the base material (FR, CEM or whatever) is still the most important parameter. So, for me, it doesn't matter if it is ENIG or HASL for better or safer manual soldering work. If you play with a pad for too long or too much / too many times it's still possible to get the pad peeled off. Depends on the hole size, type, and location: If the hole (can be a slot as well) is too big then melt solder will flow through these holes and come to the top surface of the PCB during wave soldering, and screw everything up (especially if there are components around the hole). Small holes do not bring this problem but they will quite possibly be filled with solder, so they are going to need some extra work before mounting the TH components. To prevent these issues "peelable masks" are used. They simply cover any potential problem sources for wave soldering or cover the component pads for further use, and can easily be removed after the process. This is defined in detail under IPC. In any case you'll need larger (longer or wider or both) pads to maximise the possibility of getting the component soldered properly. It doesn't end with this: You'll also have to follow some distance- and positioning-related rules to prevent shadowing (i.e. the component blocked by another bigger one) or any other possible problem. PS: Klas-Kenny had a good point in their comment. If the quantity is low then don't worry about wave-soldering and any other processes because the company you are (or will be) working with won't bother with wave soldering process for low quantities. But still, it's good to keep the general knowledge for further use in larger projects.
H: Do I need to use a voltage regulator or an overpower protection I am designing a circuit that will run on 5 V. The input however may vary from 5-12 V. Should I use a voltage regulator or an overpower protection circuit. I have found the 7805 voltage regulator but the input voltage is between 6-30 V. I understand that when you use a voltage regulator the input voltage is has to be 1 V above the output voltage. How would I work around this to get a 5 V output from a 5-12 V input? AI: You don't need either because you want to power a boost converter from the output of this. It makes no sense to reduce 12V down to 5V and then up to 18V - just convert it directly to 18V. Switching converters (buck, boost, buck/boost, whatever) generally have flexible input voltages, that is, they are voltage regulators that will self-adjust to keep the output voltage how you want it, no matter what the input voltage is (within reason). Yours should be able to take an input voltage from about 3 up to 18 volts, and still output 18 volts. You don't need to make sure the input is 5 volts. Some general info on voltage limitations: Because yours is wired as a boost converter it can't output a voltage lower than the input, which means if the input goes up to say 20 volts, so will the output. Also, the MC34063A chip is designed for up to 40 volts; if the input or output is higher than 40 volts you risk blowing it up (which is to say, it could break - it's unlikely to make an actual explosion). The number 40 comes from the "maximum ratings" table in its datasheet. And I didn't see where it says this specifically, but based on Figure 7 I think it needs at least about 3 volts to work.
H: Help with understanding why my instr. amplifier doesn't return anything I have a pressure sensor (output -> Wheatstone bridge) connected to an amplification stage, as shown here: As you can see, four points in total are attached to the ADC of my MCU (STM32L476ZGT3.) The reason for that is to check the noise at different points. The MCU is soldered and it works fine - I am able to program it and get responses. I started soldering the sensor module step by step. The pressure sensor does its job: I see differences (mV) when I increase/decrease the pressure - it has a full scale = 52.5 mV. Afterwards I soldered the first amplifier circuit (AD623) and here my problem came. At the output pin, I cannot see any difference when the pressure changes. I see constantly the ref value = 1.65V. What can be the issue? The pinout is correct, there are no shortcircuits, supplies are fine with no noise. AI: You're exciting the sensor with a 5 V voltage, and this means that the common mode voltage at the sensor output will be around 2.5 V (if it's a Wheatstone bridge sensor; check this value on your circuit). If you look at the data sheet of the AD623 at p. 4, you can see that the (common-mode) input voltage range is up to \$V_\mathrm{S}-1.5\,\mathrm{V}\$: since you're powering the AD623 with \$3.3\,\mathrm{V}\$, this means that your maximum input voltage is \$1.8\,\mathrm{V}\$, well below the common-mode output voltage of the sensor. Hence, the amplifier cannot work properly: you have to increase its power supply voltage, or choose an IA with rail-to-rail input capability.
H: Control a large number of LEDs from minimal output pins I am working on a project that uses an Attiny84 to control a large number of LEDs. The number of LEDs far outnumbers the number of I/O pins. What concepts and principles should I be researching into for a solution? AI: In general, your MCU will communicate serially. There are endless ways of doing this, from the simplest to the most complex. With Shift registers Here's a shift register (74164) Basically you connect CLOCK and SERIAL_INPUT_A to your CPU (/CLEAR and B to +ve). and you send your data one bit at a time. Most of the families of chips will have enough current to drive LEDs directly through a resistor; usually you use the shift register output to pull the LED to ground. This works well but if you don't clock the bits very fast you can see your LED pattern "ghosting". To avoid that, you want the data to appear on all the output pins at the same time, and you need a latching one or one with output control, here's the very flexible 74LS595: Texas datasheet Here's a tutorial about using it from an Arduino. With Special Device If you want brightness control or very many LEDs, you might use an array and a special chip such as the MAX 7219 or its almost-identical twim 7221. Datasheet. Here you have very many fewer resistors and because the LEDs are in an array, you can drive 64 of them, and they are commonly used to drive, for example eight-digit 7-segment displays. These chips stack up, so you can use several in row to make a larger array of LEDs. (Indeed, you can buy LED arrays with these chips already in them.) With Special LEDs There are LEDs which take serial inputs, known either as WS2812 or Neopixel. These take a serial interface directly, as each LED has its own chip to decode its signal. Special Lighting Protocols DMX-512 For architectural or theatre lighting, the standard is a simple serial protocol called DMX-512.
H: Latching push switch without a programmable IC Is it possible to make a push switch latching without using a programmable IC? I have a circuit with a 555 chip creating a square wave. I would like to add a push switch which when pressed once will turn the circuit on, then when pressed again will turn the circuit off. Is it possible to do this without using a programmable IC? I was thinking of using an ATTINY85 but was wondering if there is an easier and more cost effective way. AI: Plenty of options! An OR IC, any 74x32 in this configuration: simulate this circuit – Schematic created using CircuitLab Or if you want it even more discreet, the classic BJT thyristor configuration, borrowed from here: Replace transistor-latch with thyristor: is my circuit correct? Suggestion by Chris Knudsen, latching relay: simulate this circuit
H: Should op amp reference terminal be connected to ground? I would like to amplify the voltage from my thermocouple and had a couple of INA122s on hand. This is from the datasheet. Should pin 5 be connected to GND? (pin 4) AI: That an instrumentation amp (in-amp) not an op-amp. Pin 5, the output reference terminal (Ref), is show connected to ground. Pin 4 is shown connected to either ground or V-, depending on if you uses a single or dual supply. If you look further along in the datasheet you will see several schematics where pin 5 is connected to pin 4. In some cases Ref can be connected to a voltage to offset the output. I would recommend giving the datasheet a good looking over.
H: Is there any way to easily gain access to "actual ground" in an IT grounding system? As the title asks, is that possible? By "easy access" I mean through some connection I can find inside my home, rather than burying my own grounding electrode and running wires from it to access. And by "actual ground" I mean the soil outside; perhaps that's not the right usage of the term, feel free to correct that if so. The way I understand it there's simply not supposed to be any connection to "actual ground" (as used earlier, the soil) inside my home, but only a connection near the local transformer box (or whatever those large grey housings for the transformers are called, not the smaller ones mounted on poles) which only activates under very high voltages (surge protection). Also, some more questions related to this that I also have, to better understand the context: As long as no such connection is made, I understand it as the neutral in my home "floating" with respect to "actual ground", but does it then make sense to think of there being a voltage between the two? Since there's no circuit, what exactly would happen if I connected neutral directly to ground (essentially introducing a ground fault on purpose)? Would whatever voltage existed between neutral and "actual ground" quickly get discharged like when discharging a capacitor before the neutral ended up at ground potential and no more current flowed? And the way I understand it from reading about it, "the first fault is free" in an IT system, and connecting neutral to "actual ground" as described above would essentially be such a fault that would temporarily render it into a TT system; is that correct? AI: IT would be unusual for a domestic supply. If there's a connection from neutral to ground anywhere in the system, including at the transformer, then it's a TT system, not IT. If there is a link back at the transformer, then neutral isn't floating. As the title asks, is that possible? By "easy access" I mean through some connection I can find inside my home, rather than burying my own grounding electrode and running wires from it to access. And by "actual ground" I mean the soil outside; perhaps that's not the right usage of the term, feel free to correct that if so. Here in the UK, it used to be common to use a metal water pipe as the ground. That's not considered safe any more, as suppliers are converting pipes to plastic. Gas pipes shouldn't be used as a ground. Unless you live in a steel-framed building, there's not much else that's reliably connected to ground. The way I understand it there's simply not supposed to be any connection to "actual ground" (as used earlier, the soil) inside my home, but only a connection near the local transformer box (or whatever those large grey housings for the transformers are called, not the smaller ones mounted on poles) which only activates under very high voltages (surge protection). You need to check the rules where you live. In North America, customers are required to connect neutral to ground at one point in their installation. Here in the UK, we are prohibited from connecting neutral to ground (but the supplier may do it before the meter if they wish). As long as no such connection is made, I understand it as the neutral in my home "floating" with respect to "actual ground", but does it then make sense to think of there being a voltage between the two? If you really do have an IT supply, there will probably be some voltage, but it's undefined what that will be, and it will change if you connect anything (even a multimeter) between the two. Since there's no circuit, what exactly would happen if I connected neutral directly to ground (essentially introducing a ground fault on purpose)? It will no longer be IT. Nothing much else will happen at that point. Would whatever voltage existed between neutral and "actual ground" quickly get discharged like when discharging a capacitor before the neutral ended up at ground potential and no more current flowed? Yes. And the way I understand it from reading about it, "the first fault is free" in an IT system, and connecting neutral to "actual ground" as described above would essentially be such a fault that would temporarily render it into a TT system; is that correct? Yes. But it's arguable whether it's not TT or some variant of TN.
H: Where to connect two GND layers together? I have a 4 layer PCB. The stackup is as follows: SIG + PWR | GND | GND | SIG + PWR Now I want to connect both GND planes with each other. EasyEDA Pro has this feature called "suture vias". If I add these vias get created. The picture with the newly created vias is below (highlighted are the "suture vias"). These vias start at the first GND layer and end in the second GND layer. My question is, does it make sense that there are so few of them and has the position of them influence on the electric characteristics (impedance, inductance), or just the way current "flows". This is the MAX6676 Part: AI: If you are doing anything that is low speed (say lower than 10's of MHz) and not precision (like a few mV of ground bounce doesn't matter to ADC's), then it doesn't matter. Connect the grounds together everywhere. If you are doing anything with transmission lines or RF then it would be best to tie the grounds together because the return currents need to travel back on ground. If you have ADC's that are say 16bit and above then you need to pay attention to return currents on ground and noise from switching loads.
H: Debugging a problematic old TTL pull-up that's not pulling up I am trying to bring back into operation a late-70s disk controller board (all 74xx TTL). I'm stuck trying to figure out why a small pull-up network is resulting in a far out of spec voltage not doing what (I believe) it's supposed to be. There is a section of the larger circuit that is simplified in my sketch below. There is a 1K pull-up resistor connected to the 5V rail that is in turn connected to several input pins on four different ICs, with the apparent intention of pulling them all high. Typo: 74109 above is actually a 74107 But instead of a ~5V level on the other side of that resistor, I measure a signal that floats around 1V. Even wackier, is that as a means of debugging, I removed all four of these chips, leaving in theory only the resistor with just an isolated network of traces on the other side of it-- same low goofy voltage! So although I've illustrated the actual chips and pin connections there, it doesn't seem to make any difference whether the chips are even present. The resistor is a new 1K film resistor that measures correctly, and if I connect it to the 5V rail and nothing else, I see 5V on both sides of it, as I'd expect. So something beyond the resistor is causing the bad voltage, but I'm at a loss to figure out next steps in determining what it might be. This is a small area of the PCB, and I find no solder bridges or other obvious connectivity issues when following the traces. I'm not an engineer, just a tinkerer trying to learn, so either my expectations are wrong or I've run out of good ideas on what to look for. Can anyone offer some pointers or pro suggestions for how to systematically figure out what's going on? This has my stumped. Thank you! (The full schematic for the board I'm working with is here. The pull up circuit is chopped up across the first few sheets, look for "P.U." on sheet 1 which shows the resistor, and then blocks on subsequent pages with connections marked "PU"-- chips C1, D1, D4, and C5) AI: At this point you may have a major task ahead of you to repair this disk system board. The documentation on the Vintage Computer site you linked to seems to be missing a few pages, so there could be additional components on the suspect PU line. If you are not able to find the missing pages one alternative is to manually follow the PU trace along the complete board and start marking each component pin. To help with this task you could use a fine tip marker or small sticky labels to highlight each connection. If you are not sure of the connection use an ohm meter to verify the continuity. If you have to remove a chip be sure to mark the empty position with the IC type and the orientation. During the handling and repair of the board it would be best to use a static wrist strap to minimize the chances of static damage. If you are very lucky while tracing the PU signal you might find a shorted pin or a shorted trace. If you find a component other than an IC on this trace you could lift a pin and retest the PU line by briefly powering up the board and checking the voltage on that line. If you find that only ICs are connected to the PU line you can take a sort of shot-gun approach, purchase a group of original TTL parts and replace all of the suspect parts at one time. So far it seems that there is just a few 74123 and 74107 ICs, (but of course there are still some missing schematic pages). Another option would be to track the PU trace and if you find a main branch off point (for example near the center of the board) make a cut in the trace and retest the board measuring the voltage on the PU line (at the 1K resistor). If you do this a few times you may be able to isolate the defective point. Yet another option, if you don't mind making modifications on the board, would be to get a few 1k resistors and start placing them on the pins of each IC that uses the PU line (preferably on the bottom surface). You would first cut the original PU trace going to (and away) from each pin then solder a resistor from the VCC pin (usually pin 14) to each pin. If you later test the board under power you might find that one of these IC will still have a low voltage on the end of the new pull-up resistor, that could be the one IC that caused the problem, at that point you might only need to replace that one IC. It looks like chip A7 (74123, sht 4 of 6) should also have it's pins 3 and 11 connected to the PU line, this might be a drawing typo or maybe the pin was left open. Also see E5 (74107), p13, sht 5 of 6 200058-200 E6 (74123), p11, sht 4 of 6 200058-200 G2 (74107), p13, sht 3 of 6 200058-200 H15 (74107), p13, sht 1 of 6 200058-200 H16 (7476), p8, sht 4 of 6 200058-200 Note that some parts of the above chips have the CLR pins used for other purposes, (be sure to verify this before making any modifications). Possible other connections on the missing sheets 5 and 6 of 200028-200. IC datasheets for reference: 74123 74107 7476 Some examples of these ideas are show below: . simulate this circuit – Schematic created using CircuitLab . . simulate this circuit . . .
H: ESP32-WROOM-32D need to press reboot to start working I have made a PCB based on the ESP32-WROOM-32D, and the code upload correctly, but it seems that the board for start to work it has to press the reboot button first. Based on the schematic that ESPRESSIF give us for the ESP32-DevKitC V4. One of the difference between our schematic is how they the get 3.3V. We use a step-down to go from 12V to 3.3V: And they used the AMS1117 to go form 5V to 3.3V. (https://dl.espressif.com/dl/schematics/esp32_devkitc_v4-sch.pdf) That anyone knows if this matter? or what else can i try? AI: I try the solution that is proposed here: https://esp32.com/viewtopic.php?t=6090 And it works! I remove the capacitance C31
H: What is the structure and type of harmonics generated by a very differentiated square wave (i.e bipolar spikes)? this question is in two parts. Firstly, can you please tell me what the structure and amplitude distribution is of harmonics generated by a differentiated square wave of 50% duty cycle, where the time constant is very short, producing alternating bipolar spikes of short duration? I know a square wave produces odd order harmonics that decay in amplitude by 1/n, but not sure if the above does - or has even order harmonics as well? Secondly, what change to the harmonic series and amplitudes occurs for duty cycles tending towards 0% or 100%, from 50%, as if the source was PWM'd by a lower freq signal. Thanks. AI: You can model this as a series of positive and negative Dirac delta functions. You'll find that this ideal case gives you the (similarly ideal) result mentioned by Dave Tweed in the comments: the Fourier transform of a square wave multiplied by that of a differentiator. The drop in amplitude of the square wave harmonics and the rise with frequency of the differentiator cancel out, leaving a series of spikes on the fundamental and odd harmonics, all of equal amplitude.
H: What type of connector is on this small Li-ion pouch battery? I have some small Li-ion pouch batteries and I am having a hard time identifying the connector. To me it does not seem to be of a standard "JST" variety but I am not an expert. Has anyone seen such a connector used for a mass-produced Li-ion pouch battery? I made some measurements with a caliper and made the figure below: AI: It looks like a Hirose DF57H-2S-1.2C. Some of the measurements are off but 2.6mm across the mating face matches. I would double check the dimensions against the drawing.
H: IP address detection tool I need some help with a mini project of mine considering checking ip addresses. The main goal is to be able to either plug a device in between the router and the end device (a PC for example) in order to simply display the address assigned by the router to this specific ethernet cable. Alternatively if the former would dramatically impact the throughput of the cable itself I would settle on needing to unplug the end device in order to plug the said microcontroller so I can check the IP and plug the cable back into the end device. I need it for quality of life at work where we have a lot of Nvidia Jetson boards all connected in a very unorderly fashion all around the office, 90% of the time they are set up for remote access and need their IP address to connect. I could just set static IP but it would not solve the problem in the long run since they have their system wiped very often. Having such thing always on hand would make my life easier, I know that there are dedicated tools for that but they are often either too expensive for me to bother buying them or are simply an overkill in what they offer, apart from that, come on it would just be cool. I only need help READING the address from the cable, the simpler the better. I would greatly appreciate a recommendation for a board that would best fit this, I usually use the ESP and STM boards so I prefer those. AI: Basics If we imagine the typical case of the endpoint devices on a twisted-pair ethernet segment: At one end is a switch, typically built in to the router hardware R At the other end is a device A, B, C We insert our device at point X ISP | R | --+---+---+---+--- | | | X | | | | | A B C A network sniffer on this wire will see a small amount of traffic between the device and the router itself (such as DHCP), and a much larger amount of traffic from the device to its communicating partners (typically HTTP). If there is no peer-to-peer communication within the network (A to B etc) Ethernet traffic at X will be either from the ether address of R to the ether address of A or vice versa. We sniff for anything characteristic: I'd expect, for example, no DHCP except for A, no DNS except from A. At the simplest, make a table of all the IP addresses seen on the packets, the most common one should be A. A rough and ready script is easily made in Bourne shell or Python. On the other hand, if you have a lot of traffic within the network (i.e., between A and B) you might need to have an ethernet bridge at X so you can see which end the frame is coming from. Rasperry Pi + TCPDump A device suitable for this would be a Ethernet switch with a monitoring port and a display unit such as a Raspberry Pi running basic network traffic analysis. You start with TCPDump/TShark. Any two-Ethernet Linux computer will do the bridge function, and also run the TCPDump/whatever. It should be able to do this in an afternoon with a Raspberry Pi or similar. It's possible to build a microcontroller "device" for it but it's a lot of work for not much benefit over a Pi in a cute box with a small screen and a good /etc/rc.local. Getting it to work is all about the ethernet switch monitoring port, not the sniffing and IP address extraction. You start by reading the capture set up requirements at Wireshark. Building a Circuit Get a powerful MCU which can handle wire-speed ethenet at your desired speed With two ethernet ports Some kind of output display Program it as a bridge which copies all frames from each side to the other (this is harder than it seems at first: you have to queue the frames in case the other side is busy.) Look for IP packets in the ether frames Pull out IP address Sort / Display This device doesn't have to communicate at all on the ethernet, but it might want to for logging results etc. You might find it good to look for LLDP or CDP type traffic too, if your switches have it, as this will tell you what socket you're connected to. However you put one together, it can be really handy to have a small device to plug in to a wire to see what's happening. Obligatory postscript noting that monitoring Ethernet traffic has ethical considerations and in many jurisdictions legal ones too.
H: Would I typically get a shock from touching two live wires separated by ~240 V with each hand if my skin were completely dry (assume I'm ungrounded)? As the question asks, would I? I'm aware that one should naturally never actually try this, and that people for the most part do get shocked when accidentally doing this, but why exactly is that? I just recently measured the resistance of my body from hand to hand at ~1.6 megaohms, so at 240 V that corresponds to a 150 microamperes of current. That type of current shouldn't even be enough to harm my heart even if it went straight through it as far as I'm aware. I also read that the breakdown voltage for skin was ~500 volts, so 240 volts shouldn't be enough for that, or is there perhaps some partial breakdown effect that needs to be accounted for? Or is it perhaps because the peak-to-peak voltage is high enough to cause breakdown? AI: Short answer: generally, yes. It may or may not be fatal (in fact most people survive from 220/240V exposition), but you can bet it will be quite unpleasant. I don't know how you did measure your resistance, but take my word that you are very much non-linear resistor and your resistance at 240V is orders of magnitude less than your resistance at (half the voltage of the multimeter battery minus whatever electrochemical voltage loss between the metal and the body, generally about 1.5V). What's worse, the surface skin resistance (it dominates your hand-to-hand measured value) tends to be temperature-dependent and gets much lower as the passing current heats the point of contact. This is how unlucky people get burns in addition to the electric shock.
H: Logic-level, high-side, P-channel MOSFET switch I want to use a MOSFET for high-side switching of the DRV425 fluxgate as it has no enable pin, and has quite a high power consumption (150 mW @ 5V -> 30 mA): Before the P-channel MOSFET WTM2301 there will be a signal inverter SN74LVC2G04 for reasons not important for my question. I only have 3.3 and 5 V available on my board and want to switch the MOSFET with a 3.3 V signal. The DRV supply is 5 V. The MOSFET datasheet mentions "P-channel", and from my understanding it can be used for high-side switching, however, the test circuit looks like low-side switching in the datasheet. Can anybody provide some guidance on the chosen parts/ the circuit? Before manufacturing the board it would be great to get some feedback from experienced people. To be honest, I am confused with the datasheet and not sure this will work. AI: A cheap solution would be the following (NMOS + resistor). If you are ok with some current consumption when the PMOS is ON, you can try it. Case1: PMOS is OFF Case2: PMOS is ON You can increase R1 further and reduce current further but should make sure that the current is able to beat the IDSS of M3 and pullup M2 gate to 5V when M3 is OFF. Another potential risk is if there are sharp voltage transients of large magnitude expected on 5V supply, the transistor M2 could turn ON momentarily (when it is supposed to be OFF) if R1 is very high. A level shifter would not have any current consumption. So, it is definitely better if you can afford it.
H: How to set system bandwidth? I would like to know how to set minimum system bandwidth according to the following requirement : I have a system regulating an output. In nominal operation, the system has to regulate its output to \$S_{out1}\$. Then when an event occurs, the system change its reference (input) in order to change its output. The new output is \$S_{out2}\$. The time required for changing from \$S_{out1}\$ to \$S_{out2}\$ is \$t_{out1->out2}\$. (Suppose the system takes no time for detecting the event). My idea was to think about a sinewave and at the derivative around 0 where the slope of the sinewave is maximal in order to extract the frequency of the sinewave and so the bandwidth \$f(t) = Asin(2*Pi*f*t)\$ And then, \$f = \frac{slope}{2*Pi*A}\$ But it depends on the amplitude of the sinewave and it is not a parameter that I really know. So it makes me think that it is a bad approximation. AI: In general, a critically damped system has the fastest settling time - an underdamped system will overshoot and thereby take longer to settle, while an overdamped system will only reach the target value asymptotically. As a result, the minimum system bandwidth for your desired settling time is equal to the bandwidth of a critically damped resonator that settles to your desired accuracy (i.e. 1%) within the given time. See this answer for details on how to calculate the settling time from a given resonant frequency, and vice-versa. As a general approximation, you can equate the resonant frequency of a critically damped low-pass to its bandwidth with reasonable accuracy. Also, if you choose your bandwidth as f=1/Ts (resonant frequency period equal to settling time), you will find that a 2nd order critically damped system will have settled to within 1.36% of its final value after the settling time, according to the formula in the answer I linked. This is all independent of the absolute amplitude of the signals involved since the system in question is linear.
H: Need theoretical understanding of basis of IR sensor design Below is a cutout of the IR sensor part from a heart rate sensor schematic. I need to understand how this part has been designed, what is the basis of the choice of the two resistor values R1 and R2, and the preset R8. The part shown here is a TCRT5000 sensor. I have read elsewhere that reducing R1+R8 can increase the IR light intensity from the bulb which can increase the system's sensitivity as that would mean more reflected light falling on the phototransister, and that that would mean more current from the phototransistor which would mean R2 would need be reduced too. But I don't know the theoretical basis for all this (the math etc) so I don't really get it. What is the job of R2? Why R2 is 10 kΩ? How is R1 and R2 and R8 calculated? Someone kindly explain. EDIT: Requesting some explanations basis @user4574 answer: Firstly, According to the datasheet, the forward current value is 60 mA. Why would the designers restrict the current to just 25 mA? Why not use a smaller resistance than 150 Ω and closer to the limiting 62.5 Ω so there is more brightness and more sensitivity in the system? Second question datasheet says maximum Ic can be 100 mA, which would mean Vr2 = (10000*100)/1000 = 1000 V. What does that means? Thats a scary voltage. Thirdly, what could be the benefit or fallout of using a higher voltage and a smaller R2 for the phototransistor? Would that make the system more sensitive or less sensitive? I ask because I have seen research papers where they have used a 9V system but I don't know what value of R2 they used. Fourthly, wouldn't it be better to set R1 and R8 values such that it allows for maximum possible Luminescence at the IR lamp, and then controlling the signal quality from setting a preset at R8? I noticed in this system that human pulse was only visible at approximately R1+R8 = 300 Ω, if R1+R8 was say 70 Ω, would I have been able to see the pulse again by setting the R2 at a lower value through a 10 kΩ preset? Fifth question, I understand now from your answer what is the role of R2, but suppose it is replaced by a preset and the preset is accidently set to zero, would that in any manner be harmful to the phototransistor? AI: Per the datasheet The TCRT5000 and TCRT5000L are reflective sensors which include an infrared emitter and phototransistor in a leaded package which blocks visible light. The datasheet says that the typical forward voltage of the emitter is 1.25V. With a 5V supply the current through the LED is therefore... $$I_{D} = \frac{5V - 1.25V}{R_8 + R_1} $$ Given that R8 can go between 0 ohms and 10K ohms, the LED current can go from 369uA to 25mA. I have read elsewhere that reducing R1+R8 can increase the IR light intensity from the bulb which can increase the system's sensitivity as that would mean more reflected light falling on the phototransister, and that that would mean more current from the phototransistor which would mean R2 would need be reduced too. That's correct. The current output from the transistor is proportional to the amount of light falling on the detector. The amount of light falling on the detector is proportional to the amount of light emitted from the LED and the reflectivity coefficient of the target material that the light is being reflected from, and inversely proportional to the square of the distance to the target. But I don't know the theoretical basis for all this (the math etc) so I don't really get it. What is the job of R2? Why R2 is 10K? How is R1 and R2 and R8 calculated? Someone kindly explain. The phototransistor allows current to pass from its collector to emitter in proportion to the light falling on the detector. If the current passes through R2 then the voltage across R2 is... $$V_{R2} = R_2 * I_c$$ So the output voltage is... $$V_{out} = 5V - V_{R2} = 5V - R_2 * I_c$$ The purpose of R2 is to convert the current output of the transistor into a voltage. For an output feeding a low frequency digital input pin on some other device, 10K is a fairly standard choice for a pullup resistor. Firstly, According to the datasheet, the forward current value is 60 mA. Why would the designers restrict the current to just 25 mA? Using a part right at its maximum rating is not likely to result in good long-term reliability. Why not use a smaller resistance than 150 Ω and closer to the limiting 62.5 Ω so there is more brightness and more sensitivity in the system? Its possible the sensor was sensitive enough at 25mA, in that case, it may not have been necessary to burn the extra power. Second question datasheet says maximum Ic can be 100 mA, which would mean Vr2 = (10000*100)/1000 = 1000 V. What does that means? Thats a scary voltage. You won't get 1000V or 100mA with this setup. The transistor can't create extra voltage or current. It just allows current to pass through it. The maximum voltage you can get across R2 is the supply voltage minus the saturation voltage of the transistor (about 0.4V). Therefore, the maximum current you can get through R2 is (5V - Vce_sat)/R2, which is about 460uA in this case. The only way to get close to 100mA would be to lower R2 to like 46 ohms. But even then you probably couldn't get that much since it would require a lot of light. Fourthly, wouldn't it be better to set R1 and R8 values such that it allows for maximum possible Luminescence at the IR lamp, and then controlling the signal quality from setting a preset at R8? I noticed in this system that human pulse was only visible at approximately R1+R8 = 300 Ω, if R1+R8 was say 70 Ω, would I have been able to see the pulse again by setting the R2 at a lower value through a 10 kΩ preset? If you did an experiment that showed R1+R8 needed to be in the range of a few hundred ohms to get at reading, then its possible a 10K pot wasn't optimal. On the other hand there could be other experimental conditions (different sensor distances, skin color, placement on body) where it worked better with R1+R8 at several kilo-ohms. It's hard to assess that without more data. Use whatever works best under the conditions you plan to use the device. Fifth question, I understand now from your answer what is the role of R2, but suppose it is replaced by a preset and the preset is accidently set to zero, would that in any manner be harmful to the phototransistor? The original circuit was designed with R2=10K. That means that the original designers intended for the detector to be fully on with only 460uA flowing in the transistor. I can't say for sure, but its likely that under normal conditions transistor isn't going to conduct more than a few 10s of mA even with a lot of light hitting the detector. With a 5V supply that's likely to result in a few tenths of a watt of heat at most, which probably won't burn out the transistor.
H: Why is the bitrate of infrared smaller than the bitrate of WiFi? Infrared has a frequency of 300 GHz – 430 THz, while WiFi has a frequency of 2.4 GHz or 5 GHz. As the frequency of infrared is greater than the frequency of WiFi, the transfer rate (bitrate) of IR should be greater than WiFi. In reality, IR transmission is in Kbps, while WiFi for WLAN is about 100 Mbps. We know that a greater frequency wave can carry more bit data, but it is difficult to handle interference such as thick wall obstacles, therefore lower coverage range, and vice versa for lower frequency. That statement only applies between mobile cellular band LTE (2.3 GHz) and WiFi (2.4 GHz) where WiFi bitrate is higher than LTE, but not between IR and WiFi. Edit: I said Kbps after I read random article about IR Remote. AI: The premise is false. Infrared communication can be much higher bandwidth than wifi; just look at modern fiber-optic communications. It looks like you're really asking why wifi is faster than the protocol used by infrared remote controls, though. The reason for that is quite simple: the remote control doesn't need to transmit quickly. It only needs to send a tiny amount of data intermittently. Designing a high-bandwidth communications protocol simply to let your TV know that you hit the power button is completely unnecessary. Remote controls are also designed to last a long time on small batteries, so simpler protocols are better--complicated modulation schemes require more electronics and more power consumption. And on top of that, the system used by remote controls was designed in the 1970s! Not exactly what you'd call modern communications systems.
H: AC step down circuit I have a quick question about a circuit I want to build, namely a low voltage AC power source. I attached a picture of the schematic. Are there any safety concerns that I might have to pay attention to that are not addressed in the schematic? It is a pretty simple circuit, but it is my first time working with AC, so I wanted to be safe. AI: The primary side (230VAC) needs a fuse. I think the datasheet for the VTX-146-015-106 says there's a fusible link in the primary side to protect against overheating, but I'd still put a fuse in. Those TVS diodes will make a mess of your AC. You do not need them. You seem to want a switchable 6VAC/12VAC output. Use the following schematic: simulate this circuit – Schematic created using CircuitLab
H: is it true that when I have a 7Ah battery w/ a C Rating of 10, 7 * 0.10 = 0.7A? I have a SLA battery: 12v 7Ah C Rating 10 Is it true to say that when I use a charger, the charger needs to be less than half of 7Ah * 0.10? My charger is rated for 750mA for 12v batteries. So, I have 0.75A at 12v for charging. That is way under half of the 7Ah but just over half of the 7Ah * 0.10 which equals 0.70. I am trying to not convulse the battery to the point it discharges. Please send guidance. The maximum rated charge rate for this battery is 10% of the 7Ah. AI: C Rating 10 Do you mean a rating of 10C? If so: 7Ah * 10C = 70 A Is it true to say that when I use a charger, the charger needs to be less than half of 7Ah * 0.10? Yes, that is a good guideline for lead acid batteries. However, we warned that "C-rating" is a marketing tool, not an engineering parameter. A current of 10 C would discharge a battery in 6 minutes. The vast majority of batteries are damaged when discharged that fast and many batteries can't discharge that fast even if you try. For the sake of your battery, ignore the vendor's "C-rating" and discharge it at a reasonable rate. For example, 1 C for the typical LCO Li-ion battery, 2 C for a high-power Li-ion battery, and 0.1 C for the typical lead-acid battery.
H: Regulated power supply design Currently I'm working on my first electrical project - A dual voltage power supply. I'm very new to electrical design and have no prior knowledge of it. But I do learn fast so please bear with me. I was designing a power supply using an LM317/337 current boosted circuit, but I've been told that the design is outdated and I should look into other solutions. R5 and R6 also have a potentiometer following them to limit the minimum voltage to 24 volts with the maximum at 49 volts. The transformer in the diagram has a series resistance of 1.0 Ω on the primary side and 0.6 Ω on the secondaries. The reason I chose this circuit, is because of it's simplicity, how often it's still being used in audio receivers and amplifiers, and I also have the parts available from salvaged audio equipment. The power supply needs to be able to provide a minimum of 24 V/-24 V (48 V DC) on each rail. Maximum voltage is +60 V/-60 V (120 V DC). It's being used to provide power for a 48 V DC motor controller. It will also be used for titanium anodizing so the voltage needs to be adjustable. The 48 V DC motor is 300 W. EDIT: To better clarify my needs - I am trying to build a 48-54 V linear regulated power supply for a CNC motor controller. https://pedja.supurovic.net/36v-cnc-spindle-motor-driver/?lang=lat I've added a link to the page with the original design which uses a 5v or 24v pwm signal to control a mosfet motor controller. However mine will use the 12v signal from the CNC controller which I've added a link below to the schematics of the controller. The motor I am using is linked below. It is a 48 V DC Motor which uses 300 W. I would like to leave some headroom incase I upgrade to the 500 W motor. https://www.amazon.ca/RATTMMOTOR-12-48VDC-Air-Cooled-12000RMP-Engraving/dp/B08HGNXZVF/ref=asc_df_B08HGNXZVF/?tag=googleshopc0c-20&linkCode=df0&hvadid=578803204497&hvpos=&hvnetw=g&hvrand=3139667351443308493&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9001016&hvtargid=pla-1853557070810&psc=1 AI: I'm going to address your question. That doesn't mean a quantitative answer, because your question is about a first electrical project and some general details that you are looking to provide power for a DC motor and titanium anodizing. DC motor: A dual voltage supply for a DC motor may allow you to operate the DC motor in both directions where one side of the motor is grounded and you switch the other side between the two voltages. However, widely available dual half-bridge or full-bridge ICs (or controllers that operate discretes for bridged switching) make dual rails far less necessary. I could argue that you are better off focusing on a very good single-rail supply as your first project and spending time developing your knowledge about bridging for DC motor control, which you'll need to learn about, anyway. Titanium anodizing: I'm no expert on titanium, specifically. But anodizing, in general and specifically when considering this is a 'first electrical project', argues strongly for a constant current source. As the anodizing proceeds the impedance of the thickening layer increases. If you use a constant current source it's a lot easier (a lot easier) to control for a desired result. So here you don't even want a constant voltage supply circuit, but instead a constant current circuit -- which doesn't look the same (unless you buy a commercial power supply that supports both, in which case it does look the same on the outside, at least.) My advice, since this is a 'first electrical project', is to pick some one thing you want to achieve. It's not the time to try and make yourself an all-in-one mix-master. It can be done. But not as a first project. Learning is a process of incremental steps. Final note. The reason for suggesting emitter resistors in the external bypass PNP (or NPN) BJTs is because BJTs vary, one to another, and it almost always comes to pass that just one of them picks up the hogs share of the load and the others do little. The emitter resistor adds so-called negative feedback. (This is something that comes in many shapes and flavors, so be aware that you will need to acquire a lot of learning to be able to see it in its various disguises.) By doing so, when one of the BJTs tries to pick up too much of the load the resistor 'resists' this by signalling the other BJTs (via the shared base voltage) to do their share of the work. We can always get into more detail about exactly how that works. But that's for another time. My point here is that there is already enough for you to learn in designing a basic DC power supply. It's a great first design project if you don't let it get out of hand. Keep it simple and focused. Solve just one problem for now. And milk that project for all you can learn from it. There's a lot just in a very simple DC power supply, not to go complicating the learning process by biting off too much, right now.
H: Charge time capacitor in a BJT collector with a parallel resistor Hello, Given that circuit that has a constant current(let's say 3mA), How do I determine the charge time of that capacitor? since in t=0 the capacitor would have all the current but later it will split, so I can't use the usual formula(Vc=Vi(1-e....), but also can't use I=C*dV/dt since I would vary with time. How can I model the behavior of the charge time through the capacitor? and how does I do it if instead of a resistor I would have a diode? thanks a lot. AI: \$\small V_C=V_R\$, therefore \$\frac{1}{C}\large\int \small I_C\: dt=R(0.003-I_C)\$ Solve for \$\small I_C\$; initial condition is: \$\small t=0, I_C=0.003\: A\$. Assuming a perfect diode that switches on at 0.7 V, the capacitor will charge linearly to 0.7 V, at which point the diode switches on and carries the 3 mA thereafter.
H: Comparing liquid "energy" to batteries I'm not sure how to convert or correctly compare gasoline/alcohol to batteries in terms of weight and volume. For example in the following link Specific Energy and Energy Density of Fuels I can find the following information: Specific Energy $$E_{8} = \frac{E}{m}$$ Energy Density $$E_{d} = \frac{E}{V} $$ Specific Energy Fuel Density Energy Density kg/m3 MJ/kg MJ/m3 Gasoline 716 -47.3 -33,867 Ethanol 784 -29.7 -23,278 And the information I've found on Li-ion batery from What's the Best Battery: Li-ion - Gravimetric Energy Density (\$\frac{Wh}{kg}\$): 110-160 I have no idea how to compare/convert \$\frac{wh}{kg}\$ from/to \$\frac{kg}{m3}\$ nor \$\frac{MJ}{kg}\$. (Most likely it's more complicated then even this, as a combustion engine isn't that efficient in changing potential energy into kinetic energy. I'm not concerned with that at the moment, just trying to figure from a storage point of view how to compare these energy sources). AI: I have no idea how to compare/convert wh/kg from/to kg/m3 nor MJ/kg. First, \$\rm\frac{[kg]}{[m]^3}\$ are the units of density and not related to energy storage. Your source was just giving the density figures to let you double-check the energy density and specific energy values for self-consistency. Converting from watt-hours per kilogram to kilograms per cubic meter wouldn't make any sense. Second, one hour is 3600 seconds. And one watt is one joule per second. So you can very easily do the math to convert watt-hours to megajoules.
H: How to use thevenin theorem in this example? Use thevenin theorem to find the current through 2 ohm resistor also find thevenin voltage and thevenin resistence. My approach:First I open circuited the resistance through 2 ohm resistor then used voltage division to find the thevenin voltage but got the wrong answer. My calculations: Vth = 9V * ((6+4)/(4+4+6))= 6.43V. But the Thevenin voltage in answer is 2.571 volts. AI: When you remove the load, you end up with: simulate this circuit – Schematic created using CircuitLab It follows that \$I_y=0\$ since it is an open circuit. $$I_x=\dfrac{9\text{V}}{4\Omega+4\Omega+6\Omega}=0.643\text{A}$$ The potential difference between the terminals A and B is the \$V_{\text{TH}}\$. This is just the voltage across the farthest to the right \$4\Omega\$ resistor. Then $$V_{oc}=V_{\text{TH}}=(0.643\text{A})(4\Omega)=2.57\text{V} $$ You need to find \$R_{\text{TH}}\$. Short circuit the 9V voltage source and find the equivalent resistance at the A and B terminals. That would be: $$ R_{\text{TH}}=((4\Omega+6\Omega)||4\Omega)+5\Omega=7.86\Omega$$ With that, you can find \$I_2\$.
H: My headphones have 4 wires instead of just 3 I cut into my headphone cable to repair the headphone plug and instead of the standard "3 wires" I read about all the time mine has four: 1 red (I assume right) 1 blue (I assume left) 1 white (???) 1 black (???) These headphones don't have a microphone, so it's not for audio in. UPDATE: I looked at some other documentation about this brand's design, turns out it's "left earth" and "right earth". AI: If the plug only has three and there are four wires (and its a nicer pair of headphones) it is probable that the current return is not shared in the cable. Get a multi meter an ohm out the pairs (set it on ohm mode), if the headphones are (say) 8Ω then if you put the positive on the blue and the negative on the white, then it should say 8Ω if those are a pair, if not then try the black. Then try the same thing with the red until you have them sorted out. You might be able to ohm out the cut cable on the 3.5mm end, if you still have it. Put one of the meter cables on one of the 3.5mm jack and then test all the pairs until you have continuity, then you can match them to the new jack. Don't ask me what ohming does, you'll need to research that yourself, its an EE forum after all
H: What usb-class for a device intended to be as future proof as possible? I am writing specifications for a product and need help to minimize its future need of maintenance. In order to be able to be (optionally) monitored from the Internet the device is supposed to have a USB CDC port to connect it to a computer (I am now developing it as a python script on raspberry) able to poll data from it (less than 10 byte a minute, speed is not the problem here) and generate a nice webpage. My concern is to minimize the need for future work on this communication capability feature: we decided to make it as a pr stunt but we expect to be used by a minority of our customers, spending days every year maintaining and fixing the code is not an option. Computer-side we decided to open source the code and, of course, also the AT command for the device. Device side, what worries me is the need for drivers. What USB class should I put my device into for it to be recognized as a COM port without the need of distributing drivers? I.E. if I make it adhere to Communication Devices Class specification can I have it recognized as a com port thru "standard, omni-present" drivers? AI: You probably want a CDC serial port. I'm going to disagree with laptop2d here, although HID drivers (e.g. ones for a usb mouse and keyboard) are common, I don't see how you would use any of the standard drivers for serial-like communication. You could of course write your own HID driver, or maybe there is a company out there selling them. Windows versions from Vista onward (and probably earlier too) include a usb CDC serial driver called usbser.sys. There are as far as I can tell two major versions, one in windows Vista/7/8/8.1 and one in windows 10. For the first version, you need to provide an inf file, to link your USB VID/PID to the driver, then windows will load it. The driver is a bit rubbish, it makes no attempt to recover from transient disruptions on the bus, and we've had trouble getting through European standard immunity tests with it. Due to a driver bug, it is not possible to recover a dropped connection purely in software (!!). The windows 10 version is better. If you set the right device class and subclass (02/02, IIRC), windows will load the driver without an inf. It will still have a yellow ! in device manager though, so for a professional look you'll still want that inf. If you use an inf, it will have to be signed, and a code signing cert will set you back somewhere under £100. You could also buy comercial driver from e.g. Thesycon. They are much better than the built in windows one, and they will provide customised distributables. Costs ££££s though. I understand linux support for CDC serial ports is good, no driver needed (though maybe some udev rules), and I have no idea about Mac. This all assumes you do the USB yourself on a USB equipped microcontroller, using the appropriate libraries, and then sort out a driver. Another option would be to work with someone like FTDI. They can probably provide drivers if you use one of their usb/serial chips.
H: Does an AC rated fuse blow at the same current DC Bought some 30A fast acting glass fuses. Thought they were rated 32VDC but I noticed when they got here they are rated for 32VAC. So would they still blow at 30A of DC current or would they allow greater than 30A? AI: First of all, the voltage rating of the fuse is the maximum voltage at which the fuse is able to stop the current once it reaches the critical value (30 A, in your case). If you have a current of the critical value at a higher voltage, there's a chance it will form an electric arc even if the fuse is broken, therefore the current will keep flowing anyway. AC fuses are relatively easy to build, as the current is variable with time with a sinusoidal law. This means that the current goes to zero many times every second (for instance, 50 times every second if you're in most european countries), so you have a relatively low current most of the time. A continous current, at the same constant voltage (not alternated voltage) is therefore quite harder to stop. In conclusion, if you have a 30 A fuse rated at 32 V AC, it won't probably behave like a 30 A fuse rated at 32 V DC. It will interrupt the current flow if it reaches 30 A at, say, 24 V AC, but it probably won't if it reaches 30 A at, say, 24 V DC.
H: what is d-sub connector metal shield made of? I want to solder a ground wire to the d-sub connector's metal shield( the bright color metal part of the connector), using tin-lead solder 60-40. I just wonder what kind of metal it is. I searched the web and couldn't find the answer. This kind of connectors AI: Finding the datasheet or mechanical drawing of your part would be the best way of getting the answer. Taking one connector at random on digi-key, http://www.assmann-wsw.com/fileadmin/datasheets/ASS_4884_CO.pdf you can find that the shell is SPCC. So soft steel. Not so fun to solder on. Some (most?) shells are plated though, with copper, tin and/or nickel, which are much nicer to solder on. The other factor is that the shell is basically a HUGE heat sink (in terms of soldering electronic components) so you might have a hard time getting it hot enough to have a good solder join. Good luck.
H: How to measure Stepper motor current when using EasyDriver A3967? We are using EasyDriver stepper motor driver A3967 for running a stepper motor. We wanted to measure the current consumed by the motor using an oscilloscope. Can you give us some suggestions on how can we do that? I read about measuring the voltage across the sense register but I don't know whether it is the correct way? Where can we add a resistor in the circuit to measure current consumed by the motor? AI: You can measure right across R1 and R2 to get the current in each phase. Since they are 0.75 you must divide the voltage by 0.75. With resistances this low, a good practice is to put a scope probe on either side of the sense resistor and use the math function (A-B) to subtract the traces.
H: Optocoupler transfer ratio Every optocoupler has min and max current transfer ratio. I have read articles that said always design the circuit using the minimum current transfer ratio. However, I want to understand which parameter affect the transfer ratio. I did look at a datasheet of an optocoupler but couldn't find any information about it. Could someone please explain them to me? AI: The transfer ratio will vary in manufacturing from lot to lot and from device to device. This will be due to variation in LED, receiver, insulator and gap distance in manufacturing. The minimum current transfer ratio is guaranteed and if you design to this your circuit should work. Meanwhile you need to keep an eye on the max value if there is a risk of problems due to too much current on the output side.
H: Putting an ESP8266 to sleep via either of two signals I've got a circuit which I'm hoping to use to shut down my ESP, except where an interrupt happens from an external chip (MCP23008 GPIO expander), or I have chosen to manually keep myself enabled. Being a bit cheap, I wanted to do this using diodes - D1 is being fed from the interrupt line on the MCP23008, and D2 is being fed from another GPIO pin on the ESP. It seems that this works for keeping the pin held high (the ESP boots just fine on power up, when the INT pin is high by default, then I bring the GPIO pin high to keep it up), however when the interrupt pin goes low (I set it to Active-High mode), and I turn off the GPIO, the pin remains at 3.3V - even though the two sources on the other side of the diode are now at 0V. Clearly the capacitance on the input is retaining the charge and there's nowhere for it to go. So I've put a 1K2 pull-down resistor in - however this doesn't seem to have quite the desired effect, and the pin sits at about 2.5V (3.3 - diode drop, more or less) and the CPU does not appear to run. I'm not sure if it's just because the pull-down is too strong. What is the correct solution here, and can it be done with just diodes and/or MOSFETs (and passives)? EDIT: this is a followup to ESP8266 Wake from deep sleep with an interrupt (not a duplicate as the question is different) AI: Figure 1. Schottky diode IV curves. Source: CMLSH05-10DA datasheet. If you want to use diodes for the OR gate you could consider Schottky diodes which have a lower forward voltage drop. If you were to aim for a 350 mV drop at 25°C you should restrict the current to 0.3 mA. \$ R = \frac {V}{I} = \frac {2.95}{0.3} = 10 \; kΩ \$. As an aside, does anyone know why the 25°C curve is between 125°C and 40°C?
H: Is it safe to sleep in the same room with a car battery? I sleep in the same room with 2 car batteries. I'm not a battery person so I don't know what type they are. I tried looking for voltage but didn't find it printed on the battery. They're standard acid batteries, I use them to power LED lights and charge a phone/laptop. I've been told they emit dangerous chemicals and it's not safe to sleep in the same room, is this true? I only found one other thread similar to this, but it was about deep cycle batteries, I don't think those are the same as car batteries. AI: With any larger battery with significant potential energy, exceeding the discharge rate, over charging, charging when at end of life, or physical abuse can lead to explosions, unexpected venting of acid, or overheating that can cause a fire. The battery should be in a properly vented, protective case that safeguards the terminals and there should be an appropriately sized fuse on one or both terminals of the battery where the load and charger connects. If the battery is simply being stored (not charged or discharged) in the room and it is in a proper protective case, then it is perfectly safe. If the battery is the type with removable caps, then care must be taken during charging due to the release of hydrogen gas during the charging process. Of course the acid in the battery is quite corrosive should the battery be tipped or if the case becomes damaged. If the battery is an AGM (absorbtive glass mat) or gel cell type then there is no danger of off-gassing during normal operation. These styles of batteries will not leak if tipped - many are rated to work even when placed on their side or inverted.
H: Should power supply be fused on input and outputs? I'm building an automation control panel. It uses a 120VAC to 24VDC power supply to power several IO cards and signal lines. The entire system will draw less than 500mA when in operation. This PSU is rated to output 24VDC at up to 5A. The sticker also states that it draws up to 2.6A on the input side. I have already installed a fuse on the input side, rated for 2A. Should it also have a 5A fuse on the output? or will the 2A input fuse open if the output is overloaded/shorted? What is the best practice in this situation? Thanks! AI: The power supply is most likely already protected on the primary side. Check the spec sheet. Since your secondary load is quite small compared to the capacity of the secondary, a best practice is to install secondary protection at the planned load in order to protect the load elements and associated wiring, rather than the supply.
H: Method for having long task delays in freertos I was wondering how I can delay for longer periods of time using freertos function vTaskDelay(). Because the largest number you can store in a 16bit unsigned integer is 65535, the longest I can delay for is a little under 2 hours. I have currently implemented a method which uses a counter. Is this approach the best or is there another way? void vSomeTask(void) { static int16_t counter = 0; // DO SOMETHING //WAIT 24 Hours while (counter != 23) { vTaskDelay((1000*3600) / portTICK_RATE_MS); counter++ } counter = 0; //DO SOMETHING ELSE AFTER ONE DAY DELAY vTaskDelete(NULL); } EDIT: I just realized that because vTaskDelay is relative, it does not account for time that passes after the delay ends if other tasks of greater priority keep running. So a more refined approach would be to get the current time and instead use vTaskDelayUntil() because it's based of absolute time. AI: What you have proposed will work in concept, and at relatively low cost - though it might be implemented more cleanly as a for loop. FreeRTOS's scheduled timer callback functions use the same TickType_t argument, so those won't be of a help to you. However, it is worth noting that the 16 bit limit you mention is not actually fixed - rather it is configurable in FreeRTOSConfig.h Defining configUSE_16_BIT_TICKS as 0 causes TickType_t to be defined (typedef'ed) as an unsigned 32bit type. Using a 16 bit type will greatly improve performance on 8 and 16 bit architectures, but limits the maximum specifiable time period to 65535 'ticks'. Therefore, assuming a tick frequency of 250Hz, the maximum time a task can delay or block when a 16bit counter is used is 262 seconds, compared to 17179869 seconds when using a 32bit counter. So especially if you have a 32-bit MCU you could consider using the larger type. However, there will probably be many, many variables of TickType_t stored and used having nothing to do with your delay, and even on a 32 bit MCU this still costs memory, and your counting delay task will only wake up to count quite infrequently, so changing the data type for this purpose alone may not be worthwhile.
H: Should neutrals be tied together or left separate? I'm working on a control panel. The panel is powered by 120VAC single phase (USA). The panel has a battery backup unit (UPS) which powers the panel if the incoming power goes out, and which filters the incoming power. The incoming single-phase power is connected to a standard 3-prong wall outlet inside the panel, to which the UPS unit is plugged. The incoming earth ground is also tied to the panel backplane. From the UPS unit, a 3-prong pigtail plugs into one of the UPS outlets, and the other end is wired into the main terminal blocks (power rails) of the panel. Also, the earth ground wire of this pigtail is tied to the backplane. The question is: Should I connect the neutral wire of the incoming power to the neutral wire which comes out of the battery backup? Testing the UPS (CyberPower 685AVR) indicates that when OFF, there is no connection between the "battery" output side and the input cable. Neither the Line or Neutral wires show continuity (earth ground does, of course). When ON, there appears to be about a 30VAC difference between the "battery output" Line pins and the input cable's Line pin. Same with the Neutral pins. FYI the panel is hard-wired into the mains, so there's no chance the user would plug the cable in backward, thus placing 120VAC on the neutral wire. I wanted to ensure this configuration doesn't risk unexpected voltages in unexpected places, and that I'm not backfeeding the earth ground when the neutral should be used instead. My thought was that the neutrals should be kept separate, and that's the way we built the panel originally. It has worked fine so far, but I keep wondering if this creates a safety hazard or increased possibility of surge damage etc. Here's a quick schematic for clarity. Thanks for any advice! simulate this circuit – Schematic created using CircuitLab AI: No. The UPS includes that connection when required internally. That's why there is a "UPS Neutral Out" UPS --> SPS Most consumer products labeled "UPS" are actually SPS systems. UPS (Uninterruptable Power Supply) means that the nominal power path includes the battery output. That way power comes from the UPS battery power path regardless of whether there is any AC input or not... hence output is uninterruptable. Consumer units tend to be Standby Power Supplies where the output is switched (quickly) to the battery path when mainline AC becomes unavailable. The role of neutral Commercial systems are designed to achieve complete isolation from the power grid when it faults. Consumer systems tend to lack the relevant circuits (ostensibly for cost reduction reasons) and rely on GFI, breakers, fuses, and/or other safety devices for protection. In the event that those protective devices are activated, the "UPS" will no longer function, but no fire or shock will occur. Commercial systems are designed to go further and continue to operate in the presence of grid fault and to contain the grid fault to the external side of the power supply. In conclusion... If you have an SPS, the internal connection is already present inside the device and shorting it externally could interfere with safety devices. If you have a UPS, there are intentional switches to isolate the neutral and bypassing them will disable this protection. It's not going to help you in the best case; it will hurt you in the worst.
H: Output Voltage of OP Amp is not equals to Acl x Vin in LTSpice I have recently downloaded LTspice and when I am testing the LF351 and LM741 OP-Amp, I realised that the output voltage does not equal to the gain which should be -50. I have looked at the data sheet and the Vsat of the LF351 is around 13.5V and the LM741 is 14V. I am trying to get the design desired output which I think should be -25Vp but none of the OP-amps gave me the output. So, I am wondering why the gain is not (-R2/R1) in this case. Thank you in advance.LM741 OP-Amp AI: Note that the output voltage on the graph is not in phase with the input voltage, but lagging by about 90 degrees. This means that it's not your feedback resistor controlling the gain, but a capacitance, somewhere. LF351, and other unity gain stable op-amps, have what's called a 'dominant pole' added to them with an internal capacitor. This rolls off the open loop gain so that by the time the other internal phase shifts are getting significant, the gain has dropped below unity, so that it can be fed back for unity gain, and still be stable. As a result of dominant pole compensation, your op-amp will act like an integrator, at surprisingly low frequencies if the gain is high enough. The figure in the data sheet that lets you know how much gain can be achieved at any frequency is the Gain Bandwidth Product (GBW).
H: how to solder rotary pot Dear all, I was designing a PCB which contains a pot like the one in the picture. I know how to connect the three pins in the left. However, can anyone tell me what are the rest two pins (the small plate in the front and back) used for and how to connect them? Shall I connect them to ground? Thanks a lot AI: The hookups on the sides are there to provide mechanical stability: you don't want to stress the contacts every time you rotate the pot. They can be safely connected to GND, or left unconnected (that is, you still provide pads and solder the pot to them, but these pads can have no connection to anything else on the PCB).
H: Transistor buck converter system current increase I am putting together a small system to control an externally powered circuit from my RPi to drive a LED. The circuit can be separated into 2 parts: One side is used to power the Pi. I go from the battery (12V, 6A) to a buck converter that I use to drop the voltage to 5V. This seems to work fine. I was able to set current limitation and it would be effective. The second part is used to control the LED. Here I go from the battery to a first MOSFET controller ( MOSFET Tube Driver Module For Arduino SCM ARM Raspberry Pi with a IRF520 ) plugged to the ground on the Pi and to GPIO16. The circuit continues then to a buck converter that limits the voltage to 3V and that should normally limit the current to 750mA. It goes then to a second MOSFET controller that is used to control the LED status. This MOSFET board is connected to the ground on the Pi and to GPIO21. Now my problem is with the 2nd system. If instead of a LED I attach a multimeter and try to read the current I get the following: MOSFET 1 and 2 are off --> current 0mA MOSFET 1 on, 2 off --> current 0mA MOSFET 2 on, 1 off --> current 0mA MOSFET 1 and 2 on --> the current starts low (0.25A) and continuously rises. After 1 min it is around 0.5A and keeps going. I am new to electronics so I didn't know if it could damage the Pi. Therefore I did not leave it on to see where is stops climbing. If I switch off the 2 MOSFETS for a while and then switch on again, the current values has dropped a bit and rises again. My questions are: What could potentially limit my current in the 2nd system at 250mA when I start up? This current increase looks like something is charging somewhere. Could some part of the current go into the Pi? Or is my reading wrong by closing the system with my multimeter? How can I prevent this unwanted behavior and have the wished 750mA right away when I switch on the 2 mosfets Thank you in advance AI: IRF520 needs 10V on the gate to fully turn on. Your Pi outputs 3.3V, which is insufficient. The FET goes in linear mode. As it heats up, its threshold voltage gets lower, which explains the increase in current. Solution: use a FET which can be driven from 3V3, or use a level translator to make a 12V drive voltage from your 3V3 control signal. Also, it is unclear why you use two FETs. Since they switch low-side (in the GND wire) and you connected both FET board's grounds together, at least one of them is useless. EDIT: Your new module has a MOSFET driver which accepts logic input, so it should work. I don't know what the "VCC" pin on the input side should be connected to, though. Also you still can't use 2 low side FETs in series, as the GND pin on both boards need to be tied together for the control signal to work, so the first MOSFET can't interrupt the GND of the second one... Much simpler to ditch the MOSFETs and use a 700mA LED driver with an ENABLE input. Just pulse the ENABLE input high or low to control the LED.
H: How Do I Wire Battery? I’m working on a little project of building a wireless speaker box, I’m getting some help from my dad as he used to build and sell speakers for DJ’s as a hobby so that side is all sorted but what I’m having a bit of worry with is the correct way to wire the battery. I would need the battery to charge from an input on the side of the box and provide power to the amplifier, what I was wondering is if it would be as simple as getting a 12/24v input Example and connecting it to the terminals on the battery and if I am able to connect the amplifier to the terminals too or would need anything extra, I was thinking about using this battery or similar: Battery AI: The AGM battery that you linked to requires a special charger made for that type of battery. You cannot directly connect it to a 12 volt supply for charging. If you use an improper charging scheme, there is the possibility that the battery will vent hydrogen which is quite explosive. The battery life will also be greatly shortened. More advanced circuits bring in 12 volts to operate the electronics and have a special charger for the battery that operates off the same 12 volts. These systems often will use a technique called diode isolation that ensures the battery is used only when the 12 volts is not available. The OP asked in comments about battery types for this application. For the sake of replication, I will walk through a little bit of the engineering first. The amplifier sited is a 50 watt per channel, 2 channel amp. But this is not the power the amp will require on a continous basis. In sound engineering, there is a metric called the crest factor. This expresses the peak to average power ratio of the source. This can vary according to genre, artist, etc. Bands like the Eagles and the Beatles had crest factors approaching 20 dB. That is a 100 to 1 power ratio. So if we want to be a purist, we should run the amplifier at 1/100th on the average of its maximum power to leave headroom for undistorted peaks of these artists. In the case of a 50 watt amp, this means running it at 0.5 watts average. Take note though that most amps have significant distortion when operating at their stated maximum output power. For the sake of this example, let's set the average power at 5 watts (allowing a 10 dB crest factor). So two channels is then 10 watts. If we assume 75% efficiency for the class E amp and BT, this is a total power requirement of ~ 15 watts. Now we need to determine how long it needs to run before being recharged. I will use 4 hours for this example. 15 watts times 4 hours is 60 watt-hours. If the power source is 12 volts, this is 5 amp-hours (60 watt-hours / 12 volts). Battery amp-hours ratings are over a 20 hour period. If we shorten that period, the capacity is reduced. For a 4 hour discharge period, derate the battery by 30%. This brings the battery requirement to ~7 amp-hours. So with these numbers your chosen battery should work. But you have all the assumptions and math so you can rework things to suit your preferences. You could also consider using 4 Lithium Ion cells of a similar amp-hour rating. These too require special charging but it may be simpler to have them removable in order to plug them in a bespoke charger. With removable batteries, you can always have a second set to plug in while one set is charging.
H: Can I exchange data from a smartphone and in parallel quick charge it with an ic? I am trying to exchange data between a smartphone and an microcontroller, also in parallel i would like to quick charge the smartphone with a commercial ic. The usb protocol is 2.0. Can i exchange data simultaneously with the quick charge protocol? This will be really helpful. Thank you. AI: According to this page on the QC 2.0 protocol the differential data pair is used to request the desired voltage from the QC capable charger, meaning you cannot transfer data through the USB interface while you are quick charging. To use the data lines you must first exit Quick Charge mode by tying D- to below 0.325V, and wait until VBUS returns to 5V.
H: The polarity of the contacts when wiring an EMR When reading Omron's datasheet of G6E, I find the words as below: I can't understand well the words "The difference in polarity applied to the contacts will affect the endurance of the Relay due to the amount of contact movement". So, why? And I only see this in G6E's data sheet, not ever in others, then is this only applied to G6E, or common to others? AI: When a relay is operated under DC conditions, there is material transfer between the contacts when they close and when they open. Without the presence of an arc in the contacts, the material transfer is always from the anode to the cathode. This can form uneven surfaces (asperity) on the contacts that resemble spikes and craters when examined under magnification. But this is normal for any relay. This is sometimes called "metal bridge transfer". When arcing occurs on the contacts, the material transfer is in the opposite direction - from the cathode to the anode. And most relay applications involve some degree of arcing. This can result in more material being transferred than under non-arcing conditions. Since the ability of a relay to extinguish an arc is based on the distance between the contact points for a given DC load, the faster that this distance is traveled by the moveable contacts, the sooner the arc is extinguished. And the acceleration of the armature is dependent upon the mass of the armature. It is therefore a reasonable conclusion that the recommendation ensures the net material transfer results in the stationary contacts gaining material, thereby reducing the mass of the armature contacts in order to achieve an increasingly faster contact switching time. In any case, notice that the app note is a technique to obtain a longer than specified life from the relay. It is always nice to see such insightful tidbits.
H: How to determine electrical energy consumed by knowing the current of motor? I have an AC motor. It is running for 1 hours and I read the current every one minute and it reads 2A. So how to know how much the energy my motor already consumed? In this case, voltage is steady at 220V and not knowing the power factor(or make an assumptions that it is constant). AI: For single-phase AC, power is voltage X current X power factor. Power factor is a number between zero and one that indicates how closely the voltage and current waveforms coincide with each other. The power factor for full load may be marked on the motor. A typical motor will have a high power factor, perhaps 0.8 to 0.9 at full load, but a low power factor, perhaps less than 0.2 when it is lightly loaded. If the full-load current is marked on the motor, you can compare the measured current with the full-load current to estimate hoo heavily the motor is loaded. With no load, the motor current will likely be in the area of 1/3 of full-load current.
H: Build a voltage-controlled voltage source out of discrete components I'm in a bit of a pickle. I need to build a voltage-controlled voltage source, but I don't have any opamps (or time to order them). I have been working for several hours trying to simulate a circuit in LTSpice that will do the job, with no luck. (BJTs were never intuitive to me, and it's been a while since my circuits class!) I would really appreciate it if you guys could help me out, and hopefully the next poor schmuck who comes across this type of problem will too. I need to turn a 0-5V DC signal into a 0-15V (not-necessarily-high-current) source. Here's what I have to play with: all the 1/4 watt resistors one could want a bag of 2N4401 NPN BJTs a bag of 2N4403 PNP BJTs several nameless 60V 30A n-channel MOSFETs various capacitors 24V, 15V, and 5V power rails (avoiding the 15V would be nice, but not nessecary) AI: Try this simulate this circuit – Schematic created using CircuitLab There are THREE inverting stages in the feedback loop. A huge Cmiller across Q6 is what I suggest (I've no simulator right now). The emitter cap is to boost HF gain so the Cmiller takes effect.
H: What type of high temperature crimp connector is this? A heating element on a 3D Printer has coated stainless steel leads that were crimped to another wire. I cut the other wire but would now like to reconnect it. I'd like to use the same type of crimp connector if possible - but have no idea what this connector is called or how to find it. The wire is approximately 22-24 gauge. What is this type of connector called? Where can I purchase it (or something similar)? AI: Looks like a bullet type crimp connector to me or maybe a small spade connector.
H: Finding bits from audio file? I am assigned to do lab that is allowed to ask other people for hint. I am given an uncompressed PCM WAV file that has signal like following image: And this is question: determine the sequence of bits that were transmitted. Hint: the remote control transmitter contains a sticker inside with a number 50325 printed on it. The number is transmitted somewhere in the signal given, in binary. Does that transmitted bits mean 3 bit representation which I can obtain after sampling and quantization? (as explained in the bottom of following webpage - https://courses.engr.illinois.edu/ece110/su2017/content/courseNotes/files/?samplingAndQuantization) So somewhere in signal has 1100010010010101 (50321 in binary) as 3-bit representation? so there is a sequence of bits that contains ... 110 001 001 001 010 1.... ? AI: I am given an uncompressed PCM WAV file Basically it's a wav file and a wav file has this format: - So, try and decode it based on that and note that the 50321 byte size might be implied by the BitsPerSample definition.
H: Why choose an 8bit over a 32bit MCU With the recent Cortex-M rage, there seems to be a lot of 8bit bashing going around. I was wondering what specific use cases engineers encountered where 8bit MCUs were the preferred choice over 32bit, and what decisions informed their choice. I think this information proves useful as an aid for others who need to make a similar choice between 8/32bit. AI: I was wondering what fellow engineers thought of 8bit MCUs, and why they would consider using one in their design over a 32bit MCU. I'm a 32-bit guy by trade: worked a lot on earlier LPC and Luminary chips. For most of what I do personally, I use 8-bit because they are sufficient. actually more than sufficient: many times I have to run the mcus at speed lower than their default speed settings. 8-bit mcus are simple to learn, inexpensive and best of all plentiful. with that said, there are lots of demanding applications where a simple 8-bit mcu doesn't cut it. Or more precisely, doesn't cut it without serious additional investments in software. If you lots of number crunching, loads of multi-tasking (driving graphics for example), or into some specialized niches. for what I do personally, 8-bit vs. 32-bit is fully transparent. to the point that I can run most of my 8-bit code on 32-bit, or vice versa, with minimum changes. I can even run my Arduino code on most 16/32bit mcus with minimum changes now. so most of the time, what I pick on the hardware side is not even driven by software. edit: as to your broader point of whether the 8-bit market is dying (commercially), I would say, based on my own experience, that it is definitely so. 10+ years or so ago, I was at a software house that offered a full range of support, from 8-bit chips to 32-bit chips. one of the earliest decisions I made was to analyze the profitability of each platform and as a result, we quickly dropped support for 8-bit chips, to the point that we want to get paid to upgrade our older 8-bit software and we provide no support going forward. 8-bit programmers have a hard time finding work and 32-bit programmers are in high demand. you can observe the same trend on the programming side, at embedded conferences. I went to a ST conference on their 32-bit offerings in Shanghai 10 years ago and was absolutely shocked by the many young faces there. I think if you are an 8-bit programmer in a high cost area, you better have a niche or two. or you face some serious risks very soon.
H: What type of transformer do I need for a 5Hz AC source? On the primary side, I have a low-impedance AC supply that can be adjusted to a minimum of 100V, with a frequency variable from 5 to 800Hz (and I need to operate over this whole range). I need to somehow transform this down to 2.5V or lower, naturally as efficiently as possible, with the secondary side drawing up to 12A. I considered just buying a transformer of roughly the right ratio and maybe a bit higher power rating than I need, but there's rarely any detailed information with regards to resistance, loop counts, wire gauge and/or inductance that I'd need to properly calculate the losses caused by running a 50Hz transformer at 5Hz. I have no idea if it would just get a little hot, or melt through the casing; and even if the losses were acceptable I wouldn't know if it would even transfer enough power to the secondary. I have looked at audio transformers, as they are designed to operate at a wide frequency range, but even they seem to only go down to 20Hz. What would a more experienced engineer than I do in this situation? Are there certain specs I can look for in pre-made components, or will I need to look at having one custom-made? AI: Using a transformer to convert your existing AC supply to a lower voltage does not make sense due to the very low frequency. You're not going to find such a transformer off the shelf. Even if you did, it would be huge, heavy, and expensive. It sounds like what you really want is something that can put out up to 2.5 V AC at up to 12 A. Start from there. Your existing supply is not a solution. Forget about it. Your spec is something a class D amplifier can do. Off the shelf audio amps don't quite work here due to the 5 Hz low end requirement. You will therefore have to design your own. There are a variety of class D chips out there. It's been a while since I looked at the offerings, but if I remember right, most of them actually work down to DC and expect the external circuit to add the high pass filter for audio use. You put the parts around one normally, except put the high pass filter below 5 Hz instead of below 20 Hz. Another possibility is to do this yourself using a microcontroller with a PWM generator meant to drive a H bridge. You haven't specified harmonic content, so doing this open loop might even be good enough. Or, you can close the loop with error feedback like a real class D amplifier. One advantage of this is that it is then very easy to synthesize the waveform you want directly in the micro.
H: Odd resistor design In one of my designs, I specified the Rohm LTR10EZPF1003 100K 0802-Wide resistor: The issue is that when I added the resistor to the circuit, it creates a direct short: Measuring between the Green points is "No Connection" (expected 100K) Measuring between the Blue points is a short (expected 100K) Measuring between the Red points gives 100K ohms resistance. (expected NC) Now I have no doubt that this is "by design" (the long white area's in the dimensional drawing are metallic plates), but what I can't figure out is what, in the LTR Series Datasheet would tell me about this behavior? The resistor land pattern is not any different from a normal 0802 component pad layout. So, how can I identify this odd type of resistor and avoid its use? What should I be looking for in the specifications or data sheet? AI: how can I identify this odd type of resistor By reading the datasheet, of course. The datasheet is quite clear about where the connections are on this series of resistors. In fact, it's featured. There is no mystery here. Your own measurements show that the part is working just like the datasheet says it is supposed to. How to avoid this in the future? Read the datasheet before specifying the part in a design. That really should have been obvious.
H: Finding an accelerometer How do I go about finding/calculating the specifications of an accelerometer that can measure vibrations upto 2kHz and deflections upto 2mm? EDIT: After calculating and obtaining 16000g's worth of acceleration, I consulted my mentor and it seems like we might not experience 2mm of deflections at 2kHz. However, now the problem becomes how to estimate what deflections we will see at that frequency if we use PL 140 actuators from PI and place them on the panel? https://www.piceramic.com/en/products/piezoceramic-actuators/bender-actuators/pl112-pl140-picma-bender-103000/ AI: Accelerometers are specified by the maximum accelerations they can measure. You therefore have to calculate what acceleration is represented by moving 2 mm at 2 KHz. From your description, 2 mm is the peak to peak magnitude of the 2 kHz oscillation. Acceleration is the second derivative of displacement. The displacement is (1 mm)sin(2Πt 2000/s). Take the second derivative, which will be another sine. The peak of that is the ±magnitude the accelerometer needs to be able to measure. Acclerometers are often specified in g instead of m/s2 or the like. 1 g = 9.8 m/s2. Added Now I have time to show the calculations. The equation for displacement is:     Disp = (1 mm)sin(2Πt 2000/s) First derivative:     Speed = (12.57x103 mm/s)cos(2Πt 2000/s) Second derivative:     Acc = -(158x106 mm/s2)sin(2Πt 2000/s) The accelleration range is therefore ±158x106 mm/s2 = ±158x103 m/s2.     ±(158x103 m/s2)/(9.8 m/s2g) = ±16.1x103 g.
H: Does the electrical impedance of a headphone depend more on the cable or on the headphone itself? I'm currently considering buying a defect headphone with a built-in broken cable which would be quite expensive otherwise. I'm quite sure I'm able to solder a new cable onto the headphone to fix it. My question is the following: Does the impedance of a headphone noticeably change if I use a cheap standard AUX-chord or does it mainly depend on the internal electronics of the headphone? AI: A standard set of headphones has no electronics. The sound is produced by miniature electro-magnetic loudspeakers. simulate this circuit – Schematic created using CircuitLab The impedance of the speakers is typically >= 8 Ω and the wiring would be less than one tenth of that for good control of the speakers. Be careful to get the phasing of the speakers right. If you swap them the sound will be out of phase and will give a weird hole-in-the-middle-of-your-head effect.
H: Altium Designer: Is it possible to switch layers in an entire library at once? I am using some integrated schematic/footprint libraries that I downloaded from the internet in a PCB project I am working on. In these libraries, they put 3d component bodies on mechanical layer #1, while all my other libraries have 3d bodies on mechanical layer #13. Is there an easy way to take everything in the library that is on mechanical layer #1 and move it to mechanical layer #13 without having to edit each individual footprint? AI: Three approaches here: we can move every 3D body to Mech 12, or we can move all the Mech 1 objects to Mech 12, or we can move just Mech 1 3D bodies to Mech 12. Moving all 3D Bodies to Mech 12 Right click on a 3D body in one of the components -> Choose "Find Similar Objects" "Object Kind" should be "3D Body" with the filter set to "Same." Everything else should be "Any." Check the "Whole Library" tickbox in the bottom of the Find Similar Objects pane. The PCBLib inspector will pop open, and all the 3D bodies in your library will be selected. Under the "Object Specific" heading there is a field called "Layer." Open the drop drown next to it and select "Mechanical 12." You'll get a warning about changing multiple objects and that the action cannot be undone. Click "Yes," and you're finished. Moving Everything From Mech 1 to Mech 12 Right click on any Mechanical 1 object in one of the components -> Choose "Find Similar Objects" Change the filter on "Object Kind" to "Any" and the filter on "Layer" to "Same." Everything else should still be "Any." Check the "Whole Library" tickbox in the bottom of the Find Similar Objects pane. Perform steps 4 and 5 from the first procedure. Moving Only 3D Bodies From Mech 1 to Mech 12 Right click on a 3D body currently on Mechanical 1 in one of the components -> Choose "Find Similar Objects" The "Object Kind" field should be "3D Body." Set the "Object Kind" filter to "Same" and the filter on "Layer" to "Same." Everything else should still be "Any." Check the "Whole Library" tickbox in the bottom of the Find Similar Objects pane. Perform steps 4 and 5 from the first procedure.
H: USB OTG Cable Shielding I just soldered a USB OTG cable to connect a keyboard (regular USB-A) to a Raspberry Pi Zero (micro-USB). How to wire the VCC, GND, D- and D+ pins was obvious and the cable works. However both connectors have a pin that is connected to the connectors metal enclosure. The cable I used has a wire mesh for shielding. How am I supposed to connect the shielding: Both connectors metal enclosure to the wire mesh Only one connectors metal enclosure to the wire mesh (which one?) Connect shielding to ground? This question has been asked before: Understand the shielding of a USB device But it was not answered, aso I am not sure if the fact that this is an OTG cable makes a difference (I guess in case 2. I would have to connect the mesh to the micro-USB that connects to the raspberry, not the keyboard!?) AI: Both shields should be tied to the connector shield. USB ground should not connect to the shield at the cable connection. (although they could be tied on the PCB). Keep in mind if you tie the grounds on the PCB it will create a ground loop, this is tolerable for some applications, for most not. The shield should be tied to the chassis to shunt ESD away from the PCB ground if possible. Shields shunt noisy current away from the grounding signal, if the cable shield was broken, a noisy current would choose ground as its prefered pathway where it could cause interference in the data lines by coupling into the data lines via mutual inductance. (wires running along side each other form a mutual inductor where magnetic fields can couple from one to the other wire). The cable shield will also shield the internal conductors from stray electric fields and RFI. How am I supposed to connect the shielding: This way: Both connectors metal enclosure to the wire mesh
H: Can 12v dc circuit spark and start a fire? I'm new to electronics and electricity. I have the following scenario: I am wiring a LED light switch and mounting it into wooden cladding. My concern is, can the wires spark unexpectedly and start a fire? We are talking about 12V DC, with three, 2W LEDs. The circuit is properly fused. AI: Yes, 12V can certainly cause sparks if there is a connection that is opening and/or closing. However, I expect you are safe: Since you are fused, any high-current short should blow the fuse before anything bad happens. Your 12V power supply likely has some reasonable current limit, and It's hard to ignite wood with sparks. If you were around a flammable gas or liquid, however, any sparks could be devastating. Once I was stranded at night (with my malfunctioning car) on a road in the wilderness. I had some camping gear with me, but no method to light my cookstove. I used jumper cables from the car's 12V battery to create sparks and light the stove. I don't recommend this! It took a while for the hair on my forearms to grow back :) P.S. Make sure you note @Trevor's important point about strain relief in his answer.
H: Does this solar charger PCB design satisfy the layout requirements of the step down charger? I'm implementing the reference design for lead acid batteries for the LT3652 battery charger for solar power IC (see datasheet page 26). My circuit is identical to the reference design except for the addition of two status LEDs and the removal of temperature compensation. Solar powerd 3-stage 12v lead-acid fast/float charger I'm not very familiar with the layout considerations for switched mode supplies and have tried to follow the datasheet suggestions. From page 21: The LT3652 switch node has rise and fall times that are typically less than 10nS to maximize conversion efficiency. The switch node (Pin SW) trace should be kept as short as possible to minimize high frequency noise. The input capacitor (CIN) should be placed close to the IC to minimize this switching noise. Short, wide traces on these nodes also help to avoid voltage stress from inductive ringing. The BOOST decoupling capacitor should also be in close proximity to the IC to minimize inductive ringing. The SENSE and BAT traces should be routed together, and these and the VFB trace should be kept as short as possible. Shielding these signals from switching noise with a ground plane is recommended. High current paths and transients should be kept isolated from battery ground, to assure an accurate output voltage reference. Effective grounding can be achieved by considering switched current in the ground plane, and careful component placement and orientation can effectively steer these high currents such that the battery reference does not get corrupted. Figure 11 illustrates an effective grounding scheme using component placement to control ground currents. When the switch is enabled (loop #1), current flows from the input bypass capacitor (CIN) through the switch and inductor to the battery positive terminal. When the switch is disabled (loop #2), the current to the battery positive terminal is provided from ground through the freewheeling Schottky diode (DF). In both cases, these switch currents return to ground via the output bypass capacitor (CBAT). The datasheet has the following recommended layout: My design is as follows: Front side (40 x 31mm) Rear side (40 x 31mm) Does this design address the layout considerations raised in the datasheet or am I likely to run into problems? You'll also note that the vias connecting the front and back ground pours are all over the place. Is there any recommendation to reduce the chance of running into trouble? AI: I like the C2 and C4 sharing a common GND spot. Go ahead and drop a via, right there, down to your GND plane. And add couple Vias from D5 down to the plane. I view every VIA as 1nH or 2nH, depending on periphery/height ratio. However the current crowding into the VIA, and current crowding as exits the VIA, and broken-up traces and planes, will erase the benefit of extra VIAs.
H: High Frequency Transformer - Efficiency I would like to ask how much is the maximum efficiency of a High-Frequency Transformer (In my application P=10 kW, f=25kHz ), considering the winding resistance, the core losses as well as the magnetizing inductance. I saw a research about a 1 MW High-Frequency Transformer working at 50 kHz with maximum efficiency 99.6% and I was wondering if this efficiency is realistic. Based on your experience is it possible to have 99.6% efficiency in my application? If not how much is the maximum efficiency that I can expect? P.S. I know that there are a lot of factors that affect the performance of the transformer, for example, the material of the core, but at this point, I just need to know theoretically the maximum efficiency that I can succeed. AI: It is basically an economic question, you can get almost arbitrarily close to 100%, the price just rises exponentially, massive cores at very low flux density, wound with superconducting cables, in liquid helium? Sure you could do it, but it makes no sense. there is also little point in making the transformer very much better efficiency wise then the rest of the circuit, if you are overall say 95% efficient, so 500W or so of waste heat, but the transformer is 99% efficient (so it contributes 100W of that 500W), then making the transformer 99.9% efficient will leave your total power losses at 410W, getting the drive electronics efficiency up would pay bigger dividends. That last 0.9% has exploded the cost of that transformer, probably by at least 1000%.
H: Why would you connect AC ground to an isolated DC power supply output? I have been working on this question for a while now. I have read, and learned a lot, about power supplies, ac power, and safety. But one thing I just cannot seem to understand is why one would connect the AC ground (or protective earth, or functional ground, I believe they are all the same) to the DC output + or -? Wouldn't that forfeit the protection that isolation provides? I am sorry if this is an obvious thing, but I have been really searching for an answer, but I am seeing all kinds of conflicting answers. AI: Realize that this is a "logical Symbol" and has many "Analog" interpretations. Remember that Ground only means a triangle symbol on your Logic Diagram yet we must understand this to be a 0V reference only at that physical point. System definitions are often assumed for earthing symbols or local DC only and drafting standards will vary. In most cases, the right-most symbol denotes earth grounded. But in other cases the middle symbol may be floating or earthed. So star distributed grounds are often best to avoid sharing currents, yet distributed grounds often used. (CATV, AC power and EE Lab instruments) This leads to complications with signal integrity and immunity of the source and destination when frequent cable re-connections occur from many instruments that may be on different breakers with 3 pronged AC plugs. It is wise you thoroughly understand the impedance of any ground at different frequency bands to see how it affects immunity and susceptibility. THe Symbols are not enough to convey these meanings. simulate this circuit – Schematic created using CircuitLab So the general reason is EMC as in compatibility. THis includes immunity from interference and unintended radiation of interfering noise as well as conducted noise via AC line and signal interfaces, so there are at least 2 ports and 2 directions of compatibility to be considered. I will only list some of the reasons. CM noise THe most common reason to earth ground a floating supply is to eliminate common mode (CM) noise either from unintended SMPS noise via transformer feedthru or large step load unbalanced currents with large loop area. Baluns ---- (conversion between BALance and UNBalanced impedance) Line filters use common mode chokes or Baluns to improve AC line EMC with both a differential cap and 2 CM caps to earth. These are also useful on DC interfaces and AC signal interfaces. The next time you see a potential noisy interface cable, look for the plastic-coated ferrite cylinder molded around the cable (clamshell with ~no gap). e.g. Laptop charger or VGA cable. THOSE are CM chokes or BALUNs Important for units that are both isolated from gnd and earth grounded ( like all LCD monitors) when the signals become unbalanced and even critical for differential Ethernet signals to improve RF balanced impedance. Another method used by some applications to reduce impact of 50/60 Hz leakage and safety concerns is to use an RF cap of 10nF or less between DC return to AC ground which acts as a low impedance of 150 ohms at 100kHz for SMPS noise or 1.5 Ohms at 10MHz. ESD The other reasons may be protection of an instrument with sensitive output or inputs. Normally audio and TV interfaces may be isolated from earth ground, yet 50 ohm instruments are not. When long 50 ohm cables with 100pF/m are charged up from dragging on a dusty counter, the voltage on the cable may be enough to blow a sensitive output or input. Although ESD protection is standard, when one end is connected to an earthed instrument, it becomes discharged by load , so that connection protects then other end. However this also makes it sensitive to ground faults, which I have experienced in a big lab with machine shop in the 70's and we had to avoid this. This ESD subject is complex. In most cases you can protect equipment by voltage clamps and current limiting but that may shift the local and affect something internally. Audio and TV's interfaces are generally floating with 2 pronged plugs. Yet all lab instruments are 3 pronged plugs with earth ground interfaces to reduce EMI. This raises the HiPot insulation Field strength on primary paths such that they fail at lower potentials than floating, so immunity must be checked in this mode, but by default, never is. I found this to a flaw in OEM test procedures for AC-DC supplies and required process improvements by OEM at my demands, when I proved this true. (OEM had moved their Mfg to Mexico and failed to recognize clearance gap process controls had slipped .eg. tilted components near chassis) Good and bad ESD connections. A good connection is said to be static dissipative when 1Mohm is in series. Yet a floating cable can be charged and discharge when connected to an earthed instrument, yet when connected at one end , it safely discharges, so the other end is less likely to be impacted by a discharge. This would not be the case if both ends were floating due to stray capacitance being an effective short circuit or transient conductor to impulse ESD. If you expect ESD on long cables and want a floating supply, and have an earth ground, then a capacitor or an inductor or 1K or 1M resistor or some combination may be a better solution depending on your system immunity needs while being relatively high DC impedance to earth but low impedance at RF. Conclusion It all depends on the system, but distributed earth ground is very common in external and lab equipment yet not consumer equipment and absent on portable equipment for ground leakage hand-held safety reasons.
H: How to detect open circuit conductor inside opaque insulating sheath/cable How to detect open circuit conductor inside opaque (untransparent) insulating sheath/cable in small scale. I meant the cable diameter only 1 - 1.5 mm with suspected spot within 10 - 20 cm length AI: Connect the broken wire to 117VAC, and slide a scope probe along until the 60Hz suddenly drops. Or inject some USB signal, and use the same scope inspection.
H: Creating a timer in an RC circuit In the book "Electronics For Dummies" there is a paragraph called "Creating a timer". If you’ve got a buzzer that requires a voltage of 6 volts in order to sound off, and you’re using a 9-volt battery to power your little scare circuit, you can build an RC circuit like the one in Figure 4-5 and use the capacitor voltage to trigger the buzzer. The idea is to charge the capacitor to about 6 volts in the time you want your flatmate to think about whether she wants a beer or a lager and reach out for one, but then blast her with the buzzer. The idea is that by choosing a time and knowing the capacitor value we can calculate the resistor value so that the capacitor charges up to 6 volts in the chosen time from the equation 2/3T = 1RC (2/3T because 6V/9V = 2/3). Then as the buzzer requires 6V to trigger it should alarm after the specified time. How should I connect the buzzer? AI: You connect the buzzer in parallel with C. The problem is that most buzzers will conduct some current as C is charging up and this will affect your timing. I think you have to assume one of two things from the vagueness of the question and both give the same result. simulate this circuit – Schematic created using CircuitLab Figure 1. Figure 1a has a "magic buzzer" which doesn't load C until 2/3 supply is reached. It then buzzes. It may buzz until C discharges to some lower voltage. Alternatively, it may be have a low enough current that R is able to power it indefinitely so that Vc remains constant or even increases slowly. Figure 1b has a buzzer with some active electronics. It is powered from the supply and when the threshold exceeds a preset level the buzzer will sound. The threshold input could be made very high impedance so it wouldn't load the capacitor significantly. The question is a little unfair. The non-thinker might be able to answer it straight-away whereas the thinker could get caught in the details.
H: 12V blade fuse box type of connectors - identification I have a following appliance (blade) fuse box: 1) How these four connectors are called? Do they have a name? 2) What is the best way to connect a cable to it without soldering such that the wire is tied down and won't move around? I can't find any specification for the product with the answers for above. Thank you. AI: These are known as Faston (that's a trademark), tab, quick disconnect, spade or blade terminals. These are all names for the same thing, but there are different sizes - make sure you have the right tab width and thickness. These are probably 1/4" wide and 0.8mm thick. You want a matching female connector, and these are normally joined to wire by crimping. The associated terminals normally come in three wire sizes, with red (small), blue, and yellow (large) insulation. They cost pennies, and you can buy assortment kits. Make sure you have the right size for the wire you're using, or it won't stay put. Really, you ought to crimp it on with a special tool costing £10-100 depending on quality. You can do it with pliers, but its very hard to make it reliable.
H: Calculate Buffer Op Amp Output Impedance (With Data Sheet) For a given op amp, in my case a OPA197 by TI, I'm trying to calculate the output impedance for a near DC signal. The datasheet gives an "open loop" output impedance of 375 Ohm, to me that seems high, unless I have lulled myself into believing op amps are more ideal then I though. I expected something in the 10s of Ohms. Also Wouldn't an output impedance be gain dependent? Can anyone give me the proper way to find/calculate output impedance? Note I'm not looking for a method to measure it. This question may have the answer and I am just not understanding... Output impedance of Op Amp with Voltage Divider? AI: When the amplifier is operated with the "loop closed" i.e. it is run at (say) a gain of unity or ten or other normal sorts of gains, then the effective output impedance drops massively from 3 kohm to sub 1 ohm at DC. This is due to the effect of negative feedback. So, you look at the open loop gain (about 120 dB or 1 million at dc) and factor this and the circuits target closed loop gain to calculate closed loop output impedance. If your target closed loop gain were ten then the DC output impedance would be about 3 kohm / 100,000 = 30 milli ohm At 100 kHz the open loop output impedance is about 400 ohms but the open loop gain is now reduced to 40 dB (100) so now the closed loop output impedance is about 40 ohms (assuming the closed loop gain is ten). If the closed loop gain were unity then the closed loop output impedance at 100 kHz would be 4 ohms. One more thing to remember is that the open loop output impedance is a real measure of the output transistor's ability to deliver current to a given output load so consider this: If the DC output impedance is 3 kohm and the load is 1 kohm, the maximum peak dc voltage that can be produced at the output is severely limited by this potential divider irrespective of the chosen closed loop gain. Personally, I think that TI are potentially pulling the wool over people's eyes given that they state in the DS (page 8) that the maximum volt drop with a 2 kohm load (to mid rail) is only 500 mV. They refer to this as: - Voltage output swing from rail And, it can only be for high frequencies else it contradicts the open-loop output impedance graph. Be aware of this.
H: AXI interface of an FFT core expecting more data than it should I am working with the FFT v9.0 core from Xilinx. The FFT is configured to use the Radix-4 Burst I/O architecture. When I reach the last element of my signal, I set s_axis_data_tlast to 1 (while transmitting the last data point) and set it back to zero. I neither get an event_tlast_unexpected nor event_tlast_missing. My problem is that the s_axis_data_tready signal from the FFT remains high! In order to satisfy the FFT I had to give it 15 additional data points after it has already accepted the last datapoint: In disbelief, I reduced the length of my data stream from 4096 points to 64 points so that I could manually count the data points that were transmitted. This caused the same behaviour - again the FFT requires 15 additional data points in order to proceed. How can I resolve this issue? EDIT 1 Maybe I should provide some more information: The FFT core is clocked at 200 Mhz while my data points arrive at a rate of 50 Mhz, so I am actively slowing down the FFT with s_axis_data_tvalid. Each sample has a length of 81.92 microseconds and I start transmitting a new sample every 300 microseconds. My plan was to feed in my first sample for 81.92 microseconds, recieve the output within 218.08 microseconds and then feed in the next sample. If I don't fill the buffer (see Dave Tweed's answer), the FFT simply waits 218.08 micro seconds and fills up it's buffer with 15 points from the next sample. Then s_axis_data_tready goes low and the FFT returns it's output while it should be recieving data from the new sample. AI: The document you linked to confirms how I would expect TREADY to be handled. Page 51, paragraph 2 says: In particular, the behavior of TREADY on the input data channel [timing diagram] is not fully accurate because the Data Input channel buffers the data (16 symbols in Non-Realtime mode and 1 symbol in Realtime mode). However, this data waits in the buffer until the FFT processing core is ready for it. The Data Input channel TREADY in these diagrams is used as an indication of when the FFT processing core wants data rather than when the AXI channel (with its buffer) wants data. And page 52, paragraph 3 repeats: Note: This refers to the FFT processing core. As the Data In channel has a 16 element deep buffer on its input, it can start to pre-buffer a frame while a frame is still being processed. In the case of 8 and 16 point FFTs, it can pre-buffer entire frames. However, this buffered data waits in the buffer until the FFT engine has finished dealing with the current frame. That whole section starting on page 52 provides a lot of additional information about buffering and flow control at the module interfaces. Why are you concluding that the data is not being processed correctly?