text
stringlengths
83
79.5k
H: Separating odd and even pulses in a pulse train How would one go about separating odd and even pulses in a pulse train and displaying them using LED indicators? A schematic would be of great help. AI: A counter circuit would do the trick. Increment count on rising edge of pulse, output is the LSB of the counter. A t-flip flop would be useful. I'll leave the exactly implementation to you as this seems like a homework type of question.
H: getting interrupt from ignition circuit This transistor ignition circuit for a model petrol engine is built from a proprietary kit. I have made it up and it works. Now I want to take a signal from it as an external interrupt to an Arduino Uno based tachometer. But I don't know how to connect it. Ideally I would like the signal timed when the hall sensor switches off, as this is when the plugs are fired. (It is a wasted-spark system on a 2-cyl 4-stroke engine, so both plugs fire every revolution.) Initially I thought I might be able to take a signal off pins 4 & 5, parallel to the LED, but now I don't think that would work. How do I do this? There is a connection at the cross (UK convention) and the bottom rail should be marked "ground". AI: Easiest would be to just share the hall sensor (Pin 6&7). Pins 5& (7/8) would be the same. The Circuit looks as if there would be 12V vs Chassis Ground on the Hall, so you would need to use a resistor divider on the arduino input (~3:1). Given the general noisy-ness of Iginition Circuits I would recommend either isolating this (optocoupler with matching resistor) or using TVS Diodes as protection as well.
H: Current through an ideal inductor at steady state Find the current through the \$\mathrm{5 \space mH}\$ inductor when the circuit reaches a steady state When the circuit reaches a steady state, a current of \$\mathrm{4 \space A}\$ will flow through the resistor (since voltage across the inductors are zero). The inductors themselves are ideal, and have a resistance of \$\mathrm{0 \space \Omega}\$. Thus, the current through each inductor should be \$\frac 42 = \mathrm{2 \space A}\$. However, my textbook seems to disagree and says that the current is \$\frac 83\$ A. I am aware that \$X_L = \omega L\$, but that is for an AC circuit and not a DC circuit. Why is the current through two ideal inductors in parallel (at steady state) divided in the inverse ratio of their inductances? AI: The voltage between the ends of an ideal inductor: U=L*(di/dt) where term di/dt means the changing rate (=amperes/second) of the current through the inductor. In practical inductors there's always some resistace and the equation would be U=L*(di/dt)+iR, but you declared R=0. Your both inductors , say La=5mH and Lb=10mH have the same voltage, so La*(d(ia)/dt)=Lb*(d(ib)/dt). That doesn't allow any other possibility that the current changing rates are inversely proportional to the inductances. Thus the cumulated currents are, too.
H: Alternative to train current collectors (pantographs) A current collector (or pantograph) is a mechanical system used by, for example, trains and trams, to collect current from an overhead wire. When thinking about high-speed trains, e.g., the Shinkansen, but also with lower speed trains, there must be massive wear and tear on the current collectors and the wires. Because changing the overhead wire is more expensive than replacing the current collector contacts, one chooses a softer material to make the current collector wear down faster than the overhead lines. I am fascinated by the fact that such a "primitive" way of transferring current is used so successfully, and that it is even possible that a train goes many hundred kilometers without having to change contacts. Are there any other alternatives to transfer current for high-speed trains? Some trains are using magnetic levitation, but I believe the tracks are costly because they have to be fitted with strong electric magnets all the way. Why are there no attempts to use a contactless transfer of current, for example, couldn't one design an antenna where current sparks from the overhead wire to the antenna? Please suggest better tags for this question. AI: This blog says the wear lifetime is several months for the carbon "shoes" on the pantograph. Graphite carbon is itself a fairly good lubricant, so the friction is comparatively low. The system is incredibly simple and doesn't require too much fancy equipment per km of rail. The problem with arcing is that it actually causes quite a lot of wear! So much so that it can be used as a machining technique: Electrical discharge machining. It also wastes a chunk of energy in the arc that goes to heating the air. The "high frequency" Tesla coil approach would require an efficient means of generating high-frequency current at very high power levels (megawatts). While I don't think it's impossible, it feels like it would have high losses, and I'm not sure what level of radiated EMI it would produce given that it's the same architecture as an AM radio transmitter?
H: Trying to identify this potentiometer marked "B5K" I'm trying to identify this potentiometer as accurately as possible: On the rear it says: B5K. It has two rows of 3 pins each: (1,2,3) (1,2,3) Below are some measurements taken with my multimeter between pins 2 and 3, and the unit is: kΩ. When taking the measurements, I was making small increments. I tried to make the same increment amount each time. But you know, I'm human and the increments were not totally perfect. I did this 4 times, see the following graphs: Can you identify this potentiometer? What's the nature of this potentiometer? linear, logarithmic, etc? Where I could buy it? Is there any other data I would need to provide, in order to properly identify it? Thanks! AI: If it's a "B" type, it should be linear. From your plots, it's not very linear, but it's definitely not logarithmic either. So it's a 5K linear potentiometer. Given the tolerances, a 4.7K one would probably also work if you can't find 5K. As per the comment by Hearth, if it's got 6 pins, it will be a dual-gang 5K pot.
H: How to use PoE to power an additional device? I have an Ethernet (100 Mbps) camera powered through PoE by a PoE enabled switch. The camera is turned on and shut down by configuring the switch to cut the power on and off on the given port. I want to have a visual indicator that the camera is on. So I did the following: Assembled a 9V-120V to 5V step down module, a resistor, and a LED. With a multimeter, determined which wires are used by the camera to get its 54V (which weren't, by the way, the commonly used wires 4 and 8, but rather wires 2 and 6). Connected the step down module to the wires 2 and 6. However, it doesn't work. The switch doesn't seem to detect anything. If I unplug it, unsolder one of the cables leading to the step down module, and plug it again, the switch does detect the camera. What can I do to find where's the problem? AI: In PoE, you don't put a voltage to single conductors, but always to pairs. The standards allow two configurations: either pairs 1/2 and 3/6 OR 4/5 and 7/8. So, it sounds like this is a normal wiring. Connected the step down module to the wires 2 and 6. You can't do that: in PoE you need a center-tapped transformer to extract the DC offset that the switch puts onto the wire pair, and can't directly solder to the wires. The reason is kind of easy to explain: if you directly attach a load to either of the differential cables, you're just shorting the high-frequency signal through your load. A switch, by design, has to detect such a "signals shorted" situation and thus disables the port, typically. Even if it didn't do that, it couldn't use the port for ethernet anymore. So, instead of doing what you're doing, you'll have to find a supply voltage inside your camera, and then you can attach your LED to that.
H: How is dead time in a half bridge implemented I was wondering if dead-time in a bridge design is achieved by the turn-on and turn off resistors as shown below, so that the FETs turn on slower and turn off faster, thus avoiding shoot through. Or does this need to be implemented in code? AI: Or does this need to be implemented in code? In the past I've used gates like this: - It's fairly unambiguous in its ability to provide anti-shoot-through gate drives.
H: Why "substrate" is exposed through a "do not connect" pin at all? I've were reading through MOC3041 opto-isolated triac when I noticed this part: "Substrate". It's also repeated later on one page down further, but there's no explanation. I guess that might be the silicon substrate upon which the device was build, and I can imagine that actually connecting it to a wrong thing could make things soon pretty bad. I also know that in discreet MOSFETs the substrate is very often tied to the source pin, so if the substrate here wasn't internally connected to anything for some reason, and even the datasheet says "do not connect", then it seems quite obvious to me, that, well, it should be left not connected. OK. But if that's the case, then I guess that leaving it internally not connected would be the easiest and safest way, and I saw that a lot in various devices that had to be packed in some standard casing that had too many pins. Then why expose the substrate at all and then instruct designers to leave it floating? What's the use for this? I've also seen this question for a similar device, it could shed some light, but unfortunatelly it's unanswered. AI: The back of the silicon chip (the substrate) needs to be physically mounted (soldered) to some part of the lead frame as part of the assembly process, before the wire bonding is done and the epoxy is molded around it. Leaving it unconnected is not an option. Sometimes the substrate connection is brought out to the ends of the package, and then sheared off flush as part of the final trim after molding. Note the vertical rails that support the central chip platform in this 16-pin DIP lead frame. (source) However, in an optocoupler, chip platforms are required for both the LED and the triac circuit, and having this kind of central rail would probably compromise the amount of isolation that's possible. So they bring it out in both cases on an ordinary pin. This works for the LED, because that's how LEDs are constructed anyway. And it works for the triac because they didn't need that pin for anything else. Here's one example: (source)
H: What do the boundary modules do in an IC? I cannot understand what is the purpose of digital and analog boundary modules embedded in an IC for testing. What are their function? AI: They are basically switches that allow any two pins to be connected to the internal test buses AB1 and AB2 which are then brought out to the external pins AT1 and AT2 where they can be measured. It's basically a huge internal analog multiplexer, eliminating the need to physically probe all of those pins individually in the test fixture. As shown, the ABM probably includes the ability to disconnect each external pin from the corresponding core connection, and to probe either side of that connection.
H: Second order differential equation implementation using OP-Amp I am trying to implementat the following equation \begin{equation} x''+4x'+25=\sin(20t+36) \end{equation} using OP-Amp's. I tried to use state-space technique to implement it in the below circuit x is the voltage of output node of up-right OP-Amp. But the problem is I don't have the x term in the equation. In other words the transfer function is of the form \begin{equation} \frac{1}{s(s+4)} \end{equation} The 1/s term is problematic, the above circuit gives us low-pass characteristic of the form \begin{equation} \frac{1}{s^2+b_1s+b_0} , b_0\neq 0 \end{equation} What do you guys suggest I do to get the correct setup? Also I noticed that if we introduce \begin{equation} y=x' , y'=x'' \end{equation} we can do something with it, but I can't figure out how? Also if another circuit configuration is better, please suggest it so I switch to that. The above circuit gives me wrong output when I simulate in OrCAD-PSpice , it is a homework for my (circuit-I) class and I thought it would take only 4 hours to solve but it's been a long 24 hours now , I really need help. Any help would be appreciated. AI: The substitution x'=y doesn't seem a big deal and it really is nothing for an experienced analog computerist. But it helps a beginner to keep things in order. With that substitution you have a pair of equations: x'=y and y'=-4y+sin(20t+36)-25 These are the inputs for a pair of integrators which output x and y. Integrator which outputs y gets 3 signals as summed: y itself multiplied by -4, the sinusoidal voltage and constant -25; all scaled to practical volts. The other integrator gets only y and its output x is observed to see what happens, x is not fed back. Both integrators need some initial value. Scaling to practical voltages and time scale is essential. Seemingly you have already understood it. But you feed x back for calculating x" and that's an error. ADD The questioner says in a comment the preceding text is too difficult. Another comment hints some troubles can appear if I do homeworks. This case shows at least some attempt, it's not like "HEY YOU! SOLVE THIS! IT'S MY HOMEWORK AND I NEED IT NOW!" Unfortunately only some faint correlation between the numbers in the equation and the component values hints this can be an attempt to solve the problem. I guess it's an attempt. Thus you will get guidance, but nothing that can be copied and pasted as a full solution. At first we must note that no circuit can obey your equation as is, because circuits obey physical laws. Those laws are equations between quantities which have dimensions. If X in the equation is presented as volts, X" must have dimension volts/(second^2). 4X' has dimension volts/second, it cannot be added with X". The equation needs some modification to make it physically constructable but still retaining the numeric values right. SI unit system has an advantage. We can multiply in a non-dimensioned pure math equation summed terms with quantities which are 1 multiplied or divided by SI units and get something physically sound with quantities which all have right numeric values and compatible units. Let's take a simple example, much simpler than your equation. Let's have X' = 10 - X So, let's decide we want X to be red from a voltmeter, the wanted X is the number of volts. In addition let's decide we have the time as seconds. It can appear later that things happen too fast or too slowly and have far too high or low voltages for practical circuits. In that case we could select X or time or both are presented as scaled to different magnitude, but keeping volts and seconds are OK as long as the results show the circuit cannot work accurately or fast enough. X'=10-X has dimension conflict. X' has dimension volts/second. X is volts. It can be fixed in SI system without changing the numeric values as follows: X' * (1 second) = 10V - X . If we knew this cannot be built because our opamps are 10 times too slow we could write for ex. X'*(10 seconds)=10V-X. Then one time unit would happen in 10 seconds. Now let's check what we can get with common opamp circuits. The next is the common integrator: This could be used to solve the equation, only select RC=1 second and feed to the input the inverted sum of -X and constant +10V. The inversion compensates the inversion in the integrator: The summing circuit can be avoided by making the integrator to have two 1MOhm input resistors to its virtual ground. One gets the X and the other gets -10V. It's possible that we just haven't exact -10V. Let's assume we have only -1V accurately enough. We can increase the gain of the constant by reducing its summing resistor: If you simulate this circuit with zero initial value for X (=empty capacitor) you'll see X = 10V * (1 - exp(-t/1s)) as anyone who has calculated some RC charging cases could confirm. The original dimensionless equation has solution X=10(1-exp(-t)). I guess you can see the relation between the circuit function and the solution of the original equation. Here's a screenshot of a simulation: Your homework needs 2 integrators. This case is so simple that we skip the intermediate substitution y=x'. We start with the double integration to get x from x" You can well select RC=1s for simplicity. Write your equation as x"=-4x'+sin(20t+36)-25 and draw the circuits which feed the right half to the input x" (or actually x"*(1 second)^2).
H: How to solder wires onto pins of an RFID chip? I want to integrate a sensor with NXP's NHS3152 (datasheet). To do this I have to solder the wires onto the pins of the RFID chip. What tools should I buy to do this? What is a good reference to learn how to do it? AI: Buy the $50 NHS3152DBUL evaluation board (Available from Digikey, Mouser, Arrow etc.) and you won't have to worry about soldering a leadless package or BGA by hand for your prototyping. There's also a NHS3152TEMOADKUL starter kit for ~4dB more.
H: Capacitor calculation for current pulse to solenoid Let's say I have a power supply 48V/100mA (4.8W). However, I have a push pull solenoid which will draw ~8W (48V/170mA) for about a 50 mS pulse. Can my power supply provide this extra power for that time with a proper capacitor, or do I need to increase the nominal power of the power supply? AI: Short answer - yes. The capacitor size is determined by the minimum holding current required by the solenoid, ignoring inductive effects such as dV/dt and back-EMF. With no supply connected, here is how to calculate the capacitor size. This example does not account for the regulator circuit headroom. Your solenoid has a DC resistance of (48 / 0.17) = 282 ohms. Let's assume that for the solenoid to hold in whatever force is pulling on the armature, it needs a minimum operating current of 75% of nominal, or 128 mA. At that current the capacitor voltage is (0.128 x 282) = 36 V (duh). So the capacitor is discharging from 48 V to 36 V in 50 ms, into a load of 282 ohms. This is a simple R-C discharge circuit. The exponential equation can be solved for C, the capacitor size in farads. A quick approximation that you can do in your head is to assume a constant-current discharge rather than exponential. In this case, EC=IT The change in capacitor voltage (in volts) times the capacitance value (in farads) = the constant discharge current (in amps) times the discharge period (in seconds). Rearranging, C = (i x t) / E = (0.170 x 0.050) / 12 = 708 uF If your supply has a 1000 uF output capacitor, or a 1000 uF bulk filter capacitor driving a regulator that does not go into an overcurrent shutdown, the solenoid will stay held in for at least 50 ms, even if the cap's voltage source is completely removed. This method always yields a cap value that is larger than the exponential equation value. That "true" value is 616 uF. Note: Headroom - if the 48 V source is the output of a regulator circuit, and the regulator's input is a bulk filter cap with something like 60 V across it, and the regulator has a minimum 2 V Vin-Vout differential voltage, then the cap's discharge voltage range is 10 V larger and the required cap size is smaller.
H: Routing 5 differential pairs over a short distance with limited space I have 5 differential pairs (4-lane MIPI-DSI) going from left (SOM header) to right (FPC connector). As you can see on the right, for each lane, the signals end on opposite ends of the FPC connector. This is -unfortunately- a given, because the panel I want to drive just has this pin assignment. To make the lengths of each pair match, I have to have the signals leave the SOM header in opposite directions, to make up for the length difference they have on the other end of the signal. As you can see some signals also have pointless vias, just to make sure each signal has exactly the same amount of vias. Now my question is if in this form, does it still make sense to adhere to the spacing rules of differential pair routing. i.e. I chose 6 mil width, 5 mil spacing for 100 Ohm diff impedance with a specific stackup. But there is no actual location in any of these pairs where the N and P data would actually be the same at any given point in time. Isn't it just better to leave them apart, and what would it do to impedance? All signals are about 7.7mm long and length matched within 6 mil. I can't really move the SOM or connector further apart. AI: First, with 800 MHz bit periods, you can afford at least 10 mm, probably 20 mm length differences between pairs. From the perspective of getting the signal decoded correctly, you could also allow ~10 mm differences within pairs, however even small intra-pair length differences cause common mode currents, which lead to radiated signals, so it's better to keep the two lines within each pair well-matched. Second, it's preferable to route your pairs as actual pairs, not just as separate lines with the same length. For example, you could do something like this (sorry, I used red for the layer you have in blue and blue for the layer you have in salmon) The main point is that for as much of the trace length as possible, the two lines of the pair are actually routed directly next each other. Symmetry in the break-out from the chip or connector pads ensures (with a tiny bit of tweaking) length matching.
H: How to detect when an LED has burned out? I'd like to have a way to detect when a low power LED burns out (2-3.5V, 200-400mA) that is being driven using PWM from a Raspberry Pi with a MOSFET. My understanding is that I would be able to accomplish this by measuring the current to the LED and seeing if it is near zero in the middle of an "on" cycle, but I don't know if that's how this is typically done or if there is a lighter weight solution (considering I would want to do this with ~50 LEDs in total.) I've been told a Hall effect sensor can be used to measure the current, but I've also been told that they don't work well at this low current. What would a typical solution for detecting a burnt out LED look like? AI: @BrianDrummond's suggestion is best. Find a range for the Vf at your current and (and over the applicable junction temperature range) apply a window comparator to the voltage. We use exactly that method to detect failure in an IR LED (or connections to it) since the obvious "visual" indication is not available. I've seen partial failures in some LEDs that result in dim light and a substantial change in Vf. Maybe something to do with the heterojunction structure or just a partial short. Window comparator from this website. Open-collector (or open-drain) comparators such as LM339 should be used, or diodes added. Note that quad comparator pinout is different from quad op-amp pinout.
H: How to convert high impedance / ground output to 24V / ground output My background is from software development so please forgive my ignorance. I have an Adam 6156EI device I can control via Ethernet, it has 16 digital outputs. When I programmatically set an output to "true", the respective output becomes "ground". When I send "false", the output becomes what I would call "High Z" (disconnected, neither power nor ground). If I connect the positive side of a test lamp to +24V power, and the negative side of the lamp to the output, I can switch the light on and off. I think the output operates like a single pole/single throw switch connected to ground. My problem is that the downstream device I'm trying to control wants to receive either 24V or 0V in order for it to go on or off (I believe the currents are just a few milliamps, it handles its own amplification). What can I put in front of this output to convert it from High-Z / Ground to +24V / Ground? Or have I done something else wrong? AI: You can probably just add a "pullup" resistor to the output (between the output and +24V). The Adam unit appears to be rated at 100mA per output, which is way more than is probably required. If your inputs will work with a few mA you could try something like 4.7K 1/4-W.
H: How can a system reach its steady-state if the I-action of a PID controller, u(t), doesn't go to zero as the system approaches its desired value? The I-action of a PID controller, which integrates the error over time, results in the control signal: $$u(t) = \int_0^{t}e(T)\text{d}T$$ This means that, when the system reaches its desired value and the error reaches zero, the control signal is a constant. So it is still there and larger than 0, while the P-action and D-action both are zero and have no effect anymore. So what is happening here exactly? Why can the system reach its final value if there is always a control signal active? Or is this the reason why overshoot happens? Is it that the error gets smaller once \$e(T)=r(T)-y(T)<0\$ and the integral gets smaller? AI: Imagine a real system such as an oven. You want to maintain 350°F so that your cookies will be properly baked. The input to your controller is the temperature sensor. The output to the oven is the percentage the heaters should remain on vs. off. In order to maintain a constant temperature, the output must be non-zero, and ideally (without you opening the door or line voltage changes etc.) will be constant. Overshoot happens because of the closed-loop system dynamics (underdamped), and it can also happen because of integral windup, which is a nonlinear effect.
H: 2N3904, Power Supply & FuncGen results on strange output on the scope I was having trouble with a Collpitts oscillator output, it was distorted, so wanted to check if I am indeed in the linear region of the transistor, so I decided to use the func gen to check that. However I am getting some strange reading on the scope that I cannot understand. Attached is the schematic and what I see on the scope. V1 is the power supply, V2 is the func gen. Func Gen config is 1kHz Frequence, 1V Amplitute, 2V Offset. The BJT is a 2N3904. Pink is a probe at base, Yellow at emitter. Any one can understand what am I doing wrong? Zooming in, I see: AI: Your transistor is oscillating. As Elliot suggests adding a resistor in series with the base will cure it but it is not because of the resistor limiting the base current. Emitter followers with a capacitative load often will have a negative input resistance that can cause oscillation. Adding a small resistor (usually only a few ohms) can avoid this by reducing the 'Q' of the circuit.. If you analyze the circuit including all the parasitic capacitances and inductances it will actually be very similar to a Colpitts oscillator. The load of the scope probe will be part of the output capacitance, the wiring will create the inductances and the transistor internal capacitance plays an important part. From EDN - Emitter Followers as oscillators
H: What is the max current from a 9 V battery? Let's take, for example, a 9 V battery. Forgetting about internal resistance or any temperature restrictions, what is the maximum current I can draw from this? Using Ohm's law with a 1 Ω load, this should give us: V = I/R I = 9 V * 1 Ω Current = 9 A According to my calculations, this would give us ≈3.5 min of battery life I also thought of it like this: 9 V battery, 550 mAh battery life 550 mA for 1 hour 550 mA/h * 3600 secs = 1980 A for 1 sec Drawing this much current at 9 V would require around 5 milliohms according to my calculations. I know this isn't possible in the real world, but theoretically maybe? Even theoretically ignoring the temperature restrictions and internal resistance, this seems obviously impossible. Where am I going wrong? AI: If you "forget about" internal resistance, then the maximum current is infinite. An "ideal" component, non-existent in the real world, can provide mathematically "pure" infinite or zero amounts of resistance, voltage, current, and all the rest. Different battery compositions will have different amounts of real-world "impure" limitations. Internal resistance, temperature versus performance characteristics, "memory" and recovery effects, and so on. One of the difficult times I had learning about electronics was doing calculations and then wondering why the physical components on the breadboard were different. The figures on paper say I should measure 9 volts. I'm actually measuring 8.654 volts. What gives? A short length of wire might well be only 5 mΩ, but when you connect the battery using only the wire, it doesn't vaporize the wire with a massive surge of almost 2000 amperes. Why? Because the battery is limited by real-world physics. Some batteries are capable of some extremely high current. Consider automotive "wet cell" lead batteries. You'll find that they're capable of 1000 amperes or more, especially for turning over huge engines during start. In electronics and physics, many things are a trade off. If you want super high current, you may have to accept lower voltage, lower battery life, or extremely high cost. A capacitor, as another example, can supply extremely high currents (compared to batteries), but they store charge, and are not a charge pump, as a battery is. As such, they're sort of like super-high-speed batteries with extremely limited capacity. It was the biggest eye-opener for me as a kid in school to realize that applying Ohm's law to components was not exactly straightforward. You have to take the physics into consideration, and it's messy. A capacitor isn't just a capacitor: it has some resistance and inductance as well. The best way to think about components and batteries, I think, is that any component is a mixture of a bunch of other components, but imagine a control panel with sliders. A resistor might have its "resistance" slider at a large amount, but the "capacitance" and "inductance" sliders can't be at zero. A wirewound resistor, for example, will have more inductance than say a carbon composition resistor. Your math isn't wrong, but it's for ideal components. Check out a battery datasheet; it'll provide you with some figures that show where it isn't exactly ideal. (If you happen to have a 2000A-capable 9V battery, I know some electric vehicle engineers that would like to chat with you!)
H: Is an even number of DRAM chips required? I want to design a microprocessor based board (NXP imx 8m). All the boards I've seen so far have an even number of DRAM chips. If I want 4GB of RAM, do I have to use two 2GB DRAM chips or can I use one 4GB chip? AI: The number of DRAM chips is determined by the width of each chip in bits and the number of bits you need for your memory interface. In this case you have a 32 bit interface, so provided you had a 32 bit wide LPDDR IC, you could use a single chip.
H: Collpitts oscillator signal distorted I am trying to build a Collpitts oscillator using an 8MHz crystal, but the signal I get, is completely distorted. Any idea why? The yellow signal is probed at the output, while the pink is probing the base of the BJT. To start with I thought the problem was that my BJT was not in linear region, so I increased the load resistor to 2k to reduce the amplitude of the input signal, but the distortion was still there. Do I have some secondary oscillation somewhere? Any idea how to fix it? PS: The crystal is 8MHz not 8mhz. AI: Change R3 from 100k to 68k Change R2 from 147k to 27k thus Rb=20k and Rin= 100k hFE*Re ~100 * 1k Replace wire with 1k from emitter to C2//C3 to match R1. Root Cause: The C loading Re at some harmonic of 8MHz is causing output distortion. When there is series C coupling on Emitter always make Rmin load >= Re. In this case equal. Expect 2Vpp sine output. Use another buffer if you plan on driving any significant capacitance ( e.g 30 pf /ft)
H: What is the most power hungry component of a air conditioner? Im taking about those old school air conditioners, which draw around 1200 watts from the wall. AI: The compressor motor, followed by the evaporator fan and the condenser fan (if any), then any control electronics.
H: Performing integration using hardware instead of software One can compute the integral of a function using software, specifically one can get add doubles to obtain an approximate integral -- this is fast but suffers from rounding errors, or one can use arbitrary precision -- this is precise but generally slower. I was wondering if it is possible to implement a middle-ground in hardware (thus obtaining something that is fast, and of bigger precision than doubles) by generating in hardware a wave that corresponds to the function to be integrated and using a simple circuit with a capacitor and a resistor to obtain the integral of the resulting wave? Are there implementations of such "hardware integrators" and are they used in practice? AI: Generally analog circuits like this aren't used in computers chips except for I/O and power delivery. The reason for this is that in the space that you can put an IC capacitor, you could have thousands if not millions of transistors. Capacitors eat up IC real estate. This is why the world has gone digital in general. Lots of transistors can be squeezed onto ICs. As mentioned in my comment, there's other limitations of an analog integrator such as input offset error amplification and the bandwidth is small. If there was a large enough application for needing integration in HPC, they would add digital hardware integrators into the cpu's or accelerators.
H: Op-Amp Integrator's virtual ground I have been using op-amp TL072C in charge integrator configuration. R = 1k Ohms and C = 100 uF. Vin is a DC signal of 1 V. VCC = 10 V and VSS = -10 V. I get the expected output which is VSS, when a DC signal given as input. But the strange thing is that virtual ground voltage increases to about 0.65 V after output reaches VSS. Attached the screen shot. Why does the virtual ground voltage increases after output reaches to -VSS or saturation voltage ? Probe 3: Input Probe 1: Output probe 2: Virtual Ground AI: Is the question why it reaches 0.65 volts instead of 1 volt or is it about why it stops being a virtual ground? The question is why it stops being virtual ground An op-amp with negative feedback tries to maintain the inverting input at the same voltage as the non-inverting input by adjusting the output voltage so that the potentials are equalized. Once the op-amp output hits the end-stops, it no longer can continue to adjust the output in the correct direction to maintain a virtual earth.
H: LDO output and input capacitor clarification I would like to understand how to size the input and output capacitor of an LDO. What I think to know: About the input capacitor: The input capacitor is used for filtering high frequency input components. Nevertheless in a perfect LDO, the drop voltage across the P-channel mosfet is adjusted so as to maintain the output voltage constant whatever the input signal as long as the input voltage is higher than the voltage drop across the P-channel mosfet plus the output voltage. So if the output voltage is constant, it means that the LDO filters all the AC components of the input signal. So why do we need to add an input capacitor? I think that the bandwidth of the LDO is not sufficiently large to filter all the AC component, especially the high AC components, so an input capacitor is added to filter what the LDO could not filter. Where I can find this information into the datasheet? About the output capacitor: Suppose the load constant at the output of the LDO. The output voltage of an LDO is constant. So the output current is constant. Suppose the LDO is taking no current from the source. So the current taken from the source is equal to the output current and is CONSTANT over the time. So why do we need an output capacitor? The reasons: During load transient, the output voltage will vary during a time depending on the bandwidth of the LDO. So an output capacitor can be used for helping the regulation. The other reason is for stability concerns. Nevertheless, I have already seen 100 uF output capacitor on an LDO and a load around 500 mA under an output voltage equal to 5V. What I do not understand is that the output capacitance seems to be a function of the load, something that I do not understand. Does the stability problem imply to increase the output capacitor at this value and is function of the load? I could fairly understand that the overshoot or undershoot during load transient is dependant on the load, but what transient load need to have a 100 µF capacitor? Here is the LDO. AI: All voltage regulators want a peaceful life; if there is an output capacitor then any fast cyclic changes in load current are largely dealt with by that capacitor and the lazy output from the regulator is only expected to deal with topping up the charge to the capacitor so that the capacitor can handle the next cycle of load current change. There will be a small transient change of output voltage because the lazy regulator can't be expected to keep up with fast load changes. That is due to: - $$I = C\cdot\dfrac{dv}{dt}$$ In other words, there will be a ramp down in voltage depending on how high the current is and how big or small the capacitor value is. And the lazy old regulator will try and deal with sorting out the average output voltage in its own time. In other words, voltage regulators are not as quick to deal with load changes as you might think and therefore, the output capacitor does the main job of keeping dv/dt as slight as possible. Some voltage regulators are better than others of course but they are, after-all, a control loop and won't be as effective in the short term as an output capacitor. Having said that, output capacitors with relatively high ESR are going to cause problems too so, use the capacitor as recommended in the data sheet. So, instead of the voltage regulator having to deal with step changes in current (without a capacitor) it has to deal with dv/dt (a much slower change). As for the input capacitor, if there is a load change that causes the input voltage to fall suddenly, the lazy voltage regulator is not well equipped (speed wise) to adjust its series impedance to compensate for that input voltage fall in order to keep the output regulated. Having a capacitor at the input holds-up that voltage to a higher degree than if it were not present. This allows the lazy voltage regulator time to catch up with the situation that is occurring. The same story if the input voltage changes due to external factors - having an input capacitor can slow down that change and make life easier for the lazy voltage regulator. So, both capacitors are there to make life easier for the voltage regulator and deliver the performance expectations stated in the data sheet.
H: CAN - Tranceiver @ 5V VS Tranceiver @ 3V3 Immunity I would like to change a 5V CAN transceiver on my board into a 3V3 CAN transceiver. Nevertheless as I am clearly not a specialist of the CAN protocol, I am afraid of doing a big mistake ! I think it will clearly make the communication less robust if I reduce the power supply to 3V3. The rate of error of communication will increase. In 5V I have already some errors. Here are the two differents datasheet (If you know a better 3V3 CAN transceiver, I would be happy to hear it) : 3V3 transceiver : https://www.ti.com/lit/ds/symlink/sn65hvd232.pdf?ts=1591434105120&ref_url=https://www.ti.com/product/SN65HVD232 5V tranceiver : https://www.onsemi.com/pub/Collateral/AMIS-30660-D.PDF Well what I see is the differential voltage and the common voltage between CANL and CANH is lower with a 3V3 tranceiver during the dominant and the recessive... Transceiver 3V3 : Transceiver 5V : Actually, according to the datasheet, the differential voltage is not really affected ? ! And the voltage refered to the ground is a bit affected but no much as I thoough... What do you think about the difference in robustness between the two transceiver ? What are the other elements to pay attention ? Thank you very much and have a nice day ! AI: The CAN specification requires that the differential voltage in the dominant state (with a load of two 120 Ω termination resistors) is nominally 2 V, at least 1.5 V, and at most 3 V. So the transceiver is not allowed to pull the signals completely to the rails. The common-mode voltage of the output must be somewhere between 1.5 V and 3.5 V. The receivers must be able to handle ±12 V. Both transceivers meet these specifications, and are equally robust. If you are getting errors, then something else is wrong. (But that would be a different question.)
H: Looking for some help with SMD Component identification N51K I've got a faulty GTX 1070 Graphics card here with a blown SOT-23 casing IC. Looking at it you can se N51 and looking around on the board I can find another component like it with N51K. I cannot however figure out what the component is? It looks like a transistor of sorts. Any ideas? EDIT: Thanks for your help so far. I don't know why it failed, I purchased the card on a whim in the hope I might be able to repair it. Probing around the rest of the circuit I see no reason why it shouldn't work other than this, there are no other shorts. Please see attached for an expanded area of the circuit. I've probed the existing N51K IC and as you look at the picture: Right pin to left 1.5v forward, centre to left 1.5v forward so it would ring true as being some kind of transistor, left pin being the gate. Does fit the theory of it being a Si2305CDS as it matches the pinout and it being PNP The center pin on the blown IC goes to the 100ohm resistor and that goes to pin 3 on the ON 702 IC. Having done a bit of searching it seems at first look that the 702 IC is a dual N-Channel mosfet 2N7002DW however probing it doesn't fit as pin 5 probes to pin 1, so either that's a short that shouldn't happen or not the correct IC. I'll have a further probe around and see what else I can find. AI: Couple of options, the first second being most likely of the two. ZXTN5551FL - 160V, SOT23, NPN High voltage transistor This has package marking N51, though I can't find any photos of it to find out whether it appears along with the letter K. The manufacturer (Diodes Inc.) do use 1-character shortened date codes on small packages, in which case K would mean October 2015 (when did you buy the card?). However given its a part originally made by Zetex rather than Diodes Inc, I'm not sure if the date codes apply. SI2305CDS - P-Channel 8 V (D-S) MOSFET This has a package marking of N5, but from pictures of such devices, the marking appears in front of additional characters which represent date code information. However the package marking on your part doesn't match the lettering style from other photos of this part, and is missing a small overlined character in the middle of the number. Having said that, there is a similar thread on another forum which is looking for a similar part with number N51Y in a very similar style to your parts, which apparently they were able to confirm from the manufacturer was a SI2305CDS, which leads me to suspect your parts are too. A P-Ch MOSFET also makes more sense based on your first picture as it looks to be related to switching of a power rail
H: How to prevent switching direct and/or inductive noise on a PCB? I'm designing a power source for one of my projects and I couldn't find a better way to reduce the voltage drop on 7805 regulator other than using a switching regulator (LM2596). The switching regulator output goes through an additional LC filter (with tantalum caps) and from there to a linear regulator: The filters and linear regulator should filter out most of the switching noise, my only concern is that the noise can spread through the PCB traces, here's the one sided PCB design (those front coppers are actually jumpers): LM2596 current is not going to exceed ~200mA. I don't have any experience in designing switching regulators and handling noise, all I did was "pouring" the ground line. How can I reduce the output noise (as much as possible but reasonable) in this specific design? How to prevent the inductive noise in PCB design? AI: For lowest noise, you need GND of C4 next to GND of D7, TO MINIMIZE that loop_size/radiation/voltage drop. Why? The slewing of the diode voltage (input to energy storage inductor) will be the fastest node in your system. Keep that PCB trace very small in area and very short in length (which also reduces the radiative loop area); and have a trash collector (piece of copper, tied to Gnd) under that very fast 24 volt switching-reg node. For less "singing" at the 60 Hz rates (or 120 Hz rate) from very fast current_turn_on thru the bridge rectifier, insert 1 uH inductors or 1ohm resistors in series with 1 leg of the bridge. ============================================= Does everything look fine? What are your noise goals? (for lowest noise, use a 2nd layer as GND plane.) Is this to evolve into a commercial project, with formal must_pass_FCC measures? Is so, why not START by using a GND plane? Have you considered how to remove heat? A 1_layer PCB will be horrid at heat removal because the epoxy_fiberglass will define the heat flows; FR-4 has 200X the thermal resistance of copper for equal thickness; the ratio of thicknesses is about 0.060 / 1.4 === 40X, so the heat flows will be very limited; expect local HOT SPOTS. To understand this, get a quadrille paper pad, and start drawing heat sources and heat exits, realizing each square on the pad is an increase in temperature. ======================================= The 60Hz (120 Hz) singing is the narrow/fast turnon time of the DIODES in the bridge (4 diode) rectifier. Assuming most of the turnon current occurs in 0.026 volts (when the current thru a diode increases by e^1 = 2.718^1 = 2.718X), your turn_on time will be the SlewRate of your unrectified power transformer output, divided into 0.026 volts. Assuming SlewRate of transformer is 40 volts peak * 377 radians/second (from taking the derivative of 60Hz sin, with 6.28 * 60 == 377) or SlewRate is found to be about 16,000 volts/second. the turnon time is 0.026 / 16,000 == 1.5 microSeconds. Thus your 60Hz rectifier diodes are a 1.5 microsecond fast-edge high-power interference generator.
H: Can continuity test cause component damage? In order to test some tracks on a mounted PCB, I would like to use a multimeter for continuity test. However, then I measured the open-circuit voltage of two multimeters at hand, and the results were: Fluke 87 V: 7.3 V Keysight 34465A: 9.4 V Both have a current limit of 1 mA, but when doing a measurement without connection, it applies the rather high open-circuit voltage. I was pretty surprised to discover that these widely used high-end multimeters apply an open-circuit voltage for continuity test that is above the absolute maximum ratings of common chips like CMOS 7400-series 3.3-V logic with high impedance inputs, which is for example 6.5 V for TI SN74LVC00A. Am I being overly concerned here, or is there actually a risk of damaging the components when doing continuity test on mounted PCBs with these multimeters? Is there any suggestion of how to do continuity test with lower open-circuit voltage? AI: Can continuity test cause component damage? Generally no. I have used ohmmeters to measure continuity on expensive aerospace electronics and was never concerned. Reliability engineers never warned us about risks. For your example (LVTTL component), the part will never see a large voltage, the ESD protection circuit will limit the voltage. Connecting an ohmmeter is not the same as connecting a stiff voltage from a power supply. A stiff voltage probably would damage the part. Some parts without ESD protection could be damaged by an ohmmeter if their absolute maximum input voltage was very low. These types of parts are not common.
H: What is the blue film that covers the PCB in my TV's remote? As a weekend project I am trying to fix my TV's remote and I noticed that the contacts of the remote's keyboard is covered by a thin blue film: As you can see, the remote's PCB is covered by a blue layer of some sort of film. I wondered what is this film that the remote is covered with? Also can this film be affected somehow if the remote fails to indicate that a button has been pressed? AI: I have not seen this construction in the wild, but it looks to me like a printed dielectric layer and a printed carbon ink layer overtop of that. That allows a much cheaper punched single-layer paper-based phenolic PCB to be used- the carbon ink acts both as contacts for the silicone keyboard keys and as jumpers. Lack of recognition of a button press could be because of a faulty connection between copper and carbon, a dirty contact on the silicone or PCB side, or a cracked PCB or lifted pad (remotes take a lot of abuse and come in intimate contact with greasy human paws and sometimes food and drink). They are also conveniently bone-shaped if you happen to have a large dog.
H: What is the purpose of these coils in contactor auxiliary contacts? Can someone please tell me what the function of this module, and more specifically, the curley wires on top of this contactor? It looks like the wires go to the same terminals as the main contactor terminals (although I didn't test continuity to confirm), and from what I can tell, it engages at the same time as the contactor via connecting to the "buttons" on top. I tried to search Google but not knowing what to call it made that futile. The main reason I am asking is that the small curley wires are extremely thin, almost as if it served as some sort of a fuse. Any help would be appreciated. AI: I think you have omitted to mention that these contactors are part of a power-factor control panel and so they are switching a purely capacitive load. If so, those coils are inductors. simulate this circuit – Schematic created using CircuitLab Figure 1. Power-factor correction capacitor soft-start. Remember that a discharged capacitor appears as a short-circuit when connected to a voltage source. A huge inrush current occurs and this is hard on the contacts. The auxiliary contact block on the contactors is designed to close before the main contacts. This allows a charging current to flow into the capacitors to partially charge them before the main contacts make and reduces wear and tear on the them. When I first saw them on an installation I was very surprised that such fine wires could do that work. According to a couple of online calculators including MustCalculate the inductance for my estimate of Ø = 10 mm, L = 40 mm and 9 turns the inductance is about 180 nH. This has an impedance of only 56 μΩ at 50 Hz but it's effectively a transient that's being switched so the impedance will be much higher.
H: Hall effect current transducer schematic diagram What is the function of the amplifier 2 in the below circuit diagram? HCT-0016 Hall Effect Split-Core Current Transducer: https://www.magnelab.com/products/hall-effect-split-core-current-transducer-hct-0010/ AI: You have given no context or credit for the schematic (which is in violation of site policy so you should fix that) but it looks like a Hall-effect based current sensor. The Hall effect is the production of a voltage difference (the Hall voltage) across an electrical conductor, transverse to an electric current in the conductor and to an applied magnetic field perpendicular to the current. It was discovered by Edwin Hall in 1879. Sensors based on the Hall-effect run a controlled current through the sensor which is placed in the magnetic field to be measured. The voltage across the sensor is then amplified to give a signal proportional to the magnetic field strength. Figure 1. A magnified view of the schematic. The output amplifier. The reference current amplifier with offset adjustment potentiometer. The sensor. The magnetic core (suggesting a torroidal current sensor). The primary winding(s) which pass through the magnetic circuit. Full-scale adjustment. (This is in the amplifier feedback circuit and adjusts the gain.)
H: 220V Home Automation PCB I recently designed my first PCB, which uses an ESP-01 to control 4 relays. I planned to use this to control my home appliances, which run at 220V. But I made a rookie mistake, instead of placing screw terminal width holes for the relay's COM, NO and NC terminals, I placed standard 2.54 mm spaced holes. I have the ordered (and received the) PCBs already, so was wondering if I can still use it with some changes. I'm thinking of using 2.54 m right-angled female headers and connect them to the screw terminals. But I don't know if they can handle 220V. And my track spacing towards the end is too less for 220V, is it safe enough for a maximum current flow of 0.5A? I do not wish to waste these PCBs, so any suggestions on how to use/modify them will be highly appreciated. And what's the worse that can happen? If my PCB gets a short circuit or something, I believe my appliances will turn on even if the relay is off. Or maybe some other problem can destroy the PCB or damage the components (which are cheap). But can anything riskier happen? Thank you. AI: Drill extra top and bottom holes (green) to place a 5.08mm (or 5mm) pitch screw terminal block Cut and remove the trace to the unused holes (sky blue) Cut slots (green) to separate the coil terminals from the relay common Add wires (white) linking the unconnected relay terminals to the terminal block That LED will need to be moved too, and its wiring ripped up Next time consider using relays that have the contact terminals at one end and the coil terminals at the other end, eg NAIS JW1 series or Omron G5Q series. The ESP module works best if there is no PCB under its antenna and especially no planes or traces. so you may want to relocate that 5V line too.
H: Is there a component/method that can take any signal, then increase it to 5 volts no matter how small the signal is? I was using a logic level MOSFET that should turn on when a voltage other than 0 volts between two points is detected. My problem is that the voltage is at times less than 5 volts and probably won't activate my logic level MOSFET. I need to know if there's such a component that takes any input voltage (0.1V or higher) then outputs 5 volts unless the voltage is 0. AI: It's called a comparator, which is basically an op-amp optimized to provide as much gain as possible under all circumstances; So much gain that it provides maximum or minimum output and hits its power rail. Use a reference input of 100mV on the inverting input and apply your signal to the non-inverting input. In other words, it just outputs a HI when the voltage of one input terminal is higher than the other, and outputs a LO otherwise.
H: Hidden wire detector, using resistor We have on the collector of the first transistor is a resistor at 1000 ohms , could you tell us what function this resistor performs in this place and how to argue that it is at 1000 ohms AI: Having built numerous multi-stage bipolar amplifiers as a kid, I'd wager this resistor is to limit current. Those amplifiers, lo those many years ago, would produce a power-line humming or evil-singing/buzzing (from quick rectifier diode turnon) as I brought my hand near the floating input of my breadboard multi-stage audio-band gain-of-100,000X circuit. There was enough gain the ELECTRIC FIELDS were being detected. Thus very similar to this 3-transistor very-high-Rinput circuit. Yes, I'd include resistors in all three collectors. Perhaps 1,000/1,000/100 ohms. =================================== Remember the input lead is floating, your body is the return path for the induced charges as you hold the circuit near the wall, as you watch for a slightly-glowing LED.
H: How to design a discrete linear regulator with an opamp and an N-channel MOSFET? So as far as I understand, the basic idea of a linear regulator is to use a series-pass element along with an opamp with negative feedback to stabilize the output. This is what I usually see as an example: simulate this circuit – Schematic created using CircuitLab Now, to use a MOSFET in place of the BJT, can I just do a direct replacement like this: simulate this circuit Or should the gate of the MOSFET be driven by another BJT like below? simulate this circuit Or does it not make any difference? Is one more stable than the other? Also I remember reading somewhere on the internet that in order for the opamp to regulate correctly, a small current should flow out of the output through the negative feedback loop, but a MOSFET gate doesn't allow any current in, which is also confusing. AI: It is quite possible that none will work effectively without a compensation network applied directly to the op-amp. Whether it's an op-amp supplying a load directly or via a buffer transistor, adding bulk capacitance to the voltage output will shift the phase margin towards the point of instability: - The object of the above modification is to reduce the gain of the op-amp at higher frequencies so that the excessive phase shift brought about by the bulk output capacitance won't act on a part of the spectrum where the loop-gain is greater than unity. You might have noticed that some regulators do state that they have a maximum capacitance that can be added to their output - this is the same issue - they have internal compensation that counters "so-much" bulk capacitance but no-more. Regards driving the MOSFET, because it is a source follower, it's gate-source capacitance won't be fully seen at the op-amp output and it might be OK stability wise but the bulk output capacitance is still present and is still a problem (see above). There's no real reason to use circuit 3 given what I've said above and, if you did you would need to add an emitter resistor to ground. Simulators are a good friend for fixing and uncovering the problems mentioned above.
H: Transformer secondary winding resistance I am struggling to understand how to model a resistance loss of a transformer secondary winding. In a typical flyback converter, if the primary and secondary transformer have a resistance loss, how do we model the the secondary transformer resistor during the second interval (when the mosfet is off and diode conducts). If the turns ratio is 1:n, the current during the second interval would be i/n. So the voltage drop across the secondary winding resistor would be i/n*Rsecondary. As per my understanding, the voltage reflected on the primary winding during the second interval should be -Vload/n - i/n * Rsecondary/n. But this does not seem to be correct. The schematic of a flyback converter is: Any help/pointer will be appreciated. Thanks AI: Any help/pointer will be appreciated And how do we model the the secondary transformer resistor during the second interval (when the mosfet is off and diode conducts). You can model the secondary resistance as a simple resistor in series with the diode. If the turns ratio is 1:n, the current during the second interval would be i/n Here's where it falls apart. At the instant the MOSFET disconnects the primary, the primary current can be called \$I_{P(PK)}\$ and this transfers to a secondary current peak of \$I_{P(PK)}/n\$. Thereafter, the current is falling from that peak towards zero like this for example: - Picture from here showing the \$\color{green}{\text{secondary current}}\$ of a 2:1 step-down flyback transformer operating (in this example) in DCM at a duty of 0.34. As can be seen, the secondary current ramps down from \$I_{P(PK)}/n\$ towards zero amps. So the voltage drop across the secondary winding resistor would be i/nRsecondary.* Correct if assuming an ideal diode and we are talking about \$I_{P(PK)}/n\$ at the instant the 2nd phase of the switching cycle begins. Clearly, as \$I_{S}/n\$ falls, the volt drop gets smaller because the current gets smaller. *As per my understanding, the voltage reflected on the primary winding during the second interval should be -Vload/n - i/n * Rsecondary/n.* Given the dot notation in the transformer, the reflected voltage on the primary (at the MOSFET drain) becomes more positive than the supply rail i.e. the minus sign is an error. The flyback on the primary raises the drain above the power (source) voltage by: - $$\dfrac{V_{LOAD}}{n} + \dfrac{I_{LOAD}\cdot R_{SECONDARY}}{n} + \dfrac{V_{DIODE}}{n}$$ $$ = L_{SECONDARY}\cdot \dfrac{d(I_{LOAD})}{n\cdot dt} + \dfrac{I_{LOAD}\cdot R_{SECONDARY}}{n} + \dfrac{V_{DIODE}}{n}$$ This does not take into account spurious overshoots caused by leakage inductance in the windings.
H: Low cost op-amp with Common-mode input voltage range of 1.125V I'm developing a project where an op-amp is configured to bring a input voltage difference ranging from 1.8V to 3V to a output voltage ranging from 3V to 5V. The output of the op-amp will be fed into a ADC input of a MCU. the circuit looks as follows: simulate this circuit – Schematic created using CircuitLab Taking following considerations: The op-amp will be powered in a single supply configuration with a voltage of up to 36V. In- can range from GND to Vcc-1.8V. In+ can range from 1.8V to Vcc. In+ - In- can range from 1.8V to 3V. The input signal will be really low frequency, there will be hardware and/or software low-pass filtering. How can I find a op-amp based on it's Common-mode input voltage range? Am I missing something or making something wrong? For transistors there is the alltransistors page where you can make a parametric search, I need something like this but for op-amps. What I have so far is: At the lower end of the input range I would have In+ = 1.8V and In- = 0V this gives that the common-mode input of the op-amp should be 1.8*20/(12+20)=1.125V. At the upper end of the range I see plenty of room for the Common-mode input voltage range. But from the datasheet of a typical UA741 page 6 the Common-mode input voltage range VICR is ±13V in a ±15V test condition. This means that my 1.125V figure is outside it's input range. An other way to solve this would be to connect R3 to some fixed voltage reference instead of GND and re-think the values of the 4 resistors. Adding a extra voltage reference would add more components to the board, increase size, cost, power consumption and make it more vulnerable to disturbances. AI: Many modern opamps that do not have rail to rail inputs have a common mode range from V- (or slightly below) to (V+ - 1.5). This is because the input structure is a PNP (or P channel) pair and we have come a long way in the design of these devices. As you are measuring a low frequency signal, you may need to consider flicker (1/f) noise. Zero drift amplifiers can eliminate this noise. Most precision amplifiers have a common mode range that extends to V- (you can see some of them in this table) (Most of the usual suspects have such devices - this is a typical table). One that stands out is the ADA4523-1 which has pretty impressive specifications and much less expensive than the LT2057HV. Looking at TI, there are plenty of offerings with budgetary (1k) prices below $1. The table has a rail to rail column which specifies both the input and output and most of the items here have input to V-. Rail to rail inputs can have their own very unusual problems if driven by a high impedance source as many of these devices have overlapping input pairs (a PNP and a NPN pair) and if the input is not actively steered the crossover point is not particularly well defined. I have experienced low level oscillations with some of these devices when the input was near the (thermally sensitive) crossover point. If you do not need full rail to rail input performance it is best not to use one. Before choosing one, check to see if it is available in distribution - the most expensive part is the one you cannot buy.
H: Hidden Wire Detector, Oscilloscope Measurement We have a hidden wiring detector device I used 2SC1815 transistors and the value of R was 1K0. My antenna was made of 300 mm length copper wire with diameter 0.3 mm. I've measured its inductance - it is about 2 uH. When we connect the oscilloscope to the base of the transistor, and put the earth on the emitter, we get an oscillogram with a cut off top. She cuts about 0.47 volts Why is that? What's the matter? AI: If you could zoom in on the top part of the waveform, you will see it is a LOGARITHM of a current, that current induced by electric fields in the laboratory around you, coupled to your 300mm wire. The scope (probe) Rin of 10,000,000 ohms is also diverting part of the (Efield displacement) current. Assume a parallel-plate model C = Eo * Er * area / distance Assume this becomes 9e-12 pFmeter * (300mm * 0.3mm) / 300mm, or Capacitance = 9e-12 * 0.3mm == 27e-15 farads. The current will be I = C * dVdT I = 27e-15 * [(for 60Hz) 220 volts * 1.414 * 377 radian/seconds] or about I = 27e-15 * 160,000 volts per second == 27 * 1.6 (in our pretend precision) * e-15 * e+5 I = 40 * 1e-10 amps or about 4 nanoAmps In the real world, with your 300mm wire being the ONLY piece of metal around to gather_in those Efield flux lines, you could use the equation for plate_to_wire coupling which increases the Capacitance by 2 * PI * natural_log (wire_width / separation). For a 0.3mm wire, located (2.718 ^ 6.28 ) ratio away, the coupling is about the same for parallel_plate versus plate_wire coupling. If you hold the wire NEAR a power cable, you'll have much more than parallel_plate_predicted coupling. =============================== You might ask "since we don't know the exact metal topology, how do we know which equations to use?" You will discover the capacitive coupling equations --- parallel-plate, plate-to-wire, wire-to-wire --- are dramatically different in form and in the predicted coupling, BUT the predictions only differ about 10:1 at most. Thus using a (not exact but not far wrong) bit of physics is the key to having a very useful ESTIMATE of the capacitance, thus of the available (displacement) current. Your 3_transistor experiment lets you approach Electric-fields, and realize they can be approximated, instead of being ignored.
H: Is there such thing as an active-low, logic level mosfet? I need to make a logic level switch that will turn on when the input signal is 0V (active low). I figured using a MOSFET is the best way to go, but I'm not so sure if there are active low MOSFETS. AI: I need to make a logic level switch that will turn on when the input signal is 0V (active low) You can use a suitable P channel MOSFET for this: - Picture from here. So, if the logic input is high, the P channel MOSFET is turned off and the load is disconnected from the +5 volts supply. If the logic input is low then the MOSFET activates and the load is connected to the 5 volt supply. You can also use logic level analogue switches but watch out for limitations in on-resistance however, if you require really low leakage current (device deactivated) then an analogue switch will probably be better than a single MOSFET in many circumstances. ADG802 Example: - The above has an on-resistance of 0.25 ohm and operates from 1.8 volts to 5.5 volts. All the usual vendors (TI, Maxim etc.) will have equivalent versions of this device.
H: Will two 18650s in parallel double the total max continuous discharge current? Let's say a 18650 cell is rated at max continuous discharge of 8A . Will having two in parallel make it 16A? AI: If the two cells are exactly the same...exactly the same voltage, exactly the same internal resistance, exactly the same discharge curve...then yes, the maximum continuous discharge will be equal to the sum of the separate discharge values. However, if the cells are not exactly the same you will not achieve double the current and you risk damaging one of the cells or causing a fire.
H: Good APA 102, SK9822, WS2812B alternative? I know it's an old question but many posts about the issue are several years old, so maybe the market has changed since, hence my question: I'm designing a Raspberry Pi compatible device for a client similar to an already existing device, which uses APA102 SPI controlled LEDs. Ideally I want my client to have a "plug and play" experience, meaning when he plugs the PCB into RPi, most of the old functionality of the existing device would work immediately, without changing the software. All would be great if not for supply issues with APA102s... And most of other similar and compatible(?) LEDs for that matter. They are either no longer produced, or are available only from obscure suppliers. I found this LED from American Bright Optoelectronics Corporation, which seems to be available on reels, which is great since the device is to be PnP assembled. I'm not sure if it is compatible with the older Chinese like APA102, SK9822, WS2812B in terms of control. If anyone has worked with these or similar LEDs, and can share some experience it would be greatly appreciated. EDIT: Initially I didn't notice the line on the digikey listing saying that the utilized LED is indeed APA-102C. I don't know if the IC is the same or not however. AI: The way to evaluate operational or mechanical equivalency of the various Smart LEDs is to read the manufacturer data sheets. That will lead you to a full understanding of any differences that may exist and then you can make a decision if those differences can be ignored or not in your application. According to the data sheet for the APA-102C the manufacturer (APA Electronic Co LTD, Taiwan) indicates that they have a Worldwide Patent on their SmartLED. This will limit the number of sources for the APA-102C or direct copies of it for the duration of time those patents are valid. The manufacturer may decide to second source license another manufacturer to permit a wider availability of parts. The datasheet for the BL-HBRG32L (American Bright OptoElectronics Corp, California USA) appears on a quick overview to be generally compatible with the APA-102C. Bright's web site has news announcements indicating that their Smart LED line was introduced in April 2019. It is unclear if they made their own LED driver chip design or if they are operating under license from APA.
H: LTSpice .DC syntax error I got this error Syntax error in .DC command. expected sweep starting value of source 'sweep' I have no idea about how the syntax works. I only resorted in asking this site because it was urgent And here is the code in question: FILE: p-Enhancement ISFET Model ********************************************************* *------ ISFET MACROMODEL -------* ********************************************************* .PARAM *------------------------------------------- * Constants and common parameters *------------------------------------------- * k = Boltzmann constant [J/k] * T = Actual absolute temperature. [K] * q = Electronic charge [Coulomb] * eps0 = Vacuum dielectric permittivity [F/m] * epsw = Relative permittivity of the bulk (diffuse layer) solution * NAv = Avogadro constant [1/mole] * Lisfx = Gate length [m] * Wisfx = Gate width [m] * Agate = Gate area [m**2] * Cbulk = Electrolyte concentration [mole/l] * Ka = Positive dissociation constant [mole/l] * Kb = Negative dissociation constant [mole/l] * Kn = Dissociation constant for amine sites [mole/l] * Nsil = Silanol (or oxide) surface site density [#/m**2] * Nnit = Amine surface site density [#/m**2] * Eabs = Absolute potential of the standard hydrogen electrode [V] * Erel = Potential of ref-electrode(Ag/AgCl) relative to H electrode [V] * Phim = Work-function of metal back-contact/electronic charge [V] * Philj = Liquid-junction potential diff. between ref-sol. and electrolyte [V] * Chieo = Surface dipole potential [V] * Eref = (Eabs+Erel-Phim+Chieo+Philj) acts for gate-source ISFET Voltage [V] *----------- + conv=1e3 conv2=1e6 + k=1.38e-23 eps0=8.85e-12 T=300 + q=1.602e-19 NAv=6.0221415e23 ET='q/(k*T)' + PI='355/113' PI2='2.0*PI' + Nsil=1.0e18 Nnit=9.0e17 ;Si3N4 + Ka=15.8 Kb=63.1e-9 Kn=1e-10 ;Si3N4 *+ Nsil=8.0e18 Nnit=0.0 *Al2O3 *+ Ka=12.6e-9 Kb=79.9e-9 Kn=0.0 *Al2O3 *+ Nsil=1.0e18 Nnit=0.0 *SiO2 *+ Ka=15.8 Kb=63.1e-9 Kn=0.0 *SiO2 * + epsw=78.5 epsihp=32 epsohp=32 + dihp=0.1n dohp=0.3n Cbulk=150m + Eabs=4.7 Phim=4.7 Erel=0.205 + Chieo=3e-3 Philj=1e-3 + Lisf1=8u Wisf1=30u Agate='Wisf1*Lisf1' + bb='sqrt(8*eps0*epsw*k*T)' + Cb='NAv*Cbulk*conv' + KK='Ka*Kb*conv2' + Ch='(Agate)*((eps0*epsihp*epsohp)/(epsohp*dihp+epsihp*dohp))' + Cd='(Agate)*(bb*ET*0.5)*sqrt(Cb)' + Ceq='(1/(1/Cd+1/Ch))' * ************************************** *** MOSFET MODEL *** ************************************** * ENHANCEMENT-MODE P-MOSFET *------------------------------------- .MODEL MISFET PMOS LEVEL=2 + PHI=0.7 TOX=39n XJ=0.20u TPG=1 + VTO=-0.98 DELTA=2.9 LD=58.7n KP=1.68e-5 + UO=189 UEXP=0.24 UCRIT=1.15e5 RSH=0.1 + GAMMA=0.64 NSUB=9.86e15 NFS=1.47e11 NEFF=1.5 + VMAX=10.0e5 LAMBDA=4.25e-2 + CGSO=0.185n CGDO=0.185n CGBO=0.43n CJSW=0.26n + CJ=3.40e-4 MJ=0.58 MJSW=0.31 PB=0.90 * ***************************************************************** .SUBCKT ISFET 1 6 2 3 4 101 * Vref 1 10 {Eabs+Erel-Phim+Chieo+Philj} * Ceq 10 2 {1/(1/Cd+1/Ch))} RCeq 10 2 1G * EP1 46 0 V = log(KK)+4.606*V(101) RP1 46 0 1000G EP2 23 0 V = log(Ka*conv)+2.303*V(101) RP2 23 0 1000G * EPH 2 10 V = (Agate*q/Ceq)*(Nsil*((exp(-2*V(2,10)*ET)-exp(V(46)))/(exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+exp(V(46))))+Nnit*((exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn/Ka)*exp(V(23))))) RpH 101 0 1K ************************************************************* MIS 6 2 3 4 MISFET L='Lisf1' W='Wisf1' * .ENDS ISFET **************************************** VpH 500 0 DC 7.3 Vds 450 0 DC -2.5 Vgs 400 0 DC -2.0 * **************************************** * XIS 400 450 430 0 0 500 ISFET * *********************************** .OPTIONS list node post probe pathnum itl5=200000 tnom=27 ingold=1 .DC VDS 0 -10 1E-2 SWEEP VGS 0 -2.5 0.5 .PROBE DC I(Vds) .OP .END AI: There are some helpful suggestions here. Some of them apply in your case. Remove all blank lines. Remove the SWEEP word from the .DC card. Fix the extra ')' on the CEQ card. LTspice .OPTIONS doesn't support the following, so remove them: itl5 pathnum probe node ingold post Convert all "E" cards to "B" cards. That should get you into running mode, anyway. However, I'd recommend removing everything from the .OPTIONS and below, when pasting it into LTspice. This sets up your models and subcircuits and circuit, without actually specifying which run you want to perform. Then separately, set up the .OPTIONS card in a spice "text" card that you add, separately on the schematic. Similarly, place the .DC card into its own spice "text" card. And then similarly again, place the .PROBE and .OP cards into yet another spice "text" card, but in this case I'd recommend telling LTspice that this pair of cards are just "comments" for now. You can then run the .DC simulation and display plots, if you want. Afterwards, just comment out the .DC card and uncomment the .PROBE and .OP cards and run it again.
H: USART and ATmega RX Problem I'm trying to understand how USART of ATmega works. I read some pages and I've picked information about it. To test functionality I've written this code: #define F_CPU 16000000 #define BAUD_RATE_115200_BPS 8 #include <stdint.h> #include <avr/io.h> #include <util/delay.h> #include <stdio.h> void Transmit(void); unsigned char data[] = "Data transmitted..."; int main() { unsigned int ubrr = BAUD_RATE_115200_BPS; UBRR0H = (uint8_t)(ubrr >> 8); UBRR0L = (uint8_t)(ubrr); UCSR0B = (1 << RXEN0) | (1 << TXEN0); UCSR0C = (1 << USBS0) | (3 << UCSZ00); DDRB = 0b11111111; Transmit(); while(1) { while (!(UCSR0A & (1 << RXC0))); //data[0] = UDR0; //data[1] = 0; sprintf(data, "%d", UDR0); Transmit(); switch(UDR0) { case 'A': Transmit(); PORTB = 0b11111111; _delay_ms(2000); PORTB = 0b00000000; break; case 'B': PORTB = 0b11111111; _delay_ms(500); PORTB = 0b00000000; break; default : break; } } } void Transmit(void) { int i = 0; while(data[i] != 0) { while (!(UCSR0A & (1 << UDRE0))); UDR0 = data[i]; i++; } _delay_ms(100); } I can send data without problem, but I can't receive correct data. If I send "A", I receive ASCII code 161 or 225 and with "B", 162 or 226. I don't understand where the problem is. For tests I'm using Arduino Uno (ATmega328P 16MHz). AI: The baud rate is on the edge of accepted tolerance, so change to 38400 BPS. Try different terminal program which can send capital and non-capital letters properly.
H: Analog values without Adc STM32 I have a STM32WB55CGU6 where I have all my ADC pins used up and im trying to obtain the battery level using a pin which does not have a ADC (PB6) which is branched as shown in the picture: This follows the principle where it will charge and discharge following this link : link This is my current program but somehow it doesnt work and im pretty sure im doing something wronf but what I am not too sure. while(1){ HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_SET); HAL_Delay(1); HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_6); while(HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_6)==1){ time++; } if (HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_6)==0){value = time;} } Im programming with STMCubeIDE where I have set the pin to GPIO_Analog AI: If you compare the schematics, yours don't match how it is supposed to be connected. If the PB6 was connected to the resistors directly, and the 10nF were connected from PB6 to ground, it would work. Then, the STM32 can discharge the capacitor, and count time until it has been charged. Also, if the pin is configured into Analog mode, it's not an output, and both the digital input and output buffers are disabled, so it's digital state cannot be set or read.
H: What does Nu (ν) prefix mean? Stumbled upon this in ZVN4525E6 datasheet: Zero Gate Voltage Drain Current (IDSS): 35 νA @ VDS = 250V, VGS = 0V The letter is U+03BD and it is not in any common unit prefixes that I know. My guess this is either substitute for "nano" (since capital Nu is "N"), or some weird expression of current via power (as in V*A). Both make little sense to me. Also, while I am here asking anyway, is this FET a good choice for low side switching of small loads in 24V system controlled by 3.3V logic but also compatible with 24V pull-ups? This was actually the only choice left in parametric search after I selected 30V VDS&VGS and 3V threshold. AI: It's a typo of some sort. The Greek letter nu (looks like an italic 'v') is not an SI prefix, but may have been mistakenly used instead of an 'n' (nano). There are other 'n' and 'μ' prefixes in the datasheet, so it is not clear why they are not typed in. Comparing to a similar device (ZVN4525Z), you can see that nA is the correct unit. https://www.diodes.com/assets/Datasheets/ZVN4525Z.pdf
H: Can I can control an RC servo using only a 5VDC and GND signal? I'm working on an application where I want a servo to open and close a hatch. Because I only need the servo to operate in two positions, I'm curious if I can forgo the PWM aspect and just supply a 5VDC and GND signal to toggle between two positions. AI: I doubt that it would work the way you want. In most analog servos, the input pulses trigger an internal multivibrator that's controlled by the feedback pot, and the resulting pulse is combined using some simple logic with the original pulse to drive the motor H-bridge — the difference in pulse widths drives the motor one way or the other until they are equal. If you don't provide a stream of pulses, the motor drive will never get activated. Why not just use a regular DC motor along with some limit switches?
H: Linear dropout voltage transfer function I am reading this application note from Texas instrument : http://www.ti.com/lit/an/slyt187/slyt187.pdf?ts=1591543592096&ref_url=https://www.google.fr/. The application note give us the transfer function Vout/Iout of an LDO built with a PMOS. Here is the model : Here is the transfer function : where R12 is equal to : I have actually some troubles to understand why Rds is in parallel with the capacitor Cb. The voltage across Rds is equal to (Vin - Vout) and the voltage across Cb is equal to Vout ? So why Rds is in parallel with Cb ? Thank you very much and have a nice day :D (I know that I have some troubles with AC model) AI: I have actually some troubles to understand why Rds is in parallel with the capacitor Cb. When we're working out the equivalent resistance of some network, we treat ideal voltage sources as shorts. In this analysis we're assuming the input (\$V_i\$) is being provided by an ideal voltage source. Therefore the source terminal of the PMOS is connected to ground, for the purpose of this analysis. Since \$C_b\$ is also connected between the output terminal and ground, that puts \$C_b\$ and the drain-source branch of the MOSFET in parallel.
H: Formula question about the Bridge and full wave rectifier,where are these number from? i learn something formula of Bridge and full wave rectifier from my book DC voltage \$V_{DC}=V_m-\frac{V_{r_{(pp)}}}{2}\$,\$V_m\$ is the amplitude of sine wave voltage, \$V_{r_{(pp)}}\$ is the peak to peak voltage of ripple wave The RMS voltage value of ripple \$V_{r_{(rms)}}=\frac{V_{r_{(pp)}}}{2\sqrt{3}}\$ If \$f=60Hz,V_{r_{(rms)}}=\frac{2.4V_{DC}}{R_L C}\$ Ripple factor \$ =\frac{2.4}{R_L C} \times 100 \% \$ i have some questions about the formula above Q1 In the 2. formula,how is the \$2\sqrt{3}\$ calculated?i mean,based on what reason,so we can say \$V_{r_{(rms)}}=\frac{V_{r_{(pp)}}}{2\sqrt{3}}\$,not \$V_{r_{(rms)}}=\frac{V_{r_{(pp)}}}{any \ number}\$? Q2 In the 3. and 4. formula,how is the \$2.4\$ calculated? i mean,based on what reason,so we can say \$V_{r_{(rms)}}=\frac{2.4V_{DC}}{R_L C}, \$and Ripple factor \$=\frac{2.4}{R_L C} \times 100 \% \$ not \$V_{r_{(rms)}}=\frac{any \ number \times V_{DC}}{R_L C} \$ or Ripple factor \$=\frac{any \ number}{R_L C} \times 100 \% \$ ? AI: The ripple can be approximated by a sawtooth. The ratio of peak to RMS of a sawtooth (proof involves a bit of calculus and is left as an exercise) of a sawtooth is Vr(pp)/(2\$\sqrt{3})\$. Keep in mind that the ripple goes plus Vr/2 and minus Vr/2 so you need only integrate one half of the triangle. If you assume a constant current from the load and the period of a half cycle, and the above formula you get a constant of 2.41 milliseconds. That should give you a hint of what units to use for C.
H: Name of this crimp connector? What is the name of this crimp connector? It looks like a spade connector (female) with a missing tail. In the picture, it used to attach a thermal fuse. Does it require a special tool to install? Can you make your own by repurposing a spade connector... AI: This kind of crimp splice connection is popular in appliances, as it requires no soldering and can be used at relatively high temperatures. It comes off a roll of such connectors or a roll of strip brass, in which case it can be called a band splice. I have emulated this with ferrules and a collet hand crimping tool in order to fix our prized sandwich maker by replacing the internal thermal fuse. They called it too close on the temperature rating and it was already the highest temperature easily available (240°C) so I moved it a bit to make it run slightly cooler.
H: How to make my sound reactive LEDs with Tip31C work? I am building a rhythmic LED headphone prototype, but unfortunately I am missing something or am doing something wrong because my project is not working properly. The project is as follows: I bought A pair of one dollar headphones. Two tip31c transistors. One pam8403 module, to improve the signal of the two channels. Two 5 V LED plates for both right and left channels A USB cable. I am using this diagram: But something went wrong, because the pam8403 only works disconnecting the tip. I've tested the output right and left channel of pam8403 and works fine with speakers of test, but when I connect the tip31c in one or both channels it makes a (bip a sound hit in bot out channels) that it repeats infinitely, and the LEDds are blinking in a static sequence repeatedly infinitely, and not with all power, not following the music or music signal provided by the audio input plug... I don't know if it's a problem of pam8403 or tip31c, important I need pam8403 because not all devices have the full power.... AI: PAM8403 is a Class D bridging amplifier so you are shorting out one of the drivers by grounding it, among other things. Try using just the + on each side and use an RC low-pass filter like this: simulate this circuit – Schematic created using CircuitLab You may have to try other values of R and C to get what you want.
H: How does this BJT biased with a diode work? I'm trying to teach myself some basic electronics and I'm stuck on understanding what's going on with this simple NPN transistor circuit that is using a diode for bias. I've simulated the circuit with SPICE and I get a base voltage of about 0.61 V and a collector voltage of about 0.85 V. I also built the circuit and get very similar values on my breadboard. It seems that the transistor is conducting, otherwise the collector voltage would be 9 V, but if it's conducting that means that there's a current through the base and thus the diode, in which case the drop across the diode should be about 0.7 V, but instead I'm getting about 0.24 V. Something seems to be wrong/missing from my mental model of either how the diode or the transistor (or everything!) works. I'd be very grateful if someone can help me fix that. Changing R1 to provide different diode currents and voltage drops (measured from C-B): 1 364 mA 1.14 V 10 13.4 mA 0.75 V 100 521 uA 0.58 V 1k 45.2 uA 0.46 V 10k 4.87 uA 0.35 V 100k 568 nA 0.24 V 1MEG 73 nA 0.14 V 10MEG 10 nA 0.06 V 100MEG 1.65 nA 0.02 V AI: The Shockley diode equation, expressed so that you get the diode voltage as a function of diode current, looks like: $$V_D=\eta\,V_T\,\ln\left(1+\frac{I_D}{I_\text{SAT}}\right)$$ Aside from the thermal temperature, \$V_T\$, the two key parameters defining the dioide's behavior are the emission co-efficient, \$\eta\$, and the saturation current, \$I_\text{SAT}\$. It turns out that \$I_\text{SAT}\$ is also highly temperature-dependent. But assuming that the temperature is constant, at \$T=27^\circ\text{C}\$, we can take \$V_T\approx 26\:\text{mV}\$ and just worry about the specific values of \$\eta\$ and \$I_\text{SAT}\$. The model I have in LTspice provides \$\eta=1.752\$ and \$I_\text{SAT}=2.52\:\text{nA}\$. I've also examined the default \$\beta\$ for the 2N3904 model in LTspice. It's \$\beta=300\$. Here's a simulation that varies the load resistance over the wide range you specified (\$1\:\Omega\$ to \$100\:\text{M}\Omega\$) and displays a few interesting details: Please note that I am using a .STEP card to modify the load resistance value, automatically. This way I don't have to do separate runs and write down answers one at a time. Instead, I can just plot useful information. I've chosen to plot three different values. The green line is the diode voltage. The dark blue line is the diode's current (also the BJT's base current.) And the red line is the BJT's computed \$\beta\$ value. Before we dig in too deeply, let's check out a few hand-calculations. First off, from the above equation, for every \$10\:\text{X}\$ change in diode current I can expect to see \$1.752\cdot 26\:\text{mV}\cdot \ln\left(10\right)\approx 105 \:\text{mV}\$ change in the diode voltage. That should be the approximate slope of the dark blue line. We can also compute an arbitrary value for the diode voltage. Let's say we want to work this out for \$I_D=1\:\mu\text{A}\$. I'd compute \$1.752\cdot 26\:\text{mV}\cdot \ln\left(1+\frac{1\:\mu\text{A}}{2.52\:\text{nA}}\right)\approx 273 \:\text{mV}\$. Now, on the right side find the tick for "1e-006A" and move left until it intersects the dark blue line. Now, go directly downward from that intersection until you find the green line. Note that this is about \$270\:\text{mV}\$. Very close to prediction. Now, if you examine the curves, you'll find some interesting details. The red line should be flat at \$\beta=300\$, but it isn't. This is because the BJT experiences current-crowding and Ohmic resistance issues that, among other reasons, complicate the actual \$\beta\$. It doesn't reach a flat \$\beta\approx 300\$ until the load is about \$1\:\text{k}\Omega\$ (which corresponds to about \$I_C\approx 8.3\:\text{mA}\$.) If you examine the OnSemi datasheet for the 2N3904, then you will see this: Which shows you that the \$\beta\$ does start to decline at about that collector current. So this is about what should be expected. With lower \$\beta\$ (moving leftward on the above chart), the diode will experience rapidly growing (relative to the collector's current) currents on its own. So you'd expect the diode to show a change in slope for its diode voltage as you go from about \$1\:\text{k}\Omega\$ to about \$100\:\Omega\$. And, in fact, you do see that change roughly in that region. But the diode appears to be remarkably flat, from just a little between \$100\:\Omega\$ and \$1\:\text{k}\Omega\$ to a little between \$1\:\text{M}\Omega\$ and \$10\:\text{M}\Omega\$. That's more than six orders of magnitude! Maybe even seven! Not bad. When the currents get very tiny in the diode, then other new effects take place. These include the formation of emitter-base surface channels; the recombination of surface carriers, and the recombination of carriers in the emitter-base space-charge layer. So once again, it's not "flat" as these new effects begin to dominate in the very low current regime. I'll leave you to inspect the chart. Hopefully, you'll leave from that experience a little more comfortable with the whole situation.
H: How to make circuit to reverse dc motor direction with a 12v+ trigger wire I have a motorized retracting front license plate on my car that works great via a double pole momentary switch currently. However I really would like to make it automatically work when the car starts. It is very hard to modify the device itself due to the way it is installed so I am looking to build a circuit that would operate it based off a 12v + trigger that will be on when the car starts. The device that retracts the plate is very simple with 2 wires (red and white) to push the plate out you connect positive to red and negative to white. To retract it you put positive to white and negative to red. There is no stop switch on the device so it takes about 10 seconds to fully extend or retract. So the circuit would need to provide power in one config for about 10 seconds when it senses 12v + and the provide power in the opposite configuration when the 12v + ends on the trigger. I have some basic electronic knowledge and can solder components to a board but creating this circuit is beyond me. I would greatly appreciate some guidance to get this built. Thank you. AI: If i understood you correctly, you need something like this: simulate this circuit – Schematic created using CircuitLab When you have power on "Direction" relay, motor will rotate in one direction. When you don't - it will rotate in opposite direction. "Power" relay works as stop switch.
H: Type 3 compensator design for Buck-Boost converter I'm practicing a design of a type 3 compensator for a voltage mode buck-boost converter, so I went through the book entitled "Switch mode power supplies Spice simulation and practical design" The topology used for calculations of the different components of the compensator is shown below (Extracted from the book) The specifications are as follows: Vinmin=10v (minimum input voltage). Vinmax=15v (maximum input voltage). Vout=-12 (Regulated output voltage). Fs=100kHz (Switching frequency). Fc=5kHz (Crossover frequency, chosen by the author to make the RHPZ after that frequency). Iout=2A (maximum output current) Rload=6ohm (DC load resistor) I have followed all the steps given by the author but I failed to find the same values found to the compensator component. The method used to place the poles and zeros of the compensator is the manual method and not the K factor method. So the author proposed the following: From the Bode plot, we can see that the required gain at 5 kHz is around -10 dB worst case. To cancel the LC filter peaking, place a double zero close to the resonant frequency, 600 Hz Since the zero occurs after the crossover frequency, we can place a first pole at 7 kHz Place a second pole at one-half of the switching frequency, to force the gain to further roll off, 50 kHz. Using the manual placement method described in Chap. 3, evaluate all the compensator elements. R2 = 18.6 kohm R3 = 456 ohm C1 = 15 nF C2 = 1.3 nF C3=7 nF When I apply, the equation encircled in red in the figure, I come out with a different value for R2. I found R2=1.8kohm but the author finds R2=18k ohm and since C1 and C2 values depend on R2, so my compensator is not good and I do not get a sufficient phase margins. Please can anyone ensures to me the value of R2 and does the equation encircled in red correct ? AI: This is an excerpt of the book I wrote on switching power supplies. The exercise consists of stabilizing a buck-boost converter whose schematic diagram appears below: In the left side of the drawing, you can see a list of variables. These variables correspond to information extracted from the open-loop response of the power stage. However, considering the negative voltage delivered by the buck-boost converter, we will observe the response after the inverting block \$E_1\$. Then, we will extract the attenuation at the selected 5-kHz crossover frequency. The phase is important and will let us compute the necessary phase boost to calibrate the type 3 compensator and place poles and zeroes. However, in this exercise, the position of these elements has been done earlier in the text. The power stage response \$H(s)\$ is here: The left-side macro will now compute the components values around the op-amp to provide a gain of 9.6 dB at 5 kHz and sufficient phase boost at this frequency. The amount of phase boost will lead to the targeted phase margin, neglecting the op-amp contribution here. Owing to this approach, it is easy and fast to change the positions of the poles and zeroes and immediately see the effect on the transient response or the open-loop gain. The computed values are here: The incriminated resistance \$R_2\$ is 16.8 k\$\Omega\$ and not 18.6 k\$\Omega\$ as mistakenly printed. Once these values are applied, the compensated loop gain is here: It is important to note that the op-amp plays a role and can affect the expected gain and phase boost, leading to a smaller phase margin than expected. I have covered this aspect in a series of articles published on How2Power.com some time ago.
H: Increase amps with set voltage? If I had a battery that is 50ah at 30V, what would I have to do to increase the current rating to 150ah, while maintaining the same voltage? AI: 150 Ah is a capacity rating, not a current rating. You may well find your existing battery can already deliver 150 amps. If you want to increase the capacity from 50 Ah to 150 Ah, then you would need to put two more 50 Ah batteries in parallel with the first. This would also increase by a factor of three whatever the current rating of your first battery was, assuming they were identical. In order to find out what the current rating of your first battery is, you would need to look at the specifications. They normally give a C rating, which can be interpreted roughly as 'hours to fully discharge the battery'. Capacity falls as the output current increases, hence the qualifier 'roughly'. A C rating of 1 means that the current rating is numerically equal to the capacity rating, which it looks like you are assuming. However, few batteries have a maximum C of 1. There are different ratings for current. The two most frequently met are the maximum current that can be drawn safely, and the current for which the capacity rating is valid. With a car battery for instance, the maximum C is often around 10, for cranking the engine. However the maximum capacity C is often 0.1 or even 0.05, requiring a 10 or 20 hour discharge to obtain the stated Ah capacity.
H: Does 7905 needs minimum load current? In the 7905 negative voltage regulator datasheet, it didn't mention that it needs a minimum load current to operate. The 7905 that I have is outputting -7 V but adding a ~2 mA load causes the voltage to drop to nominal voltage -5 V. Input is -15 V. Does a 7905 need a minimum load or is it broken? AI: Yes. -5 mA as stated in the datasheet, although not separated and verbatim. Too high output voltage is common for 78xx and 79xx series linear regulators with too low load.
H: open wire detection of open drain output I am working with a commercial dc motor speed controller it has a open drain output which can be used for generating fault signals , i am taking that output to a pcb through wire , i am giving it a pullup to use the open drain output as logic level output .whenever there is fault the mosfet is on and the output is low ,when there is no fault the mosfet is off and output is pulled high. i want to make circuit to detect if there is disconnection between open drain output and the pcb_wire_connector and also give logic level fault signals AI: Try this: - It uses a window comparator and, under normal operation the voltage into the window comparator is \$\frac{2.2}{3.2}\times V_{CC}\$ and, when the MOSFET operates that voltage gets close to 0 volts but, importantly, if the wire link is broken, the voltage sensed by the window comparator is close to \$V_{CC}\$ thus indicating a wire open fault: - INPUT is the voltage level on the wire VrefHi for a Vcc of 5 volts would be about 3.5 to 4 volts VrefLo for a Vcc of 5 volts would be about 2 to 3 volts You can mount the 2K2 resistor on the output terminal block of the motor controller module in parallel with the wiring that goes to your PCB.
H: Effect of high impedance Opamp buffer on current lost In the below figure, end-user have the choice to output 4-20mA or 0-10V (using MUX control by uC), I have inserted high impedance buffer(The part number is not correct) with the voltage divider to reduce 0-10v output to 0-5V so ADC can read it (can also reduce to 0-1V) and calibrate 0-10V. I want to know if the user select 4-20mA as output, the buffer will be ignored due to high impedance, is that correct. If not do I lose any current. simulate this circuit – Schematic created using CircuitLab AI: There will be no significant current flowing into the input of the OpAmp. Depending on your measurement resolution and your specific OpAmp this will not even be detectable. The Input bias current (check the datasheet of your OpAmp) will be in the range of picoamp (FET input stage) to nanoamp (bipolar input stage). Example of impact: Assuming an input bias current of 10nA, this would be a fraction of the full scale input of \$ \frac{10~nA}{20~mA} = 0.5 \cdot 10^{-6} \$. This would require a resolution of \$ N = log_2 \frac{1}{0.5 \cdot 10^{-6}} = 21\$ Bit to change the result by only one single LSB.
H: PSoC PWM for driving LED I'm trying to implement an LED driver and I found the next circuit in PSoC's Guide on how to use the GPIOs. Thing is I don't get if it's a must to include the R3 resistor and the Q2 transistor or if it's enough configuring the Pin_4 as Strong Drive?? thanks!! AI: If the R_2 value is large enough that it limits the current through the LED to a value that is within spec for the GPIO on the MCU and the VDD powering the LED is the same voltage level as the MCU GPIO power rail then you can directly drive the LED R_2 from the GPIO pin. You would need the transistor and the R_3 resistor if: The LED power rail is a higher voltage than the MCU GPIO power rail such as 9V, 12V etc. The LED needs much higher current through it to illuminate it to the brightness desired.
H: Ambiguity about concept of baud rate and bit rate I know that there is lots of questions and answers that is related to this topic, but i can not clearly and distinctively find answers to my questions, yet. In addition i found some answers which seems to be contradictory to each other. I know that baud is number of symbols per second in a data transmitting signal, As here is mentioned: https://electronics.stackexchange.com/a/282382/254779, Then its unit could not be "bits per second", right? But these two answers bellow say that the baud rate unit is "bits per second": https://electronics.stackexchange.com/a/273817/254779, https://electronics.stackexchange.com/a/117245/254779. Further more, I have ambiguity about the way measuring baud rate. In some web sites is said to be measured by number of times line changes per second and some where else as signal units per second. But i guess that they are not completely the same, right? Because this really means that every signal unit should be correspondent to only one signal change. So for example how baud rate is measured for Manchester encoding? I guess that in this encoding number of signal changes per second is not the same as number of signal units per second, right? And the last one is that i found some answers which said meta data bits like start and stop bits were not taken into account for measuring bit rate, however, I saw somewhere else that all bits were used for measuring bit rate. So which of these is correct at the end? For example is baud rate / bit rate = 1 in the UART protocol? I have these questions in my head for long, and i decided to ask them once for all. Thanks for reading. AI: "Baud rate" means "raw symbols per second". For binary symbols (like RS-232), it's synonymous with "raw bits per second". Manchester encoding is a poor fit to this model, but if you wanted to squeeze it in, then a symbol period is equal to a bit period, and there's all the weird Manchester encoding rules that need to be followed. For RS-232, baud rate = raw bit rate, and that includes the start & stop bits. For instance, 1200 baud means a bit time of \$833\mathrm{\mu s}\$, and that applies for all bits. So if you're sending 1 start, 1 stop, and 8 data bits, the fastest you could transmit payload bits would be \$1200\frac{8}{10} = 960\$ bits/second. Typically, in the literature the term "baud" has become clouded because it's often conflated with "bits/second", and with more complicated modulation schemes like OFDM the exact meaning of a "symbol" can be up for debate -- so if you're authoring a paper, it's a good idea to make it clear what you're talking about independent of the term.
H: Magnetization Inductance vs. Transformer Inductance what is the difference between transformer inductance and magnetization inductance, as I know transformer inductance is calculated with magnetization current but I've never seen magnetization inductance calculation. AI: The transformer primary, in the absence of a load on the secondary, is just an inductor and, as with any inductor, the current that passes through it causes magnetization hence, the current that flows into the transformer primary with no secondary load is basically the magnetization current. It's probably better if you looked at the equivalent circuit of a power transformer: - \$L_P\$ and \$L_S\$ are inductances that don't couple between primary and secondary aka leakage inductance. I've never seen magnetization inductance calculation. I've literally seen dozens and dozens - it's probably one of the first calculations you make when designing a transformer. You have the core material and dimensions and from that you can calculate inductance based on \$A_L\cdot N^2\$ where \$A_L\$ is a number that embodies all the core and dimensional data and \$N\$ is the number of turns.
H: How to control LCD monitor with micro controller? I would like to control my PC monitor. After disassembly I found the control buttons are implemented like this (just more data line and buttons) I would like to control it (with ESP2866) With the first button which is alone in a DATA line 1 there is no problem I just simply pull down with one of the GPIO like this and it is working flawlessly (I don't use any resistor because expecting in the other side there is) With Data line 2 I’m having trouble with the same approach the button with the smallest resistor is triggered from other button. I try to use resistor, transistor but it just got worse. Please note ESP is working a bit higher voltage than 3.24v it is 3.26v Also connected the ground wires I wonder how should I try to interface with this? Thank you AI: Use an NPN transistor or small signal N channel MOSFET. The GPIO drives the base/gate (the NPN transistor includes a series resistor with the base). The collector/drain is connected to the resistor side of the switch. Have one sub-circuit like this for each of the switches. You could also use an IC chip that has open collector/drain output for buffering the GPIOs to the switch connections.
H: DC-DC converters and heat generation I've bought this 12V to Magsafe 2 85W car adapter so I can charge my MacBook Pro off of my auxiliary batteries without having to keep the inverter on (more efficient). If I understand correctly, this is using a DC-DC step up converter to take the voltage from 10-14V up to 20V. The problem is it gets HOT, especially if the computer is under load. The charger's own internal temperature protection kicks in and it stops providing current until it cools off. Is this just because it's a cheap / defective product or because 7A is too much for a 12V cigarette lighter style outlet? Can I expect the same heat to be wasted if I build my own DC-DC converter as outlined by this DIY article? Some insights would be great, I just want to understand what's going on :) UPDATE: I tried to build a heatsink for it that I stuck onto its metal back. It did not work. I took it apart and found that that the metal cap is connected to nothing internally explaining why the heat sink did not work. In addition, all of the electronics were encapsulated in foam, which I'm sure did not help with the overheating. I am now going to build my own like in the article linked but I have another electrical question. AI: For a MacBook Pro, the input power from the charger can be as high as 85W at 18.5VDC, which means about 4.6A input current drawn from the charger. or because 7A is too much for a 12V cigarette lighter style outlet? The charger is most likely a DC-DC boost converter and assuming it's electrical efficiency is 92% at best, the input power should be 85 / 0.92 = 92.5W. The cigarette lighter's fuse is usually 10-15A, so ~120W output can be drawn safely. The charger seems too tiny for an 85W converter. As there are no holes in the outer case for the air convection and it's hard to believe that there's a heatsink inside, a dissipation power of 92-85 = 7W can cause a lot of heat inside. Can I expect the same heat to be wasted if I build my own DC-DC converter as outlined by this DIY article? The calculation is simple. You can expect at least a total of 10W power to be wasted by MOSFETs and inductors. So you should take the thermal considerations into account, and provide the required precautions for the hot air to be ventilated (openings, heatsinks, copper areas, etc).
H: Simple Fire Alarm Circuit using transistor not simulating correctly there am student of BSSE but we studied Applied physics, our teacher give us project. Am working on it but when i simulate it, this gives me error at Transistor and Speaker. here is my circuit https://crcit.net/c/738382510e074fd987eb47e2a8859541 Thanks, help me to resolve this matter. here i found article about it! https://www.electronicshub.org/simple-fire-alarm-circuit/#:~:text=Fire%20Alarm%20Circuit%20is%20a,damage%20to%20people%20or%20property AI: There are a couple problems with the circuits used from that site. One, they are using an NPN transistor incorrectly and two, a speaker can't produce sound when you apply a constant voltage to it. The only circuit that would work is the one using the lm358. Now onto your circuit. Couple problems with it: 1) Incorrect biasing of a PNP transistor or rather incorrect orientation. Also note you're using what seems to be a symbol of phototransistor (?). 2) Battery is in wrong orientation. 3) Speaker won't produce sound just because you apply voltage to it. 4) Don't see why you need a capacitor here. Here is a more practical circuit which should work: It uses a NTC thermistor which at 25 Celsius is about 10k but at about 70 Celsius is 1.7k. When the temperature is room temperature or at least way lower than flame, the NPN transistor is off and buzzer is off. When flame is present and within a few inches of Thermistor, its resistance drops to about 1.7k and biases the transistor on thus activating the buzzer. Note that flame should be a few inches away to achieve 70 degrees Celsius and not directly applied to thermistor. You can test this out when prototyping. Also circuit uses NPN transistor biases correctly and a piezoelectric buzzer not speaker. Circuit can be power off 3xAA batteries. simulate this circuit – Schematic created using CircuitLab Edit: To show how With some modifications to your circuit it should work: Your new circuit: simulate this circuit
H: Variac Vs Motor Control I am a beginner. I want to purchase a variable AC power source for my personal lab, and I am having a lot of difficulties getting a good variac in my region whose shipping cost is not 5 times the price of the device. However, I noticed that variable motor speed controls basically work the same way, they vary output voltage, and my question is can I buy a motor speed control and have it do the same things as a variac? What are the fundamental differences between the two? AI: can I buy a motor speed control and have it do the same things as a variac? No. What are the fundamental differences between the two? A Variac reduces the voltage without modifying the sinusoidal waveform. A Variac is a variable-ratio autotransformer. The AC motor controls that provide good motor performance are variable frequency drives (VFD). They simultaneously reduce the voltage and frequency with the voltage generally proportional to frequency. It would be quite difficult to make a VFD reduce the voltage without reducing the frequency. A VFD rectifies the incoming voltage to provide DC. It then uses switching techniques to synthesize an approximation of a sine wave. With an AC motor load, the current is quite sinusoidal. With other loads, results will vary. Since three-phase motors are best for this type of control, nearly all of the many models and brands on the market have three-phase output. The "motor controller" for which a link is provided in a comment, is almost certainly a triac voltage control. It is more suitable for dimming lights and controlling heaters than it is for controlling motor speed. It would work for controlling a universal motor and to a very limited extent, some types of single-phase induction motors driving a fan or centrifugal pump. The output waveform is shown below for three voltage levels: (A) output voltage nearly equal to input voltage, (B) output slightly lower than input voltage and (C) output voltage much lower than input. Source: https://commons.wikimedia.org/wiki/File:Phase_control.svg Alternatives You will not likely find anything comparable at a reasonable price. You should probably consider more carefully what you really need. You may be able to find an assortment of fixed-ratio transformers that will satisfy some of your needs. For low power, you may be able to use a variable transformer for a toy train. For a higher voltage at an even lower current, you can use a fixed-voltage transformer to step up the output.
H: Simple security Alarm incorrect schematic diagram I am a student and my Applied Physics teacher gave an assignment to create a schematic diagram of a security alarm. The main Components are, Switch (Simple on/off) SCR C106B (Silicon Controlled Rectifier) 10 KΩ Resistor Buzzer 9 V Battery or DC power supply (Note: A combination of npn and pnp transistors can be used in place of SCR as Follows) I created a circuit diagram but my simulator does not seem to work, so i cannot verify it. Please Confirm it that is it correct. The schematic is as Follows, If There is any error in this Diagram or there is a better and easy way of doing it, please tell me. (Note: Our teacher just asked us to create a Diagram, So type of SCR or any component does not Matter) Thank You. AI: "Doesn't work" isn't a good description of a fault so you should really describe what does happen. As you have drawn it there are a couple of potential problems. With the switch open the SCR will be triggered as soon as your simulation starts. You have no way to reset the circuit. Try replacing your switch with a normally-closed version. This will hold the gate at ground during power-up and prevent the buzzer from sounding. Add another normally closed pushbutton on the battery positive line. This will be your reset button. (The SCR latches on until the current through it is reduced below the hold-on value.) Number your components R1, SW1, SW2, etc., and show the buzzer resistance or current so that we can calculate if it will pass enough current for the SCR to hold-on.
H: DC buck Convertor I want to power SIM800L which requires around 4v and 2amps(at peak only). If I attach DC buck converter to Arduino Uno 3.3V output, and power SIM800L, is it safe? AI: Buck converters step down voltage. Boost converters step up voltage. The 3.3V of an arduino is limited by the arduinos regulator and is unlikely to support 4v * 2A or 8W stepped up, which would likely be 3.3V 2.4 Amps plus the efficiency penalty of the regulator (say 20% so 3.3V * 3A). It will burn out. Those on board arduino regulators are only good up to 1 amp in best conditions.
H: How this circuit with diodes can be solved? Solve: $$U_1=?\ ,U_2=-U_3=?,U=?$$ I tried to solve this circuit with Shockley Diode Equation : $$I_{\mathrm{D}}=I_{\mathrm{SAT}}\left(e^{\frac{U_{\mathrm{D}}}{\eta^{U_{\mathrm{T}}}}}-1\right)$$ and also with equation for dynamic resistance(for this example its conductance, inverse of dynamic resistance) : $$G=\frac{I_D+I_S}{I_S}$$ Correct me if I'm wrong: $$from \ picture \ we \ see \ that \ : I_{D1}=I_{D2}+I_{D3} $$ $$from \ picture \ we \ see \ that \ : U_2=U_3$$ Results are: $$U_1=0.182(V)\ ,U_2=-U_3=0.2(V),U=-0.382(V)$$ How can be this circuit solved? AI: You are always allowed to select a node and call it \$0\:\text{V}\$. So, assuming you ground (make it \$0\:\text{V}\$) the (-) end, as follows: simulate this circuit – Schematic created using CircuitLab Then \$V_X=\eta\,V_T\cdot\ln\left(\frac12\left[1+\sqrt{5}\,\right]\right)\$. It's pretty much the only possible value, unless the (+) voltage at the top is significantly less than \$10\cdot V_T\$. So, for any applied voltage, \$V\ge 10\cdot V_T\$ (about \$250\:\text{mV}\$ or more), you are just solving \$x\$ where \$e^{^\frac{x}{V_T}}=1+e^{^\frac{-x}{V_T}}\$. You can work this out entirely from the Shockley equation. $$\begin{align*} I_{_{D_1}}&=I_{_{D_2}}+I_{_{D_3}}\\\\ -I_{_\text{SAT}}\left(e^{^\frac{-\left(V-V_X\right)}{\eta\,V_T}}-1\right)&=I_{_\text{SAT}}\left(e^{^\frac{V_X}{\eta\,V_T}}-1\right)-I_{_\text{SAT}}\left(e^{^\frac{-V_X}{\eta\,V_T}}-1\right)\\\\ -e^{^\frac{-\left(V-V_X\right)}{\eta\,V_T}}+1&=e^{^\frac{V_X}{\eta\,V_T}}-e^{^\frac{-V_X}{\eta\,V_T}}\\\\ -e^{^\frac{-V}{\eta\,V_T}}e^{^\frac{V_X}{\eta\,V_T}}-e^{^\frac{V_X}{\eta\,V_T}}+e^{^\frac{-V_X}{\eta\,V_T}}+1&=0\\\\ -\left(e^{^\frac{-V}{\eta\,V_T}}+1\right)e^{^\frac{V_X}{\eta\,V_T}}+e^{^\frac{-V_X}{\eta\,V_T}}+1&=0\\\\ -\left(e^{^\frac{-V}{\eta\,V_T}}+1\right)\left[e^{^\frac{V_X}{\eta\,V_T}}\right]^2+e^{^\frac{V_X}{\eta\,V_T}}+1&=0\\\\\hline\\ \text{set }y&=e^{^\frac{V_X}{\eta\,V_T}}\\\\ \text{quadratic solution:}\quad y &=e^{^\frac{V_X}{\eta\,V_T}}=\frac{1\mp\sqrt{4\,e^{^\frac{-V}{\eta\,V_T}}+5}}{2\left(e^{^\frac{-V}{\eta\,V_T}}+1\right)}\\\\\therefore V_X&=\eta\,V_T\,\ln\left(\frac{1\mp\sqrt{4\,e^{^\frac{-V}{\eta\,V_T}}+5}}{2\left(e^{^\frac{-V}{\eta\,V_T}}+1\right)}\right)\\\\\hline\\\text{for }V\ge 10 \cdot V_T\text{, }&e^{^\frac{-V}{\eta\,V_T}}\to 0\text{, and }V_X\to \eta\,V_T\,\ln\left(\frac{1+\sqrt{5}}{2}\right) \end{align*}$$ So, using \$V_T=26\:\text{mV}\$, this is \$V_X\approx \eta\cdot 12.51151\:\text{mV}\$. LTspice shows \$\eta=1.752\$ for the 1N4148 model. This computes out to \$V_X\approx 21.9\:\text{mV}\$. LTspice computes \$V_X=21.886\:\text{mV}\$ using a \$+10\:\text{V}\$ rail. Theory gets you close enough.
H: Simple LC circuit implementation I'm implementing a very simple LC circuit where the power supply is connected to an inductor (of 4 micro Henry specifically), and the inductor is connected through a diode to a capacitor going to ground (of 1 micro Farad). I was expecting that the capacitor will accumulate twice the input voltage, however I am consistently only reading that it accumulated exactly the input voltage. I included below a schematic of the situation and the explanation of my thinking. I added a dummy load resistor \$R1\$ but in the derivation I assume to simplify matters that \$R1 = \infty\$. I would be grateful for any explanation of why this circuit doesn't seem to work "in the real world". simulate this circuit – Schematic created using CircuitLab We now have by Kirchoff's current law, and the definition of capacitor and resistance, (note that \$V3 = V2\$ so \$V3 / R1 = V2 / R1\$), $$ I1 = \frac{d V2}{dt} \cdot C1 + \frac{V2}{R1} $$ Differentiating this we get, $$ L1 \frac{d I_1}{dt} = \frac{d^2 V2}{dt} \cdot L1 \cdot C1 + \frac{d V2}{dt} \cdot \frac{L1}{R1} $$ Now using the definition of inductor the left-hand side is equal to \$V1 = Vin - V2\$. Therefore collecting everything together we get $$ Vin - V2 = \frac{d^2 V2}{dt} \cdot L1 \cdot C1 + \frac{d V2}{dt} \cdot \frac{L1}{R1} $$ It's easier to solve it if we assume that \$R1 = \infty\$. In that case we get $$ V2 = Vin + c_0 \sin \Big ( \frac{t}{\sqrt{L1 C1}} \Big ) + c_1 \cos \Big ( \frac{t}{\sqrt{L1 C1}} \Big ) $$ Now specializing we see that \$c_1 = - Vin\$ and differenating we see that \$C1 \cdot d V2 / dt = I2\$ which is also zero at \$t = 0\$ hence \$c_0 = 0\$. We conclude that $$ V2 = Vin - Vin \cdot \cos \Big ( \frac{t}{\sqrt{L1 C1}} \Big ). $$ Since we imagine that \$R1 = \infty\$ and there is a diode, we notice that the circuit will stop when the current \$I2\$ turns negative. When this happens \$V2 = 2 Vin\$. AI: If you simulate using a near ideal diode, you can see that it is a voltage doubler: - L = 10 mH C = 1 uF The input DC voltage is 20 volts and the voltage across the capacitor (blue trace) becomes nearly 40 volts. The red trace is the inductor voltage and, at a little over 0.3 ms, it's energy is depleted having given most of it to the capacitor. If you don't activate the supply quickly compared to the LC cycle time then you'll barely see any voltage magnification on the capacitor. Here's what happens when the power supply activates over a 5 ms period: - In other words, there is very minimal magnification. With L at 1 uH and an instant application of the supply we get this: - If the supply ramps up over 4 us it becomes this: - Circuit used: -
H: Does it matter if power is applied only instantaneously? If I build a railgun and apply say, 1 million watts, to the circuit to try to power a projectile forward through electromotive force, will it really matter if that 1 million watts of power is applied for just an instantaneous time say, 1 picosecond? Will that massive amount of power even going to matter to produce any significant work, assuming nothing will get welded in place as result? AI: One million watts for 1 picosecond is only 1 micro Joule, not a lot of energy. If the conversion of electrical energy to kinetic is 100% efficient, then you can work out through \$\frac{1}{2}mv^2\$ how fast your projectile is going to be moving after acquiring 1 µJ. However, we don't tend to power railguns with a specific power for a specific time. Where would you get a one megawatt power supply? Instead, we tend to build a storage system, maybe a bunch of capacitors, maybe a spinning alternator-based machine called a compulsator, that stores a certain amount of energy. Then the challenge is to dump that energy store into the railgun load in the right sort of length of time, which generally involves controlling the inductance of the supply, switches, cables, everything really. So you'll start with an energy, not a power, and work from there. Let's do some sums with some real data. Let's say you put together a number of capacitors, say from the CD942 range, very high current capability, probably overkill, but useful to get ballpark figures. A 2kV 150nF cap stores 300 mJ when fully charged, and occupies a space of around 30x30x50 mm. So 1000 would fit into a milk-crate sort of volume, and you'd be able to lift it (I wouldn't). That will store 300 J. If discharged in 100 uS, that would deliver a power of 3 MW. That's still rather on the low side for stored power for a railgun, which scales to small sizes very badly. Have a look at this paper for a railgun supply, where they talk about mega-Joule levels of stored energy, delivered over a few milliseconds.
H: How does the HX711 circuit work? This scheme will be designed for weight scales. Why is there a transistor installed. And I want to understand why need capacitors and resistors in this circuit. (their purpose) The documentation does not describe the connection diagram, there is only an example of connecting to a load cell. HX711 AI: The PNP transistor is used by the internal linear regulator. This provides a stable \$V_{DD}\$ and excitation voltage for the IC and bridge respectively. The resistors R1 and R2 are used to set the feedback for the linear regulator. Capacitors C1 and C2 are decoupling capacitors for the IC's power supply. Capacitor C3 is decoupling for the internal bandgap reference. Resistors R3, R4, and capacitor C4 form a differential low pass filter.
H: Understanding the statement: An antenna with 20 degree beamwidth has 20 dB gain It is known to us that as gain of an antenna increases, its beamwidth becomes narrower. Is there any formula to support the above statement? AI: An antenna with 20 degree beamwidth has 20 dB gain That is an approximation In reality an antenna with 20 degree beamwidth has 21.2 dB gain. (If the beam is circular and not oval or otherwise distorted). You only need to understand some simple geometry to see why this is true; Antenna gain is relative to that of a theoretical isotropic antenna (..Ie. one which radiates evenly in all directions, in a sphere.) When we talk about an antenna having a gain of for instance 20dB, what we really mean is that; In the direction that the antenna is sensitive, the gain of the signal is 20dB compared to what it would be if the antenna was an isotropic antenna. It is very easy to see why this is the case..; An isotropic antenna radiates (and is sensitive) equally in all directions, so at a distance \$r\$ form the antenna, the power is spread over a sphere with that radius, the area of this sphere is \$4\pi r^2\$. A directional antenna on the other hand only radiates (and is sensitive) within some vertical and horizontal angle, If we assume that the vertical and the horizontal angle is the same then the beam is circular (this is the simplest example). Now imagine that you have a spherical surface, and from the centre you have a cone (beam) extending from the centre to the surface of the sphere. Where the cone/beam intersects the spherical surface it encircles an area of the surface of the sphere, the area of this surface is; \$2\pi r^2(1-\cos (\theta/2))\$ where \$ \theta\$ is the angle of the beam. To find the gain of the antenna we simply divide the are of the full sphere (isotropic antenna) by the area of the cone/beam on the sphere, like so; \$ gain = \frac{4\pi r^2}{2 \pi r^2 (1-\cos(\theta /2))} = \frac{2}{1-\cos(\theta/2)} \$ To get the above in dB you need to do; \$ gain[dB] = 10\log(\frac{2}{1-\cos(\theta/2)})\$ Plug \$ \theta=20\$ into the above equation and you will get \$21.2dB\$
H: Energy Harvesting application capacitor selection I have an energy harvesting application and I want to use a capacitor to store energy. Due to the application being very low power, a capacitor of around 50uF might be enough. What is really important though, is to have the lowest discharge possible, since the charging of the capacitor might be happening over a long period. What type of capacitor is best suited for this case? AI: You are looking for a capacitor with a high leakage resistance. A 50uF electrolytic capacitor is inexpensive and easy to find, but has a lower leakage resistance than other types of capacitors. You haven't mentioned the required voltage. That is an important consideration. Here is a chart of capacitor technologies vs. leakage resistance: The words "Values of" in the caption appear to be an error. The image is from page 8 of KEMET Corporation, Introduction to Capacitor Technologies Copyright 2013 Here is a chart showing the capacitance and voltage availability for several capacitor technologies. Image from: EPCI; ESA SPCD 2018 Symposium via https://epci.eu/capacitors-news-and-trends/
H: MOSFET load switch design help I would like some assistance designing a MOSFET load switch for use in an 12 volt automotive circuit to run a fuel pump controlled by a raspberry pi. I would like for it to be able to deliver 25 amps continuously no heat sink if possible. I have a P channel MOSFET in mind the ATP304. Problem is I have no Idea if it’s a good choice also I have no idea where to start designing a switch. I have the ULN2803A darlington driver with 4 of it’s channels paralleled to drive a solenoid, 2 individual channels of the ULN2803A driving 2 LEDs with the 2 remaining channels of the ULN2803A I was hoping to make use of it by possibly driving the load switch ATP304 MOSFET. Is it a good idea to use ULN2803A to drive the P channel ATP304 gate? If it is can someone assist me in designing a load switch with appropriate resistors, filter capacitors etc? *Expected voltage input: 11 - 16 volts *there will be electrical noise from alternator *I expect a 15 amp draw continuous but I would like it to be capable of 25 amps or so just in case later I can reuse the PSU design in a different circuit configuration *device will be installed in a cooler stop in the engine bay. Thanks]1 AI: Extract from ATP304 data sheet: - Power dissipation is typically 3.25 watts but assume 4 watts or more as an acceptable extreme. However, I would drop that device - the data sheet doesn't give the thermal resistance when mounted on a PCB hence, it's impossible to design this device into an application. It's going to be dissipating over 3 watts so, without the thermal data it's guesswork. Choose a different part is my advice. When you have found a device that suits, get the thermal resistance and back-calculate what the junction temperature will reach with 4 watts of dissipation. Is it a good idea to use ULN2803A to drive the P channel ATP304 gate? Well, ignoring the issues about the ATP304 that make it unsuitable yes, using a ULN2803A is fine for driving the gate (10 kohm pull-up required of course). But there's a wider issue in automotive environments to do with excessive voltages due to load dumps and cranking the car producing significant voltages that can fly-along the 12 volt system and wreak havoc with inadequately protected electronics: - Picture from Self-Protecting MOSFETs Deliver Improved Reliability in the Harsh Environment of Automotive Applications. There is also the issue that most (if not all) car manufacturers use what is known as high-side switches for these types of applications and frown upon the poor unreliability of an unprotected MOSFET: - Picture from here in an article entitled Automotive Smart High-Side Switch by Infineon. I would like some assistance designing a MOSFET load switch for use in an 12 volt automotive circuit to run a fuel pump controlled by a raspberry pi. So, if something goes wrong and the MOSFET goes short circuit, it will continue to run the fuel pump until what happens? Most relays (yes, relays) that ran fuel pumps require a pulsing signal to keep them activated thus preventing a software issue keeping them switched on all the time. This was common place in the 1980s although I can't speak for all vehicle types. I can speak for Audi though because I had one and the fuel pump relay failed and it would only activate for ten seconds before cutting out the engine. I swapped the relay with a non-pulsing type (probably for the headlamps) and drove home and fixed the broken relay with a bit of solder and swapped back. It's up to you what you use but, be warned about power dissipation and using unprotected MOSFETs that can go short circuit when failed.
H: Amplifier design using BJT For the circuit above $$Vc=16V, β=200, VT =25mV \quad and\quad |VBE|=0.6V $$ are given. I want to design a circuit with following conditions The current on \$R_1\$ will be 0.1*Ic1. Pmax (DC maximum power consumption) =10mW there will be no resistance value higher than 600kΩ I tried to solve it using KVL and KCL but each time I got stucked with voltage drop across BJT's itself because I could not find \$I_{B}\$. Are there any suggestions for how could I find it? P.S: I do not ask for anybody to solve whole problem. I just want suggestions to solve by myself. So please just guidance, no complete solution. AI: Well, we have the following circuit: simulate this circuit – Schematic created using CircuitLab When analyzing a transistor we need to use the following relations: $$\text{I}_\text{E}=\text{I}_\text{B}+\text{I}_\text{C}\tag1$$ Transistor gain \$\beta\$: $$\beta=\frac{\text{I}_\text{C}}{\text{I}_\text{B}}\tag2$$ Emitter voltage: $$\text{V}_\text{BE}=\text{V}_2-\text{V}_3\tag3$$ When we use and apply KCL, we can write the following set of equations: $$ \begin{cases} \text{I}_\text{x}=\text{I}_\text{C}+\text{I}_3\\ \\ \text{I}_3=\text{I}_\text{B}+\text{I}_4\\ \\ \text{I}_\text{x}=\text{I}_\text{E}+\text{I}_4 \end{cases}\tag4 $$ When we use and apply Ohm's law, we can write the following set of equations: $$ \begin{cases} \text{I}_\text{C}=\frac{\text{V}_\text{x}-\text{V}_1}{\text{R}_1}\\ \\ \text{I}_\text{E}=\frac{\text{V}_3}{\text{R}_2}\\ \\ \text{I}_3=\frac{\text{V}_\text{x}-\text{V}_2}{\text{R}_3}\\ \\ \text{I}_4=\frac{\text{V}_2}{\text{R}_4} \end{cases}\tag5 $$ Now, I use Mathematica to solve your problem using \$\$: In[1]:=VBE = -6/10; \[Beta] = 200; Vx = 24; V1 = 16; V2 = 25*10^(-3); FullSimplify[ Solve[{IE == IB + IC, \[Beta] == IC/IB, VBE == V2 - V3, Ix == IC + I3, I3 == IB + I4, Ix == IE + I4, IC == (Vx - V1)/R1, IE == V3/R2, I3 == (Vx - V2)/R3, I4 == V2/R4, I3 == (1/10)*IC, (Vx - V2)*I3 == 10*10^(-3)}, {IE, IB, IC, I3, I4, V3, R1, R2, R3, R4, Ix}]] Out[1]={{IE -> 201/47950, IB -> 1/47950, IC -> 4/959, I3 -> 2/4795, I4 -> 19/47950, V3 -> 5/8, R1 -> 1918, R2 -> 119875/804, R3 -> 919681/16, R4 -> 4795/76, Ix -> 22/4795}} In[2]:=N[%1] Out[2]={{IE -> 0.00419187, IB -> 0.0000208551, IC -> 0.00417101, I3 -> 0.000417101, I4 -> 0.000396246, V3 -> 0.625, R1 -> 1918., R2 -> 149.098, R3 -> 57480.1, R4 -> 63.0921, Ix -> 0.00458811}}
H: Using a MOSFET array to create a basic H bridge I still have this big old rc car and i wanted to make it live again since I lost the radio. I wanted to take the UPA1556AH that is inside the rc to make a H bridge and control the servo motor direction so it can turn (it is not the best idea but i don't want to wait for components). I've never created a H bridge so I'm a little confused with the schematic and the datasheet. Probably I'm very wrong. Here is the datasheet: UPA1556AH and here is the H bridge was looking for: Is it possible to make it with that internal connection? Thanks! AI: There are 5 FETs in the package, but 2 pairs have the sources shorted together. You could use the single FET with one half of one pair to make an H bridge, but..... They are all N-channel devices as well, so you would need a supply that's higher than the battery voltage to fully turn on the top side devices. Why not find a motor driver bridge part with P-channel devices in the top and N-channel devices on the bottom? Maybe like this? Or maybe something along these lines?
H: Where does the Panel Mount BNC Connector make the ground connection to my PCB? This may be a dumb question, but where does the PCB make a connection with the signal ground on this BNC connector? All I see is the signal pin that is soldered on (via solder cup) and no where is there the possibility to solder to a reference ground. The part is Digikey PN A32342-ND Thanks AI: Okay, that's a grounded bulkhead connector. The housing may be connected at many places to the PCB (if any), and probably is if it's an RF circuit. AMP aka Tyco aka TE offers similar types with and without a toothed washer to add a a wire to the panel. Insulated bulkhead connectors have two solder terminals.
H: Friis transmission equation: how do I consider power loss along other directions? I do not understand a basic concept about Friis transmision equation between two antennas: where Dt and Dr are the antenna directivities (with respect to an isotropic radiator) of the transmitting and receiving antennas respectively, λ is the wavelength and d is the distance between the antennas. Let's consider for instance the case in which both are dipole antennas, whose pattern is drawn below: How can I apply the previous formula to this case? Precisely, I have the following doubt: 1) Since dipoles are not isotropic radiators/receivers, their directivities will depend on the direction considered. So, I'd say that Pr will depend on direction. How do I find the total received power? 2) Part of the radiation from TX goes at also other directions (for instance at left). Is this fact considered in the Friis equation (and, if yes, which factor describes it?)? How can I distinguish, numerically, a situation like that in the previous picture, from something like this (a RX antenna, drawn in green, that surrounds the TX and so receives more power): AI: The Friis equation considers transmission from a point source in free space emitting power spherically hence, the power emitted at a particular distance is in units of watts per square metre where the “square metre” part is that fraction of a sphere’s surface having a radius equivalent to the distance between transmitting antenna and receiving antenna. Hence, all you need to know about the receiving antenna is its effective aperture (also described in square metres). The transmitting antenna is a simpler concept in the Friis equation. Of course, the above is for an isotopic antenna which transmits power equally in all directions so, for a dipole or monopole, we know how much more power it can transmit or receive in its optimal direction and we add those dB to the Friis path loss equation to improve the path loss. If there could be a receive antenna that totally surrounded a transmit antenna then the receive antenna would collect all the transmit power. You need to google “effective aperture” and this tells you how much a receive antenna can collect when sat at the distance from the point source transmission. I think this might be the missing link in your learning.
H: How does this circuit work? (TP4056, DW01) Why are capacitors C13, C12, R20 used here? And why resistor R18 and C5? (What function do they perform?) I don't understand why they are installed there. Datasheet: TP4056, DW01, FS8205A. AI: Capacitors C5, C13, and C12 are bypass or decoupling capacitors used to suppress high frequency noise and provide stable DC voltage at respective nodes. Resistors R18 and R20 seem to be some form of current limiting resistors to protect the pins they are attached to from excessive current which could damage the IC. Also note that this schematic is using 100k for R20 when datasheet for DW01 uses 100 ohm.
H: What is the origin of multiplicative noise from a DSLR sensor? I'm trying to understand the behavior of my DSLR camera sensor (Canon 80D). I've taken a picture of a gradient from top-right to bottom-left corners of a square. This square is positioned at the right-hand side of the picture, so that it'd be easy to just take the diagonal, starting from the top-right corner, that would be composed only of green-filtered photosites. The shot is done with a defocused lens, so that the detail of the monitor pixels pattern couldn't cause any interference like moire. ISO sensitivity is set to the smallest value: 100, exposure is 1/10 s, and aperture is f/3.2, with f=24 mm. What I get is that as the intensity registered by a photosite increases, the noise amplitude also increases. See this plot of the raw data of the diagonal, taken from the CR2 file: The fact that noise amplitude is correlated with signal amplitude makes me wonder. Thermal noise should be the same on all the photosites, regardless of their illuminance. Quantization noise wouldn't even be noticeable on this scale of ~10000 counts (and it's also additive). Shot noise also shouldn't be noticeable at this illuminance. So what is the origin of this multiplicative noise then? I've done some more captures to find the relation between the mean and the variance of the pixel values. I've taken 15 shots of a gray gradient, used every 50th row and column of the resulting data, and computed mean and variance in the sets of 15 values for each resulting pixel. Here are the results. Blue the variance, orange the least-squares fit: Blue the variance/mean ratio, orange the estimate of gain from the fit above: The plot above smoothed with moving average with 100 points in the window: Is this consistent with the shot noise explanation given in the answers? After some more comments I've subtracted the DC offset of about 511.9 from all the pixels, and now the smoothed ratio of variance to mean (i.e. estimated gain) as a function of mean looks like this: So, now the answer that explains the noise as the shot noise makes sense. AI: To amplify a bit on the explanation of "shot noise", remember that we are in the realm where (due to the tiny size of the photosites, the length of the exposure, and the various efficiencies involved) the discrete nature of photons really matters. The sensor is actually counting them. Now imagine you're photographing a flat field, and every photosite receives the same amount of illumination (for simplicity, say it's a monochrome sensor). Does that mean that in a given exposure, every photosite will record exactly the same number of photons? No! Photons arrive at random, and their arrival is well-modeled by the distribution of a Poisson process. If you turned the illumination way down so that the average number of photons per photosite per exposure was 1, then about 37% of photosites will record 0 photons, 37% will record 1 photon, 18% will record 2 photons, and 8% will record 3 or more. The standard deviation of this distribution is 1. If you increased the illumination so that the average number of photons per photosite per exposure was 10, then about 88% would record between 5 and 15 photons, with less than 1% seeing more than 18. The standard deviation of this distribution is sqrt(10) ≈ 3.16. If you increased again to an average of 100, then about 90% would record between 84 and 117 photons, and the standard deviation is 10. And the pattern continues. As the illumination increases, there are more and more "rolls of the dice" for a photon to either be detected by a photosite or not, and more and more possible values for the measurement to take on, so the absolute magnitude of the noise increases. At the same time, since the standard deviation of the Poisson process is the square root of the mean rate, the relative magnitude of the noise decreases with increasing illumination. Since what we perceive is ratios of brightness (more or less), this explains why the visible noise goes down. When you get up to, say, an average illumination of a million, the standard deviation is up to 1000... but put another way, that means that practically all of the values are between 99.8% and 100.2% of the average. That's a far cry from the situation where the average illumination was 10, and we could easily see values between 50% and 150% of the average.
H: Why an ideal LC oscillator has a highly damped response in Spectre but not in PSpice? I'm just curious about why a ideal LC oscillator (See Figure) has a damped response in Spectre Simulator but not in Ngpsice. In both cases I'm using 5V of initial condition. I'm also using gmin=0 and gmin_in Spectre in order to avoid some energy losses. In Ngspice, I'm using default convergence options. simulate this circuit – Schematic created using CircuitLab The Spectre results gives me something like: Does anyone has a hint about it? Thanks AI: I'm going to guess that it's the integration method used. Trapazoidal integration is good for oscillators, but Gear integration introduces numerical damping that tend to make oscillators damp out rather than oscillate. Most simulators provide an option to select the integration method. Try the same method in both simulators to see if you get similar results. See here: "The one area where you should definitely avoid Gear is in LC oscillators. A pure LC tank circuit with an initial voltage on the cap will oscillate forever with trapezoidal integration, but will rapidly decay with Gear integration."
H: Reading +/- 12V with 3.3V micro I have 3.3V micro and +/- 12V square wave input I need to measure. As my MCU can only read 0 to 3.3V, I would like to ask the best way to "translate" this +/-12V signal into 0 to 3.3V. I try to read but there are many many solutions and I can't figure out which is better to do. I'm adding my actual schematics: Signal is a PWM @ 1000Hz coming from EV car. I can read 0-12V to 2.625 V maximum in input. AI: Eg. Consider the input at -12V we can write 3.3/R1 = 12/R3 Consider the input at +12V we can write 3.3/R2 = (12-3.3)/R3 Pick R3 to be something in a good range, say 10K Then the results fall out as below. If you want to allow for a bit more such as +/-14V, just substitute the values, and you can scale the three resistors as desired up to the maximum your ADC likes to see at the input, or the minimum your loading permits. simulate this circuit – Schematic created using CircuitLab
H: How do Eddy Currents manage to "flow"? I know, there's an overwhelming amount of information on the Internet about what eddy currents are, but on the fundamental front, I simply fail to grasp how currents could circulate/or even exist in a piece of metal. I always thought that in order for current to flow, conductors must be in different potentials. A solid piece of metal (if connected to a power source, say the positive terminal of an ac) would stay at the same potential, with every spot on the metal at an equal potential. I can't imagine how current would flow within a block of conductor metal when all of the metal is a block. AI: I can't imagine how current would flow within a block of conductor metal when all of the metal is a block. Imagine a loop of wire, surrounding a region of changing magnetic field. This loop of wire will have a voltage induced around it, and a current will flow through it. If that region is air, then fill it in with metal. If that region is an iron core, then fuse the conductive loop to the core. Neither changes the conditions in the loop, you will still have current flow in response to the changing field across the inner region.
H: Pull Up Resistor Value for temperature sensor I read that there needs to be a pull-up resistance for dht22 when connected to arduino. When dht22 is close, arduino's internal resistor value is enough, we have to add external resistor. I want to know the exact relation that for X-meters, you should add an external resistor. Can anyone give some info about this? AI: Depending on the cable you are planning to use (for relatively long distances), the pull-up resistor and the cable capacitance form a nice, one-stage low-pass filter which directly affects tr and tf. tr (Rise Time): The duration that the signal rises from its 10% to its 90% level. tf (Fall Time): The duration that the signal falls from its 90% to its 10% level. tp (Pulse duration): The duration between 67% and 33%. As a result, $$ t_r = t_f = 2.2 \ R_P \ C_L $$ where RP is the pull-up resistor and CL is the total cable capacitance. I will not fill in the answer with a proof. But it's easy - use the capacitor's charge and discharge equations. For example, let's assume you are using a 20-meter-long cable with a capacitance of 30pF/m (running two cables: data and ground), so CL=600pF, and a pull-up resistor of RP = 10kOhm. From the formula above, tr = tf = 13.2μs. We can fairly assume that the width of a pulse will be decreased by ~10μs. It's also easy to say that this RC network will chop-off the incoming frequencies beyond fC= 1/(2 π RP CL) = ~26kHz. From the datasheet of your sensor, the minimum pulse width is 26-28μs which allows us to make tr = tf = ~1μs. With the same cable in the example above, the maximum pull-up resistor can be calculated as RP = ~1Ω which is completely unacceptable and impractical. So, you should either decrease the length or use buffers-repeaters at both ends.
H: Inductor with high Q-Factor for low frequencies I am a little bit confused by the types of inductors you can buy. After looking through numerous datasheets, it seems to me that most inductors have a high Q-Factor only at high frequencies (around 100 MHz), and the Q-Factor for frequencies below 1MHz is not even plotted in the datasheet. I, on the other hand, am looking for an inductor with a high Q-Factor for frequencies around 200kHz. Is there some special type that is designed for rather low frequencies? Or do I just have to accept that for some physical reason Q-factors are always low in the sub-MHz range? I can not really find that attribute anywhere? Thanks, Peter AI: do I just have to accept that for some physical reason Q-factors are always low in the sub-MHz range? The value of Q factor is inductive reactance divided by series resistance and, given that the inductive reactance magnitude is \$\omega L\$ (or \$2\pi F L\$), at lower frequencies Q factor is necessarily smaller. If you need to understand the Q factor of a candidate inductor calculate \$2\pi F L\$ and divide it by series resistance of the coil. But make sure that the operating frequency of the coil is below the coil's self resonant frequency (SRF). If you don't ensure this, you cannot regard the coil as having a "normal" Q factor.
H: Short circuits and equivalent resistances: why does the subcircuit get cut off? The circuit is the following: simulate this circuit – Schematic created using CircuitLab What is the equivalent resistance seen across Nodes 1 and 2? I am told it is R4 + R5. That means everything to the left is cut out. 1) Why can't current flow from across R3 to the left, into the short wire and bifurcate through the resistors R1 and R2, and back out through R3? 2) Why can't current flow across R3, into the short, and back out through the short? AI: 1) and 2) are not circuits. If current cannot flow in a circuit, it does not flow at all. Why current must flow in a circuit is a different question...
H: Does cooling the NAND chips on an SSD negatively affect its reliability? The problem of heat dissipation in high-performance, small form-factor SSDs is well-known, for example, the paper Transient Thermal Analysis for M.2 SSD Thermal Throttling published in 2018 17th IEEE Intersociety Conference on Thermal and Thermomechanical Phenomena in Electronic Systems states: Solid State Drive (SSD) technology continues to advance toward smaller footprints with higher bandwidth and adoption of new I/O interfaces in the PC market segment. Power performance requirements are tightening in the design process to address specific requirement along with the development of SSD technology. To meet this aggressive requirement of performance, one major issue is thermal throttling. As the NAND and ASIC junction temperatures approach their safe operating limits, performance throttling is triggered and thus power consumption would drop accordingly. Naturally, if space allows, adding a huge heatsink is a possible solution to this problem, there are many products available on the PC gaming market. I also see many M.2 to PCI-E passive adapters on the market have built-in heatsinks by adding a huge copper pour with connection to the ground plane under the M.2 connector. But one can find many unsourced posts on random computer hardware forums, which claims that the NAND chips should never be cooled. It is claimed that they are actually designed to heat itself up to an optimum operating temperature, and adding a heatsink to the NAND chips adversely affect its reliability. Here's some examples. One claim reads, Don't cool the NAND dies themselves! They heat themselves up to operating temperature by design, cooling them means they just continually dump out power trying to hit temperature, and will be operating with a lower endurance (simplified: higher operating temperature = lower energy input to set/erase cells = less degradation of each cell per write/erase cycle). Another claim reads, Cooling the NAND is bad. You want the NAND to run warm and stay warm. As its temperature fluctuates, and as it cools down, if you suddenly transfer a large file (read or write, I can't remember) while the NAND hasn't had time to warm back up first, it can significantly reduce the life of the NAND. It doesn't sound right to me. It suggest that the NAND chips depend on the self-heating effect to reach an optimum operating temperature, which is something I've never heard before. The only chips that I know that use self-heating are National's LM199/299/399 "Super Zener" voltage references, and Linear Technology's LT1088 Thermal RMS-DC Converter. But I don't believe NAND chips have anything to do with self-heating. I tried to fact-check and/or debunk these statement, start by looking for a NAND chip datasheet found in some recent SSDs. I went to Digikey and Mouser, set the filter to the highest storage density and sorted them by prices. Unfortunately, it seems that datasheets are not available (all under NDA? I'm looking at the wrong place?). Are these strange statements have any factual basis? AI: The paper Influence of temperature of storage, write and read operations on multiple level cells NAND flash memories from 2018 shows the following graph, which suggests that writing to flash cells at a temperature of 25°C or lower results in earlier problems at reading compared to writing at 85°C. In their discussion they deduce the following reasoning: Most NAND Flash memories implement the Fowler-Nordheim tunneling effect 1 in order to inject charges through the floating gate [7] during write operation. During write cycles, the programming circuit controls the charge of cells to ensure a sufficient margin of voltage threshold. It is assumed that the writing management circuit probably drifts with low temperatures. Indeed, transistor parameters (threshold voltage and gain) vary with temperature which in turn induces drain current shifts. And in the conclusion they summarize: Write operations at low temperatures lead to a decrease in data retention time, probably not due to a degradation of the cell but due to parametric drifts of the die embedded electronics dedicated to write operations. This suggests why the comment cited in the question might say that. But in practise I would assume that this effect is not relevant, because a better cooling of the flash will simply give the flash controller more headroom to higher performance while keeping the same temperature (assuming cooling with a traditional heatsink). After seeing the above measurements I would NOT cool my SSD with LN2, though. https://doi.org/10.1016/j.microrel.2018.06.088
H: Is HC-05 Bluetooth adapter suitable for logging fast? Just bought HC-05 bluetooth adapter from Ching and I wonder how fast HC-05 is if I can do logging with it? Assume that we have a PC and a microcontroller. The PC have a FTDI232 connected to the USB port and the FTDI232 is connected to the HC-05 and I send values from the PC to the microcontroller, who also have a HC-05 connected to one of its UART:s. Is that a proper way to logging wirelessly if I want speed? I have a 10 ms limit. Better to use USB cable directly to the microcontroller from the PC and replace the PC with a Raspberry Pi? The goal is to have a equipment that are portable. But I will first check if HC-05 is a good choice. What to do: I want to setup a communication line between a PC and a microcontroller. The PC will have a FTDI232 + HC-05 connected and the microcontroller will only have the HC-05 connected to one of its UART:s. Reason why I'm asking: I plugged in the FTDI232 to the USB port of the computer and then I connected the HC-05 to the FTDI232. Then I send the text to the USB port "AT+HELP\n" and I did get a list of commands. When I notice is that the list was displaying quite slowly. So that's make me wonder if the HC-05 is slow or is it fast and something else cause the slowness? Because I'm used CuteCom for talking to the FTDI232 chip and CuteCom is really fast and the FTDI232 is super fast. So that leave the HC-05 as the only choice left. Can it be HC-05 is a slow product in communication? AI: "HC-05" is a tag used for many Bluetooth modules, and they aren't all born equal. Having said that: HC-05 modules can be configured to use a UART speed of 460,800 kpbs, in some case even higher. HC-05 modules support Bluetooth 2.1 including Enhanced Data Rate (EDR). EDR has a theoretical maximum data rate of 2.1 Mbps. You mention a limit of 10ms. Does that mean sampling every 10ms (throughput) or sampling every so often and transmitting the result within 10ms (latency)? Both should be possible: Throughput: If data is sampled every 10ms and your sample consists of 20 bytes of data, a data rate of 20,000 bps is required. Latency: A maximum latency of 10ms for a packet of 20 bytes is achievable. Note that the HC-05 module does not know when a packet starts or ends. So it has a heuristic for determining how much data to collect and when to start transmitting. You have to test if that is a problem for your particular module. I don't expect so. The reason that your module feels slow is that the default UART speed is usually 9600 bps, i.e. rather slow. Update The FTDI232 will also introduce a delay. As a USB slave device, it may only talk when asked by the USB host, which it does every 1ms. Most likely, the slave will receive a single byte and forward it to the host when asked. After that, there is a communication pause of 1ms. By then it should have received several bytes and transmit them in the second USB packet. So expected a delay on the receiver side of up to 2ms for for 20 bytes of data.
H: How this voltage resonant soft-switching IGBT works? In this voltage resonant soft-switching IGBT: 1) When IGBT turns off, what is the reason why Vce slowly(sinusoidally) increases after current turns off? Was it because the stored voltage in L1 is slowly discharged so that Vce will not abruptly increase??? 2)When IGBT turns on, what is the reason why Vce is zero when current is slowly increasing? I mean, if the Vce is zero at the moment of increasing current, then where is the remaining voltage is dropped in the circuit???And looking at the waveform, the Vce is already zero even if current is just starting to rise Source:https://toshiba.semicon-storage.com/ap-en/semiconductor/knowledge/faq/mosfet_igbt/igbt-013.html AI: If you extracted the full picture from your link it would impart more information (I have added the definition of FWD and written it in purple so as not to confuse). I've also re-arranged it to make it easier to follow: - Inductor current ramps upwards when IGBT turns on (as per \$\dfrac{di}{dt} = \dfrac{V}{L}\$). It's slope starts to tail off due to C1 i.e. it isn't a true linear rise like a pure inductor. IGBT turns off and residual energy in the inductor forms a tuned circuit with C1 You only get half a cycle of resonance because the diode across the IGBT shunts the negative portion of the sine wave and the IGBT turns on again before it can rise positively again. In all of the above waveforms, residual voltages like the IGBT on voltage and the forward conduction voltage of the FWD are ignored. They are ignored because they represent a small fraction of the overall waveform voltages. They shouldn't be ignored when making conduction loss calculations though.
H: Why we need start/stop bit for asynchronous transmission I was reading a book which says Asynchronous transmission is so named because the timing of a signal is unimportant. Instead, information is received and translated by agreed upon patterns. To alert the receiver to the arrival of a new group, therefore, an extra bit is added to the beginning of each byte. This bit, usually a 0, is called the start bit. To let the receiver know that the byte is finished, 1 or more additional bits are appended to the end of the byte. These bits, usually 1s, are called stop bits. As the picture below shows: I don't quite get the idea, why do we need a start/stop bit? Isn't that a byte consists of 8 bits, so the receiver just needs to count how many bits it has received so far, if the number is 8, it has one byte and repeats the process. So why do we need start/stop bit? AI: If you didn't have a zero start bit that kicked-off the timing to the receiver, how would you know what to do when a serial byte comes along with a leading 1 digit in the data stream? What happens if the next bit is also 1 and the bit after that - what if all the bits are 1? Then you'd miss the entire byte because nothing would change (due to not having a start bit of 0). Regular 8 high bits with leading zero start bit: - Missing start bit: -
H: Why have the same chip in the same package, but with a different number of pins? STMicroelectronics offers the following two accelerometer chips. The LIS2DW in a 14 pin LGA package The LIS2DW12 in a 12 pin LGA package These two chips are functionally equivalent and have the same dimensions (2 mm x2 mm x 0.7 mm), and the two extra pins on the LGA-14 chip offer no additional functionality. While it makes sense to offer the same chip in different packages to ensure customers are able to place a chip with the equipment they have available (i.e. hand soldering a DIP package vs a BGA package), I don't see how offering a chip in the same package and only changing the number of pins offers any real benefits. What reasons would there be for offering two functionally equivalent chips in the same form factor, whose only difference is the number of pins? AI: There are few reasons why a manufacturer might do this. While it is fairly common to see multiple almost equivalent packaging options within the same datasheet. This manufacturer is being excessively pedantic by releasing two datasheets and two part numbers. Since that costs money (administrative costs) There is still possibly some difference that is captured there, even though, it is also possible (and arguably clearer!) to capture that difference in one datasheet with one table and multiple packaging codes/revisions. Evolution of packaging technology / Revision with contractual obligations When the part was designed the LGA14 was more available or more easily manufacture-able, the reason doesn't matter. Then the part is revised, or there is demand, or cost savings associated with the smaller package. However some customers will have contractual obligations that may make it annoying or costly to formally revise a part, so the manufacturer may choose to assign a new part number and continues to support both parts which are effectively the variants. Request from large customers Large customers may request a custom part for whatever reason comes to mind, and if they order millions of parts the manufacturer will generally be happy to take their order. The manufacturer then may also offer this to the regular customers as well under a different part number. Drop in upgrades If there is an equivalent part from this manufacturer or a competing product from another manufacturer or for backwards compatability, then the manufacturer may provide an upgrade path with pin compatible drop in part, this may apply to either LGA14/LGA12 or both. Acquisition (related to 3) This manufacturer has bought companies and has been merged/unmerged and has entered and dissolved multiple partnerships over the years. During this process a manufacturer may acquire equivalent parts from subsidiaries or partner companies. Often they may be differentiated by different part numbers. (In the most extreme version of this, I had a situation where a connector company bought another connector company and their production line that made an equivalent part , and as a result there were several part numbers for identical parts depending on which production line / lineage you were historically purchasing)
H: Basic Power Consumption - Continually leave AC on vs Occasional start/stop Question If my goal is to keep my energy consumption at a minimum should I power my AC off once the room is cool or leave it running in its sort of stand-by state (fan still running)? I'm not sure of the physics of the power consumption but I assume it takes more power to start the A/C than it takes to keep it running. Extra I live in an NYC apartment I run my A/C for about 10 minutes and my room is cooled down. I turn it off for about 10 minutes and the room STARTS to become noticeably warm again. This AC is a "portable" LG 8000btu (LP0817WSR) if that impacts this question at all. AI: The concept of "it takes more power to start the A/C than it takes to keep it running" is a myth, at least for residential users who do not pay separate "Demand Charges" (industrial and commercial users do, but A/C is not likely going to make a difference anyway). But more importantly, and not related to the ELECTRICAL issue, is how Air Conditioning functions. The fan just moves air around, but that is actually an important feature, because air movement is PERCEIVED by us as being cooler (because air moving over our skin allows our evaporative cooling system, called "sweat", to function. That's why ceiling fans are often used to help us feel better at higher temperatures. The actual removal of heat by an A/C unit is accomplished by compressing a refrigerant. A room temperature sensor (thermostat) makes the decision on when to cycle the compressor on and off, and does so based on a "hysteresis" model, meaning the upper and lower acceptable limits. So for instance if you set the thermostat for 78F, the hysteresis is likely that it turns on at 80 and turns off at 76, so your average temperature is 78. That compressor is the real energy hog, not the fan. The fan is costing you pennies, the compressor is costing you dollars. By turning the A/C off on your own, you are simply messing with the hysteresis model based on what you can tolerate / notice. The problem with that is that the models built into an A/C unit are based on its cooling capacity, measured in BTUs (British Thermal Units), meaning it's ability to remove heat. That capacity must be FASTER than the building's ability to ABSORB heat form the outside, referred to as its RESISTANCE to heat transfer, called the "R Value", often seen in describing insulation. But the higher the heat is inside your building, the longer the A/C must run to overcome it, AND THEN keep it cool inside as heat is being absorbed from outside. This is referred to as "thermal mass", meaning EVERYTHING in your house absorbs and distributes heat. So if the house is allowed to get hot, so do the walls, floor, ceiling, furniture, clothes, belongings, appliances etc. etc. When you then turn the A/C back on, it must cool down ALL of those things first before you start to notice the air temperature changing. Leaving the A/C running means it ONLY has to deal with the new heat coming in from outside. In general, it therefore uses less energy. A secondary aspect, probably important in New York and lots of other places, is that an A/C unit also dehumidifies your air, which is another way we perceive "coolness". So by turning it off yourself, you are allowing the humidity to increase again, you feel hotter sooner, so you end up having to run the A/C longer before you feel comfortable. Your best way of saving energy is to set the thermostat higher, leave it on all day, and get fans blowing ON YOU that make you feel more comfortable at the higher temperature.
H: TVS diode for RS485 I'm studying the ISO1500 for an RS485 application. In particular, I'm looking for a TVS diode for bus protection. I've found that a common TVS diode used for RS-485 applications is the SM712 (like Bourns or Littlefuse) because it has asymmetrical reverse stand-off voltages to match the common-mode operating range of RS485 (-7V to 12V). According to IEC 61000-4-5, for Class 2, a 1kV surge voltage will discharge through a resistor of 42\$\Omega\$, producing a current of 24A (as specified here). I have a doubt regarding how the SM712 can provide surge protection. In SM712 datasheet it seems that the max clamping current is lower than 24A. Moreover, It seems that the clamping voltage is higher than the absolute maximum voltage on the bus pins (±18V from ISO1500 datasheet). In this case the device will be unprotected by the surge pulse? AI: Who says it's a class 2 device? Who says class 2 is 2 kV? EN 61000-4-5 says this about the voltage impulse: - So a level 1 device would survive a 500 volt surge and this translates to a surge current of about 11.9 amps. A level 2 device would survive a surge current of 23.8 amps. The Bourns CDSOT23-SM712 suggests that the limiting voltage will be 14 volts with a surge of 17 amps. You might say that this will still destroy the ISO1500 and so it might but, the ISO1500 has internal protection that can survive an ESD of 4 kV so, it is up to the designer to merge the indirect lightning protection offered by the TVS diode to the levels that are compatible with the ISO1500. Nobody says it's easy to do.
H: Switch off power when 0v is sensed / Short to ground I have already posted this question but I made a mess of the diagram so deleted it and am posting again, apologies to anyone to answered the original question. I'm fairly new to electronics and am stuck at how to get a circuit working. I have 2 peripherals connected in the circuit, a smoke detector and a relay, both operates at 12v DC and are continuously energized (ie always powered on). When the smoke detector is triggered an internal switch is operated and the detectors output shorts to ground. What I would like to do is when the smoke detector is triggered, use the output of the detector (which is a short a to ground) to turn the relay off (ie no current is flowing through the relay) and when the detector returns to normal operation (its internal switch is off and there is no short to ground from the output) the relay returns back to normal and be energized. I have looked at NPN transistors but they need a positive supply to operate the transistor and my detector outputs a ground. I have also looked at PNP transistors however they operate the transistor with a ground signal. I am wanting the opposite effect, ie to switch off when a short to ground signal is output from the detector. I’ve included a diagram which should hopefully explain the circuit a bit better. Thanks in advance for any help. NOTE: The detector also has a +12v output as a fail safe, if the detector is working properly it outputs +12v which is used to power the relay, and hence you know there isn't a fault with the detector as shown below: AI: An output that shorts to ground when active is commonly called an NPN output (like the transistor). It will be easiest to configure this so that the relay is energized when when the output is active. Simple connect the other side of the relay to 12v. That's the opposite of what you're asking for, but if you rewire the relay so that it's normally closed you will get a similar effect. If you don't want to do that, because of power draw, or some failsafe issue, you will need another component or 2. Configure a mosfet with a pullup so that it is energizing the relay by default, then use the pull down to turn the mosfet off when the smoke detector output goes low. Whatever you do, it's a good idea to add a flyback diode across the relay.
H: Calculating magnitude of current provided by a voltage source simulate this circuit – Schematic created using CircuitLab A couple of days ago I attended an exam where I was asked to calculate Voltage at node A; Voltage at node B; Current provided by the voltage source. Using node analysis I managed to find voltages at node A and B (I got 12.13 for VA and 5.84 for VB), but I am still having difficulties in finding the current provided by the voltage source (V1 in the circuit). How can I calculate the magnitude of this current? AI: You have the voltage at B, and the resistance R3. From Ohm's you can calculate the current through R3. The current source takes 10mA of that current, and from KCL we know that the voltage source takes the rest. I calculate 9.46mA from voltage source.
H: What does Vaa mean? I'm trying to understand this circuit. It looks like all the NCP chips are just voltage regulators, but I don't understand the VDD and VAA labeling, what do these mean. Also, any idea why the top right and top left circuits are exactly the same but lead to different labels? For reference, this power supply circuit is being used for a circuit that uses instrumentation amplifiers and an AD converter. AI: Probably they've just separated analog (Vaa) and digital (Vdd) supplies by using two similar regulators, which is a valid way to keep digital noise out of the analog signals.
H: Adding supplemental power to USB device I have a USB microphone that I'd like to supplement with more power than my laptop USB port can provide. What I did was cut the power lines on the USB cord and fed in an external power source through those lines. I then tested the power line connectivity by plugging in my phone, and it charged (meaning power lines are good), then tested D+ and D- lines with a multimeter, both of which showed a very small amount of resistance. However, when I plug in my microphone and external power source, my computer does not recognize the device. I even reconnected the power lines back to their original wire and tested it, and it worked fine, so I believe there is no problem with the wiring or connectivity. From my knowledge, it seems to me my computer should be recognizing the device because as long as the device is powered, the USB line is pulled up and the computer will recognize there is a device present. Is there anything I am missing? AI: You can't disconnect ground from laptop, even if you feed extra 5V supply. The USB data still needs ground reference. Good thing is the USB is not damaged but it might have been damaged by equalizing supply leakage currents via data pins.
H: Off-the-shelf electromagnet with deterministic pole I looking to buy an electromagnet (12v) and there are a lot of them out there on amazon and ebay in all kinds of size and shapes -some are round, some are rectangle, etc. However, in my application, it's important that I have a positive side of the magnet facing out when the current runs through the electromagnet. In my application, I'm utilizing the repel effect of two magnets where another piece has a permanent magnet with positive side facing out. So the goal here is that when the electromagnet is energized, we have a force that pushes the two magnets away from each other. For example, in this picture with this DC electromagnet, is it as easy as changing the polarity of positive and negative to get, say the positive side on its face? The specs that I ready don't mention anything about that. Thanks in advance. AI: To change the polarity of the magnetic field, all you have to do is change the polarity of the input current. However, what you've shown there is a 'pot' magnet, with both poles on the same face. If you want to set up repulsion between two magnets, you'd do better with solenoids, that have a pole at each end. The geometry will be easier, as pot magnets really need to be axially aligned and have similar sizes to repel. Otherwise you end up attracting the metal of the outer shell, regardless of what the inner pole is doing. With a pole at each end, you can use very different sizes, use in conjunction with permanent magnets, use off axis, it's much easier.
H: Switching circuit based on clock I have attached the timing diagram. I want something similar to monostable multivibrator but with so additional features. don't know how the circuit will be. Case 1: I want the output to go high at the rising edge of the input, output stays high as long as the input is high but output will be pulled down after 500ms even if the input is high. Case 2: Output should go low if the input is less the 500ms, i.e. if the Input is of 300ms the output will also be of 300ms. It can be easily done with micro-controller but i want some transistor or 555 solution if it is possible. AI: A standard one-shot configured to 500ms and an 'and' gate should do the trick. Have the input signal and output of oneshot feed into the 'and' gate.
H: Question On Logic Gates In a small railway station, there are three platforms, #1, #2, #3. Up and down trains can enter in platform number #2 and #3, but platform #1 is only devoted to up trains. Design a logic circuit using basic gates for train entry into the station with proper truth table. I'm not able to completely understand what the exactly the question is asking me to do? What shall be the output operation in such a case? Be it up trains or down trains, there ARE trains entering the platforms all the time. So, if the output shows 0, what would that signify? But I need to show both up and down trains, so I took 1 to indicate the up ones and 0 to indicate the ones which were down. But, what is my operation here? What shall I find out? How do I exclude all down trains from platform 1? Shall I remove the four of the combinations which involve 0( if 0 is taken as down)? AI: Digital circuits can represent yes or no. Here I am defining an output of '1' can means the given station can accept a given train. The question is vague, but I'm assuming that each station can only fit one train in it at a time. So let's breakdown your problem into inputs and outputs. With those inputs and outputs we can get a truth table, and by extension a logic circuit. One input can be if a train is 'up' or 'down'. One output can be if station 1 can accept a train or not. If a train is down, we know that station 1 can not accept it. So on your input output table, if the input train is 'down' (let's call that 0), the output for station 1 is always no entry ('0'). So now we can add some more inputs. If the train is 'up' (let's call that 1), depending on the if the station is empty or full it may be either 'no entry' (0) or 'entry' (1). So we can make a 'station 1 empty' signal. If station 1 is empty, and the train is 'up', station 1 can accept the train (output a 1). If the station is full, you can fit another train, so the station can't accept the train (output a 0). Repeat this process for the other stations and organize it into a table. Once you do that it's just a matter of truth table -> digital circuit, which I am positive that has been answered thoroughly on this site and others.
H: How do I make this electronics system of circuits and batteries work? I have this: where Battery #2 will connect with pins (like wireless earbuds) to Battery #1 so Battery #2 can get charged (from Battery #1). So Battery #2 can be easily disconnected and connected to Battery #1 just like wireless earbuds with their case. My question is, how do I make it so that when Battery #2 is disconnected from Battery #1, Battery #2 and Circuit #2 are connected. But when Battery #2 is connected to Battery #1, the connection between Battery #2 and Circuit #2 is determined by the switch (or the state of the connection) between Battery #1 and Circuit #1? In that way, when Circuit #1 is on and Battery #2 is connected to Battery #1, Circuit #2 is also on. When Circuit #1 is off and Battery #2 is connected to Battery #1, Circuit #2 is also off. And when Battery #2 is not connected to Battery #1, Circuit #2 is on. What's the easiest way to do this with least components? AI: where Battery #2 will connect with pins (like wireless earbuds) to Battery #1 so Battery #2 can get charged (from Battery #1). WARNING: It is VERY unwise and also dangerous to directly connect two batteries together in order to try to charge battery 1 from battery 2. If battery 1 is relatively discharged and battery 2 is relatively charged VERY high currents can flow between the two batteries. Depending on the LiIon batteries used this could cause fire and/or damage to the batteries. You could add a resistor in the circuit between batteries - but this will waste energy and needs to be sized for the worst case relative charge situation. An acceptable solution is to add the circuitry from a battery bank that will accept 3 to 4.2 V in and provide battery charging out. Because of the way battery banks usually work not all will operate with 3V to 4.2V in. What will work - and it adds complexity and inefficiency is to use TWO battery bank circuits. Battery 2 inputs to the battery terminals on PB2 and outputs 5VDC. PB2 5VDC out connects to 5vDC IN on PB1 and charges battery one connected to PB1 battery terminals. __________________ My question is, how do I make it so that when Battery #2 is disconnected from Battery #1, Battery #2 and Circuit #2 are connected. .... You can almost do this with manual switching, and do it exactly with a relay or simple circuitry. In both cases a 4 pin connector is used between B1, L1 & B2, L2. 2 wires connect the batteries via a charging arrangement - see above. 2 wires are used to connect load 1 to load 2. Manual: If you don't mind having to manually switch B2-L2 when the modules are disconnected then this is an easy and low cost solution. Provide a switch S1 between B1 - L1 and another between B2-L2. When the connection is made charging occurs from B2 to B1 and L1 is connected to L2. If S2 is operated both L1 & L2 are powered by B2 (If S1 is operated then both loads are powered by B1 but that is not on your requirement list). When the connector is disconnected then B1-L1 is controlled by S1 and B2-L2 is controlled by S2. Automatic. To fully meet your description, add 2 contacts to the connector. A relay in both modules can be operated via the 2 extra connections when the modules are connected. The relays can connect or disconnect Bx to Lx as required when the modules are separated. A simple electronic circuit (one or two transistors and a few resistors on each module) could replace the relays. I could draw the related circuit, but I suggest that you look at the above descriptions and draw a circuit that matches. Ask if too hard after giving it a try. A circuit with a 2 pin connector may be possible but with extra circuit complexity. _________________________ Below is an example only circuit that meets what I understand your requirement to be. S2 operates both loads when the two modules are joined and load2 only when separated. Load 1 is automatically powered on separation. When plugged together: B2 charges B1 via a suitable charging circuit. Switch 2 operates Load 2 and Load 1 from Battery 2. Q3 is turned on via R3 and turns Q1 off. When unplugged: Switch 2 operates load 2 from battery two Q1 is turned on by R7 so Load 1 is powered by Battery 1 . Three wires is possible with a little more complexity. Two wires would need "signalling" over the charging circuit and is possible but non-trivial. Use of eg optocoupled signalling as well as the two power leads would allow two wires plus the opto link. In this mode S2 controls L1 & L2 powered from B2. | When separated S1 controls L1 from B1 and L2 is on from B2. simulate this circuit – Schematic created using CircuitLab In the above diagram charge direction is left to right. Assume source battery is of higher mAh than target battery. R7 ~~= V/Ib Ib ~= Ichg/Beta_Q1*2 Say Beta = 100 (higher available). Say Ichg = 150 mA max. V_R7 ~= 2.5V R7 ~= 2.5/(0.150/100 x 2) ~~= 1K Change Q1 to a suitably low Rdson MOSFET for much lower standby current. R3 maybe 33k R6 maybe 220k MOSFETS allow much higher resistor values ane lower losses via resistor strings. If using bipolars then eg BC327-40 / BC807-40 have higher beta so allow larger resistors. __________________ This addresses the various discussions. I have not gone over it in utter detail compared to spec as the spec is somewhat fluid - and a boost converter is still needed for battery-battery charging BUT it shows how one side can auto turn on when disconnected and how both sides are controlled by one switch when connected. Click image for larger version