text
stringlengths
83
79.5k
H: Transparent Screen Selection We are as a team with four members intending to design an augmented reality oriented smart glass which shall contain a CMOS camera, wireless communication and transparent screen. The algorithm below as flow diagram. simulate this circuit – Schematic created using CircuitLab The main problem we are having is to find a transparent display fitted into project (2"-2.5 is reasonable for smart glass.) My question is what else can be done instead of transparent display? Are there really fitted displays that we missed? AI: You can't do AR by simply placing a "transparent screen" over someone's eyes — the screen will be horribly out of focus. There are two possible approaches that are commonly used: Use a VR (non-transparent) display, but mix the image from your camera in with the picture elements generated by the augmentation software. Use an optical beam splitter along with an ordinary non-transparent display. Between the display and the beam splitter, you have optics that cause the display to appear much farther away than it actually is, so that the user can focus on both the real world and the display at the same time.
H: Lock-in amplifiers, signal averaging and signal post-processing I would like to know about what are the benefits of using a lock-in amplifier. I have read that they basically consist on multiplying a signal by a reference which switches the frequency to DC. Then the signal is integrated to remove the noise thanks to their randomness. My question is: what is the difference of this with respect to simply averaging the signal in an oscilloscope? Additionally, reading on DSP Lock-in amplifiers, is it not equivalent to perform some post-processing techniques on a recorded signal? AI: Averaging a DC signal to reduce noise doesn't get rid of: DC offsets of amplifier chain Thermally-induced offset voltages Furthermore, noise tends not to be "white" at low frequencies. (Noise of amplifiers includes a 1/f effect). Lock-in amplifier avoids all these pitfalls. You can place the reference frequency where the amplifier chain adds least noise. Does post-processing include a recording of the reference signal as well as the actual signal? If so, then post-processing could be done, equivalent to a lock-in. If you only have one channel recorded (actual noisy signal) then post-processing isn't equivalent to lock-in processing. A lock-in is a tracking bandpass filter while post-processing without a reference frequency is a fixed-frequency bandpass filter. When a lock-in is set to very long time-constant, you have a very narrow bandwidth filter indeed - it is difficult to maintain phase coherency over such a long period. A tracking filter helps greatly when the reference frequency is not stable. For example, an optical beam chopper motor is very difficult to maintain at a stable rotational rate, resulting in the reference frequency wandering. This instability puts a limit on how narrow the filter bandwidth can be used with a fixed-frequency filter.
H: Identify components on computer motherboard - cylindrical and cube shapes I'd like to know what components are the ones with blue numbers and the big ones behind them: The latter components I'm talking about: AI: As Jakob Halskov mentioned, those are 820 uF 25V aluminum electrolytical capacitors. Those black "tall" components are flat wire iron core inductors, likely configured for the voltage regulators next to them. The CHOKE reference designator is proof that it is an inductor.
H: LTspice darlington model TL;DR : I want to use a darlington transistor model(BD679&BD680) within LTspice. Can I do that by using default symbols npn or pnp from component selector menu? I have done it with TIP41C & TIP42C, the downloaded file for them were like this: ****** * Spice Model * Item: TIP41C * Date: 8/11/10 * Revision History: A * ========================================================== * This model was developed by: * Central Semiconductor Corp. * 145 Adams Avenue * Hauppauge, NY 11788 * * These models are subject to change without notice. * Users may not directly or indirectly re-sell or * re-distribute this model. This model may not * be modified, or altered without the consent of Central Semiconductor Corp. * * For more information on this model contact * Central Semiconductor Corp. at: * (631) 435-1110 or Engineering@centralsemi.com * http://www.centralsemi.com * ========================================================== ****** *SRC=TIP41C;TIP41C;BJTs NPN; Si;100.0V 3.00A 3MHz Central Semi Central Semi .MODEL TIP41C NPN ( + IS=290.83E-15 + BF=113.55 + VAF=100 + IKF=1.9905 + ISE=1.3946E-12 + NE=1.4763 + BR=.1001 + VAR=100 + IKR=10.010E-3 + ISC=320.65E-12 + NC=1.8994 + NK=.58929 + RB=.71129 + CJE=348.44E-12 + VJE=.78228 + MJE=.42865 + CJC=184.26E-12 + VJC=.47897 + MJC=.40458 + TF=36.381E-9 + XTF=100.32 + VTF=21.563 + ITF=28.791 + TR=10.000E-9 ) I have just copied and added .MODEL part to the end of standard.bjt file. And I was able to choose it from "pick new transistor" menu. So, I now downloaded the library file for BD680 darlington transistor but it is more complicated than the former TIP41C case. ************************************** * Model Generated by MODPEX * *Copyright(c) Symmetry Design Systems* * All Rights Reserved * * UNPUBLISHED LICENSED SOFTWARE * * Contains Proprietary Information * * Which is The Property of * * SYMMETRY OR ITS LICENSORS * * Modeling services provided by * * Interface Technologies www.i-t.com * ************************************** .SUBCKT bd680 1 2 3 * Model generated on Feb 14, 2004 * Model format: PSpice * Darlington macro model * External node designations * Node 1 -> Collect * Node 2 -> Base * Node 3 -> Emitter Q1 1 2 4 qmodel Q2 1 4 3 q1model 2.46191 D1 1 3 dmodel R1 2 4 8000 R2 4 3 120 * Default values used in dmodel * EG=1.11 TT=0 BV=infinite .MODEL dmodel d +IS=1e-12 RS=10 N=1 XTI=3 +CJO=0 VJ=0.75 M=0.33 FC=0.5 .MODEL qmodel pnp +IS=2.23835e-12 BF=149.682 NF=1.2 VAF=59.0895 +IKF=0.118079 ISE=9.09119e-14 NE=1.42175 BR=0.587475 +NR=0.75 VAR=100.388 IKR=0.0934405 ISC=9.09118e-14 +NC=2 RB=15.5445 IRB=0.450416 RBM=12.8364 +RE=0.0939759 RC=2.76027 XTB=0.497353 XTI=2.9942 EG=1.05 +CJE=1e-11 VJE=0.75 MJE=0.33 TF=1e-09 +XTF=1 VTF=10 ITF=0.01 CJC=1e-11 +VJC=0.75 MJC=0.33 XCJC=0.9 FC=0.5 +TR=1e-07 PTF=0 KF=0 AF=1 .MODEL q1model pnp +IS=2.23835e-12 BF=149.682 NF=1.2 VAF=59.0895 +IKF=0.118079 ISE=9.09119e-14 NE=1.42175 BR=0.587475 +NR=0.75 VAR=100.388 IKR=0.0934405 ISC=9.09118e-14 +NC=2 RB=15.5445 IRB=0.450416 RBM=12.8364 +RE=0.0939759 RC=2.76027 XTB=0.497353 XTI=2.9942 EG=1.05 +CJE=1e-11 VJE=0.75 MJE=0.33 TF=1e-09 +XTF=1 VTF=10 ITF=0.01 CJC=0 +VJC=0.75 MJC=0.33 XCJC=0.9 FC=0.5 +TR=1e-07 PTF=0 KF=0 AF=1 .ENDS So I assume I cannot just copy this into standart.bjt file. When I was also trying to use LM741, I added its library file in form of .sub file to the /sub folder of LTspice and I was able to use .lib LM741.sub. I have been choosing opamp2 from component selector menu and just renaming its name to LM741 was sufficient. But this method did not work for BD680 darlington. I assume opamp2 for intended to be used with sub models however pnp is not. But I am not sure. So what can I do? update: I think dragging the library file into LTspice and creating a new symbol can be one of the solutions. I have just figured it out. So, you can provide better solutions if you have any. AI: So I assume I cannot just copy this into standart.bjt file. You can copy one line models that are based off of the npn or pnp spice model such as this: .model kt3102e npn bf=5000 br=5 is=.2p tf=.4n cjc=12p cje=12p vaf=100 tr=45n rc=.5 rb=1.5k rbm=80 irb=10u ikf=50m xcjc=0.3 kf=5f eg=1.11 ne=1.35 ise=0.1p nc=2 isc=1p Vceo=20 Icrating=100m mfg=USSR so you could copy this into the bjt file (but that isn't legal without obtaining permission): .MODEL TIP41C NPN ( IS=290.83E-15 BF=113.55 VAF=100 IKF=1.9905 ISE=1.3946E-12 NE=1.4763 BR=.1001 VAR=100 IKR=10.010E-3 ISC=320.65E-12 + NC=1.8994 NK=.58929 RB=.71129 CJE=348.44E-12 VJE=.78228 MJE=.42865 CJC=184.26E-12 VJC=.47897 MJC=.40458 TF=36.381E-9 XTF=100.32 VTF=21.563 ITF=28.791 TR=10.000E-9 ) So the tIP41C works in the .bjt file, but sub-circuit files don't work (files with more than one spice line as far as I'm aware) so the bd680 won't work in the .bjt file. Either file can be imported by using the include statement: .include C:\Whatever path\LTspiceXVII\SQ7414ENb_PS.lib Then finding an existing model (this works for any model) and pressing alt and clicking, you should get a menu like this. Change the type prefix to X and the spice line to the model in the include file More complete description on this here: http://ltwiki.org/LTspiceHelpXVII/LTspiceHelp/html/Third_party_Model.htm
H: Optocoupler/isolater circuit for 24VDC sense that transfers switch status to 3.3VDC microcontroller hope everyone is having a good couple weeks before Christmas, I was given this question for an assignment How would you use an opto-isolator to sense a switch status in a 24VDC machine control circuit and transfer this status to a 3.3VDC/5VDC microcontroller input (something like an arduino uno). Explain how your circuit works. (this was posed to me as a general question, so i would assume the 24VDC motor circuit would have a transistor and diode for protection). NOTE***: I've only sim'd the 24VDC source in this case So what I have done so far below is use a 4n25 optocoupler, to try and send a low signal to the controller when the 24VDC switch status is ON and a high state when the switch status is OFF. Pic 1 would be ON and Pic 2 below Pic 1 would be OFF. Any sort of clarification regarding the following would be much appreciated :) When the switch is closed, why is the voltage at PR1 4.5V? is there like an extra voltage drop(s) due to the IRLED inside the coupler and the resistor? Would an NPN BJT connected via separate 5VDC be a better idea to supply the IRLED rather than a voltage divider? If so, where would I connect it? This last a bit vague I apologize, but practically speaking, would this circuit even work? All I have right now is the sim and a lack of parts to realize it AI: You don't need the R1/R4 divider. Eliminate those resistors and choose a value for R3 that limits the LED current. It looks like setting R3 to 2.2kΩ would give you about 10mA maximum through the optocoupler's LED. I didn't look at the 4N25's datasheet...you might be able to go down to 5mA or so. Note that the logic low voltage into the microcontroller is 1.01V (top picture). That is very high for a valid logic '0' but it might work for some microcontrollers at some supply voltages. I suggest that you delete LED2 and R6. Just use R2 as a 2.2kΩ pullup to the microcontroller's supply voltage and connect pin 5 of U2 (the NPN's collector) directly to the microcontroller input pin. If you want to add an LED indicator then use a separate NPN or NMOS transistor for that purpose.
H: Why do power supplies fail? I want to buy this power supply Here It says that it can last from 5-8 years. It can last 5-8 years by using it constantly? Also why do they fail? What component inside them causes them to fail? Sorry for my bad english AI: There is no mention under what conditions (ambient temperature, moisture, load, dust amount, etc) it can last for the given 5 to 8 years. Some equipment are rated in hours total, or years of normal office use when used for 8 hours per day for 5 days a week. Usually power supplies have electrolytic capacitors that just have a limited hours of use, but any component can fail under stress. If you want specifications that define how long a power supply lasts under some given conditions, perhaps search for a power supply that defines them.
H: Can \$I_E = I_B\$ in a BJT? So I have been trying to solve this BJT problem for the last 20 min with no luck so far. My question is, in this circuit, is \$I_B = I_E\$? I have tried solving the problem with this consideration and without, but still can't do it. Btw, the hint basically gives us \$V_{BE} = 0.8 \$ and \$V_{CE} = 0.2\$ EDIT: I have tried solving it using KVL: $$5 - 2{I_B} - V_{BE} - 3{I_E} = 0$$ That got me no where. I then thought \$I_B\$ may be equal to \$I_E\$ but the answer I got was wrong. AI: My question is, in this circuit, is \$I_B = I_E\$? No, \$I_E = I_C + I_B\$ and \$I_C\$ is clearly not zero. As for solving it: $$2000 * I_B + 0.8 + 3000 * I_E = 5$$ $$7000 * I_C + 0.2 + 3000 * I_E = 12$$ You now have 3 equations and 3 unknowns so you should be able to solve this easily enough.
H: BJT 'Hard Saturation' Equivalent for MOSFET? For a BJT, we usually want to hard saturate it by assuming Beta value is very low. This way we can maximize the current at the collector. However, I am not sure what is the equivalent for a MOSFET transistor. Is there anything similar to Hard Saturation for a MOSFET transistor? If so, how can it be achieved? AI: You may not have heard of it because 'saturation' in a MOSFET is the opposite of a bipolar transistor. I think you are actually talking about keeping the MOSFET out of saturation and minimizing resistance in the linear region. This is achieved by maximizing Gate voltage, which is the FET equivalent of maximizing Base current in a bipolar transistor. Here's an example of Drain current vs Drain-Source voltage for various Gate voltages on a standard power MOSFET. In the steep 'linear' part of each curve the Drain-Source channel acts like a resistor, so current is proportional to voltage. The flat part is where the channel 'saturates' and cannot pass any more current. This particular MOSFET is rated for 50A maximum, so a Gate voltage of 10V is sufficient to keep it in linear mode well beyond its rating. At 5V it only stays in linear mode to ~15A, and also has higher resistance (which you can tell from the gentler slope below VDS of ~1V). It might still be usable for switching lower current, but this FET really needs more than 5V to ensure that it stays fully turned on at high current.
H: Can capacitors be damaged by a DMM in continuity mode? Some multimeters have a pretty high open circuit voltage in continuity test mode and resistance mode (possibly to improve SNR?), but they are current limited. For example, the Fluke 87V behave like an 1mA constant current source with a maximum output voltage of ~7.3V in continuity mode. I think it is generally safe to use these multimeters to probe ICs, as most of them have clamping diodes. The question is, will capacitors with a low voltage rating be damaged (with a low limited current)? This is a common scenario when I probe power rails on a board to test for short circuits: simulate this circuit – Schematic created using CircuitLab AI: Continuity or Resistance mode applies a very low constant current such as 1mA to 1uA so no such damage will occur at low voltage. There is not enough power. However, I suspect leaving a reverse voltage charge on a supercap over time will degrade the capacitor just like leaving a battery undercharged that is not a "deep-state discharge type" will oxidize and damage battery performance over time. (hours) Therefore if you do test reverse resistance , that's ok for the short term but do not leave a negative voltage on the cap. So you can expect dV/dt=Ic/C so if 1 Farad and 1mA you expect 1mV per second change in voltage. Use Voltage mode to check voltage after resistance test shows 0 Ohms Note: R or diode test mode on a DMM = +ve V on +red and on an Analog meter in Resistance mode, the voltage applied is the reverse (+ve V on -ve black) and displayed voltage is shown in R with a log graticule on meter. WIKI REF However reverse-charging a supercapacitor lowers its capacity, so it is recommended practice to maintain the polarity resulting from the formation of the electrodes during production.
H: Are charge and voltage in a capacitor always directly proportional, regardless of structure? Capacitance is said to be a constant, and is defined as \$C := \frac{q}{V}\$. I have been unable, however, to find an implementation-independent way to show that charge and voltage are directly proportional to confirm this. Are charge and voltage in a capacitor always directly proportional? If so, how can we show this without assuming the capacitor's structure (e.g. parallel plate)? AI: You have it the wrong way round. When charge is proportional to voltage, we say the capacitance is constant. Capacitance is constant, or nearly so, for rigid structures made from simple materials like metal conductors and low k dielectrics. When you buy a capacitor from a catalogue, they generally have metal electrodes. There's a huge choice of dielectrics, low k ones like plastic polymers and alli or tantalum oxides, and high k ones like exotic oxides of barium, titanium, and a whole bunch of other secret goodies. If the structure is not rigid, like the electrodes in an electrostatic loudspeaker, then the capacitance varies as the electrodes move, which would cause audio distortion if not mitigated. A tuning capacitor made of interleaved vanes is also not rigid, it's designed to be varied. If the conductors are not simple metals, but semiconductors in a junction making a diode, then the effective edge of the conductor varies in position as the voltage on the junction varies. This is the structure of a varactor, capacitance changes with voltage. If the dielectrics are low k, then their polarisation per electric field is generally more or less linear all the way up to electric breakdown, resulting in a constant capacitance. High k ceramics are very polarisable in low fields, but in higher fields become less so, without breaking down. This means that capacitors can be built having a high working voltage, but a reduced capacitance at that voltage, sometimes down to 10% of their zero bias capacitance. Take great care when choosing ceramic capacitors to ensure that you will have enough capacitance at the bias voltage you want to operate at, you will need to dig beyond the shortform specifications to find out.
H: Placing multiple inductors (buck) close to each other on PCB I have three buck converters on my PCB. 12V to 0.82V @ 25A -FP1308-R21-R, Fsw = 650 kHz, TPS548D21 12V to 1V @ 8A - IHLP2525CZERR47M01, Fsw = 1 MHz, TPS548A20 12V to 5V @ 3A - Inductor is XAL5030-332ME, 400 kHz (can be increased), TPS568215 Due to thermal issues and heatsink optimization, we need place all three of these inductors very close (3-5 mm) to each other. All the inductors are shielded. What will the inductor shielding effectiveness be? There is no specification on distance vs field. Can we place all three inductors close to each other? If we can place them close together, what considerations do I need to take care of? Added a PIC of this. AI: What will the inductor shielding effectiveness be? There is no specification on distance vs field. You can do a simple test - use 100 kHz (from a signal generator) applied to one inductor and see how much induced voltage is in another inductor when placed close to the driven inductor. I wouldn't want more than (say) 2% coupling (2% voltage induction). Rotate orientation to find least coupling and then design your PCB.
H: Does DisplayPort support scaling natively? In the DisplayPort Wikipedia page, in advantages section it is stated that "Can drive display panels directly, eliminating scaling and control circuits and allowing for cheaper and slimmer displays". In the DisplayPort 1.2 specification, it is stated in external connection objectives that " Support external display configurations that do not include scaling, a discrete display controller, or on screen display (OSD) functions, enabling low cost, digital monitors. " DisplayPort 1.2 specification - https://www.google.com/url?sa=t&source=web&rct=j&url=https://glenwing.github.io/docs/DP-1.2.pdf&ved=2ahUKEwjkq-_xgrDmAhVsxTgGHaCjCB0QFjAAegQIAxAB&usg=AOvVaw1P2cs_sDfKQF4AX6NoqNMa Does this mean DisplayPort will upscale or downscale according to display panel connected without a scaling unit in between ? AI: A DisplayPort cable simply transmits electrical signals without changing them. Objective 3) just says that a display that is not capable of scaling is DisplayPort compatible. In other words, the DisplayPort specification does not require that all displays must support scaling. If you have a display that does not support scaling, and if your source is not able to generate images in the correct resolution, then the system will not work. Allowing this failure mode was seen as an acceptable tradeoff to avoid higher costs.
H: OC-voltage-gain for cascaded amplifier I have the following problem. "An amplifier stage with \$A_{voc}=100\frac{V}{V}\$, \$R_i=100k\Omega\$, \$R_o=10k\Omega\$ is connected to another amplifier with \$A_{voc}=10\frac{V}{V}\$, \$R_i=10k\Omega\$, \$R_o=100\Omega\$. They are in cascade, so to speak. What is the open-circuit voltage gain for this cascade?" My initial thought was that you just multiplied the two \$A_{voc}\$'s together and there you had it. That would make the total oc-voltage-gain 1000. But it turns out the answer to this question is \$500 \frac{V}{V}\$. Can anyone explain why this is? There were no schematic included for this problem, but I would assume it looks something like this. AI: The question is poorly worded, and of the two possible ways to connect the amplifiers I think you picked the one that is different from what the instructor assumed. I think the question intends that the output of the amplifier with \$R_O = 10\,\text{k}\Omega\$ is connected to the input of the amplifier with \$R_i = 10\,\text{k}\Omega\$. And that's a big hint right there...
H: What is the purpose of this NPN transistor in a battery protection circuit? I found a circuit using a HY2120 2-cell battery protection IC. The application notes differ from how it has been used in the circuit below and I don't understand why the author has not just directly connected the VSS pin to ground. What purpose does the sub-circuit in red serve? Has it got something to do with the fact that B- and P- are both connected to GND so the protection wouldn't work if the IC was still connected to P- when the protection triggered? Circuit in question: HY2120 application diagram: Huisman do you mean something like the following flow if P is reversed? AI: I tried to redraw the schematic so it matches the HY2120 application diagram. simulate this circuit – Schematic created using CircuitLab Instead of using the RDS(on) of (Q3||Q4)+(Q8||Q9), the author decided to use R14||R15 as current sense resistors. I don't understand why the author has not just directly connected the VSS pin to ground. There is no ground reference in the author's schematic. But there is indeed a reason the author separated the B- and the P- connections. B+ and P+ are connected. If B- and P- were connected as well and a reverse voltage was applied to P+ and P-, then this reverse voltage is also directly seen by the batteries. The author added 2 reverse polarity protections: D1, a 1SMA5924BT3G, a 9.1V Zener diode of 1.5W which will be forward biased and will (temporarily) clamp the voltage to some forward voltage (about 1.5-2V??) and will hopefully trigger a circuit breaker before the zener blows (because the forward voltage is already 1.2 V at 200 mA, it is likely it will blow quite easily). The red encircled subcircuit. I think the author makes use of the internal clamping diode of the HY2120. (I assume there is a clamping diode based on the Absolute Maximum Ratings: Input voltage between VDD and VSS pin: VSS-0.3 to VSS+10 V) Because P- is positive wrt BP+, D2 and the clamping diode are forward biased and Q7 will turn on. Q7 makes sure mosfets Q8 and Q9 are turned off. They have to be turned off, because the body diodes of Q3 and Q4 are forward biased. Although it probably works, I think using an unspecified clamping diode for this protection circuit is bad practice.
H: Why would this cause a latch? I'm reading ZipCPU's tutorial and got confused. Specifically, I'm referring to this page. To transcribe the Verilog code: input wire i_S; input wire [7:0] i_V; output reg [7:0] o_R; always @(*) if (i_S) o_R = i_V; I can understand that if o_R is declared as a wire, then a latch will be inferred as wires have no memory, and thus some external memory is required to keep the previous value. However, o_R is a register here, and registers can keep their state. For example, we can simply connect i_S to the "write enable" pin of the flip-flop corresponding to o_R, so why do we have a latch now? As a bonus, why is a latch, rather than a flip-flop, inferred in such a situation? I'm under the impression that they basically serve the same purpose. AI: The always block is evaluated every time i_S or i_V changes. You haven't specified what the value of o_R should be when i_S is false, so the simulator and synthesizer assume that you just want to retain the old value of o_R in this case. Therefore, a latch is inserted. The terms latch and flip-flop are not standardized, but most people use latch to mean a level-sensitive bistable element while a flip-flop is an edge-sensitive bistable element. They are not the same.
H: Measuring Power to Load Using Oscilloscope I have a small three-phase motor being mechanically driven to act as a generator. My goal is to measure power delivered to a load, which in my case would simply be a 4 ohm resistor, using an oscilloscope. I've seen others with the same goal have measured the voltage drop over a shunt resistor to measure the current and then measured voltage across their load in order to use P=VI. Why is that extra resistor used to measure current? If I have a known resistance and I then measure voltage across it, can I not use P=V^2/R to get power delivered to load? I know it is probably a simple question but any help would be appreciated. AI: You can, but usually you don't have such a convenient resistor that you can use as a shunt located in the right place already in the circuit doing something else, or your load is not resistive so the voltage measured isn't representative of the current through it. If the voltage measured is not representative of the current then you must measure both instead of just measuring one and using it to calculate the other (which is what you are technically doing with P=V^2/R by combining P=VI and V=IR). It may be less accurate too since resistance changes with temperature, and your load is dissipating power so will probably heat up more than a shunt will too since the shunt's purpose and design isn't to dissipate power. Also, your oscilloscope might not have differential or isolated probes, or your circuit might not be floating. That means you can't just connect your probe's ground clip to a pre-existing resistor just anywhere in the circuit without causing a short which means you can't just measure the voltage across a resistor sitting anywhere in the circuit. In that case you have to place a shunt in a part of the circuit where the scope grounds clip can safely connect to one end.
H: A question about controlling pm DC motor with long signal wires I have a PWM driver board for a 12V pm DC motor(like toy motors) to control its speed. To create a shake effect the motor will be mounted 50 meters far away from the PWM driver board, for such long wiring is there any extra practice for such application? AI: The resistance of the 50 meters of wire needs to be considered. The resulting voltage drop may require a higher power supply voltage. The speed variation due to load variation may be greater than it would be with less voltage drop. You need to know how much current the motor requires and how much resistance is added by the wire. You may need to use a larger wire if the voltage drop is too much.
H: What's the simplest (smallest) way to dim a DC LED strip with a switch? I apologize for asking about what is probably the most simple problem to you folks but it seems I am ignorant of all the basics of electronics and Google did not help me here. This is a 12v DC system. When I say 'switch' I mean I want 'high beams' and 'low beams' effectively. High being the full amount of current that the strip wants and low being 1/2 or 1/4 of what it wants. I've attached pics of the specs for one strip that claims to be dimmable. I do not need exact specified amounts of current. My purpose is simply reduced light output and reduced energy consumption at the flip of a switch. But I do want it to be efficient in that it doesnt just 'burn off' the excess current as heat. Is there a simple way to do this? Thank you. AI: Most efficient way is to use a circuit that pulses the 12V at high enough frequency to not be seen as flickering, then determine experimentally to find the duty cycle that yields perceived 50% dimness. Basically a 555 set up as an oscillator an a N-channel mosfet between the cathodes and GND would do it. Or an Arduino Promini and AOD508 (or equivalent Low Rds part) if you want to control the duty cycle in software instead of using Rs & Cs. Since these appear to be "dumb" (vs individually controllable chip) light strips, 4 transistors are needed, one for each color. Some mixing of colors may be needed to achieve the color and dimness you wish. In which case, a Promini + 4 transistor approach would be smarter. If you look the at controller at this site, something similar would be found. https://www.superbrightleds.com/moreinfo/clearance-led-strip-and-tape-lights/outdoor-rgbw-led-strip-lights-weatherproof-12v-led-tape-light-w-white-and-multicolor-leds-245-lumensft/1711/#tab/specifications
H: Is there something as common frequency? Let's say I have following three sinusoidal waves. 1. x1(t) = A*sin(2*pi*1000*t) i.e, f = 1 kHz 2. x2(t) = B*sin(2*pi*1500*t) i.e, f = 1.5 kHz 3. x3(t) = C*sin(2*pi*2000*t) i.e, f = 2 kHz So when I get the signal y(t) = x1(t) + x2(t) + x3(t), Is there any way to determine the common frequency such that the y(t) will start repeating itself? Can it be directly evaluated as smallest common multiple of these frequencies? For example, 6 kHz for this case. AI: The interval of repetition will be the LCM (least common multiple) of the periods of the sinusoids. This is also the inverse of the GCD (greatest common divisor) of the frequencies. The periods of your signals are 1ms, 0.666ms, and 0.5ms. The LCM of these is 2ms, so the signal repeats after 2 periods of the first signal, 3 periods of the second signal, and 4 periods of the third signal.
H: DAC controlled LDO as current source Currently I use a LT3083 as a constant current source more or less according to the datasheet as given in the first image. Instead of a single set resistor however is use a fixed resistor in series with a variable resistor connected via a cable to the case of my device which is generally not recommended as I'm told. In the future I would like to set the current with a DAC if possible like this: Unfortunately, the datasheet does not offer any more details to this configuration and it only works as a voltage regulator. How would I have to modify the second schematic to create a DAC controlled current source with the LT3082? Is this even possible? Thanks! AI: Once again, the 4-resistor difference amp is your friend. The circuit they show you has the output of the LT1991 referenced to ground, but it can also be referenced to Vout, like this: simulate this circuit – Schematic created using CircuitLab OA2 acts to keep the voltage difference between OUT and REF equal to the voltage difference between IN+ and IN-. This means that you can now control the voltage across R1 — and therefore the output current — by means of a ground-referenced voltage Vset coming from your DAC. This circuit shows a gain of 1, which means that Vset must be limited to 0 - 1V, but you could actually use a gain of less than 1, which would allow you to use a wider range of DAC voltages. Just keep R3 = R5 and R4 = R6. You can get amplifiers with matched resistors built in, such as the LT6363 family. In particular, you might want to use the LT6363-0.5.
H: Capacitor selection - effect of reducing size of the MLCC capacitor in an audio application We are developing an audio application using the TI TLV320AIC3111 codec and we are referring to the EVM document for the same. On this document, they've used a couple of 47uF 1210 capacitors (pg 23). However, we have a space constraint and are looking to find a smaller package for them. What parameters do we need to look at before choosing a smaller package? How will the ESR be affected by taking a smaller package? AI: There are several 47µF caps on the schematics: Power supply decoupling (C15 C16) Capacitance of Class 2 ceramic dielectrics decreases with increasing electric field, and the field is proportional to voltage/thickness. You can use a better dielectric (X7R) that holds its capacitance better for example. You have to determine how much capacitance you actually need, and then choose what caps you will use to get that capacitance at the actual voltage you use. If you want accurate capacitance vs voltage graphs you can try murata simsurfing to plot curves and compare various caps (check "capacitance vs DC bias" in the menu), here is an example: Headphone output DC blocking cap (C19 C20) Since MLCC capacitance varies with bias voltage, when used in any kind of filter they will introduce harmonic distortion, sometimes in very "generous" amounts especially at low frequencies. Depending on your requirements, if you want low distortion, you may have to replace the output caps with tantalums. This is why headphone amps chips which do not require output caps are being offered. Regarding your question, lowering the cap value to use a smaller one would also change the bass cutoff frequency depending on headphone impedance. So you have to account for this. Mic Bias filter cap (C14) MLCC is piezoelectric and microphonic, so using it for mic bias could be trouble... although if the microphone is on the same board, it will pick up the board vibrations anyway so perhaps it wouldn't be a problem. To reduce capacitor value, it would be simpler to use a higher value resistor in the RC filter.
H: Type of capacitor to bridge X10 signals in household power X10 is a protocol for communication among electronic devices used for home automation where the signals involve brief radio frequency (RF) bursts over a home's A/C power lines. Household wiring often has two different power circuits; each of the two 220V offers a single phase circuit to neutral. This means if the X10 controller is on one of those 110V circuits, the signals are not passed to the other of those circuits. The solution to this is to bridge the two 110V circuits so the RF signals may pass between them. This question is about what the specs for the capacitor should be if we wanted it to be very reliable over time. I bought and installed a capacitor like this (for a dollar) and it worked for probably five or more years: But then it failed, and looked like this when I found it: Capacitors, when operating properly, do not conduct [significant] current across their leads, but this season (putting up Christmas lights), the signals were not passing to all outlets, and when I looked in the breaker box, the capacitor had dropped away and fallen to the bottom. The leads were gone (apparently melted). So the dielectric apparently broke down over time and the capacitor failed. This got me to thinking, would there be a higher quality / higher spec capacitor that would be less likely to fail? If it meant I could count on it when I needed it, for decades to come, it would be worth spending more on it. But I don't know what to buy. I suppose I could install more than one, then if one failed, I'd have another. But I'm not going to be pulling the cover off of the breaker box to see if one or the other blew. Obviously not a critical problem, but just curious if there's a solution where a little more investment would mean no problems in the future. Follow-up Appended Edit: I ordered another one from the same place as I got the one the that had earlier failed: AI: I like X-10, use it myself, and have put it into several friends' homes. What has worked for me for decades is a 0.22 uF plastic box capacitor, rated X, X1, or X2. This is a film capacitor similar to the one pictured, but rated for continuous connection across AC lines such as Line-to-Line (240 Vac). Most are rated for something like 275 Vac. This type of capacitor is called "self-healing". If an internal short happens, the transient current blows away the shorting material, often such that the part continues to have enough capacitance to function normally. https://www.ecicaps.com/tech-tools/technical-papers/self-healing-affect-metallized-capacitors/ UPDATE: Seeing the added photos of the old cap with the "104" marking (0.1 uF) jogged a memory. Long ago I knew that was the recommended value, and used it for a while. But as I expanded the X-10 stuff around the house, some controllers could not "reach" some devices, so I increased the value to 0.22 uF and that solved it. That is why I recommend 0.22 uF over 0.1 uF. If you want to compromise, 0.15 uF also will work.
H: 3mm LED reverse breakdown voltage What is the usual breakdown voltage for these cheap and common LEDs? For example are they able to operate between -9V and +9V states(on and off) for a long duration? Or does having -9V across these LEDs destroy them? The current limiting resistor will be used by the way. edit: while speaking about these LEDs, I refer to the ones you can or anyone can find in lots of examples, simple project tutorials on the internet etc. I have watched almost 100s of these videos, read tutorials but never seen anybody referring which LED model they are using. They just call it as "LED" and one can find it very easily. I refer those LEDs. AI: All of these types of single discrete LEDs has a reverse voltage breakdown threshold of -5V. Never drive more than the absolute maximum specs in the datasheet and also expect > 50kh MTBF. LITE-ON also add a note to every Absolute Maximum Rating Table : Reverse Voltage can't be continued operating This also applies to forward current with a current limiting resistor. Typically for Red, Yellow these are tested for -5V @ 1uA Max and for Blue, WHite, Green, -5V @10uA This does not mean they will fail at -6V but that the current exponential rises at some point above -5V and the breakdown voltage and capacitance discharge will destroy the junction. Even if one test worked at -9V you may conclude -9V is OK to use as there is an aging acceleration rate. If they are all identical capacitance and leakage then it may be reasonable to assume if you had 20 in series that you could apply -100 V reverse and the ones which leak more then reduce in voltage drop to equalize. By no coincidence this is also the same -5V reverse voltage rating for almost all NPN/PNP's as the heavily doped Vbe junctions in bipolar junction transistors has the same limitation, unlike the lighter doped Vbc diode which provides the high Vce voltage rating (Vce = Vbc reverse + Vbe forward ) I see a difference in Anode gold wirebond in these packages due to the side of the flat D edge and the position of the reflective cup holder, but sometimes the transparent substrate is inverted. (caution)
H: Generating bit stream in hardware. Glitches with Arduino Background I have a bit sequence that I want to transmit through a digital output. My first attempt was to use direct port assignment on an Arduino. I set the duration of each level with noops. For example, if I wanted to transmit the sequence [1, 0] with 3 clock cycles per bit the code would be void setup() { pinMode(7, OUTPUT); } void loop() { PORTD = B10000000; __asm__("nop\n\t"); __asm__("nop\n\t"); PORTD = B00000000; __asm__("nop\n\t"); __asm__("nop\n\t"); delay(1); } I am trying to transmit 3 periods of the sequence [1,1,0] with a bit width of 1us. The expected output is shown in the first picture below. The problem is that the Arduino glitches occasionally. The problem can be seen by turning on the scope persistence; see the second scope shot below. I have scope trigger hold off set to just greater than the duration of the entire sequence (10us). Questions Why is the Arduino glitching? Is there a way to implement this on the Arduino without the glitches? Is there a preferred way of generating a digital signal in hardware that works better than this? Thanks! AI: An interrupt is probably occurring in the middle of your sequence. If you really want to precisely control the timing of your pulses you should disable interrupts before starting the first pulse and enable the interrupts after the last pulse.
H: Does my laptop need powerbank with output voltage the same like my charger's or my battery's? I have laptop (Acer Aspire 7745G) which has charger 19V-4.74A and battery 11.1V - 6,6Ah (73Wh). I'm planning to buy powerbank for it but I don't know what voltage would be okay. I'm looking to this powerbank I see that it has DC output of 12/15/19V. So, can I use this powerbank for my laptop? If yes, what voltage of output should I use? AI: You almost certainly will not be able to replace a specific laptop's battery with a "power bank". The motherboard will not recognize the power bank as a valid battery, so it will not attempt to charge it. There is a communications protocol between the motherboard and the battery, and the exact nature of the messages is usually not public.
H: How to know how much energy storage has powerbank? I just looked to this question and I don't understand how to know how much Wh this powerbank has (click "Specifications" tab), because it has different output voltages and I don't know how to calculate if it's 18Ah * 12V = 216Wh or 18Ah * 19V = 342Wh? AI: The information provided on the vendor web site is not very clear or specific. If you really care about this you should look for a different vendor, one that provides complete specifications.
H: P Channel MOSFET is not behaving with another MOSFET This is a very simple (or so I thought) power switching circuit I made for an extremely low, power consumptive device. The device normally runs on a 3.6v lithium, but occasionally a user will plug it into a computer to grab/program data. When plugging into computer, I want to kill power from the battery and solely power from USB interface. When USB is disconnected, MOSFETs make the switch back to battery. Both MOSFETs are P Channel. When I first built the circuit, I left Q2 out to check if Q1 was working as expected. It was. When the USB is not plugged in, Q1 gate is 0v, and source is 3.6V. Negative 3.6V fully turns on the MOSFET. When I plug in USB, interface IC turns on, and drives Q1's gate to 3.3v which turns it off just fine. But when I added Q2 (with no USB power), Q2 doesn't want to turn off. The VGs should be +3.6v, so it should drive it hard off! Instead, it seems like it's partially on, back feeding the voltage regulator; I'm reading 2V on the reg's input. Then when I plug in USB, now Q1 wont turn off! Here's my thought's on what should happen: With a battery, but no USB power, Q1 Vgs should be -3.6v which turns on Q1. When Q1 is on, it feeds the gate of Q2 with +3.6v while the source is 0v because theres no USB power. So Q2 should be off. When USB power is added, Q1's gate is driven high by the USB IC which brings the Vgs to -0.3v which is plenty to keep Q1 off (confirmed through testing). When Q1 turns off, Q2's gate is 0v and the source is +3.3v. This gives Vgs -3.3v which should be driven fully on. Any help would be awesome. Thanks guys! MOSFETs data sheet AI: Q2 leakage is probably through the body diode of the FET, which is not shown on your schematic. I think a bigger problem is that the gate and drain of Q2 are connected together, meaning you can only get within Vgs(th) of your 3.3V supply. And Tony's right, if those resistors are meant to turn off the FET in a floating gate situation, they should be connected between gate and source.
H: How much voltage difference will lead to saturation, LM741? Which parameter should I look for? I want to know what should be ( Vin+ - Vin- ) to get a saturated output. AI: The main one would be the large signal voltage gain. This gives the output in V for a difference in input measured in mV. You also need to look at the input offset voltage which in this case is 2 to 6 mV. If you take the worst case, 6 mV, and maximum large signal voltage gain of 200 you can see that the output would be saturated without any difference between the inputs. The 741 is ancient and should only be used to learn about why we don't use them anymore.
H: LTspice output of a bjt amplifier is offsetted If I choose "start external DC supply voltages at 0" from transient simulation settings, the output is centered at 4.55 Volts. The amplification and gain is OK, but the output is not centered at 0. However, If I don't choose that option "start external DC supply voltages at 0", then output is also centered at 0 volts. Is it related to charging of C27? But output offset is also not likely to drop towards 0. It continues oscillating around 4.55 volts. If someone can explain me what is the difference between those two options and how to solve offset problem, it will be nice. AI: Your "ampout" output is unterminated, so there's no place for any charge on C27 to go. If you start with supply voltages = 0, then when the collector voltage of Q1 goes up (presumably to 4.55V), it'll take "ampout" with it. You should figure that the voltage of "ampout" at startup without the supplies starting at zero will be at the whim of the tool, and in this case the tool's whim is to have it be 0V. Be thankful it doesn't just give you an error. If you want things to be sensible, put a sensible resistance to ground -- either whatever you believe the DC impedance to ground will be in the real circuit, or something high enough so that the pole formed by C27 and your resistor is well below any frequency of interest.
H: "recommended that CLK begin toggling within 150 ms ... to ensure long-term reliability of the device" -- why? In Intel's Pentium Processor Family Developer Manual, regarding the CPU clock, it says that "it is recommended that CLK begin toggling within 150 ms after VCC reaches its proper operating level. This recommendation is to ensure long-term reliability of the device." From a circuit implementation perspective, how might holding the clock low or high damage the device? AI: The clock undoubtedly operates charge pumps within the chip that provide bias voltages for various functional areas. Without proper bias, leakage currents are probably higher than the transistors are really designed to handle long-term.
H: using ANSI C libraries for STM32 programs In the internet, I often find examples of the source codes for programming STM32 MCUs at register-level. Strangely, some of those source codes include "#include < stdint.h >". In general, is it possible to include ANSI C libraries in the source codes for STM32? Here is an example of such a C project. AI: Yes you can. You should definitely be aware of their possibilities. Check the documentation for when you are using the ARM Toolchain. https://developer.arm.com/docs/dui0475/l/the-arm-c-and-c-libraries https://static.docs.arm.com/dui0475/l/DUI0475L_libraries_user_guide.pdf Or for GNU: https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/ https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc.pdf You can also find info in the POSIX docs, such as stdint.h.
H: For a constant load, how does increasing supply voltage increase speed of the motor? For a given load: Increase in supply voltage results in increase in armature drop. Increase in armature drop results in higher armature current. But we know that speed is inversely proportional to armature current. We also know that increase in supply voltage increases speed. What am I missing here? Edited to make the question clear as to what I'm asking AI: For a constant load, how does increasing supply voltage increase speed of the motor? Speed ∝ voltage. Torque ∝ current. Let's imagine the following: The motor is connected to the voltage source and is running at a constant speed. The back EMF has risen and the current has reduced from its starting value and is stable. If we now increase the voltage the current will increase. Remember that the current, \$ I = \frac {V_S - V_{bEMF}}{R} \$ where R is the motor resistance. The increased current will give increased torque which will accelerate the motor to its new steady speed. But we know that speed is inversely proportional to armature current. No. Speed is proportional to voltage. If you try to stall a motor running on constant voltage you will see the current rise. However, given a constant voltage the current will decrease as you approach the speed for that voltage. That may be the source of your confusion. You could get a good feel for this if you have access to a lab power-supply with a voltage and current meter along with a suitable DC motor. Try running the motor in constant voltage mode an in constant current mode. From the comments: For a given load, an increase in voltage supply would increase the potential difference across the armature. This is kind-of a redundant statement. For a permanent magnet motor the supply voltage is the armature voltage. And this increase in armature p.d. generates a stronger magnetic field which interacts with the stator field to make the motor go faster. simulate this circuit – Schematic created using CircuitLab Try thinking of it like this: The motor acts as a generator. The faster it spins the more back-EMF it generates. Due to friction losses, etc. the back-EMF is less than the applied voltage. At startup a certain V1 is applied. The motor is stationary so the back-EMF is zero. A high current flows determined by V/R. The motor starts to spin up. The back-EMF rises. The current falls because R is no longer between V1 and 0 V but between V1 and VbEMF. The faster the motor spins the more the back-EMF voltage rises and the current falls. The motor speed stabilises when the power in = the work it has to do. If we now increase V1 then more current will flow through R. This will provide more torque and accelerate the motor until a new stable operating point is found.
H: What are the disadvantages of using a Zener diode over a linear voltage regulator? I wonder why a Zener diode is worse than linear voltage regulator. Some of the posts online mentioned that because of the power dissipating problem. Zener diodes keep consuming a large amount of current while the load may just need a very little amount of current. If I understand correctly, this phenomenon will happen only when the Zener diode is connected with the load in parallel. What if I connected my Zener diode with my load in series? Also, someone said that linear voltage regulators (e.g. LM7805) are not good voltage regulators as the power dissipated in them is much higher than that in switching voltage regulators. In my understanding, the power dissipated in a linear voltage regulator can be calculated by dropout voltage x current = power converted to heat. Regarding these 2 points, other than a linear voltage regulator can handler a wider current range, what is the benefit of choosing a linear voltage regulator over a Zener diode? AI: 1) When using a Zener diode as the regulation element like in this circuit: the disadvantage is that the circuit needs to be configured such that there's always some current flowing through the zener diode. The zener diode acts as a shunt regulator, it "burns off" the current that is "left over" instead of limiting the current that flows when little current is needed. When the load takes no current then all the current that isn't taken by the load has to go through the zener. That wastes power. In practice this circuit is only suitable for loads which draw a low current and preferably also a somewhat constant current. Why would I use this circuit then? Well, it's cheap. A linear regulator like the LM7805 or a zener + transistor based circuit like this one: form a series regulator (not shunt). These regulators have the advantage that they consume only as much current as is needed. When the load takes no current then there is only a small amount of power used. These circuits are slightly more expensive as a transistor is needed or a voltage regulator chip like the LM7805. 2) Saying that the LM7805 is a bad regulator because it just "burns off" the excess power isn't telling the whole story. The LM7805 (and LM317 and similar) are still used a lot so they clearly have their purpose. Fact is that for loads that do not need a lot of current, let's say up to 100 mA, then these linear regulators are a good choice. Only when you need (a lot) more current then it might be more efficient (less power turned into heat) when a switching regulator is used. A typical example when to use a switching regulator is to convert 12 V (car or solar panel battery) to 5 V (USB) for powering gadgets. Then a current of up to 2 A might be needed. At 12 V, 2 A, a linear regulator will need to "burn off" 7 V at 2 A, that's 14 watt which requires a substantial heatsink. Even a cheap switched regulator like an LM2596 can do that much more efficiently without the large heatsink. So don't think that some circuit solution is always better than the other. It is more complex than that. What the most optimal solution is depends on what is needed. Like input voltage, current into load, cost etc. In the real world engineers use all of the solutions I have shown here, they choose the one that best suits a certain situation.
H: Is there any chip that measures the amplitudes of voice bands simultaneously? Is there any existing chip that can take 20Hz~20KHz signal as input and outputs the amplitude of each frequency band? For example, divide the 20Hz~20KHz range into few bands (20~1K, 1K~2K,...) and outputs all the power/amplitude of each band simultaneously? AI: Consider the Mix-Sig MSGEQ7, a seven band filter, with centre frequencies of 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz and 16kHz. It outputs a DC signal for each band, stepped through by an external clock.
H: Lab power supply screw plug I'm intending to buy a lab power supply, high likely a .. I'm thinking about a Korad KA3005D (see picture below). It does not come with cables for the Red + and Black - terminals, and I (also) would like to have a plug to use power not only via the (4mm) banana plugs, but also by screwing it to the same terminal. I'm intending to create a cable myself. My questions: For connecting the power cables it can be either connected to the banana plug or to the screw. On the cable, a half round iron 'circle' is needed … how is such half round thing called to connect to it? I mean the 'plug' that needs to be added to the Red + and Black - terminals. What is the (inner) diameter (if it is standard)? AI: It can have different names: fork connector Y (spade) connector Y plug (or any mix of keywords mentioned above) The connectors have different inner diameters. Either measure it when you have the power supply or estimate the diameter based on overall dimensions (it doesnt need to be that precise).
H: Simple MOSFET circuit doesn't seem to be fully turning on One of my current home projects is redoing the doorbell by retro-fitting a pushbutton and LED inside an older button housing which I already had and looks nice, but didn't come with a very good switch mechanism or light of any kind. Due to the small size of the interior of the button housing, I had to go with a small through-hole pushbutton, which has a contact resistance of around 60Ω. Due to this, the button itself cannot pass the ~1Amp at 9VDC required to pull in the solenoid in the bell unit and heats up trying to do so. To get around this, I've been experimenting with using a BUZ71 MOSFET(to which I'm very new) according to the below diagram, the theory being that when the button is not pushed, the ~10mA through the LED will not cause a high enough voltage at the gate to turn on the MOSFET, and when the button is pushed, there will be enough voltage on the gate to turn on the MOSFET, thus allowing enough current to flow to ring the bell. I started with a smaller value for R1, but the bell never rang, so I've been working up the values to create a higher voltage on the gate. With 120Ω for R1, \$V_{(GS)}\$ reaches 4.6V when the button is pressed, and the solenoid tries to pull in but not enough to ring. Additionally, with any resistor value I've tried, the MOSFET gets quite warm if the button is held in for more than a few seconds. Avoiding this was the main reason I gave up experimenting with BJTs and moved to MOSFETs, as the BUZ71's \$r_{DS(ON)}\$ of 0.1Ω should mean it only dissipates 0.225W at 1.5A(max current that would flow through the 6Ω solenoid), right? I'm guessing there's something obvious that I'm doing wrong, because most of my guidance in the circuit design has been from reading and adapting tutorials online. I might be able to get the bell to function properly if I keep increasing R1, but will this solve the heat issue? Do I need a different MOSFET? I chose the BUZ71 as it was at my local hobby shop and seemed to be able to handle the current I need it to. AI: The problem is as you turn on the MOSFET, current flows through the solenoid and the MOSFET source voltage rises and tries to turn off the MOSFET. This is negative feedback and will force the MOSFET to behave linearly rather than act as a switch. It would be better if you moved the solenoid to be in series with the drain connection on the MOSFET: - If you want the LED to extinguish when the button is pressed move the LED and series resistor to connect between drain node and source node of the MOSFET. On the other hand if you want the LED to light when the button is pressed, then reconnect the resistor and LED across the 10 kohm resistor. Breaking news: - Unfortunately, the LED and button in the button housing outside are connected to the bell, power supply and mosfet by only a 2-core cable Then you will have to use a low value of resistor instead of the 10 kohm in the diagram above.
H: Tests to verify complete functionality of a PCB What tests can be carried out on a power supply PCB to verify its complete functionality? For example:- I have designed a custom board using the JCM3012S3V. It takes 12V input and produces 3.3V. What tests does this particular board need other than basic power on and verifying the output voltage with respect to input voltage? The designed board may be working fine, I don't want this board to impact the working of other boards. I am talking about tests like: Measuring the noise generated from the board What other tests does a board need to pass? AI: Depends on how deep down the rabbit hole you want to go. I'll list some tests that are done on pretty much every power supply I work on: Load regulation: Start at minimum load, or 5%-10% load and then step the load to 100% of your rated output and then back again. This can be done with an electronic load or some kind of mosfet + resistor circuit. Monitor output voltage on a scope. Take note of how far the voltage dips during 0->100, how far it surges during 100->0, and how long it takes to settle back to regulation. This is also a good way to estimate your phase margin if you don't have an analyzer. Line regulation: Measure your output voltage at nominal input, then at the lowest acceptable input and the highest acceptable input. Line regulation = (High-Low)/Nominal. Ripple/Noise: You already suggested this one, but it is a good thing to measure. Even if only to match with your maths. Efficiency: Power Out/Power In, easy peezy. Short circuit/current limit: What happens if you short circuit your supply? Does it have protections? Before doing a short, I'd lower your load resistance past 100% load and see how the supply reacts. Only do this if you put protections in place, I don't want to be responsible for hurting your supply. For DC/DC converters, you can also test PSRR by injecting noise on top of your input voltage and seeing how much it is attenuated on the output. Requires a spectrum analyzer or a good scope. There is much more out there, but like Andy said, it really depends on what you built, and what you deem acceptable. If you aren't making this for a customer or what have you, then it is all up to you.
H: What is this schematic symbol that is a circled capacitor? I am trying to determine what this symbol is that looks like a circled capacitor and is labeled as "Z1" that I circled in blue below. Here is the full schematic with this component being near the top left at the input. In my search I found this question with a circled capacitor and a dot but I'm not sure if its the same. I also found websites saying Z is for zener diodes which this obviously is not or this website that says Z could be for a balun, general network, or phase shifter but I did not find circuit symbols that match this one when googling those. AI: They are indeed varistors like others are (educatingly) guessing. Varistors Z1 and Z2 have overvoltage protect function on the line input. Source: http://www.pavouk.org/hw/en_atxps.html You can find this source by googling on ATX power supply using the website on the schematic. Search term: ATX POWER SUPPLY site:www.pavouk.org
H: Voltage regulation: are the ground diodes necessary? (Picture added) Are the diodes on the ground line necessary? Would the following work to provide the device with 12v and 4A? AI: simulate this circuit – Schematic created using CircuitLab Figure 1. A Zener dropper circuit. If you really wanted to use a Zener diode you would just use a 6 V one and drop the voltage as shown in Figure 1. Since you mention 4 A current the power dissipated in the Zener would be calculated by \$ P = V_ZI = 6 \times 4 = 24 \ \text W \$ but you won't find a device with this power rating - not easily at least. Your scheme had several problems. You were dropping 12 V across the Zener leaving you with a maximum of 6 at your load. You have a series resistor of 3 Ω which, with your remaining 6 V supply, limits the maximum current to \$ I = \frac {V}{R} = \frac {6}{3} = 2 \ \text A \$ into a short circuit. If you have any kind of a load with a resistance of more than 0 Ω you'll get less than 2 A. In your original post you were hoping to draw 4 A from the 12 V side while supply the circuit with a 3 A supply. This wouldn't end well. The solutions, as discussed in the comments are: Purchase the correct 12 V, 4 A supply in the first place. Use a DC/DC converter / buck converter or switching regulator to step the voltage down. For 12 V at 4 A you will need a 48 W converter. The power into the converter will be \$ P_{in} = \frac {P_{out}}{Eff} \$.
H: Voltage increase with capacitor... what's the "true" voltage? The board on an old battery charger went bad, but the transformer was good. So I've got about a 12.3VDC output when I connect the transformer to a bridge rectifier. However, if I decide to wire in a capacitor, the voltage jumps to over 20v. When I hook up a 12v load (light bulb) it goes back down to around 13v. Why is this voltage increase happening with the cap? If this 20v isn't my "actual" voltage, what is? Is it the voltage I see with a load attached? If load decreases the voltage in the circut, how do I know I'm not sending too big a voltage to my load? AI: Figure 1. Bridge rectifier and smoothing capacitor. Image uncredited on EE.SE. Without the smoothing capacitor you get the dotted-line full-wave rectified waveform. You are reading the average value of this, 12.3 V. The smoothing capacitor, when added in, is charged to the peak value of the voltage and maintains it during the dips in the rectified voltage. The average voltage will be close to the peak voltage, 20 V. When I hook up a 12v load (light bulb) it goes back down to around 13v. The capacitor's value isn't high enough to maintain the voltage at 20 V with such a large load as your lamp. It does hold it up 0.7 V higher than without the capacitor. Why is this voltage increase happening with the cap? Explained above. If load decreases the voltage in the circut, how do I know I'm not sending too big a voltage to my lamp? You use the meter to check this. With 13 V you are running a little "hot". Note that incandescent lamps are tolerant of peaking voltages due to the thermal characteristics of the filament. Electronic devices may be destroyed if the peak voltage exceeds the device's rated voltage. Note: 'V' for volt, 'A' for ampere, etc. SI units named after a person have their symbols capitalised but are lowercase when spelled out.
H: Nyquist plot disagreeing with the unity step response of the closed loop Let us assume that the open loop transfer function of my system is: \$L(s)=\frac{10(s+1)(s+2)}{(s-3)(s-4)}\$ Also, the system has unity feedback, meaning that the closed loop transfer function is \$T(s)=\frac{L(s)}{1+L(s)}\$ since \$L(s)=G(s)H(s)\$ and \$H(s)=1\$ Then the Nyquist plot is this: There are 2 RHP poles present and the plot circles the (-1,0) point 2 times, anti-clockwise. \$Z=N-P\$ where \$N=-2\$ and \$P=2\$ so \$Z=0\$ => Stable System. And the unity step response is this (for the closed loop): It looks stable, but if I press on "more time", it looks pretty unstable: So the Nyquist plot is disagreeing with the unity step response. What is happening? The transfer function is theoretical in nature, it does not necessarily represent a real system's response. I have taken care to make sure that the unity step response is that of the closed loop transfer function (and not that of the open loop, which is clearly unstable). I used WolframAlpha for all my plots. AI: Please double check the simulation/plots. That behavior seems way too fast ("noisy") for the dynamics of your system. I tried simulating the closed loop system in Octave and could notice that there is an unstable pole cancellation, but that does not lead to the "unstable" behavior in Octave. I would say that is a problem in WolframAlpha and not really a control theory thing. s = tf('s') l = 10(s+1)(s+2)/((s−3)(s−4)) pzmap(l/(1+l)) step(l/(1+l),40)
H: LM393 comparator how to use? Update: All I want is, when the signal is higher than reference voltage, LEDs to light up(brightly). For this, I was planning to use an op-amp as comparator (left circuit) but everybody told me to use a comparator instead. However there is some differences between operating of these two devices which confused me. I have drawn(on the right) the way I think it should be with a comparator after my readings. But I am not sure. If you think I can use an op-amp comparator (left circuit), then I noticed that with GND connected to -Vcc terminal of this op-amp, the current flows through LEDs even the signal is lower than Vref. I would expect the output to be 0 V and so no current flows through the LEDs. However this is not the case. You can also to explain this to me. LM741 is not a must component, I know it is a very ancient op-amp but I am so stuck in these concepts that not able to choose another one. simulate this circuit – Schematic created using CircuitLab Original question: I am a little bit confused about the usage of LM393. Is this comparator IC somehow different than opAmp comparators? For them, I was able to understand easily because the load was directly connected to output. So when V+ > V-, the output goes high and when V- > V+ output goes low. Just like below, But for this LM393, it looks different. I have read some: If the voltage at the inverting terminal is greater than the voltage at the noninverting terminal, then the output of the op amp will be drawn down to ground, allowing electricity to flow from VCC to ground, turning on the output device. If the voltage at the inverting terminal is less than at the noninverting terminal, then the output of the op amp stays at VCC allowing no electricity to flow, since there is no electric potential difference across the output device. This means that when the inverting terminal voltage is greater, the load connected to output can be powered on. When the noninverting terminal voltage is greater, the load connected to output will be powered off. So if an LED is connected to output, it will turn on when the inverting voltage is greater and turn off when the noninverting voltage falls below the inverting voltage. I think I am confused about the pull-up part in LM393. In my design, I want to feed 2 leds in parallel from the output of the comparator, so I guess I will need 20+20 = 40mA in total from this output. Does LM393 give the opportunity to have this much current flow? If so, where the reference voltage(which I want to compare with a signal and when signal is above that reference voltage the load gets current) be connected? AI: Is this comparator IC somehow different than op-amp comparators? They are similar in some ways. Comparators usually have the following advantages: They should have low input offsets so you get precise switching. Many work down the the negative rail on the inputs. They don't latch up. Op-amps can take some time to come out of saturation so this introduces a time delay. Many comparators have open-collector outputs so you can parallel them. This is useful in window-comparator applications. This means that when the inverting terminal voltage is greater, the load connected to output can be powered on. If V- > V+ then the output pulls low. A load connected between VCC and the output will turn on. When the noninverting terminal voltage is greater, the load connected to output will be powered off. For an open-collector comparator the output transistor will be turn off allowing the output to be pulled high. So if an LED is connected to output, it will turn on when the inverting voltage is greater and turn off when the noninverting voltage falls below the inverting voltage. No circuit schematic so we can't comment. I think I am confused about the pull-up part in LM393. In my design, I want to feed 2 leds in parallel from the output of the comparator, so I guess I will need 20 + 20 = 40 mA in total from this output. Why not put them in series and halve the current? Does LM393 give the opportunity to have this much current flow? Check the datasheet. If so, where the reference voltage (which I want to compare with a signal and when signal is above that reference voltage the load gets current) be connected? Use the inverting input for your reference. Usually a pair of resistors configured as a voltage divider will give you the reference voltage required. Use a comparitor for comparison. Use an op-amp for amplification. (But don't use a 741.) Comments on schematic: If you think I can use an op-amp comparator (left circuit), then I noticed that with GND connected to -Vcc terminal of this op-amp, the current flows through LEDs even the signal is lower than Vref. I would expect the output to be 0 V and so no current flows through the LEDs. However this is not the case. You can also to explain this to me. If you read the Output Voltage Swing parameters on the 741 datasheet you will see that it may be as low as &pm;12 V on a &pm;15 V supply. That means it can only get to about 3 V from negative supply and that's when it has a decent &pm;15 V supply. You're running it at 9 V so it may be worse. Hopefully you're beginning to understand why an op-amp is not the right choice for a comparator and that the 741 is a not a good choice for an op-amp.
H: Common mode noise mitigation in two pin smps How does a 2 pin (no earth ground connection) SMPS offer common mode protection? Is it safe to power appliances over it? AI: There are two things to consider. A power supply that is unearthed won’t usually pass output noise regulations without a filter tying the output (via a noise reduction capacitor) to something like ground. Given that the noise on the output is mainly produced by internal switching noise, the choice made by designers is to use an appropriately rated capacitor from one of the output terminals to live, neutral or the DC bus voltage. Not perfect, but for small devices, good enough. The second thing to consider is that this can produce an open circuit voltage of about 50% of the incoming AC supply voltage on both output terminals and, it’s quite possible to feel a small tingle or see a small arc if handled in such a way so as to promote said tingle or arc. It’s not dangerous but, it has been known to damage sensitive electronics. This second outcome is because the added capacitor used as a noise reducer on the output inevitably couples low frequency AC from the mains power input to the DC output. Not perfect I know.
H: Obtaining Accurate Measurements from Strain Gauge Background I have a strain gauge that I need to obtain measurements from. The product page indicates that the sensor is a half bridge configuration (one active/one compensating element). The sensor has three wires: White (common), Red (active) and Black (compensating). I have never used a strain gauge before, so I may have some fundamental misconceptions about how it works. My Understanding of the gauge is that I need to measure the resistance and use the equation: \$strain = (R - R_0)/(G*R_0)^2\$, where \$R\$ is the measured resistance, \$R_0\$ is the gauge resistance, and \$G\$ is the gauge factor. I do this for both leads (active and compensating) and subtract the two to find the actual strain. What I have Tried Using an Agilent Data Acquisition unit, I have successfully measured the resistance of both leads as ~120\$\ \Omega \$, which is expected, and calculated a strain of essentially zero. My Problem started when I tested the sensor by heating the it (attached to a metal plate) to 50C. I expected the strain to increase, but was surprised to see that it actually decreased. Now I am questioning my basic understanding of how this sensor works. The change was very small, but distinct from the noise (below image). Additionally, the noise I am getting from the sensor is less than ideal. I suspect some of it is caused by the furnace I am using, as there is a noticeable increase in noise when I turned it on (below image). Update The increased noise level remains even after de-energizing the furnace, so I now believe the increase is caused by the temperature. Questions Shouldn't strain increase as the temperature increases? Is this level of noise normal? How can I reduce it? Am I using the strain gauge correctly? AI: simulate this circuit – Schematic created using CircuitLab The OEM website does not show any useful information. I would call or write to them. But my guess would be to wire the measurement instrument like this and put a plastic RF cap across the input with shielded twisted pair cable. There is no indication on sensitivity or polarity.
H: ESP32: sampling a 1 kHz square wave (10%-90% duty cycle) with analogRead() I need to sample the peak voltage of a 1 kHz square wave. The duty cycle varies between 10% and 90%. I am using an ESP32 and hoped to use analogRead() to sample the data. My first idea was to attach an interrupt to a digital pin being fed the square wave. It seems that the analog read only sometimes happens on time. The first signal in this image is the input signal at roughly 50% duty cycle. The second is the start and end of the analog read: digitalWrite(32, HIGH); int level = analogRead(CP_READ); digitalWrite(32, LOW); As you can see, the reads sometimes occur after the falling edge of the input signal even though the interrupt was attached to RISING. Curiously, setting it to FALLING yields exactly the same result as above. Also, it doesn't even seem to trigger on each rising/falling edge. As you can see, it skips 2 pulses. Here is a small sample of the output: Current CP voltage level is: 4095 Current CP voltage level is: 2925 Current CP voltage level is: 955 Current CP voltage level is: 3687 Current CP voltage level is: 1344 Current CP voltage level is: 0 Current CP voltage level is: 4095 Current CP voltage level is: 4095 Current CP voltage level is: 4095 Current CP voltage level is: 4095 Current CP voltage level is: 3149 Current CP voltage level is: 1044 Current CP voltage level is: 0 Current CP voltage level is: 4095 Current CP voltage level is: 4095 Current CP voltage level is: 4095 Current CP voltage level is: 4095 Current CP voltage level is: 2737 Current CP voltage level is: 784 Current CP voltage level is: 3423 Current CP voltage level is: 1198 Current CP voltage level is: 0 In my test case, it should always be 4095. This is the whole interrupt: void IRAM_ATTR isr() { digitalWrite(32, HIGH); int level = analogRead(CP_READ); digitalWrite(32, LOW); Serial.print("Current CP voltage level is: "); Serial.println(level); } Is there anything I should know about the ADC? Is there a sort of "setup" time that is required to get it going that I can account for? AI: The ADC read is very short, you can see that with your logic analyzer trace, so you can rule that out as the problem. The Serial.print lines inside the ISR are probably taking way too much time to handle the interrupts at the 1 kHz rate. You should instead buffer the result and print out the results outside of the interrupt.
H: HX711 : Inductor on supply line and feedback I'm re-implementing the great HX711 breakout board from Sparkfun (schematics : https://cdn.sparkfun.com/assets/f/5/5/b/c/SparkFun_HX711_Load_Cell.pdf). I'm trying to understand the exact role of the inductor (I think it removes high frequency noises but an explanation would be great). The real issue I have with this circuit is: Why is the feedback of the regulator measured before the inductor and not after? AI: Why is the feedback of the regulator measured before the inductor and not after? Connecting the feedback left or right of the inductor will hardly have effect on the voltage regulation. Probably the designer first designed the feedback control for the internal analog supply regulator and next decided to add an additional LC filter to reduce noise to the supply to the load cell even more. (The LC filter is to filter the noise coming from the supply that is connected to VSUP (pin 1) of the HX711.) What surprises me more is that pin 3 of the HX711 is still connected before the LC filter. It might be due to my assumption the LC filter has been added later.
H: How to access GPIO pins on Atmega with memory mapping? I'm programming the Atmega328P in embedded C. I'm going to use 16 pins for turning on LEDs, and I have to use PORTB, PORTD and PORTC for this. I would like to just iterate a pointer so I can turn them on/off instead having to deal with what port each pin relates to. So an example would be how I need three if statements to iterate through the 16 pins like shown below: // Enable outputs DDRB = 0b00111111; // 6 outputs DDRC = 0b00110000; // 2 outputs DDRD = 0xFF; // 8 outputs // LED pins uint8_t ledpin[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; uint8_t idx = 0; // Set LEDs if (idx < 8) for(int i = 0; i < 8; i++) PORTD |= (1 << ledpin[i]); if( idx > 8 && idx < 14) for(int i = 8; i < 14 ; i++) PORTB |= (1 << ledpin[i]); if (idx >= 14) for(int i = 14; i < 16; i++) PORTC |= (1 << ledpin[i]); I would rather use a memory map where I could just say "pin0 address + offset" like this: // Base address of ports uint8_t base 0x00 uint8_t offset = 0x04; // LED pins uint8_t ledpin[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; // Set LEDs for(int i = 0; i < 16; i++){ (base + offset) |= (1 << ledpin[i]); // Pseudo code offset += 0x04; } The code above is obviously not optimized, nor totally functioning code but I think it gets my point accross as to what I want to achieve. Ultimately I will use this in a code to control a LED cube which will work quite differently, but it's essential that I don't need to decode what port each pin belong to all the time. Is there a good way to solve this with virtually no overhead? EDIT After investigating and trying out a lot of stuff with good help from the answers I have found that it's not possible to address individual bits in the AVR ports. Each PORTB/C/D have their own address, but it's not possible to manipulate the bits with memory mapping, like incrementing a pointer address. Atmega328P datasheet page 280 shows the memory map of the IO ports (image below). AI: Is there a good way to solve this with virtually no overhead? There is no practical way to get 'virtually no overhead' in C on AVR. Code that looks like it should have low overhead often doesn't, and you have to look at the disassembly to see the real code. AVR has a RISC architecture that needs many instructions to do 'simple' operations. IN, OUT, and SBI/CBI (bit set/clear) instructions take literal arguments only, which must be 'hard-coded' at compile time. But there is no barrel shifter, so bit masks computed at run time can take many instructions to produce. Pointers are made from 8 bit registers that are loaded one byte at a time, so pointer operations may use more cycles than port I/O with conditional code. Here's the best I have managed to produce so far (It's basically the same as your code except the pin masks are precomputed, and it's wrapped in a function instead of inlined)... // LED pin masks #define LP0 1<<0 #define LP1 1<<1 #define LP2 1<<2 #define LP3 1<<3 #define LP4 1<<4 #define LP5 1<<5 #define LP6 1<<6 #define LP7 1<<7 #define LP8 1<<0 #define LP9 1<<1 #define LP10 1<<2 #define LP11 1<<3 #define LP12 1<<4 #define LP13 1<<5 #define LP14 1<<0 #define LP15 1<<1 // pin mask array uint8_t ledpin_mask[] = {LP0,LP1,LP2,LP3,LP4,LP5,LP6,LP7,LP8,LP9,LP10,LP11,LP12,LP13,LP14,LP15}; // turn on LED void setled(uint8_t pin) { if (pin < 8) { PORTD |= (ledpin_mask[pin]); } else if ( pin < 14) { PORTB |= (ledpin_mask[pin]); } else { PORTC |= (ledpin_mask[pin]); } } ...which generates the following machine code:- void setled(uint8_t pin) { 96: 28 2f mov r18, r24 98: 30 e0 ldi r19, 0x00 ; 0 if (pin < 8) 9a: 88 30 cpi r24, 0x08 ; 8 9c: 40 f4 brcc .+16 ; 0xae <setled+0x18> { PORTD |= (ledpin[pin]); 9e: 9b b1 in r25, 0x0b ; 11 a0: f9 01 movw r30, r18 a2: e0 50 subi r30, 0x00 ; 0 a4: ff 4f sbci r31, 0xFF ; 255 a6: 80 81 ld r24, Z a8: 89 2b or r24, r25 aa: 8b b9 out 0x0b, r24 ; 11 ac: 08 95 ret } else if ( pin < 14) ae: 8e 30 cpi r24, 0x0E ; 14 b0: 40 f4 brcc .+16 ; 0xc2 <setled+0x2c> { PORTB |= (ledpin[pin]); b2: 95 b1 in r25, 0x05 ; 5 b4: f9 01 movw r30, r18 b6: e0 50 subi r30, 0x00 ; 0 b8: ff 4f sbci r31, 0xFF ; 255 ba: 80 81 ld r24, Z bc: 89 2b or r24, r25 be: 85 b9 out 0x05, r24 ; 5 c0: 08 95 ret } else { PORTC |= (ledpin[pin]); c2: 98 b1 in r25, 0x08 ; 8 c4: f9 01 movw r30, r18 c6: e0 50 subi r30, 0x00 ; 0 c8: ff 4f sbci r31, 0xFF ; 255 ca: 80 81 ld r24, Z cc: 89 2b or r24, r25 ce: 88 b9 out 0x08, r24 ; 8 d0: 08 95 ret That's 12 or 14 machine code instructions executed depending on the port, which is probably about as close as you can get to 'virtually no overhead' without coding in optimized assembler.
H: Using multiple transistor to increase current handling I need to make circuit that will convert 24v to 5v 4A. I have bought LM7805 mosfets and they are converting 0-40v to 5v 1.5A. Problem is that I need minimal of 4A at the end so connecting 4 transistor in paralel should give me 6A on the output (6 * 1.5A)? I tried this and it does not work. AI: I need to make circuit that will convert 24 V to 5 V, 4 A. OK, that will be 20 W out. I have bought LM7805 mosfets ... The LM7805 is not a MOSFET, it's a complete voltage regulator. ... and they are converting 0-40v to 5v 1.5A. If you were to draw 1.5 A while powering the regulator with 40 V you would have PIN = 40 × 1.5 = 60 W and POUT = 5 × 1.5 = 7.5 W out. > 80% of your power would be wasted as heat until the device burnt out or shut down due to over-temperature. Problem is that I need minimal of 4A at the end so connecting 4 transistor in paralel should give me 6A on the output (6 * 1.5A)? Maybe. I tried this and it does not work. It is not clear what you mean be "does not work" and without a schematic I can't hazard a guess at what you have built. A linear voltage regulator is a very poor choice for your application. You need a DC/DC power converter or a switching power supply which will efficiently step down the voltage. A good one should have an efficiency of around 90% and will avoid the horrendous heat problems your present approach would have.
H: CircuitsClouds: Why is led voltage not dropping? Today I used the website http://circuits-cloud.com/ for the first time. I created the circuit below. I assume N is the forward voltage of the LED. What I would expect: VoltMeter 2 equals the forward voltage of LED2 (which is N = 1.8 V). What I see: VoltMeter shows 0.03 V As a side note, when I add two more LEDs, resulting in 3 times the forward voltage of 1.8 V which is 5.4 V, while the voltage source is only 5 V, VoltMeter2 still shows a value. Do I do something stupid? AI: The parameter \$N\$ is not the forward voltage. It looks like the simulator is using the Shockley diode equation, which provides the diode forward current as a function of the diode forward voltage. The parameter \$N\$ is the ideality factor. If you want to properly simulate an LED you should get the model parameters from the manufacturer of the LED.
H: Capacitor selection - Audio decoupling capacitor for microphone We are developing a custom application based on the TLV320AIC3111. According to the datasheet, the typical configuration has a 1uF cap on the MIC1LP line, which I assume is for AC decoupling the audio input. However, on the EVM for the same caps they've used 0.47uF. The impedance of the mic we'll be using is around 6ohms and we need a good low-frequency response (our signal can go as low as 100Hz). I need help choosing the right value and type (MLCC or tantalum). AI: What you need to do is to consider the input capacitor as part of a high pass filter. The cutoff frequency of a simple RC high pass filter can be computed using the following equation: $$f_ = \frac{1}{2{\pi}RC}$$ C is the capacitance of the input capacitor in farads. R is the input impedance of the IC in ohms. If you refer to page 26 of the datasheet, you will find this description: The input feed-forward resistance for the MIC1LP input of the microphone PGA stage has three settings, 10 kΩ, 20 kΩ, and 40 kΩ, which are controlled by writing to page 1 / register 48, bits D7 and D6. The input feed-forward resistance value selected affects the gain of the microphone PGA. The ADC PGA gain for the MIC1LP input depends on the setting of page1 / register 48 and page 1 / register 49, bits D7–D6. If D7–D6 are set to 01, then the ADC PGA has 6 dB more gain with respect to the value programmed using page 1 / register 47. If D7–D6 are set to 10, then the ADC PGA has the same gain as programmed using page 1 / register 47. If D7–D6 are set to 11, then the ADC PGA has 6 dB less gain with respect to the value programmed using page 1 / register 47. The same gain scaling is also valid for the MIC1RP and MIC1LM input, based on the feed-forward resistance selected using page 1 / register 48, bits D5–D2. The input resistance is selectable through the registers of the IC, and are used to set the gain. R therefore depends on how much gain you will need. Since you give the impedance of the microphone as 6 ohms, I assume it is a low impedance dynamic microphone rather than an electret microphone. The signal level from dynamic microphones is rather low, so I will assume you need maximum gain. According to this chart from page 26, that would be with the input resistor set to 10k: Assuming 10k, and a cutoff of 100Hz, you would need an input capacitor of about 160nF. Larger capacitors will push the cutoff frequency down. Selecting lower gain will also push the cutoff frequency down. A tantalum capacitor shouldn't be needed - the required capacitance isn't high enough to force you to use tantalum. Ceramic capacitors have enough capacitance. There shouldn't be enough DC involved to cause problems with reduced capacitance. The same applies to microphony effects from the ceramic capacitor - not enough DC voltage for it to be a problem. A 470nF ceramic capaacitor as on your evaluation board should do fine.
H: Measurement of Isolation in a Directional Coupler I want to measure the isolation of the following directional coupler (for more details of that specific component, go here). Isolation can be evaluated through the scattering parameter S21, but how can I measure it? Obviously I can measure S14, S41, S13, S43, S31, S33... but what about S21? I cannot connect port 2 to a vector analyzer because it is internally terminated on a 50Ohm load. AI: You do not need S21 because, as you point out, you can't measure it, and you're not going to use it. What's relevant to you is S34, the unwanted, ideally 0 reverse coupled signal. Your directivity, the difference between the forward and the reverse coupling, is the ratio of S31 to S34. This answer assumes you're the user of this packaged coupler. If instead you're the designer of the bare metal coupler component that's inside the package, then you will want to measure S21, but then you'll have access to all four ports of the coupler.
H: How to know if the load is variable one? For example, I have an air conditioner. How to know if such a device has a variable load or not ? NOTE: Air conditioner is just an example. My question is in general how to know ? AI: How to know if the load is variable one? Think about how the device works. Does it have a heating element? Does it have motors? Does it have controls that would change its operating setpoints? Some examples: Heaters (room heaters, hobs, ovens, etc.) are usually switched fully on or off by thermostat or timer control and rely on the thermal inertia of the heater and matter being heated to even out the surges of power. See Setting heat on electric stove for details. Is it variable? Yes. The average power consumed varies with the setting or the room temperature. On the other hand you could argue "No", the power consumed while on is always the same. Your air conditioner will have a fan and a heat pump. The fan commonly has a three-speed control (so that's variable) but the heat pump may be fixed speed and just cuts in and out as required (so that's fixed power but intermittent). Your food mixer has an adjustable speed control so that's obviously variable. Any audio amplifier's power consumption will increase with volume. Any motors' power consumption will increase with speed and with load.
H: VNH5019 motor controller So I want to use the VNH5019 motor Controller shield for the Arduino Uno for a project. My question regarding this is the voltage of the motors. Since they differ from motor to motor I'm not sure which voltage works with the VNH5019. I haven't found any data in the regarding data sheet. Is there a way to tell the controller the max voltage that the motors could handle or how does this work? I'm quite new to this topic so any help is appreciated! AI: I think you should do it the other way around. First decide what maximum voltage the motor must be running on (this could be the rated voltage or lower if you want that). Just apply this voltage to the VNH5019 motor Controller board as shown below indicated with motor power, but make sure this applied voltage is within the limits 5.5V to 24V. Using PWM you can vary the voltage that the board applies to the motor, ranging from 0V to applied voltage.
H: Powering up an ESP32 with IO extender (MCP23017) and two of 8 channel relays from an external 5 V, 10 A power supply I'm working on a project that needs an ESP32 board, IO extender (MCP23017), two of 8 channel relays and some sensors, I've powered up all of the parts from a stable 5 V, 10 A power supply as shown in this block diagram: Added: More detailed wiring diagram: After connecting all the parts to the external power supply, the ESP32 gets too hot and then it burns after 10 seconds. Could you please correct my connections, if there are any mistakes? The sensors are: 2 DHT22 2 MQ135 2 Magnetic switches Ultrasonic Thanks for your time. Update: The connections were correct. I've just added voltage dividers and it worked correctly. AI: The ESP32 runs of 3.3V (I found a schematic which I hope is the correct one). I do not have schematics of the other parts but I notice that everything runs of 5V. I suggest you check: If the I/O of all connected ports are 3V3. or If the ESP32 has 5V tolerant ports. If not you are connecting 5V I/O ports to a 3V3 processor. That might explain why it gets hot. A more dangerous way is to connect things one-by-one and check which one makes it get hot. (I would normally not recommended that but it is a quick-and-dirty way to narrow done where the problem is)
H: LM324 output voltage problem edit: I also found out that with a LM741, that problem does not occur. edit: First of all, this is not a "should I use LM324 as a comparator or not" question. Besides that, I just wonder the reason for this behaviour. I will paste one of my comments also here, since I think it describes the part I don't understand better. However, I don't understand why it is related to opAmp's capability of resposing fast. The output goes 0 as soon as V+ goes below V-. So it looks like it does not have a problem with catching up. Rather, it, not understandably(to me, at least), goes high again while no change occurs in the state of V- to V+. Why does not output stay at 0 but rises again high? I am talking about the yellow rectangle portion. The signal at the non-inverting input is higher than Vref on the inverting input for that duration. I would expect it to stay at GND as long as V- > V+. I am using LM324 model from Texas Instruments Website. Update : For all who might be having difficulties in such applications, I figured out this will be a better solution, after the answer of Marcus Müller. AI: You're getting phase reversal because you are taking the input below the negative supply rail. Add a negative voltage rail (-9V) to the op amp and it'll be OK.
H: What happens the transistors in a chip as the temperature increases? If the chip stop operating properly, then as it gets hotter the transistors fail, eventually to the point where the silicon in the transistor melts. I'm after the whole process of how a temperature increase affects the chip, until the chip is destroyed. AI: The transistors don't just "fail" at some given temperature. For silicon devices, as temperature increases, the devices get slower and their leakage increases. At some point their performance drops off to the point that the device that they are part of, be it a gate, flip flop, ASIC, FPGA, or a microprocessor doesn't meet it's spec'd performance. For industrial grade parts, this is usually 70 deg C. For mil-aero parts, it's 125 deg C. Also, other parts of the system will fail long before the silicon starts to melt. Silicon has a melting point of approximately 1400 deg C. The solder that attaches the part to the board has a melting point of around 185 deg C, depending on the type of solder.
H: How to use this BLDC and know more about it? I have this BLDC I removed from a CD Drive. I want to use it. Just for playful reasons. But I don't know what to make of it. Where to get started with on the Internet. Any help will be appreciated. AI: These are fun to play with and a good introduction to BLDC technology. Technically it is a 3 phase BLDC motor with 9 stator arms and 12 magnet poles, probably 'Star' wound, with analog Hall sensors. If it came from a standard size (5.25") CDROM drive then it is probably rated for 12V (but will run on less) and draws less than 1A in normal operation. To drive it properly you need a BLDC controller. You can try to make one with a dedicated sensored controller chip like I did, but getting the wiring right is tricky (25 different different ways it could be connected, and only 2 are correct!). Alternatively just use a standard 'RC hobby' brushless ESC, and solder the ESC's phase leads directly to the windings (no need to connect the Hall sensors). For even more fun you can try rewinding it and replacing the Ferrite 'ring' magnet with Neodym magnets for more power. If you do an Internet search for 'brushless CDROM motor' you should find many examples of driving them with an Arduino etc.
H: Why won't this 555 timer flashing circuit work? The circuit which I made shows the following behavior, when power is given to the circuit: Sometimes it lights up, sometimes it doesn't. When it does light up, it flashes properly for a few seconds but then becomes dimmer and dimmer. What is causing this unpredictable behavior? Is it the components? Or is it the breadboard? This is my first project using an IC Yellow wire shorts 4 and 8. Orange wire shorts 2 and 6 UPDATE: The circuit is now working. All I had to do was change the battery! Circuit diagram from a YouTube video where I got the circuit: 555 pins 1, 2, 3 and 4: 555 pins 5, 6, 7 and 8: AI: Looks okay to me. Try a fresh battery (almost 100% sure that’s your immediate issue), and increase the series resistor to the LED to draw less current (try 2K or so), at least temporarily. I also can’t see the color code clearly on the existing part. You seem to have two 1uF caps, put the remaining one across the battery, observing polarity, of course. The ancient bipolar 555s draw a large pulse of current when switching, so a bypass cap is desirable.
H: From voltage plot to diode circuit I'm trying to do this electronics exercise, but I can't tell if the question is wrong or I have to add something to the circuit. I have to draw the diode circuit, starting from the input and output voltage graph, and calculate its function: I've drawn this circuit: The Vo voltage is the one of R3. However, the corresponding plot of my circuit is this: If Vi >= 0.7V, D1 is ON and D2 is OFF. R1 = 3/2 * R3. If Vi <= -0.7V, D1 is OFF and D2 is ON. R2 = 2 * R3. EDIT: there is an error here and in the graph, R2 = R3/2 If -0.7V <= Vi <= 0.7V, they are both OFF. I cannot understand how it is possible to have, as required by the exercise, a positive output voltage when the input voltage is negative. Thank you AI: It is easy to satisfy the denominator of the voltage divider ratio R1/(R1+R2) which is the tangent or the opposite over adjacent in geometry. This design spec requires a +ve only output for a bipolar input and this is called a fullwave (FW) rectifier. But the voltage ratio is created by splitting open the +ve side of the FW bridge and inserting any R value such that the ratio of load to the sum of load + source = the slopes +2/3 and +2/5 for the negative input. Teachers often not tell you why silicon diodes are 0.7V. This is typical for a small rated current and depends on power rating of diode. Thus there is not standard value of current for 0.7V. But since the current is low at 0.6 V, the internal electrode+semi junction "bulk" resistance, Rs does not influence the threshold voltage much so remember this. 1mA Silicon diode= 0.6V (same as Vbe) It might be 50mA to 1A get 0.7V depending on power rating so when using kiliohm resistors , assume the 0.6V @ 1mA instead. In my diagram I put scope traces for the top diode V(t) above I(t) which shows a max of 623mV @ 29mA max which used even smaller resistors. I created the XY plot by creating Vin then Vout then "combine" then choose XY. You can rotate the plot by swapping part ends with a right mouse click.
H: Why don't my LED Christmas Lights change color at the same rate I purchased 100 LED C7 - Color Changing, Candelabra Base, Christmas bulbs. They screw into regular 120 Volt string cords that I used to have 25-5 watt incandescent bulbs in. When the lights first come on, they are all the same same color but after that, they all change colors at different rates; the same order of color but at different rates. I'm sure these are mass produced with all the same parts produced at the same time. So why the different rate of change? AI: Manufacturing tolerances, plain and simple. Every part is made with a tolerance. A 100 ohm resistor, 5%, is between 95 ohms and 105 ohms. Obviously that is affecting the timing of the various lights. They are built with a simple timer circuit such as a 555, that relies on a resistor and capacitor, and is therefore subject to the manufacturing tolerances of both, as well as itself. They do not pick up the AC heartbeat, because that would add to the cost of the bulb, I guess. And then you wouldn't buy it.
H: Cascading inverting op amp for increased gain and low noise on piezo contact microphone My aim: To create an amplifier that amplifies the output a piezo microphone with low noise and very high gain. Much higher than regular piezo amplifiers for musical instruments, I am doing underwater audio recordings. I have the following design: As-is: If I put my headphone to TP1 and GND, I can hear if I tap the piezo or the desk, but I need higher gain, so I added a new op amp in series. At TP2 I cannot hear anything, even though I know it works because if I disconnect TP1 from the first stage and and tap it with my fingers, I can hear the 50Hz humming. Questions: Why my second AD797 does not pick up the signal of the first and amplifies further, and how can it be fixed? Is it a good idea to use this inverted setup, or should I go with the non-inverted one? Generally speaking, what other kind of improvements can be made on this device? I am a software engineer, not an electrical engineer, so any suggestion is appreciated. AI: Because you have ground as the negative supply rail JP1 can only go positive which means that JP2 wants to go negative but it can't because there is no negative supply rail so JP2 is locked at 0V. Add a negative supply rail to the op amps or bias everything up to half the supply voltage. At the moment JP1 is half wave rectified because it cannot swing negative. If a half wave rectified signal is OK for you then change the second amp to non-inverting and its output will want to go positive, which it will be able to do, but will also be half wave rectified. simulate this circuit – Schematic created using CircuitLab This should do the job. Voltage gain = 1000. I don't know how low in frequency you're interested in but those capacitors will reduce the signal level below about 20Hz. If you are interested in frequencies below that then either increase the size of the capacitors or use a circuit which has a +&- voltage supply in which case you won't need any capacitors. Don't forget to put a 100nF capacitor across the supply of each op amp for decoupling. Improved version with added filtering on the biasing for improved noise performance. C2 is so big (470uF) so that you can use headphones but, when you use the circuit with a recorder, the recorder will have a higher input impedance and so then C2 can be reduced in value by a very large factor. I don’t know what the frequency response of your mic is but this circuit should now pass down to a few Hertz. You should only attach headphones to the output of the second stage via a power amp. The second stage output probably doesn't have the drive capability to drive low impedance headphones directly and the op amp may be damaged if you do attach them directly. Those 22pF caps across the feedback resistors are included to reduce high frequency noise but they will also reduce the signal amplitude at high frequency, reducing it down to about 2/3 at 72kHz. If you don't want this then leave out the 22pF caps.
H: Design a circuit that takes a 3 bit binary and makes it (x^2 - x), using a decoder of your choice i tried making the circuit for each output on its own then make the final circuit but i have a feeling that wrong any thoughts ? AI: First off, we must determine the sizes of the outputs and inputs. If x is a 3-bit number, then x^2 is 6 bits, and x^2 - x the same. Next we can make the truth table for a 3 bit input number and 6 bit output number: Input: 0 (dec) = 000 (bin), Output: 00 (dec) = 000000 (bin) Input: 1 (dec) = 001 (bin), Output: 00 (dec) = 000000 (bin) Input: 2 (dec) = 010 (bin), Output: 02 (dec) = 000010 (bin) Input: 3 (dec) = 011 (bin), Output: 06 (dec) = 000110 (bin) Input: 4 (dec) = 100 (bin), Output: 12 (dec) = 001100 (bin) Input: 5 (dec) = 101 (bin), Output: 20 (dec) = 011000 (bin) Input: 6 (dec) = 110 (bin), Output: 30 (dec) = 011110 (bin) Input: 7 (dec) = 111 (bin), Output: 42 (dec) = 101010 (bin) Now that we know what output should be produced for a given input, we can derive logic functions for each of the 6 output bits using a Karnaugh map or otherwise. Each output bit depends only on 3 input bits, so the Karnaugh maps will be easy to do if you choose that approach. I will do some of them. Clearly bit 0 of the output is always 0, so its function is trivial: Output[0] = 0 Let's do bit 1 now of the output now. We see that Output[1] is 1 only when the input is equal to 2, 3, 6, or 7. Thus we can write: Output[1] = (Input == 010) | (Input == 011) | (Input == 110) | (Input == 111) Simplifying, Output[1] = Input[1] Moving on to the next bit, Output[2] is 1 only when the input is equal to 3, 4, or 6. So we have: Output[2] = (Input == 011) | (Input == 100) | (Input == 110) Hopefully this is instructive regarding how to do this type of problem. I will leave the other bits and drawing the gate-level circuit to you.
H: What’s the correct way to disconnect this circuit board connector? Electronics noob here. What’s the correct way to unplug this cable from the circuit board? Don’t want to break it! Thanks. AI: As MadHatter also suggested, I also think this looks a JST connector, maybe from the SH connector series. I unmount these SH connector using a sharp tweezer or two screwdrivers and gently pry loose the house from the header such that the house leaves the header as straight as possible. I position the tweeser points between house and header on both sides as shown in the picture below (between the red lines on each side). While gently prying the house one side, I try to fixate the tweezer pijt other side on the header, such that it acts fulcrum. Alternating this per tweezer point, I gently lift up the house bit by bit till it comes out. For clarity, I drew and explained the process using the long side of the connector. Prying at the small sides of the connector might even go easier. I think this method is always better than pulling on the leads of the connector.
H: Why do LED headlamp bulbs need active cooling? I decided to install LED headlamp bulbs in my car in the hope that I can avoid replacing bulbs every year. I was quite surprised to find that I can't fit replacement bulbs in my car due to the bulbs having a huge heatsink and, indeed, a fan to keep them cool. I don't have sufficient space in my lamp housing to incorporate the extra hardware. Looking on Wikipedia at the relative efficiencies of halogen and LED I see that they are both hugely less efficient than I anticipated: Halogen 3.5% (typical) LED 14.9% (worst case) My usual halogen bulbs use 55 watts, and higher-output LEDs use 20 watts. Therefore, the halogen bulbs are creating: 96.5% * 55 watts = 53 watts of heat The LEDs: 85.1% * 20 watts = 17 watts of heat. Why do the LEDs need active cooling when the halogen bulbs don't - yet they create over 3 times the waste heat? AI: Here's an interesting video comparing a 25/25W LED headlight to a 90/100W halogen. Philips Luxeon H4 Headlight Temperature Output vs Halogen The passive heatsink at the rear of the LED lamp got up to 74 °C, while the halogen lamp reached 99 °C at the bulb holder. Considering the difference in power consumption, the temperature difference doesn't seem that much! The halogen lamp's quartz bulb has to reach a surface temperature of 250 °C in order to maintain the halogen cycle, and the filament inside runs at ~3000 °C, so why doesn't the outside of the lamp get a lot hotter? One answer can be guessed from the measurements at the front of the lamps. The LED lamp only got up to 33 °C, but the Halogen measured 60 °C. An LED only emits visible light, so most of the heat produced has to be dissipated by the heatsink. A halogen lamp dissipates a lot of heat too, but it also emits infrared light directly out the front along with the visible light. Some of that infrared is absorbed by the front glass, but a lot of it passes through and so does not heat up the lamp. In the graph below we see that a halogen lamp emits much more infrared than visible light. If that light was useful to us the lamp would be considered far more efficient. Halogen Lamp Spectrum The other difference is that halogen lamps are designed to run hot (which they must to work properly), but LEDs are less efficient at high temperature and may be damaged by going over 150 °C, so they need better heat sinking.
H: Basic of a charged piezo : pC/G, mV/G, Signal analysis This is the first time I use a High impedance piezo sensor and the problems went pretty quickly. Here is the piezo I used : Manufacturer part number : PKGS-00GXP1-R Rating : 0.35pC/G (+/- 15%) Range is between 0 to 50 G. I read that we always need to amplify the piezo signal when it's a charged piezo. So, I'm trying to make an amplifier for this but I can't make any correlation between the G and the voltage I get from this. Might as well say that I don't even know how to read the output from the piezo signal! Here is the amplifier schematic: simulate this circuit – Schematic created using CircuitLab Here is a scope view of a small shock. Ch1 yellow : ADC (amplified output signal) Ch2 blue : BS170 Gate (piezo output signal) How to read a piezo signal like the signal on the scope? Should I read only the first Edge from the signal like in the image below? What is pC/G ? How to make a convertion pC/G to V ? Is my Amplifier even correct? Any other low-cost suggestion ? image taken from the manufacturer of the piezo (murata) Lectures about High Impedance sensor: https://www.analog.com/en/technical-articles/signal-conditioning-for-high-impedance-sensors.html https://www.allaboutcircuits.com/technical-articles/understanding-and-implementing-charge-amplifiers-for-piezoelectric-sensor-s/ Precision : When I said low-cost, I mean, the lower the better. If I can make it under 2$ (piezo not included) it would be awesome. The sensor is near the MCU. I want to log any shock made to the device. So physically, the piezo is at 5mm of the amp-op input and the amp-op output is direcly linked to the ADC input of the MCU (Will probably add some protection). Everything is on the same PCB. AI: How to read a piezo signal like the signal on the scope? Should I read only the first Edge from the signal like in the image below? That depends on your application. I read it as an amplifier that's saturating for the first \$80\mu\mathrm{s}\$ or so, because the gate voltage is wiggly but the FET output is sitting on ground. What is pC/G ? Pico Coulombs per g, with \$\mathrm{1g = 9.81 m/s^2}\$. \$0.84 \mathrm{pC/g}\$ means that for a sudden 1g change in acceleration, 0.84 picocoulombs come out (or go into) the piezo device. Typically you'll have the thing loaded with a bit of resistance that'll return its voltage back to zero (or whatever you've biased it at). How to make a conversion pC/G to V ? If the piezo has a well-defined capacitance (look in the datasheet) then within its bandwidth the piezo itself will output a voltage of \$k / C_p\$, where \$k = 0.84\mathrm{pC/g}\$ and \$C_p\$ is the piezo's capacitance. In that case, you could follow it with a plain old voltage amplifier of the appropriate gain and bandwidth. The datasheet I found lists an output capacitance of \$390\mathrm{pF} \pm 30\%\$. That's a pretty large range. Add that to the sensitivity variation of \$\pm 15\%\$ and if you depend on the output capacitance for accuracy then your overall variation is somewhere around \$\pm 50\%\$. That means you either make inaccurate measurements or you calibrate each sensor. If you want to increase accuracy, then you'd need to make an amplifier with a low input impedance through the range of frequencies that you're interested in, and make sure it's stable. There's not nearly enough information in your question for me to know if that's necessary or desirable. Is my Amplifier even correct? Any other low-cost suggestion ? That depends on what you want out of it. I'm not sure that, with a 5V supply, you can even count on that working for every transistor you put in there, or over any sort of temperature range. I'd be far more inclined to use an inexpensive op-amp in non-inverting mode, but your "low cost" may be lower than mine.
H: Reflection Coefficient with Electric Field and Voltage In different situations the input reflection coefficient (of a waveguide, of a transmission line etc) is defined differently. Wikipedia says: The reflection coefficient may also be established using other field or circuit pairs of quantities whose product defines power resolvable into a forward and reverse wave. For instance, with electromagnetic plane waves, one uses the ratio of the electric fields of the reflected to that of the forward wave (or magnetic fields, again with a minus sign). So, let's consider for instance a coaxial cable. We may define its input reflection coefficient as the ratio between reverse and the direct travelling voltage waves (V-(z)/V+(z)), but also as the ratio between the reverse and the direct travelling electric fields (E-(z)/E-(z)). Are these two reflection coefficients the same? AI: A couple weeks ago, I answered one of your earlier questions like this: Remember that when we defined the electrostatic potential difference (aka "voltage"), $$V=-\int \vec{E}\cdot d\vec\ell,$$ we called it the electrostatic potential difference because it is only strictly valid in electrostatics. When we use this concept in AC circuits, we're using it as an approximation only (usually described as the lumped circuit approximation). In particular, in the presence of time-varying magnetic fields, we can't count on this \$V\$ to be independent of the path over which we take the integral. In transmission lines, we are definitely dealing with time-varying magnetic fields, so we can't expect the electrostatic potential difference to be well defined. We define an approximate potential at a point along the transmission line as the negative integral of the electric field from one conductor to the other at that point. [emphasis added] The voltage at a point on a transmission line is defined by an integral of the electric field between the conductors at that point. So if you double the electric field, you double the voltage, or if you halve the electric field you halve the voltage. So your two definitions of the reflection coefficient are equivalent, provided the transmission line is well-behaved enough to let you actually define a voltage on it.
H: Size of Decoupling Capacitors in Digital Circuits There are plenty of questions about how to size decoupling capacitors in digital systems, but I have not found the answer to my specific question. They are some capacitances that are usually put externally in circuits with MCUs or other digital circuits between GND and VDD. Their main role is that of reducing the power supply fluctuations. One of these kind of fluctuations is the so called ground bouncing, which is the drop of the voltage supply on the parasitic resistance of the supply line during the instants in which transistors absorb more current. It may be seen as a drop of VDD, or a rise of VGND, as shown in this graph. I have seen in some datasheets (and the same has been written in some other questions) that usually they are chosen with 0.1uF capacitance (and surely not more than 1uF). But I do not understand the specific reason of putting this upper bound. I understand that their capacitance must be quite high (high capacitance = high smoothing effect), but why do we stop at 0.1 or 1uF? Why not 10uF, 100uF, ideally infinite F? For instance, in stabilised DC voltage supply, I have always used (in parallel, after Graetz Bridge and before the voltage regulator) an electrolytic capacitor of 15.000 uF, and its purpose was, at least conceptually, similar to that described before. AI: Parasitic inductance. Larger caps tend to come in large packages and larger packages have more parasitic inductance and therefore are not effective at high frequencies. The limiting factor for decoupling low frequencies is capacitance, but the limiting factor for decoupling high frequencies is parasitic inductance. Ideally, you're better off using the tiniest possible package you can get, with the largest amount of capacitance available in that package, and then using a lot of them in parallel until to achieve the total capacitance you need to decouple those lower frequencies. If the parasitic inductance of the smallest package you can get is still too high for the high frequencies you need to decouple, then you need go to PCBs with embedded, distributed capacitance. ADDITION: Inductors look a bit like big resistors to high frequencies and small resistors to low frequencies. The entire reason we need decoupling capacitors in the first place is because all wires and traces have inductance and sudden changes in current demand by digital circuits switching causes voltage drops or spikes via these inductors if the load current is flowing through them. This appears at the power pins of the digital circuits as voltage spikes or voltage droops which disrupt the circuit's proper function. Similarly, the parasitic inductance in a capacitor is in series with the ideal capacitance and prevents high frequencies from flowing through them easily, which is required if the capacitor is going to properly decouple.
H: How to mux 10 sensor units with 4-pin that must communicate with a single unit with 3 programmable input I have 10 sensor units, each unit has 4 pin Vcc, Gnd, Digital out and analog out. The main control unit that must receive the outputs has 2 pin for Vcc and Gnd and the others 3 pins are freely configurable for both digital and analog I\O operations. I want to connect all the 10 sensor units at main control unit, but isn't strictly needed that the output of all the 10 units is received exactly at the same time (so eventually they could be alternated with some little delay each other). How should I accomplish this? Notes: It's enough just analog output of each sensor for values, the digital isn't strictly needed The output voltage of each sensor is in the range 0.1 - 5 Vc AI: You can do this with only two chips: 16-channel analog mux with 4-bit binary address input (e.g. ADG706) and 4-bit binary counter with "clear" input (e.g. 74HCT393). One control pin is used to reset counter to 0, another to increment counter (change mux address), and the last one is used as analog input from mux. Update Here is the schematics. I've used whatever symbols were available in the Eagle, so the pin names are different from those in the datasheets. But the pinouts are compatible, so it should be trivial to figure out. And, of course, you can use any level-compatible inverter/nand/nor chip for IC4. Something like 100R resistors should be sufficient to protect sensor outputs while not interfering much with ADC. Oh, and don't forget to connect Vee of the muxes to the ground.
H: Regulated input relay switch simulate this circuit – Schematic created using CircuitLab The control input may vary. What I want is, the relay will only switched on if the input voltage on R1 is at least 5 V. It works but the relay produce "buzzing sound" (like in the middle of switched OFF to ON but not enough voltage). Do I need more than this simple schematic ? Any suggestion would be appreciated, including op-amp voltage comparator example very welcome. AI: Here's a simple circuit that will do what you are asking for. There should be a 100nF bypass capacitor on the 12V supply as well. Input voltage can be -0.3V to +12V. simulate this circuit – Schematic created using CircuitLab The op-amp is used as a comparator in this case. R1 and D1 form a +5V reference voltage. R3 and R2 provide a bit of hysteresis so the relay snaps on or off without chattering even if the input voltage is changing slowly. You can replace R1 + D1 (5.1V zener diode) with 2K & 1.5K resistors respectively if the 12V supply is clean and well-regulated.
H: How do fireplace direct ignition control modules work? My gas fireplace has an electric spark ignition that isn't sparking. I'd like to 'test' it, but I'm not sure what a working one would be doing. The spark contact has 120VAC with 4A current when I hook up my multimeter from the 'high voltage' to the 'burner return'. I would have thought it'd be enough to cause an arc of sorts, but even when I use probes that are very close together and attached to the terminals, no sparks. How, generally, do these things work and where might I start in debugging it? Should I expect sparking with that kind of current? I'm especially curious if the black circular part in the bottom left can be identified (there are no markings on it and I don't even know what kind of thing it might be). This control module is RAM-1MC1-06, if that makes a difference. AI: The voltage at the igniter is probably high enough to damage your multimeter, if you succeed in getting it to operate. The high voltage transformer output (the tab on the black cylinder) goes to the electrode not to the mains. You should not be fooling with this safety-critical subsystem, please cease before you electrocute yourself or blow up your house. As to how it works, the incoming mains is stepped down by the transformer T1 and rectified and filtered, then likely regulated down to 5V to power the microcontroller U1 which controls the ignition sequence and gas valve actuation via the Omron relay, including flame detection, limited restart attempts and safety lockout. The safety redundant components near the connector are likely a flame rod type detection scheme. It’s very important that the gas not flow for more than a very brief time without a flame, lest the gas fill your house and eventually find a spark with unfortunate consequences. The spark itself is typically generated by triggering an SCR to discharge a capacitor into the primary of transformer T2, creating a high voltage spark at double mains frequency, and not isolated from mains (so an electrocution hazard). The board has redundant parts for safety, the micro has safety-critical approved hardware and firmware and the circuit is conformally coated. It is designed to fail only in a safe manner (to sufficiently high probability to satisfy UL and CSA that it won’t kill too many people), which it apparently has.
H: What happens when transistor operates in saturation region for constant current source I am learning about the constant current sources and I found this video What I dont understand is that, when the forward voltage of the LED is increased from 1.7V to 3.3V, and our Emitter voltage is maintained at 2V, the voltage across the Collector Emitter Junction is decreased. This makes the transistor to work in the saturation region. Why does the transistor in saturation region does not help in providing the constant current. In all the cases mentioned in the screenshot, Ie=Ve/R which is always 2V/100ohms, 20mA. Since, in all cases (different LED Forward voltage and same Vdd supply voltage), we are getting the same load current. So, what's wrong with the transistor operating in saturation region in this case? Please clarify if I am wrong AI: when the forward voltage of the LED is increased from 1.7V to 3.3V, and our Emitter voltage is maintained at 2V... In saturation β reduces towards zero as VCE goes to zero, so the Base draws more current. In your circuit that will cause greater voltage drop across RB1, so the Emitter voltage won't be maintained at 2V. Instead it will go down, causing the Collector current to also go down. The LED will get 3.3V, but at lower current. Here's the result of simulating your circuit in LTspice, with LED voltage varying from 1.7V to 4.5V:- Between 1.7V and 2.9V the transistor does a good job of keeping the LED current (red line) constant. Above 2.9V the the transistor goes into saturation as the voltage between the Collector (green line) and Emitter (blue line) drops below 0.2V, causing β to reduce and requiring more Base current (magenta line) to maintain current through RE. But the higher Base current also reduces Base voltage as it draws more current through RB1, which in turn reduces the Emitter voltage. With less voltage across RE (as well as more current coming from the Base instead of from the Collector) the Collector current also reduces. In this region the transistor is acting more like a resistor than a constant current source. If the voltage divider was 'stiffer' and held the Base voltage constant despite the increased Base current then the transistor would go into hard saturation, with the Base supplying enough Emitter current to keep VE close to 2V even if the Collector current dropped to zero. With a 5V supply and the Emitter at 1.8V there would not be sufficient voltage left to light a 3.3V LED.
H: How does a microcontroller provide a frequency higher than its crystal frequency? I have a microcontroller which is connected to an 8MHz crystal. I have a schematic which has a QSPI flash IC connected to it whose clock is provide by the micro and happens to be 48MHz. I want to understand how the 8MHz is increased to 48MHz. Is it a PLL which does this? If so how? How can I determine the maximum frequency that the microcontroller can provide from any of its pins? AI: Many microcontrollers do have one or more PLL inside them, but also internal clock oscillators. In most complex devices, different peripherals can be clocked with different clock sources as well. What a PLL does is that it has a oscillator inside it (called VCO) and it uses the crystal (8 MHz in your case) as reference. In this case to get 48 MHz, the VCO output would be divided by 6, and compared that the divided VCO output matches the crystal frequency. This means that VCO output is 6*8 MHz or 48 MHz. The maximum speed a microcontroller can output on its pins is said in the datasheet.
H: Interfacing LIN bus with CAN On the following figure, LIN is used to build subnetworks from a CAN bus: Is there any standardized way to interface these two buses (e.g. for addressing a LIN node from a CAN node)? I read an article on Hackaday that states that this is the case: There is even an optional transport layer spec that is compatible with CAN bus and makes it easier to integrate the local LIN cluster with the bigger network. However, I cannot any specification related to this. Is this really standardized or is everyone doing it differently? AI: It is ISO 15765-2 and is mentioned in "3.2 Transport Layer" of the LIN spec.
H: Should you not go above max VGS for a Nmos? I wanted to switch a relay with a raspberry zero, which uses 3.3v, after looking at my 16 years old electronic engineering notes (I'm in IT now), I moderatly re-understood how nmos works (controlled by tension only, once activated is equivalent to a resistor, RDsOn). They are tension operated not current operated so less math to do, that is why I choose them. After some quick googling I found that some people use IRLZ34N. So I did this : In order to switch on a waterpump for 15 seconds each day. It has been working for 2 months now. My question is, why doesn't it blow up? since I exceeded Max VGS. Thanks. AI: Max VGS is given in the Absolute Maximum Ratings section of the datasheet it is given as 16V in the one I have seen for this device. irflz34n datasheet The number you are looking at is the threshold voltage which is where the transistor is fully on under low current conditions. It is given a minimum and maximum value for any one transistor because of variations in manufacturing changing this value. This is not intended to give the operating range for the transistor. Using the transistor as a switch it is good to drive the gate higher than the threshold voltage. Somewhere in the data sheet you should have a graph of either RDSon or drain current at various gate voltages. From this you can see that the ability to drive higher currents is better as you drive the gate voltage higher.
H: Why did my Atmega328p chips stop working? I am fairly new to embedded programming. I bought some Atmega328P U chips (not Atmega328P-PU). I have two Arduino boards and the chips worked just fine, and were letting me upload sketches. One of those chips stopped working while trying to upload bootloader using one Uno board to other. I bought a usbasp programmer like this one - (https://www.fischl.de/usbasp/bilder/usbasp_kit.jpg) which has two jumpers (it is set to J2). I used ProgISP software from Zhifengsoft, which successfully read my chips. But after clicking 'ERASE', the Atmega chips did read for a few times and then stopped responding at all. Now, everytime I click read (RD) on the software, it says CHIP ENABLE PROGRAM ERROR. However, it successfully reads an Atmega8A chip I have, which suggests something is wrong with only my Atmega328P chips. I do remember the setting 'PROGRAM FUSE' was enabled at time of erase. What has gone wrong with them? Is there a way to recover them or they are just useless now since software cannot read them anymore? Do I need some other programmer and technique to use that I am not aware of? [UPDATE] I tried using Arduino IDE and Khazama AVR programmer software which give the same error for my Atmega328P chips - "target doesn't answer. initialization failed rc=-1. Flashw riting fail. However, as usual, Atmega8A chip programs just fine. AI: Most likely you programmed the fuse bits into such values that the chip does not work any more in the current hardware as it might expect different clock hardware now. Don't program the fuses unless you thoroughly understand their operation. Depending on what the new fuse settings were, it might be recovered by giving it external clock in place of crystal. If the ISP disable fuse is set, it can't be programmed via ISP any more, and you need a parallel programmer, so it might be cheaper to just get a new MCU instead.
H: Why isn't solder melting at 370 °C? I recently tried to use a soldering iron for the first time, but I don't seem to figure out how to use it properly. In the articles I've read about how to solder properly, it is commonly stated that the process is quite short: you touch the connection you want to solder for a few seconds, then you apply the solder for another few seconds, and that's it. This, however, is not what is happening in practice. When I apply the solder, nothing happens: the solder wire (provided with the soldering iron) just stays solid, and if I keep touching the solder with the soldering iron for, say, a minute or two, at some point it may start melting, sticks to the iron, and remains there in a solid form, then melts again a minute later. I was thinking that this is due to the fact that the soldering iron is not hot enough, but the manual of the soldering iron says that the melting point of the solder wire is 215 °C and the general operating temperature is 270-320 °C, while I've set it up to 370 °C, and tried even a few times to push it up to 400 °C, even if the manual claims that “the temperature for general use should not exceed 380 °C.” Since the problem is not the temperature, what am I doing wrong? Notes: The soldering iron is new. The tip is clean. The temperature of the tip is reported on a small LCD screen (i.e. this is not the temperature I've set, but the actual temperature of the tip). AI: Are you sure the tip is actually getting hot? Not just what the stations sensor (which is probably nowhere near the actual tip) says. Try touching it to a small block of wood and see if it smokes/chars. Does the solder melt if touched only to the iron tip, not to the joint? It sounds really that the tip is not getting hot enough, or, that the tip is too small for the joint being soldered (not enough thermal mass) and so applying it to the cold metals of the joint is robbing it of its heat capacity and cooling it down. I would also obtain some good quality solder such as Kester or Multicore - the stuff supplied free with the iron (im going to guess its a chinese unit?) is likely rather poor.
H: Do multimedia speaker systems run on AC power rather than DC? I am talking about the typical multimedia speakers that are generally connected to the computer’s audio line-out point. For example, my power adapter for Altec Lansing multimedia speakers says Input 230 V AC Output 9 V AC. So 9V AC is fed into the device. What happens thereafter is a black box for me. If I correctly remember during college studies I had seen audio amplifier circuits for which power input was DC. Even I had assembled one audio amplifier using some Philips TDA chip using a ready to solder hobby kit that would take DC input to power it. I would give the stereo output of my Walkman to it and it would drive the speakers with amplified output. Is it that the 9V AC is then internally converted to 9V DC using bridge rectifier which is inside the speaker cabinet or does the entire amplifier circuit operates on 9V AC? AI: The answer to "why is it made this way?" is quite often "it was five cents cheaper to make." The audio amps always run on DC. Modern multimedia loudspeakers would probably use a Class D chip requiring a single positive supply, powered by a switching wall wart. Older chips require a symmetric power supply (like +15V and -15V) or a single supply if they are bridged. This presents a problem... Getting a product certified for safety is expensive if it has a mains input and mains voltage inside. It is cheaper to use an AC adapter which is already certified. The same adapter can be used for lots of different products. If the AC adapter is made by a specialized manufacturer, certification costs will be spread even more. When using an AC adapter, what is removed from the product enclosure itself is cost, and this cost lies on the mains voltage AC side. An adapter also removes heat from the enclosure, and .. heat also makes the device cost more, makes it bigger, etc. An ugly wall wart is the match made in heaven for every modern sleek and thin device ... While it would be possible to use an AC adapter providing a symmetric +/- supply, this would make the adapter more specialized, thus harder to sell for the company which manufactures it. It would need a 3 pin connector, again more expensive and less standard than a DC barrel connector. All this means that, if you want a +/- symmetric supply, an AC adapter which outputs AC is a good solution. The device being powered will contain a rectifier (two half-wave rectifiers) and capacitors to make positive and negative DC. This has more ripple than a transformer with proper full-wave rectification, but for cheapo multimedia speakers, no-one cares. Even if the amplifier only requires one positive supply, you want low impedance between the supply caps and the amplifier circuit, which means the caps should be in the device, not in the adapter. And you don't want to pay for caps in two different places when you can pay for just one! Every cent counts. Switching supplies make up for this by being cheaper and lighter (thus cheaper to transport and sell) than transformers... ...but they are a specialist job, and EMI certification is expensive, so your average tech equipment manufacturer will either outsource or purchase from a specialized manufacturer. And this is how you get a super thin sleek flat TV with a big fat power brick.
H: Where do flip flops "save" their state? From what I could understand, the state of a flip flop is the current value it is holding on to, i.e., the value that was previously inputted and is now saved for future use. My question is, where does it actually save that state? and how does it know? AI: The state of the flip-flop is stored as the voltage on a particular signal node inside the flip-flop. This voltage is maintained by using a positive feedback loop within the circuit. When the appropriate input conditions are applied to change the state of the flip-flop this positive feedback loop is broken and the new value is stored (by changing the voltage on the particular node).
H: How does "imprinting a voltage" work? In products such as KNX there are only two wires used to communicate between a potentially large number of devices, and also provide power at the same time. For example in KNX the normal voltage on the bus is 30V, and to transmit a bit the voltage changes +/- 5V, see page 33-36 of http://knx.com.ua/attachments/article/132/KNX-basic_course_full.pdf What I would like to understand is how such a circuit can be built. What I can see in the linked pdf is after the power supply there is a "choke" which has close to 0 ohm resistance for DC and very high resistance to AC, I understand this prevents the power-supply from overriding the data. But how is such a choke constructed? Furthermore, I would like to understand how to construct a device that can raise/lower the voltage on the bus by 5-6V without using external power. I do not have a background in electrical engineering, I studies computer science, and have a basic understanding of resistors, capacitors, inductors, and I would like to be able to model such a circuit, i.e., in ltspice to understand how it works (I am not searching for a working model, my goal is to understand it). AI: Remember that a capacitor acts as a open circuit for DC, and as a short circuit for (high-enough frequency) AC. Complementarily, an inductor acts as a short circuit for DC and an open circuit for (high enough frequency) AC. So you can construct a bias tee like this: simulate this circuit – Schematic created using CircuitLab Now the load sees a DC current coming from VDC through the inductor, and added to that an AC current coming from VAC through the capacitor. The circuit you described in your question works essentially the same way, but possibly a bit more elaborate (but since you haven't shared the circuit I can't say exactly how).
H: Help me find the best PCB design and why that is the one? From the worst to the best design due to impedance parameters that affect the signal i would do it as a) > b) > d) and c) because c) is the one with the lowest lenth and lowest curves, am I right? EDIT: I know that all the designs could work but I want to know which one is the best one and the reason for that. AI: It's very unlikely that there's any design where one of these configurations would work and the other three would fail. If you're designing this to carry a low speed, high current signal, then it would be better to either Move the two ends of the trace closer together (i.e. move R2 closer to PL1) or use a wider trace, or use a parallel trace on another layer, or ... If no other changes are possible, then possibly c is better than the other options, but more likely they'll either all fail or all work. If you're designing to carry a high-speed signal, then it would be more important to be sure that your ground-plane beneath the trace is unbroken, that the trace width is correct to provide controlled impedance, that the trace-to-ground separation on the top layer is not affecting characteristic impedance, that the connectors are adequate for your frequency content, etc., etc., before worrying about the difference between the different trace paths.
H: Calculation of base current and what decides the current through collector-emitter branch I have the below circuit. Its not a homework material. I am understanding how to analyze the transistor circuits. Below are my questions while trying to analyze : If I am given the below circuit, how to determine whether the transistor is operating in active/saturation/cut off region? How is the base current determined in the below circuit when there is not base resistor given? The voltage at the base is calculated to be 1.4V. But how is base current calculated? What determines the current through the collector-emitter branch? Is is the emitter resistor or collector resistor? To determine the current through the collector-emitter branch, we need to find the region of operation of the transistor, right? How to find Ib and Ic? Can someone help. AI: If I am given the below circuit, how to determine whether the transistor is operating in active/saturation/cut off region? We can, for example, assume that the BJT is working in an active region. And do the calculations based on this assumption. Because if our assumption is wrong we get "unreal" results. How is the base current determined in the below circuit when there is not base resistor given? The voltage at the base is calculated to be 1.4V. But how is base current calculated? We can do it in multiple ways. The first way is to write a KCL equation and solve it. \$I_1 = I_B + I2 \$ (1) And the II Kirchhoff's law we can write: \$V_{CC} = I_1R_1 + I_2 R_2\$ (2) \$ I_2 R_2 = V_{BE} + I_E R_E\$ (3) Additional base on this: We can write \$ \large I_B = \frac{I_E}{\beta + 1}\$ (4) We can solve this for \$I_B\$ current $$I_B = \frac{R_2V_{CC} - V_{BE}(R_1+R_2)}{(\beta + 1)R_E(R_1+R_2) +(R_1R_2) }$$ But there is also a simpler way to solve this circuit by using Thevenin's theorem. We can replace the voltage divider (this gray rectangle) with his Thevenin's equivalent circuit: $$V_{TH} = V_{CC} \times \frac{R_2}{R_1+R_2} = 1.4V$$ $$R_{TH} = R_1||R_2 =\frac{R_1 \times R_2}{R_1 + R_2} \approx 2.8k\Omega$$ So, we end up with this circuit: And base on KVL we can write: \$V_{TH} = I_B R_{TH} + V_{BE}+I_E R_E\$ And we also know that \$I_E = (\beta +1)I_B\$ so we end up with \$V_{TH} = I_B R_{TH} + V_{BE}+ (\beta +1)I_B R_E\$ and the base current: $$I_B = \frac{V_{TH} - V_{BE}}{R_{TH} + (\beta +1)R_E } = \frac{1.4V - 0.7V}{2.8k\Omega + 201*180\Omega} \approx 18 \mu A$$ $$I_C = \beta I_B = 200 \times 18 \mu A = 3.6mA$$ $$I_E = (\beta+1) I_B = 201 \times 18 \mu A = 3.618mA$$ $$V_E = I_E R_E = 0.651V$$ $$V_C = V_{CC} - I_C R_C = 2.552V$$ What determines the current through the collector-emitter branch? Is is the emitter resistor or collector resistor? If the BJT is on the active region (\$V_C > V_E\$) the truth is that the \$V_{BE}\$ voltage determines the current through the collector-emitter. Or the base current if we prefer the "current control" point of view. How is possible that with same Ibase there is more than one Vce?
H: logic gates combined with R-C network often violates absolute max ratings, does that hurt? I know the theory but don't have much practice with this, so while I am experimenting with little success I ran into this question: what are the bad effects by violating the Absolute Maximum Ratings for a multivibrator build out of logic gates? Here is the relevant part of the schematics, an RC network combined with some logic gates, e.g. as in CD4011: This is the basic schematic that you will see for a-stable and bi-stable multivibrators. Often you will see a big resistor between C and the input of G2, but because CMOS gates have virtually zero input current, that resistor does nothing and has zero volt. Online example: https://www.electronics-tutorials.ws/sequential/seq_3.html schematic: https://www.electronics-tutorials.ws/wp-content/uploads/2018/05/sequential-seq10.gif When the outputs of G1 and G3 are different, C will be charged and a voltage will be build over C. The voltage over C cannot exceed 5 V, assuming that the gates are powered with 5 V. According to the specs, e.g. https://www.ti.com/lit/ds/symlink/cd4011b.pdf , the output of the gates can be within 50 mV of the supply voltage, if "1", or ground, if "0". But let's be realistic, the idea is that G2 will switch at some point. The transition range is about 1.5 - 3.5 V, so C will be charged at least to 1.5 V when G2 switches over. When G1 switches, its output changes with about 4.9 V. With 1.5 V on C, the input of G2 will then get a voltage of either 6.4 V or minus 1.4 V. With 3.5 V on C, those voltages are 8.4 or minus 3.4 V. My point is that such input voltages are way out of spec. The Absolute Maximum Rating for inputs is 0.5 V above the power supply (Vdd), and 0.5 V below zero: When designing something, you always try to stay within the manufacturer specs of the components. Specs often state that operating a component outside the absolute maximum ratings may affect reliability, which in clear text means that the component may become permanently defective, or "broken". There is no guarantee that it gets damaged after some seconds or days when the input is beyond abs max rating. Because I see so many applications of RC networks with logic gates, I am really wondering if we should take those Abs Max Ratings serious. Update: Two commenters provided answers that made me understand how this issue works, thanks! I also drew a schematic, but don't want to present as an answer, hence this update. In real R-C applications there is an extra R2, and the logic gate has protection diodes that play an active role: The idea is to make the timing depending on C1 and R1, so R2 should be significantly larger than R1. R1 should be at least 5 kOhm because the 4011 has a maximum of 1 mA output current. The input of the logic gate is high-ohmic because of the FET, if the input voltage is within 0 to 5 V. When the input voltage raises above power supply or lowers below zero because of G1 switching, one of the input protection diodes will be conducting. R2 must be large enough to limit the input current to 10 mA, just barely visible on my screenshot of the absolute maximum ratings, but this will always be the case because R2 >> R1 and R1 > 5 kOhm. The answer is that the Absolute Maximum Ratings are NOT exceeded because of the R-C network. Even with R2 of zero ohm, because G1 cannot deliver an output greater than 10 mA, but then the time constant is not just R1 times C1. AI: If you look at the online examples more carefully, you'll see they're not like the schematic you shared. Here's the online example: [source] Notice that in this example, the capacitor is not directly connected to the input of any gate (only to the output of U2). The resistor connected between the capacitor and the inputs of the gates means that the current that can be fed through the capacitor to those gate inputs is limited. If the resistor values are 5 kohms, and the U2 output switches between 0 and 5 V, then only 1 mA could possibly flow through the resistors into the input pins of U1 or U2. This current limit is enough to prevent damaging the gates. (Aside: with older CMOS chips (like 4000 series) you may have to watch out for latch-up behavior if inputs are driven outside the rails even briefly. Luckily for me I've never had to design with such old parts, so I can't give you more details on exactly what is needed to avoid the problem) Edit In comments you say these resistors carry no current. That is true when the input voltage is between the supply rails. But consider that the input pins don't just connect to CMOS gates. There are diodes connected between the input pin and the rails to protect the CMOS gates from ESD currents: [Source] When the input voltage is between the rails, these diodes are reverse biased, and, as you have said, there is very little current through any resistor connected to the input pin. But if the input voltage goes above Vdd or below Vss by more than a diode drop, one or the other of these diodes becomes forward biased and you can no longer assume there's no current through the resistor connected to the input. Since you're specifically asking about the case where the capacitively coupled signal drives the input voltage above or below the supply rail, you can't ignore these diodes. If your input source is current limited (by the resistor) then these diodes will also clamp the input voltage to not go excessively outside the rails, and the IC will not be damaged. (but there are a number of gotchas with relying on this technique, particularly in low-power circuits, so if you design a circuit this way be sure you know where the current will go after going through the protection diode and that it won't affect the operation of your circuit in some other way)
H: What does this notation do in multi-meter? What does this red marked area do in this multimeter? UT33B Palm-Size Multimeter Model: TOL-00032 AI: Those three are battery test modes for different voltages. It differs from the DC voltage range by placing a small load on the battery.
H: How to remove/trim MCP4725 DAC offset? I'm using MCP4725 (datasheet) module, VCC is connected to a 4096V reference voltage. there's a steady 23mV offset: 0 - 23mV 50 - 73mV 100 - 123mV ... How can I zero this offset error? From the datasheet: AI: At least two ways come to mind. 1) Put a summing amplifier after your DAC adding in a -23 mV offset to the signal. Need to be careful and use precision resistors so that you don't introduce more error than the offset you're trying to correct for. 2) Do it in software, which was suggested by the data sheet and Elliott Alderson. Just subtract the digital equivalent of 23 mV from the desired voltage value before writing it to the DAC. You would have to do some sort of limiting or saturation operation on the low end of the range since the DAC won't handle a negative value properly, to prevent wrap-around of the DAC output.
H: mATX motherboard JFP1 header: Does not require pull-up or pull-down resistors, right? As per some of the mATX motherboard specifications, the JFP1 (Front-Panel connector #1 jumper), the purpose of the various pins is as per this graphic: As per the description of the pins, I get the impression that the motherboard already has the required pull-up resister onboard, and for the 2 LEDs and 2 switches, I need only some LEDs (s.a. 5mm ones) and some momentary PCB-mount push-button momentary to make the circuit , right ? AI: Yes, normal case just has wires to LEDs and buttons like your drawing.
H: What is reason of having 3 phase in the transmission in cities? What is the reason of having 3 transmission lines as three phases ? AI: Electricity is generated as three-phase, for very good reasons that I won't go into here, and if you distributed only one of those phases, then you have what's called an unbalanced load (in fact, it's about as unbalanced as you can possibly get), and power people hate those--they cause all kinds of problems with power distribution and--don't quote me on this--i'm pretty sure they can even damage generation equipment when they're really bad. So instead, you distribute all three phases and just do single-phase (or split-phase) in each individual building. (I'm a bit rusty on power transmission, so please feel free to correct any mistakes or misrepresentations in this answer!)
H: Attenuators in Waveguides Let's consider for instance a rectangular waveguide with TE01 mode. As shown here, a possible attenuator may be realized with a metal card placed so that it is tangential to the electric field. Here the explanation of this behaviour. There are some things I do not understand: 1) Why should it be placed with electric field tangential to it? I'd say that the reason is that a tangential electric field may induce a surface current that dissipates power on the card. But why does an orthogonal field keep undisturbed? I'd say that it would induce an orthogonal current inside the card, which also dissipates power. 2) Is that card a good conductor, a very good conductor, or a bad conductor? If it is a very good conductor, I understand that an orthogonal electric field does not induce current because current does not flow internally in a perfect conductor. But if it is a very good conductor, why do we have this big dissipation of current with a tangential electric field? It induces me to think it is not a good conductor, but just a resistor. AI: But why does an orthogonal field keep undisturbed? I'd say that it would induce an orthogonal current inside the card, which also dissipates power. Remember the conductive part of the pad is just a thin film coated onto the glass plate. It has to be thin presumably to have enough resistance to not disturb the field significantly. If it did, instead of absorbing the signal it would reflect it back towards the source. This would still reduce the forward travelling signal, but might be detrimental to the operation of the source. Since the film is so thin, there's nowhere for a significant current to flow if you apply the electric field orthogonal to its surface. Is that card a good conductor, a very good conductor, or a bad conductor?' It has to be only moderately conductive. If it were a very good or ideal conductor, it would produce reflections rather than absorption when placed in the waveguide.
H: Frequency response of this circuit Im not sure how to find the frequency response (\$H(jw)=V_o/Vin\$) of this circuit Can anybody help please? AI: Well, we have the following circuit: simulate this circuit – Schematic created using CircuitLab Now, we know a few things: I will do the analysis in the (complex) s-domain (using Laplace transform); The input impedance is given by: $$\text{z}_\text{in}\left(\text{s}\right)=\frac{\text{R}_1\left(\text{R}_2+\text{sL}+\frac{\text{R}_3\frac{1}{\text{sC}}}{\text{R}_3+\frac{1}{\text{sC}}}\right)}{\text{R}_1+\text{R}_2+\text{sL}+\frac{\text{R}_3\frac{1}{\text{sC}}}{\text{R}_3+\frac{1}{\text{sC}}}}=\frac{\text{R}_1\left(\text{R}_2+\text{sL}+\frac{\text{R}_3}{1+\text{sC}\text{R}_3}\right)}{\text{R}_1+\text{R}_2+\text{sL}+\frac{\text{R}_3}{1+\text{sC}\text{R}_3}}\tag1$$ The output voltage is given by: $$\text{v}_\text{out}\left(\text{s}\right)=\text{i}_\text{out}\left(\text{s}\right)\cdot\text{z}_\text{out}\left(\text{s}\right)\tag2$$ The output impedance is given by: $$\text{z}_\text{out}\left(\text{s}\right)=\frac{1}{\text{sC}}\tag3$$ The output current can be written in terms of the input current, as follows: $$ \begin{cases} \text{i}_2\left(\text{s}\right)=\frac{\text{R}_1}{\text{R}_1+\text{R}_2+\text{sL}+\frac{\text{R}_3}{1+\text{sC}\text{R}_3}}\cdot\text{i}_\text{in}\left(\text{s}\right)\\ \\ \text{i}_\text{out}\left(\text{s}\right)=\frac{\text{R}_3}{\text{R}_3+\frac{1}{\text{sC}}}\cdot\text{i}_2\left(\text{s}\right) \end{cases}\tag4 $$ The input current can be rewritten as: $$\text{i}_\text{in}\left(\text{s}\right)=\frac{\text{v}_\text{in}\left(\text{s}\right)}{\text{z}_\text{in}\left(\text{s}\right)}\tag5$$ Now, we can write: $$\mathcal{H}\left(\text{s}\right):=\frac{\text{v}_\text{out}\left(\text{s}\right)}{\text{v}_\text{in}\left(\text{s}\right)}\tag6$$ Using the information from above we get: $$\mathcal{H}\left(\text{s}\right)=\frac{\text{R}_3}{\text{R}_3+\left(\text{R}_2+\text{sL}\right)\left(1+\text{sC}\text{R}_3\right)}\tag7$$ Using your values we get: $$\mathcal{H}\left(\text{s}\right)=\frac{2000}{3600+\text{s}\left(170+\text{s}\right)}\tag8$$ So amplitude: $$\left|\underline{\mathcal{H}}\left(\text{j}\omega\right)\right|=\frac{2000}{\sqrt{\omega^2\left(21700+\omega^2\right)+12960000}}\tag9$$
H: Why is the SR Flip flop edge enabled I'm struggling to understand the diference between a Latch and a SR Flip Flop, I know that a latch is level activated, and the SR Flip Flop is edge activated but if the circuit is the same, why is the behavior diferent? I watched this video from Neso Academy, I really don't know why the latch becomes edge active if I use a clock. If i send a 1 the latch is active, so why isn't the SR flip flop active when the clock is 1? Am I missing something or is there an error in the video? AI: The only time when SR latches are edge-sensitive is the release of SR input contention. When both Set and Reset are active then both outputs Q & Q* are asserted "1". Then after the 1st input {S,R} edge is removed from the active state, only the corresponding output {S=>Q, R=>Q!} will change. A clock enabled SR Latch is a MISNOMER if called a Flip Flop as it not a Flip Flop {D,T or JK} Also this would cause an unstable output if both S=R=active when Clock enable goes low. Conclusion: Youtube video is wrong.
H: Do Protected Power MOSFETs need a flyback diodes? There are protected MOSFETs under various marketing names available (e.g. omnifet, hitfet, intellifet, etc). These devices include clamping diodes and overcurrent/temperature protection. They also seem to suggest that inductive loads can be connected directly: Infineon-BSP78: Datasheet AND8202: ClampFET topologies utilize ESD protection at the gate input and active gate to drain clamping (described later), useful when switching inductive loads. [...] All topologies drive any type of resistive or inductive load such as solenoids, heater coils, and filament bulbs limited only by the current and thermal capability of the device Usually flyback diodes are used directly across the inductive load (and not the MOSFET) to prevent voltage spikes if the transistor is turned off. Thanks to the overvoltage protection diodes the MOSFET should be safe, but other parts may not. Should I use these protected MOSFETs without a flyback diode and what pitfalls may occur? AI: I opened a 60V part datasheet from Infineon BTS 117. In the datasheet page 4, there is a section on Protection Functions, telling a single energy discharge the part can take (temp. dependent, of course). Footnote 2 says protection functions are not for repetitive operation. This is a clear statement you should not use this part without a flyback diode. Further in the document, you may find the schematic of the protection circuit - zener diode from drain to gate. This will protect the part but it is stressed significantly more than the flyback diode would ever be, plus the gate driver inside needs to sink the clamped current. Depending on your application, you may or may not be able to get away without the flyback diode. Without knowing the details I will say use the flyback diode. Also, hear rules of thumb but don't always heed them. They exist for good reasons, but know the reasons to determine if they apply to you.
H: What electrical symbol where it looks like two resistors in parallel and connected on one end I am trying to copy a circuit from a schematic but i stumbled upon a symbol that im not familiar of and the part label does not yield any relevant result from google What is it and what does it do in the circuit? AI: Schematic symbols in production schematics more often represent the specific component used and not necessarily the most elegant logical schematic symbols. This component is a 2 resistor array, specifically the type where one side of the array is connected together (shorted) This component can be replaced by two resistors. Most major MFG of resistors offer arrayed parts, with same value (e..g 4x 10k ) and with other patterns (2:1 or a resistor tree 8:4:2:1), independent terminals and with internal short like your example This is done for a few reasons. Manufacturers may offer parts that have better mutual tollerance than absolute tollerance, , e.g. a 10k/10k part to form a 2:1 divider , while the total resistance tolerance is say 1% the difference between the two halves may be guaranteed less than 0.1% When you need lots of identical resistors, especially pull-up arrays, a quad resistor with 0805 shape (4x0805) takes up less space than 4x 0805 resistors, since they are all tied to Vdd or Vss anyway, the common connection is useful.
H: Need help on a DC motor-PWM-SMPS setup (Does a PWM help overcome a DC motor's initial startup current surge?) I am trying to build a DIY one-way peristaltic pump with a 12V 100W DC motor (possible candidate : https://www.ebay.com/itm/DC-12V-100W-13000-15000rpm-775-motor-High-speed-Large-torque-DC-motor/352550303190) which will be controlled by something like this PWM controller (10-50V, rated for 40A continuous & 60A max current) (https://www.ebay.com/itm/DC-10-55V-12V-24V-48V-30A-PWM-DC-Motor-Speed-Driver-Controller-Soft-Start-Switch/322616619257) and will be powered by an SMPS supply such as this 12V 20A supply (https://www.ebay.com/itm/AC-to-DC-240-Watt-12-24-Volt-20-10-Amp-LED-Driver-Switching-SMPS-Power-Supply/183703093948) So my question is: Will this setup work? Is either of the PWM controller or SMPS supply overkill or underwhelming? If this setup works, is it because of the PWM? I ask because I've heard that DC motors draw 5~10 times their normal running current when they start up, so such setups involving SMPS power supplies may regard the initial current spike as a problem and may fail to 'turn on' properly, but a PWM helps with that problem. But my understanding is that a PWM turns the flow of electricity on/off really fast so as to modulate the total electricity passed through but the current load (amps) stays untouched, so I'm not really sure what happens here. AI: This PWM appears to be a good choice as it has an unspecified SOFT START. This means the duty cycle must start from 0 to the pot set value for some reasonable preset time such as >0.1 second by design assumptions for small motor start time. Motors have an inductive where current rises with dI/dt = V/L so if dt starts at 0 then the soft start PWM ought to eliminate the or reduce the 10x start surge significantly. Normally the start surge is due to the full voltage integrated to reach V+/Rs the coil resistance. But with a "soft-start" or ramped PWM duty cycle to set level by Pot, the average voltage starts low and the pump starts slow. I would expect this soft period to be at least 100ms but preferably >1s with only 10% of the starting current to avoid full power start of 10x rated current. If the Soft-start was done right for motors, with this 100W/12V = 8.2A motor a 15A PWM soft-start could work but I see it has a 30A rating which will run cooler.
H: Understanding low current measurement I'm trying to understand a current measurement of a hobby project. This project consists of several ICs and is battery operated. At a certain mode (deep sleep) it should consume a very low current, which I estimated around 100μA or less. To verify low current consumption I'm using the following setup for the measurement: simulate this circuit – Schematic created using CircuitLab Since my shunt resistor R1 is 0.5 Ohm, I would expect the current to be V / 0.5. (Actually I'm using 3 resistors of 1.5 Ohm in parallel, which I consider as a single 0.5 Ohm resistor). The load R2 is the digital circuit with multiple components (ESP32, BQ21040DBVR, CP2104, M3406, XC61CC3302NR-G, resistors, capacitors, etc) at a deep sleep mode. And this is the reading I'm getting: This measurement is consistent. When removing power it goes flat so it originates from my circuit. Questions Is the setup I'm using good enough for measuring sub-milliampere currents? Why Vmin is less than 0? The scope is calibrated and when removing power it goes to 0. Is it correct to use Vrms as the "average DC measured voltage"? It so, it means that the average current draw is 0.00056 / 0.5 = 1.12mA Regarding those 7.28Vpp spikes every 500μsec: I would like to find their source. The circuit is a printed PCB with SMT parts so I prefer not to rework it, if possible. What would be a good way to debug it and find the part that creates these spikes? Since these spikes are very short and at a (more or less) steady frequency, my guess is that they come from one of the ICs on the board, and not from analog discrete parts. But looking at their datasheets, I couldn't find any reason why any of them would consume ~14mA every 500μsec when the system is in a deep sleep mode. Any idea? AI: It's difficult to cover the dynamic range required to measure both peak current and sleep current at the same time. When trying to verify very low sleep current requirements, I use the following circuit, with component values suited to the particular load. simulate this circuit – Schematic created using CircuitLab R1 is a reasonable value to develop a measurable drop at the expected uA levels. C1 is large enough to source all of the high current pulse demanded periodically by the load with negligible drop during the pulse, say <100mV, verify this with your scope. Of course a large electrolytic for C1 will have a large leakage current, and this current may vary with time, especially if your C1 has just come out of your junk box after sever years uncharged, but this can be measured, tracked, allowed for with a bit of care. Letting the capacitor sit at its maximum voltage for a while before using it will reform the insulating oxide, and should mitigate most of the high leakage and its variation before using. Replace C1 and R1 with much smaller values to characterise your peak load current.
H: Buffers output load in unpowered state Lets take under consideration a 3 state buffer, such as this one: Since the datasheet doesnt provide the information about the internal build of the buffer, I was wondering either it is safe to assume that in case the chip is not powered up (0V between VCC and GND), the output is in High Z state? Should one worry about any load at the outputs in unpowered state? I imagine there is a mosfet P + N half bridge at the output. AI: No, it is not at all safe to assume that the output pins are floating when the device is not powered. I would assume quite the opposite: all pins are clamped to Vcc through ESD diodes. Since Vcc is 0V when not powered, that means the output pins are clamped to ground through these diodes, and you won't be able to apply a voltage greater than about 0.5V to them. Having first made that blanket assumption, check the datasheet. Some devices may be designed with different kinds of ESD protection. However, the specific part you mention states pretty clearly in the datasheet, under "output clamping current" that the output pin may draw 20mA if the voltage is 0.5V below ground or above Vcc.
H: LED Blinking On turn on and off I made a circuit for LED Driving (current controlling), based on this circuit. Everything works fine except that the LED is suddenly blinking when the circuit is turning on and off. How can I prevent this blinking? I can't calculate the blinking current but I think it is about 10-20 mA which is very high for me and can damage LED. AI: Without the actual circuit and component values, it is hard to assess the problem you are facing. However, I could think of a possible reason and another very unlikely one, and a solution for it. Possible Problem During turn-on \$C_2\$ starts to be charged, once the output of the voltage divider formed by the potentiometer \$R_6\$ is above the inverting input of the comparator, the latter will try to turn on the mosfet. At this moment an in-rush current will flow through the LED. If either the comparator is not fast enough (small bandwidth) or the feedback is too slow (maybe due to poor layout and parasitics), the control loop will not react fast enough to pull down the gate of the mosfet. If the battery cannot supply the necessary current, it will be drawn from the pre-charged capacitors \$C_3\$ and \$C_2\$ (mostly from \$C_3\$ because of its relatively lower \$ESR\$). This will in turn lower the supply voltage of opamp if there is enough resistance between it and the power supply, which might drive the opamp out of its operating point for a short time. Possible solutions Add a capacitor (\$\approx 100nF ... 10\mu F \$) between the output of the comparator and the source end of the mosfet. This will speed up the feedback. Replace the opamp with a faster one (bigger bandwidth) Replace the mosfet with one with a lower gate capacitance, therefore a faster response time. Add a rectifier or schottky diode between the LED an and the capacitors, preventing the LED from drawing current from the caps. In case you are using a long cable between the LED/laser and your circuit, try to reduce its length, since its parasitic inductance can form together with the upper capacitor \$C_1\$ a LC tank, which might lead to oscillations.
H: How to specify a via should be plugged to prevent solder wicking? I have a 0.167mm diameter via under a BGA component to provide ground connections to two adjacent pads (ENIG-finish PCB). Our PCB fab house recommended that we plug the via to prevent solder from flowing into the via which might leave the pads with insufficient solder. I am using Altium Designer 20. I'm familiar with tenting vias with soldermask (I generally tent the top and leave the bottom open to avoid trapping heated gas). How do I specify that the via should be plugged? I haven't been able to find any appropriate property to set in Altium. Is this commonly done by callout on the drill guide layer or some other method? AI: With my usual Chinese proto house it's specified on the order form, and adds about $150 US to the cost for 5 100x100mm boards, also adds a few days to the lead time. If your board house does not have that, you can put it in the readme file or fab drawing along with material, stackup etc. If you want some of the vias plugged and not others, you'll have to talk to them and find a way to differentiate them if they agree to in fact do it. I suggest making the plugged ones unique in some way (eg. slightly different size to the rest).
H: Powering up several teensy boards I want to use four teensy boards connected via the I2C protocol over a short distance (not more than 0.5m or 20 inches) but only the master one powered by the USB cable. Should that be safe to connect the Vin pins of the slaves to the 3.3V pin of the master? (provided that the total amperage doesn't exceed the maximum). In that case should I connect all boards to GND instead of AGNG? (no analog conpontment is included). Thank you in advance. AI: Given your clarification that the Master is a Teensy 3.2 and the Slaves are Teensy-LC you should NOT connect the 3.3V output of the master to the slaves. Referring to the two schematics you will see that in the Teensy-LC the 74LV1T125 is powered from the Vin (+5V) so this devices would be un-powered if you only connect 3.3V rails. The best option would appear to be to connect the Vin from the Master to the Vin of the Slaves and the GND pin from the Master to the Slaves (don't use AGND as it's connected through Ferrites to GND). NOTE: The Teensy-LC processor has an built in 3.3V regulator, so powering the Vin pin with +5V is the best solution.
H: TCA9509 level translating I2C bus repeater - can levels be the same? The TCA9509, a nice little I2C bus repeater, has two supplies: \$V_{CCA}\$ and \$V_{CCB}\$, for supplying the two sides, master and slave respectively. I can't tell if it can be used as a normal bus repeater for an all-\$5V\$ bus, or whether the master bus must be 1 volt lower. The datasheet seems annoyingly ambiguous: the expression \$V_{CCA} \leq (V_{CCB} - 1)\$ appears in the "Electrical Characteristics" section, some of the Application examples and even on the main page, as linked above, under Parametrics:Supply restrictions, as shown: Obviously not actually from the datasheet, but someone thought it important enough to extract it and put it on the main page. All the examples in the datasheet ensure that \$V_{CCA}\$ is at least a volt lower than \$V_{CCB}\$, and the constraint is mentioned multiple times in the datasheet. The description says: This TCA9509 integrated circuit is an I2C bus/SMBus Repeater for use in I2C/SMBus systems. It can also provide bidirectional voltage-level translation (up- translation/down-translation) between low voltages (down to \$0.9V\$) and higher voltages (\$2.7V\$ to \$5.5V\$) in mixed-mode applications. This device enables I2C and similar bus systems to be extended, without degradation of performance even during level shifting. The "It can also provide..." wording sounds awfully like level-shifting is an additional, optional capability. The actual "Recommended Operating Conditions" - where you'd expect restrictions like this to appear - doesn't mention it or suggest it (max value for both is \$5.5V\$, not \$V_{CCA}=4.5V\$, \$V_{CCB}=5.5V\$, as you'd expect if this was a real limit). Does anyone know the truth, please? I want to run both sides at \$5V\$, plain and simple. Is there something I've missed here? AI: Yes, it can. That's the repeater mode without level translation that you mention.
H: Altium: Export/Package Read-Only PCB or Project I'm looking to export an altium PCB or full project but would like it to be "read-only" so that whomever I'm sending it to cannot edit it without my knowledge. They're looking to do a more in-depth analysis than just the gerbers/fab/assy files. Has anyone had experience exporting read-only projects with Altium? AI: No, there isn't any way to make your project read only in Altium, to avoid accidental changes you should simply lock all your components and features. There are alternatives that I have used Send a stripped down design or only the PCB file and a reference schematic Send odb++ or an exported CAD data (e.g. legacy ascii fileformat) that makes it less trivial to pretend to be you while providing more data than gerbers and basic assembly data . Find consultants you trust to respect your IP,
H: Low power circuit that powers an LED but should not shock the human user Need help making a circuit that requires very low current so that in case a human comes in contact he/she should not be shocked. Also a small buzzer or Led needs to powered through this circuit. The aim of this circuit is that when two components on the machine come in contact with each other the user must become aware.Something that is similar to the continuity mode on a multi meter.I need to use a 5V 3A supply as it will be powering another component. There is a possibility that the user of the machine may touch one of the components, the current should be so low that the resistance of the body should be enough. I would also like to know if I need to add additional resistors to drop the current further and also add a fuse so that in case anything goes wrong the fuse can break and the user is always protected. AI: At 5V you are already in pretty safe territory as far as human contact is concerned. A representative standard for electrical hazards is ECMA-287:. You can use a series resistor of say 10K or more to limit the max current to less than 0.5 mA even in the event of very small skin resistance (which would only happen e.g. with an open wound). The resistor would keep you in the range of ES1 level exposure even in the event of "abnormal" conditions. You could in principle go much larger with the resistor, like 1 Meg or more, depending on other sources of noise. E.g. is there a large motor motor nearby? I would recommend using a MOSFET to turn on your LED and/or audible alarm. You should protect the gate of the MOSFET with a Zener diode. If we suppose the bottom plate is at ground in your figure and the top needs to be energized to +5 V then a reasonable circuit that would fit in one box could be: