source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Do microprocessor have any special hardware to do division and multiplicaiton? My old school understanding is that multiplication is nothing but successive addition and division is nothing but successive subtraction. So, my question is there any changes being done like do we have a hardware that does the division and multiplication in one machine cycle or go. For e.g, if I have 2 registers of 64 bits, and if I multiply them, I can get an overflow i.e. I need two 64 registers to store the result. So, when I do multiply do the modern RISC processor does successive addition behind the scene or does it do just multiplication. Is there a hardware that can do just multiplication rather than using full adder? <Q> Some faster and larger processors have hardware multiplier and some slower and smaller <S> don't. <S> Division can be also made faster with hardware. <S> If there is no hardware to help, the software needs to perform multiplication and division with a software algorithm. <S> While successive addition and subtraction can do it, there are faster ways to do it, for example multiply can be performed with shifting and adding. <A> Some modern RISC processors have dedicated integer multiplication (or multiply-add or MAC) circuit blocks, some very small or low power ones don’t (some of the earliest RISC ISAs didn’t even have a MUL instruction). <S> The multiply logic blocks are often just a bunch of layers of (3 input, 2 output) <S> carry-save adders (mostly XOR gates), sometimes stacked, sometimes pipelined, with attached carry propagation logic (look-ahead or carry-select are two common types). <S> Similar to a fast adder, just a lot deeper, and with a single carry block, instead of one for each adder layer. <A> It does the integer, floating point and binary/boolean operations all in hardware, with things like square-roots needing extra CPU cycles. <S> In some cases floating point is handled by a local FP engine. <S> Now days extra help from vector processors on another card or as part of a video card (CUDA cores) or GPU can process huge arrays of numbers. <S> Todays 64 bit operating systems handle the background details. <S> Extended floating point handles 128 bit math. <S> Hardware based multipliers are common. <S> To multiply or divide by powers of 2 a shift register is used, faster than a complex ALU. <S> You are thinking of the way things were decades ago. <S> Normally the simpler and much lower cost <S> These are mostly for machine control with built-in graphics/USB/Ethernet and seldom exceed 200 MHZ to save power. <S> They can do machine control with ease, but are no competition for a Intel i7 or AMD Ryzen CPU running at 3 GHZ to 5 GHZ. <A> There are ALU multiplication units : Source of image <S> The very basic MCU, CPU has the ALU with multiplication/division capabilities. <S> However you can build an ALU without it, but it can be still called an ALU. <S> The very first computers didn't had an ALU with such capabilities, therefore the mul/div was made with a program that was shifting and adding. <S> Such ALU is a popular 7418 .
MPU's can do integers/hardware multiply and possibly floating point to 64 bits. Yes, it is called a ALU, or A rithmetic L ogic U nit.
Why does wire not have large capacitive reactance? For capacitive reactance, I am presented this formula: $$X_C = -\frac{1}{2\pi fC} $$ Where clearly, the capacitive reactance is inversely proportional to the capacitance. This confuses me. We usually talk about capacitive reactance in relation to capacitors, which have a rather high capacitance. From this formula, I would expect their reactive capacitance to be small, and the reactive capacitance of elements with low capacitance to become very high. That is, a simple wire should always have a much higher reactive capacitance than a capacitor. What am I getting wrong here? Does this formula only apply to the circuit-elements we define as capacitors? If so, what makes them so special that we can apply this formula to them, but not to other elements which also have a (very small) capacitance? <Q> The same formula applies. <S> Wires have low capacitance to their surroundings so they have high Xc. <S> Capacitors have high capacitance in comparison so they have low Xc. <S> Thus the wires are a smaller AC load (less current flows) and capacitors are a larger AC load (more current flows). <S> It is no different from resistance, high resistance means small load and small current, low resistance means high load and high current. <A> A straight wire will, as you say, have a very low capacitance and therefore a very high capacitive reactance (dependent on frequency). <S> What you may be overlooking is that the capacitive reactance is only one part of the wire's impedance (R + jX), the other parts being inductive reactance and resistance. <S> As the resistance in a wire will be significantly lower than the reactance components and also not frequency dependent <S> it dominates the overall impedance as the capacitive reactance is effectively in parallel with the wire's resistance component not in series with it. <A> There's a trick for making a low capacitance, high reactance, capacitor: just twist two wires together. <S> These "gimmick" capacitors were perhaps more common in the past, but may still be found in the wild. <S> So, yes, wires have capacitance to other conductors. <A> The formula features \$C\$ in the \$1 <S> /C\$ <S> reciprocal configuration because in fact the impedance of a capacitor to the flow of AC current in fact decreases with increased capacitance. <S> For instance, a 1 \$nF\$ capacitor will not pass 60Hz AC very well at all; it appears nearly an open circuit to that frequency. <S> A 100 <S> \$\mu F\$ capacitor, much larger, passes 60HZ AC much better. <S> Now a stretch of copper wire conducts; it passes not only very low frequencies very well, but even DC. <S> So does that mean that, paradoxically, a wire is a very large capacitor? <S> No, it doesn't. <S> A piece of wire has almost no capacitance at all; because it conducts, it cannot spontaneously maintain a separation of charges. <S> Wire conducts very well because it has low resistance . <S> We can model a wire and a capacitor it like this: simulate this circuit – Schematic created using CircuitLab <S> That is to say, a wire or a capacitor can both be be modeled as a resistance in parallel with a capacitance. <S> (If we presently cared about inductance, we would add that also, and for completeness we would include an inductor model.) <S> Therefore all the current flows because of the low resistance; effectively, the tiny capacitance is shorted out by the low resistance. <S> A capacitor is basically an open circuit; it blocks the flow of DC, except for some small leakage. <S> That leakage can be modeled as a large resistor shunting an ideal capacitance. <S> Parallel impedances sum using the \${1/Z_{\text total} = 1/Z_1 + 1/Z_2 <S> + ... <S> + 1/Z_n}\$ formula. <S> Wire has a very low resistive Z, and so that vastly dominates over its huge capacitive Z. A capacitor has a relatively low capacitive Z, which dominates over its huge resistive Z. <S> So in the diagram on the left, the overall Z is that of the R branch, and in the diagram on the right, the overall Z is that of the C branch. <S> In other words, we can explain everything using the principle "electricity takes the path of least resistance impedance". <A> Examine the capacitance of Twisted Pairs (2 wires) versus capacitance of a Coaxial Cable (a wire inside a tube). <S> A wire does have very high capacitance reactance as it interacts with stored charges in its surroundings. <S> As you try to send a signal from A to B, a wire in isolation requires the lowest amount of charge. <S> On the other hand, a wire over a sheet of metal (a plane), requires MORE charge but will be faster. <A> "Just a wire", and for that matter the "textbook electrical circuit", only exists in "electrically short" setups where the longest wire is shorter than the wavelength of the highest frequency component in use by an order of magnitude or more. <S> Beyond that, you have to always think of pairs of wires as transmission lines <S> - loose wires will become part of a transmission line with whatever other wire carries the return current. <S> If the shape/layout of the resulting transmission line is wack, the whole setup will behave like a transmission line that is wack. <S> Long overland AC lines are not just called "transmission lines" because they transmit electricity on a line, they actually behave with all the RF magic in play - a line of several hundred miles is no longer truly electrically short at 60Hz.
A wire has a very low capacitance, which means that the C branch of the circuit has a very high \$X_C\$ and therefore very high impedance.
Need assistance to understand Power and Ohm's Law Hello I'm looking at a light bar on a vehicle and the specifications say it draws 7.5A at 9-32V and the light bar says it has 36 x 5 Watt LED lights which would make a total of 180 Watts that this device uses is this correct?. My confusion is how can it draw a constant 7.5A at each voltage between 9-32V? If the voltage increase how does affect energy used over time if the current is still flowing to the device at the same speed? and if is powered by 32V at 7.5A this would be a total of 240A which is too much for the device. Would the internal resistance be changing to keep a constant current of 7.5A? Thank you <Q> You're assuming that the current is always 7.5A. <S> Manufacturers often quote the maximum current draw. <S> If the light bar contains a switch mode power supply, then the current draw will decrease if you increase the voltage, keeping the wattage approximately constant. <S> Just because the light bar contains 36 x 5W LEDS, it doesn't mean that each LED is actually being driven at 5W. Running an LED at less than its rated power <S> makes it easier to keep it cool. <S> It's also a very good way to fool customers into thinking they are going to get a light that's a lot brighter than it really is. <A> It might have a power supply inside it to drive the LEDs. <S> Or it might have a constant current driver <S> so it wastes extra power as heat. <S> But 180 watts at 7.5A is exactly 24V <S> so they might have rated the consumption at typical 24V usage. <A> It's possible that this has a maximum output power rating regardless of what you provide to the light bar. <S> This regulator will take the 9-32V input and convert it to potentially a 12 / 24V rail that is actually powering the LEDS. <S> If you could share a link to what LED bar was used that might help us explain what's happening. <S> Just to clear up your maths and question about Ohm's law, with the provided information you have said that the Light Bar states Max current of 7.5A and an operational voltage range from 9-32V. <S> The image below shows the equations you should be using to calculate this, to calculate power with the values you have you should do I <S> X V = <S> P. <S> If you want to work out the max current we should do P / V = <S> I. Knowing this <S> we can Knowing this <S> we can calculate all possible combinations, as shown below, <S> Assuming the 7.5A limit is used across all voltages you will be current limited at any voltage below 24V meaning the maximum power output would drop as shown. <S> From my calculations you can see that the Current rating provided lines up perfectly with the 24V @ <S> 7.5A = <S> 180W <S> so it's likely <S> the numbers you are reading are referenced to a 24V supply. <S> This is also quite a common supply rail for LED's so that seems to make sense.
The light bar you described seems like it could be using an internal regulator to actually power the lights. So there is a good chance the 7.5A is rated nominal value for rated nominal supply, and it will vary according to the applied voltage.
Capacitive Switch To Distinguish Between Metal and Plastic I have an application where a rotating plastic wheel has ferromagnetic inserts on the circumference of the plastic wheel (they don't stick out). Shown below in the picture is the plastic wheel (black) with ferromagnetic inserts (red). This could be accomplished with a hall-effect edge detection sensor like the Allegro ATS616LSGTN-T but I don't want to use it because the magnet in this sensor will cause drag (due to the reluctance effect); this is my only reason for wanting to avoid using hall-effect sensors. I am wondering if it would be possible to create a capacitive switching sensor to distinguish between plastic and metal given the wheel is rotating around 3500 rpm. <Q> To be short: the answer is no. <S> capacitive sensors aren't so fast, at least from my knowledge, nor they will clearly distinct magnet from plastics. <S> The second thing is that hall sensors don't have any ferromagnetic inside to cause drag, so I do think is the best solution for your application. <A> If there is a large capacitance change (measure it!) <S> I don't think you'd have any problems using that, though I am not sure if there is a "canned" chip- most capacitance touch or proximity applications need and want a much slower response time- <S> tens of milliseconds for example. <S> One of the earliest applications of this principle was vacuum-tube based proximity fuses in WWII. <S> If I ass-u-me 10 segments at 3500 RPM <S> that's less than 600Hz. <S> You can use a frequency of 1MHz, giving plenty of time to detect changes in impedance (or frequency if it's part of a tuned circuit). <A> It would be difficult to do this capacitively as it appears there is no electrical path from the metal in the wheel to ground or anywhere else. <S> In the best case, that would provide 1/4 the capacitive change compared to the capacitance between sensor and insert. <S> However, I suspect an inductive approach would be easier. <S> Measure <S> the inductance of a coil in proximity, which will change as the ferromagnetic plate passes by. <A> I am wondering if it would be possible to create a capacitiveswitching sensor to distinguish between plastic and metal given thewheel is rotating around 3500 rpm <S> That's about 58 revs per second <S> and, you might be able to do it with this: - I believe you can get prototype boards to do some testing and <S> if it works you can move on to a high speed sensing machine if you do require a higher sample rate. <S> I've designed and built capacitive probes and sensor circuits that are good for a bandwidth of nearly 100 kHz <S> so it's certainly possible with the sort of resolution as seen by the TI chips set above. <S> But, possibly a simpler way is to use the ferromagnetic properties of the inserts and build a mini metal detector that runs at (say) 100 to 300 kHz. <S> It would be a low power AC excitation so it won't disturb the inertia of the rotating wheel. <S> Or just buy an optical sensor and paint a stripe on the wheel. <S> These are very effective and can work at a distance of several cm. <S> Again I've used these when testing rotating electronics on a spin-rig running at several tens of thousands of RPM. <A> Considering all the data available, it would not be wrong to conclude that this application is well suited for a standard proximity sensor application. <S> The maximum switching frequency would be close to 360 Hz. <S> Here's a comparison of various proximity sensor types with respect to their maximum switching frequency. <S> These are typical values across a range of diameters and sensing distances. <S> Values for specific types could be as high as 50 Hz for capacitive and 1000 Hz for inductive sensors. <S> Since magnetic types are not to be considered, an inductive proximity sensor appears most suitable.
The best capacitive solution would be to put two plates in your sensor and measure the capacitive coupling between them to see if metal in proximity is creating a capacitive path.
Can we or should we parallel H-bridge module for increse current? Can we parallel H-bridge input and output for increse current? For specific I select 2 case L298N (BJT based) TB6612FNG (Mosfet based) For L298N as shown in datasheet suggested to parallel chanel to increse current.For TB6612FNG It have designed dead time.If we can or we already did it.The question are How to ensure it will not short-circuit between chanel? What about load sharing? if to chanel not share load equally, that means maximun current not twice value of 1 chanel. <Q> Generally you choose drivers and heatsinks so that they are capable of driving the DCR coil resistance for surge starts with much less voltage drop than the DCR. <S> Your MOSFET H bridge specs are: <S> Output current: IOUT = <S> 1.2 <S> A(ave)/3.2 A (peak) <S> Output low ON resistor: 0.5Ω <S> (upper+lower Typ. <S> @ <S> VM ≥ 5 V) <S> Therefore the motor DCR must be matched to the driver. <S> 3.2A peak implies a ratio of I=Vbat/(2Ron+DCR). <S> Since there are two FETs active , it is 2Ron. <S> If you need more current, consider a better bridge driver instead. <S> 6644 family and up instead of 6612 <A> If this is about parallel controlled IC's it may not work unless there is a way to synchronize them . <S> Individual MOSFETs with same part number, and hopefully same batch number will track each other very well. <S> If there is a source resistor used to sense current all parallel MOSFETs need to use the same current sensor. <S> Internally a MOSFET is an array of parallel transistors used to build up the current rating, so parallel MOSFETs share loading very well. <S> As for preventing "shoot-through" the PWM controller and design topology <S> help insure there is dead-time so that 1 MOSFET is switched OFF before the other MOSFET is turned ON. <A> With a single device, it can manage its own dead time to some extent. <S> With multiple devices, your controlling micro will need to handle it. <S> Use the datasheets to find the worst-case dead time required for your device, then double it to allow for tolerances between devices, and use that time in your micro. <S> Then we get onto device types. <S> BJTs are vulnerable to thermal runaway, so in general they should not be used in parallel unless the device has some kind of additional circuitry to prevent this. <S> MOSFETs do not generally suffer from this, so they are safer to use in parallel. <S> However MOSFETs do still have the disadvantage that since their on-resistance will not be exactly the same, one device will still have more current through it than the other. <S> You'll need to use the max/min on-resistance specs to work out how bad the balance between devices could be.
If the datasheets do not specify being able to sync with other IC's then you cannot do so. It is bad practice to blindly parallel drivers without knowing how to estimate the power dissipation and heat rise. Multiple devices in parallel simply give you more of the same problem you already have with an H-bridge - namely that you need to allow enough dead time for one side to turn off fully before you turn on the other side.
Reason for minimize PCB tracd width? As I know we need larger trace width to handle higher current but some PCB got small PCB trace for signal. Why they don't use large trace if it's no any disadvantage?. Are there any reason or factor for minimizing trace width? (ignore space constrain) <Q> Impedance control (discontinuities), and parasitic capacitance (two sides of the same coin really) <S> if you are running over a ground plane. <S> Sometimes it's difficult to tell in advance if you might run out of room and if your trace is too big you have to reduce it down which might mean you have to re-arrange a bunch of stuff. <S> Also, it can make it more difficult to solder. <S> More heatsinking. <S> Also, have you ever routed a board? <S> It can be mind numbingly tedious to keep on changing trace widths. <S> I used to try and make my traces match the width of the pads, but after running into so many traces that run to multiple components each with different pad sizes <S> I threw my hands up in the air and just used the same 0.3mm trace width for every signal when it was not critical. <A> If you need impedance control, it's essential to set the trace width to achieve the right unit capacitance and inductance. <S> The exact width will vary, depending on the target impedance and other factors. <S> A needlessly-wide trace would work against that. <S> If you don't need impedance control, it nevertheless is still desirable to reduce trace capacitance to improve signal transition time and reduce drive power (narrower traces have less area, and therefore less capacitance.) <S> Ultimately, it's more work to make arbitrarily-sized traces for signals. <S> You would settle on a set of layout rules and use them throughout your design. <S> Power planes are a different matter. <S> It's often the case that these use wide shapes, to improve both power integrity and thermal dissipation. <A> Although you say "(ignore space constrain)", I think the main factor governing track width is space constraints. <S> With through-hole parts, we often want to run tracks between IC pins - <S> the pin spacing and pad diameter place a limit on the maximum width of track there, and it is convenient to use that same width everywhere, rather than reducing the width only when needed. <S> With surface-mount parts there are similar spacing concerns to get tracks between component pads. <S> With PCB CAD programs, it is generally most convenient to use the same track width everwhere - <S> it is extra work to change track width, so wider tracks are only used where needed, for extra power-handling capability.
In addition, the larger a trace is, the higher the chance you might have to narrow it down to squeeze it past something and that introduces an impedance discontinuity. I guess this could also cause tombstoning in some cases if you have a small component with landings sitting right on the a giant trace.
Why use a tantalum instead of a ceramic capacitor? On page 72 of the AD7124-4 datasheet it says: Decouple AVDD with a 1 μF tantalum capacitor in parallel with a 0.1 μF capacitor to AVSS on each pin. Why would this capacitor be specified to be a tantalum? At this low capacitance a ceramic MLCC is cheaper and has superior ESL and ESR. Is there a reason for this? <Q> The LDO built into the chip needs an ESR that is high enough to ensure stability under all conditions. <S> You can use a 1uF ceramic capacitor with a series resistor of 5 or 10 ohms in place of the tantalum capacitor. <S> And keep the 100nF capacitor in parallel. <A> It's pretty much legacy information. <S> For instance, the AD7192 on page 36 says the same thing and that dates back to 2009. <S> The AD7124 is 2015 vintage and it appears to have just copied over some of the same words: - If I could be bothered to go back further <S> I'm sure I'd find that pretty much all similar devices that are older say the same thing. <S> You can use MLCC capacitors. <A> MLCCs have mostly better ESR and ESL compared to tantalum capacitors, but tantalum capacitors are a bit stronger against voltage and temperature fluctuations. <S> For example, an MLCC's capacitance may change 40% at 50% of rated voltage. <S> Plus, some converters need a bit high ESR and a bit high ESL for stabilization ( <S> e.g. to prevent unnecessary oscillations). <A> Tantalum capacitors are specified to make life exciting and to help remind you of the bad old days :-). <S> In this application it may be safe enough. <S> Or not. <S> This answer Are tantalum capacitors safe for use in new designs? <S> explains (at great length :-) ) <S> the relevant considerations. <S> In this case, as others have noted, using an MLCC, possibly with a small series resistor, will do as good a job and avoid the more exciting aspects of tantalum capacitor failure. <S> From Kemet "APPLICATION NOTES FOR TANTALUM CAPACITORS" <S> Capacitor failure may be induced by exceeding therated conditions of forward DC voltage, reverse DC voltage, surge voltage, surge current, power dissipation, ortemperature. <S> As with any practical device, these capacitors also possess an inherent, although low, failure ratewhen operated within the rated condition. <S> The dominant failure mode is by short-circuit. ... <S> Catastrophic failure occurs as an avalanche inDC leakage current over a short (millisecond) time span. <S> The failed capacitor, while called “short-circuited”, mayexhibit a DC resistance of 10 to 104 ohm.
A Tantalum capacitor has good capacitance per volume and low ESR, at the expense of a propensity to (any or all of) smoke, shriek, burst into flame and explode when subjected to small voltage excursions above rated value when connected to an other than low energy source.
I removed a little motor from my laptop fan and it won't run using a 9V battery I realize this is may be a noob question so please point me to the right place to ask it if this isn't so. Anyway, I'm trying to build a little magnetic blender using a spare laptop fan. I tried plugging the red and black wires (and every other possible combination) into a 9V battery but it didn't run at all. So I broke the whole thing apart and ended up with the motor inside: When I plug the + and - ports from my battery to the metal things in the motor (A and B in the picture), it turns about half turn and then it stops, and when I switch the poles it runs a little more, and so on, always on the same direction. So I guess the poles need to switch intermittently, which I understand means I need AC instead of DC? Is there a way to easily have this motor work using a battery or power from my outlet using simple tools? I understand home current is AC, but I'd need a way to lower the voltage while keeping it AC, and I believe phone chargers all output DC. <Q> You are on the right track, in thought process at least, not procedure. <S> Know that fundamentally, there is no such thing as a DC motor. <S> All motors operate based on changing (alternating/rotating) magnetic fields which are produced by changing (alternating) currents. <S> They are all "AC" so to speak at the lowest level. <S> What goes into the coils is always some form of AC. <S> You only have motors that take DC and convert it into AC. <S> The brushes on a brushed motor do this by taking the DC you put into the wires and making the current change directions through the coils when it turns, thereby producing the "AC", so that it can continue to turn instead of just turning a bit and locking up. <S> It needs some smarts. <S> A computer fan has the electronics integrated into it, but it appears you might have ripped those out. <A> Try again with a working fan and then follow the instructions. <S> The internal fan electronics commutates the DC with the Hall Effect magnetic rotor sensor. <S> Instead of guessing use, Red=+, Blk=- , yellow= tach out or don’t care <A> I'm guessing from the details you give that this was a 3-wire fan? <S> the basic details others have not expressly given, but rather hinted at, are that PC fans don't run on just voltage. <S> you cannot just put 9 volts on a 12 volt PC fan coil to run it or slow it down. <S> it needs 12 volts, and data from a sensor showing it's speed and position to itself so it to know to turn and switch active coils to keep itself turning; called Tach. <S> Yes, I know I haven't said anything new <S> , I'm just adding some clarification that might be needed
In a brushless motor, like your computer fan, electronics are required to do the job of the brushes.
What was used as paint on insulation/conformal coating in the 1950s? I'm restoring a multimeter from the 1950s and I was wondering what was used as paint-on insulation/conformal coating. It's the yellow/brownish stuff smeared on the screws and leads in the photo.I suspect it is shellac, was this commonly used in the 1950s in electronics? It is not greasy and quite hard. It will melt a bit with a soldering iron. <Q> Photographs are not reliable color indicators. <S> And there are greases near that color. <S> But that really looks like the signature color of GE’s Glyptal , which is an insulating paint specifically made for electrical equipment. <S> Glyptal comes in very basic colors like black and white, but that particular burgundy is their signature. <S> I’ve never had occasion to stick a soldering iron on Glyptal, so I don’t know what it does. <S> But it does not like to burn, unlike normal paint. <S> Glyptal is readily available today, and is used for such purposes. <S> Also, auto racers paint the inside of engine blocks to capture any remaining casting sand, so it doesn’t wind up in the lubricating oil. <S> I suspect they are after the “non-flammable” characteristic, not its dielectric strength. <A> shellac (or some other type of varnish) for a hard heat resistant coating andparaffin wax for a softer meltable coating. <A> For many applications, a fast-drying varnish or enamel was used. <S> The material left behind when the solvent dried was whatever plastic material was available. <S> Nitrocellulose was developed in the mid 1800's and used as a plastic or plastic coating for many purposes.
Given the 1950s era, Glyptal makes a world of sense, since the product was in its heyday then. The base was whatever volatile organic solvent was available at the time.
Subtractor op-amp configuration to find the diference of 2 signals How can a differential op-amp be configured in a way that it doesn't amplify but only takes the difference between the signals at the inverting and non inverting input? <Q> We set the gain of a differential amplifier to unity (well, +1 from non-inverting input, -1 from inverting input), so that it 'doesn't amplify', while taking the difference between its inputs. <S> For a conventional diff-amp, this means all four resistors equal. <A> Using the superposition theorem : - The gain through the inverting "channel" is \$\dfrac{R_f}{R_1}\$ <S> So, make <S> \$R_f = <S> R_1\$ <S> to get an amplification of minus one. <S> The gain through the non-inverting "channel" is \$\dfrac{R_g}{R_2+R_g}\cdot <S> (1+\dfrac{R_f}{R_1})\$ <S> So, if \$R_f = <S> R_1\$ (as per above) <S> then the non-inverting gain is \$\dfrac{2\cdot R_g}{R_2+R_g}\$ Hence for a non-inverting unity gain, make \$R_2 = R_g\$ <A> It is not hard to show that the output voltage of your circuit is: $$\text{V}_\text{out}=\text{V}_2\cdot\frac{\text{R}_\text{g}}{\text{R}_2+\text{R}_\text{g}}\cdot\frac{\text{R}_1+\text{R}_\text{f}}{\text{R}_1}-\text{V}_1\cdot\frac{\text{R}_\text{f}}{\text{R}_1}\tag1$$ <S> So, when we make \$\text{R}:=\text{R}_\text{f}=\text{R}_1\$ <S> we get: $$\text{V}_\text{out}=\text{V}_2\cdot\frac{\text{R}_\text{g}}{\text{R}_2+\text{R}_\text{g}}\cdot\frac{\text{R}+\text{R}}{\text{R}}-\text{V}_1\cdot\frac{\text{R}}{\text{R}}\tag2$$ <S> Simplifying gives: $$\text{V}_\text{out}=\text{V}_2\cdot\frac{2\text{R}_\text{g}}{\text{R}_2+\text{R}_\text{g}}-\text{V}_1\tag3$$ <S> So, we need: $$\frac{2\text{R}_\text{g}}{\text{R}_2+\text{R}_\text{g}}=1\space\Longleftrightarrow\space2\text{R}_\text{g}=\text{R}_2+\text{R}_\text{g}\space\Longleftrightarrow\space\text{R}_\text{g}=\text{R}_2:=\text{k}\tag4$$ <S> So, we get: $$\text{V}_\text{out}=\text{V}_2\cdot\frac{2\text{k}}{\text{k}+\text{k}}-\text{V}_1\tag5$$ <S> Simplifying gives: $$\text{V}_\text{out}=\text{V}_2-\text{V}_1\tag6$$ <S> So, we need \$\text{R}_\text{g}=\text{R}_2\$ and \$\text{R}_\text{f}=\text{R}_1\$ . <A> First story The best way to reveal the idea of this clever circuit solution, is to show how it was invented (this approach is suitable for explaining every unknown circuit). <S> Probably, some tried to convert the humble non-inverting amplifier into a differential amplifier by connecting the second voltage to the unused inverting input. <S> But it turned out the gain of the inverting input is one unit smaller than the gain of the non-inverting input. <S> So they connected an amplifier between the second input source and the inverting input. <S> Probably, others tried to convert the humble inverting amplifier into a differential amplifier by connecting the second voltage to the unused non-inverting input. <S> But now it turned out the gain of the non-inverting input is one unit larger than the gain of the inverting input. <S> So they connected an attenuator between the second input source and the non-inverting input. <S> Of course, the second solution turned out to be simpler ... <S> Second story <S> The idea of this clever circuit solution is to equalize the gains of its two inputs since the gain of the non-inverting input is one unit larger than the gain of the inverting input. <S> By connecting an attenuator before the non-inverting input (it needs only two resistors). <S> Of course, we choose the second solution... <S> Third story <S> But at some point they realized that the simple 4-resistor solution had a significant drawback <S> - it was influenced by the internal resistance of the input sources. <S> Then they remembered the more complex solution with an additional op-amp... and decided to use it. <S> They called it "instrumentation amplifier":
We can do it in two ways: By connecting a non-inverting amplifier before the inverting input (it needs another op-amp and resistors).
Floating traces on MCU dev boards bad for noise? When you have development boards for microprocessors with every GPIO pinned out on headers around the edge of the board, is the board more susceptible to picking up noise than a board without all those unconnected lines? For example say you were using the ADC on the board but everything else is disconnected (like in the image): Would the signal being read be noisier than if all those pink unused traces didn't exist if the board was placed near noisy things like SMPSs? <Q> It’s okay to leave I/ <S> O pins unconnected if you ensure that they’re programmed to have a pull-up or pull-down, or are programmed as outputs. <S> What you don’t want is a floating input. <S> That can lead to unstable operation and excess power draw. <S> That said, if proximity to a noise source is a problem, you can bypass the (pull-up/down) pins with small capacitors. <A> Probably not by a lot. <S> Proper grounding of the PCB and filtering of the input signal, the analog reference and PCB layout are more of an issue. <S> That's built on a cheap 2-layer board so the layout cannot be all that great. <S> If you flip that board over, you'll probably find large areas of copper pour that are at AC ground potential (either tied to GND or to a power supply rail). <A> The higher the impedance seen from outside, the more susceptible the pin to noise. <S> The best practice would be configuring them as push-pull digital outputs as the impedance seen from outside would be much lower.
If the unused pin is configured as input (analog or digital) or open-drain output, the pin will be more susceptible to noise.
How to accurately measure 16MHz clock with Oscilloscope I have a small problem trying to make a 16 MHz signal with a scope with 100 MHz 1 GS/s. I can't seem to be able to read the square wave from the MCU clock, see results on the attached picture. I calibrated the probe with the 1 kHz built in square wave on the oscilloscope. Also, I can see that if I output the clock signal with a prescaler of 5, i.e. a frequent of 3.2MHz then I am able to read a signal that looks more like a square signal. I'm not sure what I might be missing or doing wrong. I'm using the STM Nucleo F410RB development board. <Q> The shape of the waveform won't affect the fundamental frequency of a signal. <S> However an oscilloscope is usually not the correct instrument to accurately measure frequency. <S> It may only have an accuracy of 1% or so. <S> are usually only obtained after the signal is sampled and so will not be as accurate. <S> If you want to measure the frequency accurately and your scope does not have a built-in frequency counter <S> you will need a frequency counter/timer such as [Keysight 53230A 350 MHz Universal Frequency Counter 1 <S> The wave shape distortion you see is almost certainly because of your probing technique. <S> The probe should have an extremely short ground - a couple of inches is too long. <S> Your oscilloscope probe accessories will probably contain some small springs that are used for this purpose. <S> To get the best waveform I don't use a probe and instead use coax wired directly to the signal. <S> with very short connections. <S> If the source cannot drive a coax cable directly a 470 or 910 ohm resistor at the probe point can make an ad-hoc 10:1 or 20:1 attenuator with very good frequency response (up to a few GHz). <S> Set the oscilloscope to 50 ohm input impedance if using this approach. <A> Your oscilloscope photo indicates that you are able to measure the MCU clock at 16 MHz quite nicely. <S> You should be using a "10X" probe. <S> It will add some capacitance to the MCU oscillator, which will likely shift its frequency lower. <S> If the MCU oscillator has an input pin and an output pin, probe the output pin. <S> Your OWON oscilloscope has a time-base accuracy of \$\pm100\$ <S> parts-per-million. <S> If you need more accuracy, measure frequency with a frequency counter instead... <S> a decent frequency counter should contain a more accurate time base. <S> Your OWON 'scope has an internal counter claiming 6-digit resolution. <S> If this internal counter uses the main timebase (having accuracy of 0.01%) then its least-significant digits are suspect. <S> From the OWON SDS1102 manual: <S> Counter: <S> It is a 6-digit single-channel counter. <S> The counter can only measure <S> the frequency of <S> the triggering channel. <S> The frequency range is from <S> 2Hz to the full bandwidth. <S> Only if the measured channel is in Edge mode of Single trigger type, the counter can be enabled. <S> The counter is displayed at the bottom of the screen. <S> Operation steps: <S> 1.Push <S> Trigger Menu button, set the trigger type to Single , <S> set the trigger mode to Edge , select the signal source. <S> 2.Push the Acquire button to show the right menu. <S> 3.Select <S> Counter as <S> ON or OFF <S> in the right menu. <A> @KevinWhite has given the correct solution. <S> Analysis. <S> The underdamped square wave indicates peaks every 2/5 in 1cm at 50ns per cm=division approx. <S> thus 40ns cycle = 25MHz resonance. <S> This is common with long ground lead inductance 0.5~1nH <S> /mm and special coax used in 10:1 probe < 90pF/m. <S> The computed resonance is dependant on the length of the ground lead inductance. <S> Thus to expect an increase in resonant frequency requires better impedance matching of the probe <S> 10RC+L : <S> 1RC ratio by reducing the L value. <S> This raises resonant frequency by inverse square root (LC), so to raise 25MHz to 200Mhz 1:8 <S> requires reducing the ground lead length by a factor of 64 down to ~5~10mm from (est. <S> = ) <S> 160~320mm supply or ground lead length including probe ground path length on cct board gnd location. <S> So I predict your probe ground lead was too long and also <S> calibration imperfect. <S> Conclusion: <S> use ground pad or test points directly at IC. <S> Ensure Vdd,Vss is decoupled by at least 10nF directly at IC. <S> As these also add path inductance to Zout. <S> Also consider CMOS output impedance ~ 50 Ohm +/-50% from RdsOn is also mismatched and further improvement can be made by examining all stray loads of breadboard wiring to output. <S> (L,C) <S> P.s. <S> 25MHz probe resonance is pretty common and this is another reason why all DSO’s have 20MHz LPF with amateur 10:1 probes.
As @glen_geek points out in his answer some oscilloscopes do have counter/timers built into the instrument that can give high-accuracy (typically only for a single chanell) but the frequency displayed using the normal measurement facilities
Building a furnace with more than one thermocouple for accurate temperature measurement I am a mechanical engineering student. I am in the process of making a special purpose heating equipment. It could be considered as a 3 phase electrical resistance furnace. I want the temperature in the chamber to be uniform, so I want to place three K-type thermocouples to feed to a temperature controller-contactor set up to control the temperature. I have previously built an electrical resistance furnace of 2 kW but with a single thermocouple and controller-contactor setup. How can I have more than one thermocouple to control the temperature in the machine? Edit 1. The purpose is to heat metal. Based on my calculation it would consume 36 kW of electricity. Based on the comments and answers, I am planning to split the heating coils into three separate sections with independent thermocouples and controller setup, where each section would be wired as an independent 3 phase heater. Would this design work? <Q> For uniformity, you should STIR the air inside the furnace. <S> Measuring with 3 thermocouples does nothing to ensure uniformity. <S> I've worked with people who design/test silicon temperature sensors. <S> The oil baths are always STIRRED. <S> ======================================== Be wary of abruptly switching 36,000 watts. <S> The energy stored in the power lines will cause ARCS at any contact points on relays, or high (destructive) junction voltages on FETS or bipolars or SCRs. <A> Imbalanced high loads on 3ph network may cause several problems. <A> I am planning to split the heating coils into three separate sections with independent thermocouples and controller setup, where each section would be wired as an independent 3 phase heater. <S> Would this design work? <S> Probably. <S> You will have (mostly radiant?) <S> heat transfer between the heaters and your workpiece, and conductive heat transfer within the work piece. <S> This will lead to cross-talk between the zones: When you try to heat up the "left side" of the work piece some of that heat will end up in the "right side". <S> That means that while your PID controller for the "right side" is trying to do one thing, the heat from the "left side" might be making something else happen. <S> This could lead to a chaotic mess, but most likely as long as you tune your PIDs to be overly damped and don't try to make any fast changes to the temperature you'll be fine. <S> Though be warned: optimizing the heater geometry to heat your workpiece uniformly is a whole separate topic. <S> (Assuming primarily radiant heat transfer.) <A> Just a note about the 3 phase elements. <S> Ones like silicon carbide can change their resistance as they age. <S> I would suggest connecting the elements in star, with the star point isolated from the neutral. <S> That way, the potential of the star point can change, to give the higher resistance element a bit more voltage & the others a bit less, to reduce the imbalance of power. <S> If you are using a thyristor control, you will need to tell the supplier what element connection it is (neutral connected, or no neutral). <S> The SCR timing is set different for each.
I do suggest you to not use separate controllers for each phase, rather turn all three on/off heaters at the same time using three phase contactor and 3ph protecting circuit breaker.
Why does impedance decrease in an MLCC as frequency increases? I understand that the impedance of any capacitor decreases as frequency reaches the resonance frequency, following the formula Xc = 1 / ( 2 pi f C ), but why does the impedance of an MLCC such a better frequency response than other capacitor types like electrolytic and tantalum? Additionally I read somewhere that "this equation is not ( in math terms ) "rigorously correct", it is actually a crude "rule of thumb", which has some built-in assumptions that are NEVER identified, anywhere." on one of the answers [here][1] Is this true? And why are the assumption never identified anywhere? <Q> "this equation is not ( in math terms ) "rigorously correct", it isactually a crude "rule of thumb", which has some built-in assumptionsthat are NEVER identified, anywhere. <S> " on one of the answers here Is this true? <S> I can't address your 2nd paragraph because it does not read correctly <S> i.e. it is gobbledygook . <S> Try fixing your question. <S> If you are referring to the answer given by someone called "@Bob S" to this question then take note that Bob S has not received upvotes for his answer, has accumulated a total reputation of 1 and hasn't been seen since April this year when he joined stack exchange. <S> In short, his answer is not to be relied upon. <A> An MLCC capacitor has smaller ESR than electrolytic or tantalum. <S> Due to physical construction and size, the ESL is also lower than on electrolytics. <S> The MLCC curve still approximately follows that curve, but due to smaller parasitics, it performs better, has higher resonance frequency, and narrower resonance peak, before the inductance makes the impedace to rise again. <S> So the formula for reactance for a capacitance is correct, but a physical real world capacitor has other properties than just capacitance. <S> It has ESR, ESL, dielectric losses, and even the capacitance varies over temperature and voltage applied, so the simple formula just does not model these. <A> The equation you give is the theoretical reactance of an ideal capacitor. <S> It comes from the mathematical descriptions of capacitance. <S> I don't see how you get the idea that it is a "rule of thumb." <S> $$Z_C <S> = \frac{1}{2 \times \pi \times <S> f <S> \times <S> C}$$ <S> Clearly shows that reactance becomes smaller as the frequency increases - and that is true for all capacitors. <S> Wikipedia has a lot of the math and links to other sources if you'd like to read about it. <S> What you are discussing, however, is a difference between different types of real capacitors. <S> A real capacitor has resistance and inductance in addition to the capacitance it was designed to have. <S> Resistance is there because all conductors have at least a little resistance. <S> Inductance is there because even a straight wire has at least a little inductance. <S> Look at the construction of an electrolytic capacitor: <S> It has two very long conductors (the anode and cathode foils.) <S> They are very thin and very long, which gives them considerable resistance. <S> Since the whole thing is rolled together, the length of the rolled conductors also gives it considerable inductance. <S> While the capacitance itself follows the equation for reactance you gave, you also have to figure in the resistance and the inductance. <S> $$ <S> Z_T = Z_C + Z_I +R$$ <S> Along with that, the capacitance and inductance form a resonator and make things more fun. <S> The difference between an electrolytic capacitor and a ceramic capacitor is that the frequency response of the ceramic capacitor more closely follows the ideal equation - ceramic capacitors have lower inductance and lower resistance than electrolytic capacitors. <S> Part of the difference is due to the size - typical ceramic capacitors are smaller than typical electrolytic capacitors. <S> Part of the difference is due to materials, and part of it is due to the physical construction. <S> As the applied frequency rises, the resistance and inductance play a proportionally larger role. <S> Resistance is (more or less) fixed, and the impedance of the inductance increases. <S> At some point, those two out weigh the impedance of the capacitance. <S> That's where your capacitor loses its effectiveness as a capacitor and behaves like an inductor.
MLCC capacitors generally have a much lower effective series resistance and therefore will have a sharper series resonance compared to Electrolytics/Tantalums: - Picture from this wiki page .
board to board soldering without castellated vias, how? I want to produce (small scale) a simple device (0.5A stepper motor controlled by atmega and a498 with a potentiometer to regulate speed). To simplify the whole process I'm using as many ready made modules as possible. A498 and Arduinos are simple - can be connected with "mother" pcb by headers, but I'm not sure about buck converters. The ones I'm interested in do not have castellated vias, they have regular pads with vias (do they have a proper name?) at each corner of the module. How to connect them properly to other pcb? Can one just solder those IN, OUT pads to "mother" board? <Q> You're doing it backwards if you're trying to SMD-mount these modules: <S> You get Wireless and high-speed boards with castellated edges, because it's easier and cheaper to make one small board with many layers, on-board antennas, impedance matching and so forth, instead of directly putting your components on your main board. <S> These cheap voltage converters do not require any of that. <S> The datasheets and design assistants of the voltage regulator IC manufacturers are good, and it's pretty easy to do so. <S> So, long story short, the thing you want doesn't exist because it bears no advantage. <A> You can use individual header pins (which would space the board off), bare wire (introducesome spacing somehow to allow traces to be routed under the module safely) or individual male/female pins and sockets (eg. <S> from Mill-Max). <S> Whatever you do, keep in mind that there are multiple sources of those PSU modules, and the next one you get may not be identical in terms of pin placement, which could be inconvenient if you have a bunch of PCBs fabricated. <A> Just grab a single-row .100" header, and cut off some single pins and solder it to your daughterboard. <S> Then stick it into your motherboard and solder the pins. <S> Unless you are holding the PCB in your hands, do not try and guess if the bottom side has a solder mask and no components so that you can just place it against a motherboard without raising it. <S> The mechanical strength won't be very good anyways without the pins.
Instead of buying a board with standard components soldered to it and soldering that to your motherboard, simply directly put the voltage controller IC and the other components on your board.
Which cable connection will result in a greater loss of power? I know that running a power cable (the cable is carrying 5V DC, I plug in an AC to DC converter to the mains) that is, for example, 50m will cause losses in the power output. So if you measure at the source it will be 5V but when you measure at the end it might be 4.3V. However, if I connect a mains extension cable that is 50m (the cable is carrying 230V AC) and then plugs in my AC to DC supply (this DC power cable is only 5cm) to my mains extension cable. Now I measure the output of the AC to DC power cable (at the end of the 5cm power cable) will I still get 5V or will the mains extension cable incur losses along the 50m and thus reduce the output of the AC to DC power supply from 5V to 4.3V? Which is better Scenario 1 or 2, in order to minimize losses? The AC mains extension is coming straight from the house's wall socket. There is no AC converter. just a three-pin plug plugged into the wall socket. Please don't ask to go and buy a 50m AC extension cable and test it. This question is asking about the principle of running an AC extension or a DC extension in order to reduce power losses. What if the cable is 5km long....? <Q> The losses are proportional to the current flowing in the wire, due to wire resistance. <S> Let's assume the load draws 5W, which will be 1A at 5V. <S> Even if we assume that the power supply is ideal, and converts mains to 5W with 100% efficiency, it will draw only 5W. Now as mains is 230VAC in your example, 5W is only 22mA. <S> So because the current is so much smaller, there is less voltage drop over the wire. <S> There is still enough voltage for the power supply to generate stable 5V locally. <A> You should run the higher voltage in the long cable. <S> Higher voltage results to less current drawn for the same load. <S> Another reason is that the AC/DC converters usually have no problems providing stable 5 V even if the input drop a few volts. <S> Some even work at a range from 100 V to 230 V, to be usable in ~110 V system. <A> Any regulated switching converter, whether AC or DC in and/or out will maintain the voltage at its output and compensate for voltage droop at its input by drawing more current and thus more power at its input. <S> You still incur power losses in the long cable, but the output voltage of the converter is controlled. <S> For lowest droop at the output do not have the long cable on the output. <S> Your question is equating voltage drop with cable losses. <S> Not the same thing.
For lowest power loss, have the long cable o the side with the least current (highest voltage).
Passive (energy harvesting) tag / transponder chipset solution with 12 inches range? I've been using a 134.2 KHz (FDX-B, ISO 11784/85) transponder/reader for use with implanted and pendant tags. However, I've been frustrated as to the range. Is anyone aware of a chip/circuit level solution incorporating that or a similar standard (like 13.56 MHz, ISO/IEC 14443, etc) that can be designed to work reliably at a range of up to 12 inches? For the tag, I only need the basic requirement of transmitting a unique identifier and can use a pendant size tag. As I understand RFID transponders, I should be able to build an RF emitter with a power output capable of powering a suitable tag at that distance, which when sufficiently energized will automatically broadcast its unique code. And then the remaining challenge is just to build a suitable reader. Is it that simple? Anyone have experience in that area? <Q> The easiest way to achieve higher ranges is to increase the size of the antenna. <S> But I don't think that such a large distance is possible with 134.2 kHz and a reasonable sized antenna. <S> Another possibility is to increase the frequency but still remaining inductive coupling. <S> HF (13.56 MHz) seems to be a good solution. <S> You already mentioned the possibility to move towards another standard like ISO/IEC 14443. <S> But if you want to switch to 13.56 MHz, you should use ISO/IEC 15693 because the minimum required field strength is much lower. <S> The maximum range is up to 1 m, which is suitable for your application. <S> One more note. <S> The communication from tag to reader is done by load modulation. <S> A relatively new chip from NXP (NTAG 5 boost) uses active load modulation. <S> NXP claims to achieve the same read range like passive load modulation but with a 40 times smaller antenna. <S> Conversely, with the same antenna size, the range with active load modulation should be significantly greater than with passive. <S> There may also be solutions from other manufacturers that I am not aware of. <A> If you use a large diameter coil, perhaps solenoidal, the field may reach 12 inches in adequate strength. <S> The inductance will be large, and resonance may be delicate; you may need to trim the resonance in real time. <A> I decided to focus on an ST25R3911B-AQFT reader chip (supporting the ISO/IEC 15693 standard and with 1.4W power to the antenna) with an ST25TV (NFC Type 5) tag. <S> It will work with 3.3V. <S> The 15693 (13.56MHz) standard has longer range than the 14443 and still better than 125kHz and 134.2kHz and is well established. <S> ST includes some detailed instructions on designing, building, tuning and matching the antenna for its $5.75 chip. <S> Calibration requires a Vector Network Analyzer, and fortunately I was able to find a little $30 NanoVNA that HAM radio guys on YouTube seem to think a worthwhile tool. <S> ST has a user forum with reasonably good participation. <S> One customer achieved a 24 cm read range with a 14 cm x 10 cm antenna, which should be adequate. <S> The problem with ST is wading through tons and tons of technical data.
UHF-RFID (860-960 MHz) would be great for range but terrible for energy harvesting because there is electromagnetic coupling and no inductive. In summary, I would recommend using ISO/IEC 15693 and maybe consider a chip with active load modulation or similar.
Is this analog switch good for UART lines? Currently designing a circuit to switch between two UART lines using an analog dpdt switch. Been searching for a while and found the BL1532 . The datasheet says it's a DPDT USB2.0 Analog Switch, but not sure if this chip will work for UART since USB is pretty fast (not an expert in this field). Here is my circuit: The MCU can communicate from 9600 to 115200 baud rate.As you can see I drive the BL1532 select pin with an spdt switch for 3.3V HIGH and GND LOW. Any advice or opinion is appreciated <Q> The analog mux chip will work. <S> Specifications are completely overkill for simple serial port switching though, so it depends on your definition of good, for example if a cheaper chip is better. <A> The IC in itself should be fine. <S> I didn't see anything in the datasheet which would indicate that it wouldn't work with the voltages or speeds you have in mind. <S> What I checked were the supply voltage characteristics and general voltage limitations on the pins. <S> I also checked that there is no indication of some DC blocking or differential <S> signaling is going on. <S> For your schematic: I would use pull-ups on the RX lines (all of them, can be in the 10-100 kOhm range) to prevent glitches when switching between the modes. <S> And some current limiting resistors like 1 kOhm in the lines for the external connection <S> , you might switch things up and then your MCU might get damaged. <S> Series resistors help in this case. <S> And if your header is going to be used by "the general public" you should probably beef it up against ESD with some protection diodes at least. <S> Another thing which isn't shown if there is a common ground for the external headers available. <S> That is needed for the communication to work. <S> It might work ok on your test because you have a hidden shared common ground but will not work if you connect it to a battery running device. <A> Your better option is to use a hub or bridge of sorts. <S> I believe they have all the way up to quad-uarts at this point, like the FT4232. <S> Depending on your MCU, you might have a USB output and an available driver. <S> Alternatively, if you prefer to use SPI or I2C, there's the MAX14830. <S> This will bridge to other UARTs as well from I2C or SPI. <S> MAX14830 datasheet
Look into FTDI - they make many UART to USB converters, which might be a better option.
How does the LM386 work? I am not an electrical engineer, but I am curious enough and my mind tells me to make a radio circuit. Now I am into it, so to make one, I need some components, but before that so that I can be a little more into basics of the working of the device, the only device I can't find an explanation for is the LM386 IC. It is an audio amplifier but its pin-out is not that clear. It shows a simple triangle but no information. What is it? A logic gate, another IC? Please explain to me how the LM386 works. <Q> The triangle is just a symbol use on a schematic diagram to represent the IC. <S> If you consult the manufacturer's datasheet for the LM386, you should find a full description and schematic of the internal circuit, and also a description of the physical package of the part, with the dimensions and pin locations. <A> The LM386 is an audio power amplifier. <S> "Power" in this case usually is less than 1 watt. <S> In a sense it is a specialized version of an operational amplifier, so it usually is shown on a schematic with an opamp-like symbol. <S> Here is the datasheet from the company that invented it: https://www.ti.com/lit/ds/symlink/lm386.pdf <S> Only one of the schematics in the datasheet shows a decoupling capacitor across the power pins, but it is critically important that it be there for any/all circuits. <S> The capacitor(s) should be as close as possible to pins 4 and 6, with the shortest possible leads. <S> I recommend a 0.1 uF ceramic and 10 uF <S> electrolytic in parallel. <S> All audio power amp chips are very sensitive about this. <A> Here is a pinout diagram of the lm386. <S> And I believe this is its most general format.
The LM386 is an IC.
Purpose of resistor colour code What would be the purpose of using a colour code for resistors instead of just printing their values? <Q> A long time ago, the technology did not exist or was too expensive to print such small text on parts. <S> Also, you can read coloured rings no matter what angle you are looking at the resistor from or how it is mounted, but as someone who has trouble telling similar colours apart <S> this is useless <S> and I don't really buy it. <A> Putting color bands on the resistor allows the value to be read regardless of the orientation, and very quickly for a skilled person. <A> Once you go to more modern surface mount parts, it is more common than not to have the resistance value simply printed on the top for the larger (and thus more human solderable) sizes: <S> Through hole parts don't do that because they're old and in the old days precision manufacturing wasn't as good as it is now. <S> Surprisingly, this (edit: labeling) never caught on for capacitors ( <S> edit: SMD capacitors), even though resistance is much easier to measure. <A> In some OLD resistors I once rescued from tube radios as a kid, the BED_coded resistors were only readable from the top. <S> Because the code was BODY color END color DOT color (only visible from the top)
Some leaded resistors, particularly precision ones, are marked with the value.
Why do motherboard voltages meet 5v standard when so much seems to work at 5.5? I am working with supercaps (>1F) for resin embedded purposes. I have an induction charger that says 5v, but it really is outputting 4.85 volt. Caps seem to be commonly in 2.7 and 5.5 volts... although there are some caps at other voltages, 5.5v seems to have way more supercaps than just 5v. Why is this? I can't really fully charge big 2.7v caps in series (5.4v) but it seems so perfect for a 5.5 volt system. And I have to use a buck converter to get to 5.5 volt... or I have to just resistor drop everything to 2.7/3 and then they don't last anywhere near as long. SO what is the reason for this and how do I deal with this problem? I could really use some insight. I'm sorry if this has been explained elsewhere... I'm struggling to dig through huge search results with just voltages and basic words for filtering. Thanks for any help. <Q> Well, 5.5V (or 6V or 6.3V) are a common specifications for parts designed to work at 5V with a bit of tolerance. <S> 5.5V for ICs is about as close as you want to call it (10% more than nominal). <S> For example, the 74ACH00 . <S> Often the 5V is biased a bit higher to account for conductor losses at full load, so you might find a regulated 5V wall wart that outputs 5.1V or even a bit higher with a light load. <S> You don't want the parts failing if things are just slightly off nominal. <S> For example, the ubiquitous LM7805 regulator will output between 4.8 and 5.2V. <A> I could really use some insight. <S> A voltage rating of 5.5 volts for a capacitor is the maximum voltage that should be applied <S> i.e. it is a top limit and, any excursion above that top limit is not recommended. <S> 5.5 volts is the chosen rating for a lot of capacitors on this basis. <S> Why do motherboard voltages meet 5v standard when so much seems towork at 5.5? <S> You should take care to ensure that any system you design cannot supply more voltage to the capacitors than what their maximum rating is. <S> In addition (and especially for electrolytic capacitors), the lifetime of the part can be increased by up to 50% by running at half the rated voltage. <S> I don't know how this might apply to supercaps <S> but I suspect that there is a similar trade-off. <A> Supercaps come at 2.7V because that's what chemistry says, and 5.5V is just two of them in series. <S> Lithium ion batteries come at 3.2-4.2V, so don't they have 4.2V motherboards? <S> Obviously they can't be 2.7V and 4.2V at the same time. <S> Answer: Why should they? <S> Why would computer motherboards care what voltage lithium ion batteries have, or supercapacitors? <S> They don't have lithium ion batteries on them, and they don't have supercapacitors on them. <S> It's simply irrelevant. <S> NASA's ion thrusters run at 3000 volts so why don't we have 3000-volt computer motherboards? <S> Also, 2.7/5.5V is the maximum rating for a supercap. <S> You probably don't want to go all the way up to the maximum rating. <A> The use of 5V power supplies goes back to the days when TTL logic chips were used everywhere. <S> TTL was introduced in the 1960s, long before anybody had ever heard of supercapacitors. <S> These days, 3.3V logic is also common. <S> Unfortunately, that doesn't work well with supercapacitors, either.
Given that a lot of systems run at 5 volts and the 5 volt rail might have an output accuracy between 4.75 volts and 5.25 volts (across load and temperature ranges), then a capacitor suitable for a 5 volt rail must have a voltage rating that is higher than 5.25 volts.
Cost effective way to protect circuit from overvoltage Which is the most cost effective way to protect a DC circuit that requires 5V input (and draw up to 1A) from external power supply? Suppose that a careless user can accidentally attach an external power supply and power up with 6-9-12-24V, this situation can literally blow up my circuit! This can appear to be a silly question but i don't have any ideas! <Q> Probably the most common method is to use a fuse with any (and sometimes all) of the following: <S> - A regular power zener diode <S> A power shunt regulator (like a zener but programmable) A crow-bar circuit (on over-voltage <S> , it clamps to close to 0 volts) <S> So, if the voltage exceeds a certain level, too much current will flow into the aforementioned devices/circuits and then the fuse blows. <S> You can use resettable fuses too (polyfuses they are sometimes called). <S> Once power is removed, the polyfuse resets. <S> An alternative is a series-connected over-voltage circuit that "disconnects" when the input voltage exceeds a certain critical level. <S> Not too tricky to design <S> but, they should also be used in conjunction with a zener to ensure that fast voltage rising events are dealt with effectively. <A> I would consider something like this ciruit: simulate this circuit – <S> Schematic created using CircuitLab <S> The fuse will blow when the input voltage exceeds 5.1 V <S> If replacing a blown fuse is an issue, consider a polyfuse which self-resets <S> Instead of the zener diode many other solutions can work, a zener + Thysristor solution like this: Borrowed from here , there are more solutions in that article. <S> What solution is most suitable in your situation depends on many things: is replacing a fuse OK? <S> what is the current consumption of your circuit? <S> Cost of the components Also don't forget physical solutions to protect your circuit, like using a USB connector for powering. <S> You will still need to cater for cheap USB chargers that output up to 7 V though. <A> The fuse and zener is a good and commonly used solution ... <S> Others include, marking clearly the DC voltage intended (or AC otherwise) to be used, close to the power supply input. <S> This would normally be on the product case, next to the supply input. <S> Also making it difficult to otherwise plug anything else but your intended voltage, such as a mini-USB or USB connector if you're running of 5V DC only ... <S> Usually its a combination of all of these ways. <A> The most common solution is to have a voltage regulator in your device. <S> Your circuit itself runs on 5V, but the regulator can accept a much higher voltage (say, up to 40VDC) and make 5V from whatever input it gets. <S> That's what most consumer devices do. <S> If you want to protect against more extreme mistakes, then a circuit such Andy <S> aka describes can handle much higher voltages. <S> Regardless of what solution you choose, be aware that <S> they <S> will all fail if the user tries hard enough. <S> I knew a kid who attached a 120VAC power cable to the barrel plug and connected it to an electronic game just to see what happened. <S> The (expensive at the time) game smoked and burned out - of course. <S> The folks who designed it didn't include "protect 9VDC input from 120VAC line voltage" in the game because that would cost too much. <S> Even if it weren't too expensive, you have to draw the line somewhere. <S> 120VAC? <S> Why not 240VAC, or maybe the local distribution transformer shorts and <S> you get 3000VAC? <S> At some point you just have to figure the "protection" is more trouble than it is worth, and the user's device is going to get damaged from misuse. <A> An economical solution is Toshiba 5.5V (5.1 Vth) <S> TVS ($0.036 @ 1k) with desired 1A Polyfuse <A> Use a micro USB socket for the power connection. <S> All USB shaped power connectors provide 5V. <S> So the 9V plug doesn't fit. <A> There are a surprisingly large amount of things to tackle for input protection: over voltage (constant), over voltage (ESD) and reverse voltage protection. <S> The tricky part is sizing the fuse to allow proper operation, but prevent damage of downstream components in the time it takes to trip. <S> The diode will heat up considerably and may be destroyed, depending on the power supply. <S> To tackle reverse voltage protection, you can use a diode in series with the supply (if you can handle the dissipation/voltage drop), or a P-Channel MOSFET circuit if you need lower loss, in the milliohms region. <S> If your voltage input source is not variable, the easiest solution would just be to use a voltage regulator with some transient input protection. <S> If it is variable (such as in the case of a wide input buck converter), you may want to explore the above options. <S> Finally you can use many commercial e-fuse or hot swap controller ICs if you want to reduce your BOM or design effort - <S> These ICs can (but not always) combine ALL of the above functions into a tiny package.
One of the easier solutions is to use a fuse or polyfuse, and a TVS or zener shunting to ground in the case of overvoltage.
Hi! I would like to connect my LED lights (Vaxmyra from IKEA) designed for 24V system into my 12V system, do I need a current limiting resistor? I bought these VAXMYRA LEDs thinking they were made for 12V but apparently they need to be feeded 24V.Supposedly I'll have to install a 24V DC step-up converter, but this device can deliver up to 3A current. I opened the Vaxmyra LED fixture and I could see there are 8 resistors built in (or at least I think they are resistors), but does this mean that I don't need a current limiting resistor befor each vaxmyra light I plan to install in my circuit? <Q> The PCB is likely designed in the same way that LED strips are meaning that the series LEDs are expecting a 24V rail like shown below, If you deliver 12V to a strip expecting 24V the voltage divided between the series LEDs doesn't add up! <S> You would need to in theory half the length of the series LED paths for 12V to work <S> and that's not going to happen. <S> No single component is going to fix this problem, without a new PCB design or a 24V supply. <A> Yes these contain their own Current limiting resistors . <S> I see 2 SMD’s per 3 strings of 6 x3=18 LEDs. <S> (6S3P)6x3.2V=19.2V + <S> IR= 24V where IR is shared power dissipation by 2 SMD’s and tolerant of wide variation of Vf in LED <S> ’s <S> You could : <S> A) get a large single 24Vdc supply and a motor driver board to act as a Buck dimmer or, B) <S> get the IKEA 18W supply for each pair (8W each) C) return them and get dimmable PAR30 Edison AC bulbs and PAR fixtures with a Triac dimmer. <S> D) <S> none of the above <S> These appear to have temp sensing indicators which tells me, the fixture needs to be vented. <S> At one time I thought the modern house ought to have 24V or 48Vdc shared throughout the home <S> then universal plugs for every peripheral, but it seems USB 5V has become that bus which is only good for short hauls with high currents 12W per port. <A> You are correct. <S> Simply applying 22 to 24 volts will power these pucks just like it would a 24V led strip. <S> A lower voltage would mean slightly dimmer leds but longer life. <S> Your 3A step up <S> module can provide up to 3A, but the leds will only draw what they need. <S> Current is pulled not pushed . <S> And with the resistors on board it will be limited to about 60 mA for the puck. <S> Just make sure your 12V supply can support the load. <S> An average step up regulator is 80 percent efficient, so for a 24V 60mA or 1.4W output you need roughly 1.7W or 12V 140 mA in.
Your only option would be to step up the 12V supply you have to 24V but that seems like more of a headache than it's worth. The pucks already have current limiting resistors for their led segments.
Conceptual Question regarding necessity to do level shifting I have a circuit where a 3.3V MCU which is not 5V compatible needs to drive an MCP23017. The MCP23017 will drive and read inputs and outputs from various 74HCT components. I'm thinking that based on the datasheet for the MCP23017, I can power it at 3.3V so it's communication to the MCP is 3.3V compatible. It would also put out logic HIGH at close to 3.3V but that is sufficient for the HCT parts to recognize as HIGH. I would power the HCT parts at 5V. Their outputs would be 5V for HIGH which, I believe, can still be read by the MCP23017 safely even if only driven at 3.3V. No bi-directional level shifter needed on the I2C lines? <Q> No bi-directional level shifter needed on the I2C lines? <S> The I2C pins do not need a level shifter, as long as the MCP23017 and the MCU are both run at 3.3V, no level shifting is required since they are both operating at the same levels. <S> Their outputs would be 5V for HIGH which, I believe, can still be read by the MCP23017 safely even if only driven at 3.3V. <S> You will need to level-shift the inputs to the MCP23017 that are 5V though, since the 23017 can only handle VDD +0.6V, or a maximum of 3.9V. <S> To do this, you can use a simple resistor-divider. <S> You should size this such that the input is 3.3V, not 3.9V since 3.9V is an "absolute maximum" rating and may damage the device or severely reduce its lifetime. <A> This is shown on page 3 of the datasheet under "Voltage on all other pins..." which shows Vdd + 0.6 V. <S> So, you need a level shifter. <S> Here is an easy way to do it using MOSFETs that should work with most logic-level N-MOS devices: <S> simulate this circuit – <S> Schematic created using CircuitLab <A> I would power the HCT parts at 5V. <S> Their outputs would be 5V for HIGHwhich, I believe, can still be read by the MCP23017 safely even ifonly driven at 3.3V <S> The maximum input voltage for a MCP23017 on a 3.3 volt supply is 3.9 volts - read page 3 of data sheet: - If this is limited to less than 20 mA <S> then maybe you'll be OK. <S> I haven't looked into what the generic HCT output current is.
If you power the MCP23017 with 3.3 V, the pins are only tolerant to 3.9 V.
1.2V AAA rechargeable batteries, voltage for almost full charged cell Some weeks ago, I bought a new pair of AAA rechargeable batteries, Ni-MH. Its package shows "Panasonic eneloop" model with up to 800mAh. First I connected them in series and connected two resistors of 10 ohms in parallel to the series of batteries, the voltage measured was 2.2V with around 440mA of load connected. Then I left this working for 80 minutes, and the voltage after this period was 1.36V (they did not heat). Then I disconnected the resistor loads, and the open circuit voltage increased to 1.7V and it began to increase from mV to mV and reached 2.24V after some minutes. I waited more minutes again with no load on the AAA batteries, the voltage of them was at 2.55V after this. Then I used this high-side current source, of around 350mA, to recharge them, in series also (they were with almost the same individual voltages at this point). When I connected the charger to the batteries in series, the total voltage on them increased to 2,89V. After 25 minutes of charge the voltage was 2.98V, after 50 minutes of charge they were measuring total of 3.02V, and after 80 minutes measuring 3.04V. Then I disconnected the batteries from the charger, waited around 10 minutes, and measured them without load again, measured 2.77V. Have I over-charged them? What series voltage is to be expected to reach when they are almost full of charge? It should be a lower or higher final of charge voltage (<3V or >3V)? Other: Which voltage should I consider if I want a single value for Ni-MH and Ni-CD chemestries? <Q> It sounds like you completely discharged them, then charged them at 350 mA for less than 2 hours. <S> I doubt you over-charged them. <S> If the capacity is similar to original (or similar to rated) then they are probably OK. <S> With NiMH batteries, charging does not rely on voltage thresholds for end of charge. <S> The charging is terminated using either dV/dt or DT/dt criteria. <S> In other words, the slope of the voltage change is observed during charge at constant current, or the slope of the temperature change is observed during charging at constant current. <S> The charge rate should be at least C/3 in order to generate a strong dV/dt signal. <S> C/2 is better. <S> I will let you search the details yourself as you seem to be quite resourceful and are proceeding on the right track. <S> In order to accommodate both AA and AAA, you will need to select different charge rates. <S> AAA will want to be charged at 350 or 500mA. AA should be charged at the highest practical rate. <S> At least 700mA. <S> If you cannot do this automatically, then the user should do it with a switch or something. <A> For NiCd and NiMH, there is not a clear and universal "charging end voltage"; the end voltage depends, among other things, on temperature and charge rate. <S> They should really be charged using dV/dt or dT/dt detection, or both. <S> Charging them very slowly at under C/10 (even less for NiMH) with a timer can work without a proper end-of-charge detection, but it is, well, slow. <S> Especially NiMH doesn't like overcharging, so <S> you may well have overcharged them, depending on the charge they had when you started charging. <S> Then again, C/2.3 for 80 minutes, you have probably escaped battery failure. <A> You were charging them at about C/2.2 which is by no means out of the ordinary. <S> Without knowing if this happened, it's hard to tell whether you overcharged them or not since at that charging rate the voltage levels off at about 1.5V at full charge. <S> As far as making a multi-chemistry charger, why reinvent the wheel? <S> A MAX712 can automatically detect when the cell voltage levels off and transition to a C/16 trickle charge <S> and it's not that much more complicated than the circuit you have right now. <S> Plus, you don't have to worry about compensating for temperature or charge rate or battery chemistry. <A> Your cells should be undamaged. <S> NimH cells have endpoint voltages of around 1.4 - 1.5V, depending on the charge rate. <S> I built a charging system for NimH in an environment where it was not possible to use any of the more usual methods (negative voltage inflection <S> when charged, increased rate of temperature changed when charged, absolute temperature when charged, timed cutoff). <S> I used end point voltage. <S> The product was a solar charged light. <S> All the usual methods had aspects which made them unsuitable in this application. <S> http:// <S> bit.ly/SL2MINIAFRICA <S> I sampled all the models / brands of NimH available on our local marketplace. <S> (Maybe 15 or 20 different types).I was using AA cells but a similar result will apply to AAA. <S> Several hundred thousand products used this system. <S> At about C/10 charge rate an endpoint voltage of 1.45V/cell worked well overall. <S> At higher charge rates a higher voltage is used. <S> Too high and the cell will "runaway" and charging will never stop. <S> If you use too low a voltage for the charge rate charging will terminate early. <S> Possible method: <S> Charge the cells in a standard charger. <S> Apply a constant current which you wish to use as your charge rate. <S> Measure the cell voltage - this is your cutoff voltage.
Like ocrdu said, the best way to determine end of charge is to look for the slight drop in cell voltage (while holding charge current constant) at around 100% capacity. To be sure, you can measure the capacity after you fully charge them.
Voltage comparator - how to get a stable voltage reference from a battery I'm trying to build a circuit which will be used to monitor the voltage of Li-ion battery. The voltage comparator I'm using is LM393. Since the whole circuit will be powered by, it the battery will be drained and would not stayed at the constant voltage. The battery stays at 4.2 V when it is fully charged. I want to put the reference voltage at 3.7 V and the actual voltage of the battery at V(in). I tried to put a voltage divider at the reference voltage but cannot find the resistor values which will satisfy this case. How do I build the circuit so that the ever changing voltage of the battery gives a stable constant value at the reference node? <Q> Here's a circuit I did for a similar question you raised yesterday. <S> It uses a very low-power voltage reference such as the <S> MAX6006 <S> (it consumes less than 1 μA) or <S> the LT1389 <S> which is also sub <S> μA consumption. <S> For instance, with 0.5 μA flowing to feed the reference, R3 drops 1.025 volts hence the battery voltage can fall to 2.275 volts before the reference voltage starts to fail in stability and accuracy. <S> The op-amp is also very low power <S> (less than 0.5 μA current consumption for the LPV521 ) and therefore is good for monitoring a battery especially as the input bias currents are around 40 fA typically <S> (that's not a lot). <S> : <S> - If the battery voltage is ramped from 1 volt to 4 volts, you can see the points where the comparator switches: - As the battery voltage rises, the output triggers on at 3.79 volts and, as the battery voltage falls, the output switches to 0 volts at 3.64 volts. <S> The points are not the same due to a small amount of hysteresis in the circuit caused by R5 and R4. <A> You can use a voltage reference (e.g. MCP1501) for a precise reference; for instance: simulate this circuit – Schematic created using CircuitLab <S> In this case the LM will output a 1 when the voltage on the battery drops below 1.2V <S> * (27k+13k) / 13k = <S> 3.69V <S> If you need a less precise way of measuring, you can use a zener or even a diode (even less precise) simulate this circuit <S> In this case the LM will output a 1 when the voltage on the battery drops below 2.4V <S> * (27k+51k) <S> / 51k = <S> 3.67V simulate this circuit <S> In this case the LM will output a 1 when the voltage on the battery drops below 0.6V <S> * (27k+51k) <S> / <S> 5.1k = 3.77V <S> Please consider that especially this last circuit is quite imprecise (the 0.6V threshold changes quite a lot). <S> For this reason, you'd better measure to find out the actual voltage detected by the LM <A> In the simplest (and not very precise) case, this can be a zener diode with a resistor. <A> Potential divider will do exactly that divide voltage supplied to it based on a ratio. <S> You need a zener diode with an appropriate resistor. <S> This way Zener voltage stays constant even when the battery voltage drops. <S> Of course, within the limit at some point, your battery might drop below Zener voltage and your reference will not be valid anymore. <S> Alternatively, just get a voltage reference chip. <A> If your circuit can be modified to use a different reference, a bandgap voltage reference uses less power but 3.7V options aren’t available.
You need a voltage reference or a LDO regulator. Because they are shunt references they will work down to quite low battery voltages. A zener diode is probably the easiest, at the expense of what could be a significant amount of current running through it.
What is the box at the end of a USB cable? Not the cylinder that hangs onto the cable itself; the actual box at the end that you grab onto in order to pull it out or push it in. They often have the USB logo on them. Is it some sort of circuitry to handle serialization or timing? Or just to make the cord easier to plug/unplug? They're prohibitively bulky for some applications, and I can't seem to find cables that have smaller ones or none altogether (at least not without knowing what they're called or what they're for). <Q> Thats called a (molded) strain relief or enclose or case. <S> Its to protect the wire connections from the cable to the connector inside. <S> Its also for looks in case of the metal over plastic ones. <S> For basic usb cables it has no active circuitry inside. <S> Some types of usb A cables do have circuitry inside the plug (Flash drives, USB to Serial <S> /TTL adapters, chargers, led drivers, etc). <S> Some of which are larger than normal but some which do fit inside the standardish sized case. <S> You can even get some devices that fit almost entirely in the connector <S> and it's shell, using the underside of the connector pins. <S> USB C (and Thunderbolt 3) cables are more likely to have circuits inside the case. <S> E-marker chips are needed for high speed transfers and power delivery. <A> There's no active circuitry in a Type A USB cable, just wire connections. <S> Internally, the cable itself is mechanically clamped to the metal connector shell, and the wires terminated to the connector. <S> The 'box', as you call it, is a housing over-molded onto the back of the connector (in this case, probably using an appearance sleeve with molding plastics injected after.) <S> This overmold housing serves several functions: <S> protects (insulates) the wire-to-connector joints provides a strain relief for the cable provides a grip to plug/unlug the cable. <S> The second function is important. <S> Without it, the cable is prone to damage from flexing. <S> And yes, the connector is bulky, intentionally so. <S> Nevertheless, the cable you show complies with the USB spec for size. <S> It's meant to be robust and easy to handle - no pins to break off, withstands a lot of mating cycles, etc. <S> That said, in response to observations like yours, smaller USB versions were introduced later - Mini, Micro (used on Android phones) and now Type C. <A> The size of the box around the plug can vary in material (hard rubber is often used) based on the ergonomic and visual traits desired. <S> The cable connector can technically can be as slim as receiving USB port which is a defined specification as 12mm x 4.5mm.
In most USB cables that section is responsible for relieving the stress on the wires and preventing the connections between the cable wires and the USB data pads from separating.
Why voltage is shifted in my schematic? I'm learning basics of electronics and trying to get familiar with the common emitter topology. This is my schematic diagram: When I try to simulate it in Kicad I get this: Everything works as I expect except the fact that "base" is 0.4V higher than "in". How this can be explained? UPD. It looks like the voltage shift is not constant. If I change the capacitor and the resistor this way: Thrn the voltages become equal soon: It leaves me with question why these voltages differ by 0.4V initially? Is it something specific to ngspice? <Q> Capacitor C1 breaks any DC connection between in and base . <S> You could add a 100 V (or -100 V) DC source in series with V2, and you’d get the same result for the voltage at base , at least after any start up transients die off. <A> You don't have a fixed DC reference for the base, so the simulator is picking some number thats resulting from the internal transistor model. <S> Try putting a 1 meg resistor on the base to ground, bet that mystery voltage disappears Google 'bias BJT base' and you'll find the knowledge you seek :) <A> Frankly, I was surprised to see a waveform at transistor collector... <S> it should end up very near Vcc of 3.3V, with only a little squiggle of 10kHz. <S> This peak current biases the capacitor to a more negative average voltage after some long time. <S> An LTSpice transient simulation ran for 100 seconds, plotting from 99.999s to 100s (below). <S> After this long time, collector waveform turns into a very short spike. <S> Note that average base voltage (green) has fallen to nearly -0.5V... <S> the base only conducts current for a brief moment at the +ve peak: <A> It's not perfect to make a sine to square limiter with a single transistor for variable input amplitudes. <S> For larger input when Vbe conducts more at 0.6V with lower impedance it clips and changes the DC bias offset. <S> New and Improved <S> But the best way is to use a pullup to Vcc, Rb+/ Rc = 10 for pullup Rb+ (R+/R4) <S> Rc <S> / Rs = 10 for serial input <S> Rs (R4/R1) <S> then Rb+/Rs=100 with not much attenuation, yet better DC bias to base current. <S> V gain = <S> Rc/rE <S> until saturated the reduces a lot (towards 10% hFE) <S> rE is base-emitter resistance <S> Once you learn these kind of impedance ratios, design gets easier. <S> Don't make the input cap RC= <S> T too big otherwise the startup time can be too long. <S> Falstad SIM Tool
Transistor base-emitter junction acts as a diode clamp, which only accepts current at the most positive peak of the AC waveform.
Choosing power supply with sensor I have a sensor that requires 9-30 VDC power, 600 mW at 24 VDC nominal voltage. I have a power supply that can source up to 15 VDC and up to 400 mW in power. If 24 VDC is the nominal voltage of the sensor at 600 mW, then I assume that it requires 25 mA as the nominal current. For my power supply, if I were to set 15 VDC, then I could source 400mw/15V = 26.7mA of current. I know that the 15 V is a lower potential, and thus the current would change as well, but would it still be enough to power? My main questions are these: Does the load require 600 mW or 25 mA for power? What exactly "powers" it? What is the meaning of the 9-30 VDC power? Does it somehow change the resistance to allow more current if I am using a lower voltage power supply? I'd greatly appreciate any clarification with these! <Q> You are making assumptions about your sensor that may not be valid. <S> If you reduce the input voltage it is possible that the input current could go up, so that the power consumption remains relatively constant. <S> So, no, based on the information you have provided we can't say that your proposed arrangement will work. <S> We can't say how the sensor current will change or why it is changing in a particular way. <S> Just not enough information. <A> If you post the datasheet it would be easier to help you. <S> But given the information you've given us, it's likely that your power supply won't be able to give enough power without damaging itself, or make the sensor operate reliably. <S> So to answer your two questions: <S> The power powers it. <S> It probably has an internal voltage regulator <S> , that can take 9-30VDC and turn it into the voltage it needs (likely 24VDC, since it's the one that's specified). <S> I would get a new power supply. <A> The following sensor specifications are to be considered while selecting the power supply: <S> Operating voltage - May be a fixed voltage or a range <S> e.g. (24 V DC) or (10...30 V DC). <S> Current consumption - Or no-load supply current e.g. (< 15 mA) or (< 15 mA at 24 V DC). <S> Load current - Or <S> switching current / operating current <S> e.g. (0 <S> ...100mA) or (max. 100 mA) or (100 mA short-circuit / overload protected). <S> The actual load current may depend on the application (lower current while driving a digital input or higher while driving a relay). <S> However it would be safe to consider the sum of no-load current and load current per sensor while selecting the power supply (for this example it would be 15 + 100 = 115 mA).
It might be that the sensor takes in less current at lower voltages, but we can't know that without the datasheet. If the datasheet says that the sensor needs 600mW of power at 24 volts, you need a power supply rated for 600mW of power.
How to rotate a part/device in Eagle (schematic view) using keyboard-hotkeys only? I'm fairly new to eagle. So far i was unable to figure out how to rotate a selected part in the schematic editor using keyboard shortcuts only. Please, do not answer with suggestions by using the mouse or the context menu, because I'm not a fan of using a mouse. Also you could suggest an alternative EDA-Software, which fulfills common use cases, like "keyboard-shortcuts for basic operations" OR marking "already placed" parts "in a common" way as a favoured/preferred part. I'm using Windows 10. <Q> Creating EAGLE shortcuts will help you work faster, Setting up shortcuts like these in EAGLE is easy using the Assign Command. <S> To do so, Under the pull down menu Options <S> you will find the ASSIGN command <S> (Figure 1) <S> The following dialog Box will appear (Figure 2) <S> To begin the process click on NEW in the Assign dialog box. <S> A series of keystroke options appear: Modifier and an Assign Command field (Figure 3). <S> For our example, we will create a new assignment (CTRL-R) to run the Rotate command. <S> Press <S> OK , then OK <S> and now whenever you press Ctrl + R on your keyboard the Rotate command will be activated. <S> Note that any assignments other than the F Keys needs to include a <S> Modifier such as Alt , Ctrl , or Shift . <S> Also you can use multiple modifier combination with the same letter assignment to do different commands. <A> It is possible to acheive the behaviour you wish. <S> Eagle uses a command based system, and mouse clicks are no different from other commands - they have text based equivalents. <S> Left <S> Click: (@) <S> Right <S> Click: (>@) <S> You can add additional modifiers for things like shift ( s ), ctrl ( c ) and alt ( a ). <S> So for example, shift+right click would be (>s@) . <S> Coordinates can also be entered using this syntax, replacing @ <S> (current mouse position), with a value such as (>s 1 2) <S> - shift right click at coordinate <S> x=1 <S> / y=2 in the current grid units. <S> Putting this together, you can assign a keyboard shortcut ( Options->Assign ) for whichever key combination you want, and set the action to perform rotation in one of three ways: If you want to rotate whichever part you are currently hovering over with the mouse (i.e. have not clicked on yet), you can use the command rotate (@) . <S> This will activate the rotate command and immediately click and rotate whichever component or object is at the current cursor location. <S> If you want to rotate an object you are currently moving - i.e. you've clicked on it with the move command and its currently following the mouse around - you can use the command (>@) which will perform a right click at the mouse location. <S> For the move command this right click performs a rotation of the selected object without letting go of it. <S> which will CTRL+Right Click with the rotate command, which will rotate the current group. <A> Yes, you can rotate a part in EAGLE by using only a keyboard. <S> Look for the text box near the top of the screen, to the right of your current position on the schematic. <S> Just type "rotate" followed by enter. <S> On the inspector panel a box will pop up which will allow you to edit the part's angle. <S> Simply change the value of that and you'll be set.
If you want to rotate the current group, you can do the command rotate (>C@)
How to Put a Fuse on the DT-9205M Multimeter? I got a DT-9205M multimeter, it has 20A unfused and 0.2A fused after I saw the PCB, surprisingly there is no fuse on the 0.2A and instead of that they put 000 resistors on it I wonder if I could put a 0.2A fuse my self but I don't know exactly where the right spot is also, can I replace 000 resistor with a fuse? <Q> The place for the fuse is the big area marked with white outline, with two metal pads, and the text "FUSE 0.2A/250V". <A> Instead, get a fused probe or make a banana plug to banana jack cable with a fuse in it and put it inline with one of your probes. <S> There are fuse carriers with lead wires that you can do this with. <S> If you want to add a 0.2A fuse, you can either replace that 000 jumper with a 0.2A fuse with the same footprint, or simply remove it and place a 0.2A fuse across the big pads labelled as such. <S> That little 000 jumper is just a fuse bypass. <A> From the comments: <S> Sorry if I'm asking again but can I put another fuse for 20 A? <S> instead of that resistor? <S> is it even related to 20 A? <S> R15 is the current shunt. <S> Typically it will be 0.01 Ω so that 20 A gives a 200 mV drop across it and this gives 200 mV to the LCD voltmeter module. <S> (Actually 199.9 mV is the maximum that can be displayed.) <S> So no, you can't put a 20 A fuse in. <S> Be very aware that if you take a voltage reading having forgetton to move the leads back to V + COM after taking a current reading that you will apply a short circuit and may create an arc flash. <S> The professional meters will have a special fuse for this circuit and replacement fuses generally cost more than a supermarket multimeter.
You can also replace the zero ohm SMD resistor with a fuse if you like. If your meter was never made to accommodate a 20A fuse, then there will be no room on the PCB for a 20A fuse.
Are these ground stitching vias? If so, why are they placed in this manner? For reference this is a cheap analog RCA capture card I got from amazon a while back. Today I broke the enclosure on accident and as a studying EE who does some PCB design, I was curious about this. I am assuming these are GND stitching vias, but was curious why there are so many? Did they go overboard or is this crucial to have for good signal? <Q> Yes, they're ground-stitching vias. <S> You might also see similar patterns for thermal conduction, but that doesn't seem to be the case here. <S> Did they go overboard or is this crucial to have for good signal? <A> Yes, there are more there than strictly necessary. <S> Don't use this board as an example of how to do ground stitching. <S> There are several spots where the designer should have done something else. <S> Have a look here: <S> That "island" should have been removed. <S> Those things can radiate high frequencies generated by currents through the ground plane. <S> The designer tacked the "islands" to another ground plane, so they (probably) won't radiate anything. <S> It would have been better to remove the little islands than to stitch them. <S> With stitching vias you can be pretty sure the islands won't radiate - but you have to pay for the vias on each board. <S> If you remove the islands, then they won't radiate at all - and you don't have to pay for vias or remember to stitch that area if you change the layout. <S> There's another island by R2, and a larger one by R4. <A> This would capture RGB 75 Ohm signals with perhaps 10MHz or more bandwidth if high end capture . <S> But SNR must be > 50dB for high Quality analog video. <S> This means using 1V standard video the goal for noise ingress is <1mV. <S> Thus using coax like shielding with lots of vias between ground tracks an ground planes and surface signals is a good way for <30MHz yet not for microwave as the via inductance is significant. <S> So more important is to tie track ground tracks to ground plane to reduce induction of stray H fields as E fields won’t be a problem, but long current loops can be a problem with motors or DCDC converters nearby for example. <S> A proper design would compute impedances and crosstalk of noise signals < 10MHz for aliasing at pixel rate . <S> 1mV is -60dB from 1V signal. <S> Overkill ? <S> Depends on EMI sources and crosstalk criteria for noise from adjacent cards. <S> Not so much for 4GHz as high current <10MHz <S> I doubt this video capture card was the designer’s first rodeo, so don’t get thrown off the horse by his design and assume he had a good reason for it, if it is a name brand card. <S> even though my Samsung Microwave is excellent, my EMI meter shows a lot of V/m and A/m near the seal and window when powered on <S> and it will generate EMI on old FM type cordless phones at 60,120 Hz modulation rate nearby as I recall, but modern pacemakers have better shielding, yet still have warnings. <S> They generally only measure far field and not sure about close contact near field EMI specs
Between the text "C1" and "C2" is a little "island" of ground plane that was left over from the solid ground pour after placing parts and routing traces. Yes, those are ground stitching vias. There are probably more vias there than are strictly needed, but a few extra vias is cheaper than a board re-spin.
Do 10V 100μF and 16V 100μF capacitors have the same capacity and output? I vaguely remember that 100μF represent the capacity of a capacitor, but I also kinda remember that it has to do with the voltage. So my question is, do 10V 100μF and 16V 100μF capacitors have the same capacity and output (meaning does the 16V 100μF capacitor is the same as 10V 100μF capacitor only capable of working in a higher voltage system)? <Q> Consider a glass of water: - I vaguely remember that 100μF represent the capacity of a capacitor <S> No, capacity is how much something can be filled without spilling. <S> Capacitance is the term measured in farads and is equivalent to the area of the glass above. <S> The height in which water is filled is equivalent to the voltage and <S> therefore capacity <S> is capacitance multiplied by voltage. <S> This equals charge i.e. Q = CV. <S> So my question is, do 10V 100μF and <S> 16V 100μF capacitors have the samecapacity <S> No they have the same capacitance . <A> Up to 10 V, both capacitors behave as a 100μF capacitor. <S> Between 10 V and 16 V, the 10 V capacitor may behave as a capacitor for a while, but it may increase its leakage current, it may go off with a bang, we just don't know. <S> The 16 V capacitor will continue to behave like a capacitor. <S> Above 16 V, neither capacitor can be trusted. <A> That you remember a correlation with the cap's voltage might be due to the fact that ceramic caps DO change behaviour with voltage. <S> A ceramic cap loses capacitance with increasing voltage. <S> Depending on the dielectric, you might have only something like 20% of the rated capacity at full voltage (at least for X5R, others can be better). <S> So a higher voltage rating will give you more capacitance at your working voltage. <A> In most circuits they will behave the same, but as the voltage rating goes up, generally the ESR goes down and the maximum allowed ripple current goes down
Capacity is how full you can safely fill the capacitor and that related to charge (Q = CV). Assuming (from the high capacitance) you are talking about polarized caps, then yes, both will behave pretty much the same below 10V.
How does being exposed to strong radiations effect nanosatellite electronics equipment? I'm on paper designing a nanosatellite power system. The satellite would be orbiting in LEO. And I am wondering how and what type of radiation would affect its electronics. The system has a microcontroller, a few inductors, a few transistors, capacitors and some op-amps. How does one actually shield a nanosatellite from radiation? Does the metal box of the power system help? Or should the nanosatellite be made of some particular material to protect the subsystems from radiation? <Q> The electronics of a satellite can be changed by radiation because radiation can be just photon and photons <S> can excite electrons or holes creating unwanted error. <S> There are different type of shieldings for different type of radiation. <S> Just Google how to protect from different kind of radiations. <S> And those mentioned are just the simplest case there could be α radiation but the changes are more for the CSE. <A> Radiation can flip bits in registers and memory. <S> First minimise that, with shielding, and using 'rad-hard' components. <S> Second, minimise the effect of that, with system design. <S> If the flipped bit in in the program counter, then you can expect the program to run off into the weeds. <S> Look up 'crash bars', instructions to reset peppered amongst the program proper, so that a bad PC will hopefully eventually reset the device. <S> Look up 'watchdog', hardware to reset the microcontroller <S> should it fail to do something expected, like flip a bit every 100 mS or whatever you choose. <S> If the flipped bit is in the program flash, then it's game over, unless you're routinely checksumming flash and have a way of correcting it with FEC (forward error correction) and/or multiple copies of the program. <S> Look up 'redundancy', using multiple processor running the same program, and suitable hardware voting on the outputs, and resetting or otherwise repairing the 'odd processor out'. <A> Silicon breakdown voltage shrinks with lithography and contamination. <S> Radiation shield effectiveness depends on wavelength and atomic structure of metal for Xray to alpha,beta to gamma radiation. <S> https://www.thomasnet.com/articles/plant-facility-equipment/radiation-shielding-materials/ <S> But consider the E field and junction size and normal breakdown to conducted voltages can be small, but large for nano wave particles as the impedance rises in the dielectric. <S> This contamination is R in a dielectric C reduces the gap length and causes partial discharge,PD and might sound like a Geiger counter. <S> When mV/um is energized by photons of alpha and gamma waves it goes through metal and is harder to shield thus larger litho <S> older technology was generally better than newer small litho. <S> But as contaminant levels improved by processing and process, newer smaller litho became more tolerant. <S> Think of it like a unijunction partial discharge , PD relaxation oscillator effect but more random excitation from cosmo solar flares. <S> So E field is important and wavelength for radiation hardened IC’s . <S> They do this by Xray bombardment precap to “oblate” the contaminant particles that might be in the PPM concentration levels making it more robust, or it could make it worse if the particles fuse together and remain behind <S> thus extremely low current HIPOT to devices might seem practical but expensive to substrate might be done now (?) <S> which makes more expensive $$ <S> yet verified partly. <S> But it must be done by a reliable process of visual inspection and XRAY bombardment. <S> without this then you have a Monte Carlo machine. <S> do you feel lucky? <S> Then add redundancy with detect and correction. <S> The takes EMI design to a much higher frequency level of physics.
Radiation can be electrons or positrons and if it is positrons (β+) they can annihilate with electrons or if it is electrons they can fill holes which is not good in semiconductors.
Are these 2 circuits interchangeble? I found the upper circuit. Originally it is designed as an output circuit for an audio player with a jack output. I have no transistora lying around, but opamps like the TL074. I made the lower design.On the right you see the in (green) and outputs of the circuits. My questions, Is the design at the bottom a good substitution for the top circuit? Is R4 is for impedance matching? (Then I probably should add it.) <Q> The op-amp needs biasing because it is single-supplied. <S> Impedance matching is something different. <S> It requires to make the load impedance (if possible) equal to the output impedance but not the opposite. <S> Adding a resistor in series to the amp output only decreases the voltage. <A> Is the design at the bottom a good substitution for the top circuit? <S> They are only interchangeable if their \$\color{red}{\text{intended function is known}}\$ . <S> The intended function is what the circuit is meant to accomplish in the wider sense i.e. what they connect to and what range of input signals they are expected to buffer without creating distortion. <S> Given that the NPN circuit can swing it's output down to nearly 0 volts but <S> the TL074 is limited to only swinging its output down to 3 volts above its negative rail (0 volts in your circuit) <S> then it's unlikely that they are compatible in the wider sense. <S> Try increasing the sinewave amplitude to see what I mean. <S> Also, the TL074 will be significantly limited on bandwidth compared to virtually all NPN transistors, it makes it difficult to say that they are compatible. <S> The above areas highlighted in red are potential problem areas. <S> Is R4 is for impedance matching? <S> Impossible to say given the details you have provided. <S> For instance, to the right of C2 might be a capacitor down to ground and then R4 would probably be regarded as forming a low pass filter with that "invisible" capacitor. <S> In other words, we don't know the provenance of your circuitry. <A> With DC bias to NPN added output impedance is basically Re so a series R4 is only to prevent capacitive load parasitics oscillations so it can be small such as >Rbe. <S> Yet OA with high gain has an output impedance of ~200 Ohms/ open loop gain so essentially 0 ohms until current limited by design. <S> Whereas for large signal out Load is critical for emitter follower and <S> AC couple loads must be >Re to prevent starving emitter current which raises output impedance instantly. <S> But for high impedance loads you want to consider CR= <S> Tau relaxation charge time constant on startups on output or rise time=0.35 <S> /f-3dB for 10~90% <S> not asymptotic voltage at 0 to 64% Vdc as a square wave becomes triangular near cutoff f. <S> For a preamp you would use Re to be less than load and series R to any smaller R>rBE junction resistance for stability reasons from current feedback to base from reactance Cout load of cable capacitance like a phono coax cable. <S> Yet to drive a speaker you want complementary emitter follower Darlington power transistors even with Op Amp inside the feedback loop to boost current. <S> Often you see 25kHz RC snubber 4Ohm load to 0V to prevent same parasitic emitter-follower power driver oscillations. <S> Remember stability criteria is Av<1 for positive feedback, so an emitter follower with Av~<1 depending on loading needs some reactive resonant cable load gain of >Av to make it oscillate at that frequency for an emitter follower. <S> That’s the only reason why you might see a series R on output AC coupled in audio preamps, then prefer shunt Royer snubber on power amps.
Regarding R4, probably it is a protecting resistor.
USB2 powering 3.3V at 500 mA I have the above simple requirement, and I'm frankly astonished that I can't find it as a simple chip. My understandings: USB2 provides 5V on its power pins; USB2 assumes 100mA, but will provide 500mA upon negotiation; Most USB2 sources just provide 500mA anyway - but I want to be "official" and negotiate for it first; USB3 does "power delivery", but those chips are SO complex that they're overkill for my situation. I have a 500mA, 3.3V circuit (330mA @ 5V) that I'd like to power from 5V USB. So I'm looking for a simple chip that has 4 USB pins (I assume the Data pins are part of the negotiation!) and one 3.3V output pin that can supply 500 mA - noting that ~750mA is the theoretical maximum. If there needs to be a couple of extra pins for support components (capacitors, inductors, etc.) then so be it, but I'd hope there wouldn't be many. I've found all sorts of devices for USB chargers (on the "host" side - no good), USB Hub controllers (to even out multiple ports' requirements - too complex), USB peripherals with incidental output voltage (e.g. FTDI - way too complex), and even one 8-pin device that's almost ideal - but it stops at 200mA (300mA @ 3.3V). Why isn't there a device that negotiates for 500mA, and then simply delivers it at 3.3V @ 750 mA (or close)? <Q> Why isn't there a device that negotiates for 500mA, and then simply delivers it at 3.3V <S> @ 750 mA (or close)? <S> Getting 750 mA implies a switching regulator, which is going to be a few components. <S> If you just want 500mA, I believe officially you are supposed to enumerate if connected to a host. <S> However, almost nothing actually enforces that requirement, so if you are really pressed for board space or don't mind using a USB phone charger, you could omit the microcontroller and put a 30 cent 3.3v linear regulator. <A> Mostly because of the impractical need for one. <S> As you mention no one really cared about the usb power enumeration so it has been defacto ignored. <S> And it never worked with usb power supplies. <S> Plus you would need active circuitry to do so. <S> For a power only non data transfer device, its an added expense with little benefit. <S> Usb requires constant data transfers or a keep alive message. <S> Usb requires you to enumerate as a device on the host. <S> Enumerating as an unknown device would lead to messages on the computer about it. <S> You can roll your own if you really wanted to. <S> Take a 5v to 3.3V switching regulator with an enable pin and take a usb capable microcontroller like an attiny based v-usb or real usb atmegaU and program it as a usb serial device. <S> Once enumerated you can switch on the regulator for your output. <S> Bonus serial connection if you need it. <S> Not a single chip solution but with two modules off fleabay and 20 minutes of setup you can have what you want. <A> #2 premise is wrong. <S> This "100 mA" sentiment is a commonly repeated misconception. <S> Per USB specifications any AC-DC powered USB host must provide AT LEAST <S> 500 mA. See this . <S> That's why you cannot find any "negotiating" device on the market, it is not needed and thus does not exist.
There is no need to "negotiate" anything from USB2 port, nor be "official".
Does a USB PD source supply any voltage to a non USB PD compliant USB C device? If yes, how much? I have a 40W USB PD compliant charger from my ultrabook. I recently bought a pair of headphones (Sony WH-1000XM4) which can be charged using a USB C Plug. Sadly I can not find in the specifications of these headphones whether they support the USB PD standard. It only says they are supposed to operate at 5V and draw 1.5A, so they are potentially not compatible. So I'm wondering, what happens when a non USB PD compliant device is charged with a USB PD source? The source can supply 5-20V. I assume the device would be fried if it were to be exposed to the full 20V, but I wonder whether the source recognize that the device is not USB PD compatible and doesn't supply any voltage at all. This would make sense to me, as it seems like USB PD compliant devices "tell" the source which voltage they want. <Q> The question is about USB Type-C connectivity. <S> The Type-C connectivity provides two methods of determining source capability. <S> The primary method is the value of pull-up on HOST side on CC pins. <S> Type-C specifications define three levels of capability: <S> 500/900 mA (56k pull-up to 5V), 1.5 A (22k pull-up), and 3A (10k pull-up). <S> The connecting device pulls down this with 5.1k to ground, and the resulting voltage level tells the device how much current it can take over the particular connection. <S> When the host sees the pull-down, it will turn on "+5Vsafe" VBUS. <S> This is per Type-C protocol. <S> So the Sony device is perfectly compliant to the basic +5V safe supply. <S> The secondary method is provided by nearly independent Power Delivery specification. <S> If the consumer implements PD, it still need to follow Type-C specifications for CC pull-up-down protocol, and will receive "+5Vsafe" VBUS. <S> Only then the consumer will send serial PD-defined messages over CC pin to discover source capabilities. <S> If provider responds, then negotiations for power contract will proceed. <S> If the consumer is not PD-agnostic, no messages will be generated and no responses will be returned, and no contract will be negotiated. <S> The link power will stay at the default "Safe+5VBUS" power schema, per DC levels on CC pins. <A> If the device doesn't support USB-PD, then it doesn't have a controller to negotiate the USB-PD voltages and the plug will act as a normal USB. <A> By default, all USB chargers and USB hosts provide 5V on VBUS pin. <S> Once connected, a USB PD charger will then try to communicate on the CC1/CC2 pins using the USB PD protocol. <S> If the attached device does not answer, it stays at 5V. <S> Your headphones seem to draw 1.5A. <S> This is above the default USB current of 500mA for USB 2 and 900mA for USB 3 applying for USB hosts. <S> For USB chargers, 1.5A is ok. <S> Your device can distinguish a charger from a host by measuring the voltage on CC1 and CC2. <S> The voltage is determined by certain pull-up (charger, host) and pull-down (device) resistor values on CC1 and CC2. <S> You should have no problem connecting your device to the charger.
It should (and probably will) draw 1.5A only if it detects a charger.
Thread alternatives for embedded systems I'm currently studying electrical engineering. Due to the pandemics, my classes were suspended and I'm using this time learning more about electronics and programming. I'm currently trying to use a Pic16f628a and a generic digital display to build a digital clock with some features. The thing, is that I'd had to access a menu pressing a button in execution time, while the clock is being displayed. Normally I'd call a thread for the clock display and the main thread would be watching for inputs, but due to the simplicity of the pic controller I can't use the resource. So, my C code (not yet implemented specifically to pic) is something like this: void display_timer(){ static struct current_time timer; static int is_time_set = 0; set_current_time(&timer, &is_time_set); while (is_time_set){ system("clear"); printf("########\n"); printf("%d:%d:%d\n", timer.HOURS, timer.MINUTES, timer.SECONDS); printf("########\n"); sleep(1); update_timer(&timer, &is_time_set); }}int main (){ while (1){ display_menu(); }} During the sleep(), the controller would have to be able to watch for new inputs and act correspondingly. One alternative I though was to use a state machine to store a button press, dividing the sleep function into 4 or 8 intervals, something like this: while (is_time_set){ system("clear"); printf("########\n"); printf("%d:%d:%d\n", timer.HOURS, timer.MINUTES, timer.SECONDS); printf("########\n"); for (int i = 0; i<8; i++){ if (state_machine_input == 1){state_machine_input = 0; break;} sleep(1/8); } update_timer(&timer, &is_time_set); It could be done, but I'd appreciate if I'd not have to add more complexity to the project, adding another state machine for example. What could I do in therms of software to implement this functionality? <Q> Threading is a higher level concept than microcontroller programming. <S> Simply put, threads are implemented as a scheduler that uses timer interrupts, which in turn saves the program counter + stack pointer etc and sets those to different locations. <S> So it is quite possible and easy to implement a similar concept using interrupts - with the benefit that you get specialized interrupts instead of generic multi-threading. <S> That's about the only sensible way to do it with a restricted legacy 8 bitter like PIC, which is extremely limited when it comes to stack use. <S> Forget about using thread libs, even those written for microcontrollers. <S> That will only add excessive bloat and complexity, for nothing gained. <S> It is a bad idea in general to drag PC programming concepts into the embedded world. <S> What you should be doing, is to put your button scanning inside a cyclic timer interrupt that's executed once per 10ms or so. <S> From inside the interrupt, you poll the buttons and compare the button read with the previous once, for debouncing purposes. <S> The result of this is stored in a variable shared with the main program, declared as volatile and protected from race conditions. <S> Since you only write to the variable from inside the interrupts, it may be sufficient protection to ensure that reads are 8 bits, but you must disassemble to be sure. <S> More info about that here: Using volatile in embedded C development . <A> Use interrupts <S> You want to run some code when pressing a button? <S> Use a pin-change-interrupt <S> You want to do something at a fixed interval? <S> In a way, the hardware of the microcontroller runs a 'thread' that monitors the interrupt sources, and runs a 'callback' or interrupt-routine for each event. <S> The main program is automatically paused while executing the interrupt. <S> A common way to share data between interrupts and main code is through volatile global variables and temporarily disable interrupts when reading data from these globals when they are more than the word-size of the controller (almost always on an 8 bit controller) <A> I would probably suggest a cooperative multitasking library. <S> One that I have used in the past is Protothreads: <S> http://www.dunkels.com/adam/pt/ <S> Good luck. <A> There are in general different approaches with multitasking when it comes to embedded system: Polling or Cooperative Multitasking : Everything is done in one infinite loop and the tasks are designed to take the minimum time possible and return to the main execution as fast as possible, to avoid delay. <S> Note that tasks suitable for this architecture might not be what you would think of in terms of higher-level concept, <S> for example in your application one task could be update_display and another task could be check_button and you would build a loop such as: while(1){ check_buttons(); update_display(); sleep(0.1); //seconds } <S> Interrupts : <S> All possible inputs as connected to hardware interrupts and the main execution is left for things that cannot be put on interrupt (might be nothing, in which case usually the microcontroller is put in a sleep mode to reduce power consumptions. <S> Details of how this is done usually depend on the particular microcontroller and compiler used. <S> RTOS : <S> depending on how much power the microcontroller provides, it might be possible to run a Real-Time Operating System (RTOS), which might provide with API to create tasks or even threads. <S> This depends on the application and the hardware capabilities, and for educational examples should not be necessary (or advisable, imo) <S> Consider also that another important part in deciding the overall architecture of the application is the division in tasks and how they cooperate. <S> One of the paradigms used is the State Machines (the link is to the general wikipedia page that might be overwhelming, simpler resources specific to embedded programming can be found on your textbook or on google). <A> Mostly, in 8-bit devices have limited source. <S> I think simpler solution is better solution in 8-bit PICs. <S> You can create hardware Timers for 2 different tasks. <S> Set a flag and check the flag in your infinite loop, do the task and reset the flag. <S> Don't use delays. <S> This method guarantees to done your tasks in your infinite loop, if your flags up. <S> But, you have to know that the tasks is not executed exact time when the flags up. <S> If there was two flags set at same time you can't know which one is executed first. <S> Because you don't know where in the infinite loop. <S> But, it's mostly okay for not time critical interfacing applications.
Use a timer-interrupt Any decent cooperative multitasking library will help abstract away the implicit state machine required to keep track of things.
How to make fast (low latency) capacitive touch buttons I'm looking to create low latency capacitive touch buttons for a musical instrument. The response time (from physical touch to touch registered in microcontroller) needs to be around ~2ms or less. From what I've read it seems like this is possible (and there have even been touchscreens developed with sub 1ms latency - see here !).Given that I merely want to implement a single button, it seems like it should be achievable. However, I've been shopping around for ICs and everything I can find seems to have 10-16ms response time. So given the lack of an appropriate IC, how could I create such a sensor myself? Is it merely a matter of doing very fast AC voltage measurements on the sensor pad? - In which case, what is the limiting factor here? Why are all the products on the market so slow? <Q> It seems that you have found low power products that do not need to be so fast as they have not been designed to be used on high performance musical instrument needing fast response time, but as simple user interface buttons that need to be reliable (think of stoves and ovens that need to be robust and extremely sure not to trigger easily by accident or house can burn down). <S> What you can do is to find a reasonably powerful microcontroller with hardware support for capacitive sensing, and fine tune the accompanying sensing software library to fast response time. <S> Most likely your device would have a microcontroller anyway, or at least it would benefit from it. <A> Any clock detecting a signal coupled by touch screens does not need more than 10 cycles and thus is sub-1ms with a suitable sensitive threshold. <S> Rectifying 10% of f with a low pass filter @ <S> f-3dB <S> =fc/10 will reach 90% of input V in Tau after 10 cycles. <S> Using a known capacitive touch pF threshold and a reference cap of similar value, all you is a comparator set to 50% to rectify the signal and detect an input with RC< 1ms. <S> It seems those who down voted do not understand how to. <S> Help. <S> Or they do not understand how to comment or detect a capacitance switch by detecting impedance of C by an RC time constant of 10 cycles at the pixel MUX rate using the load of a finger and fast refresh scans. <S> Better questionHow to design a “switch” with on off impedance specs and hysteresis using the HBM of 100pf for finger with a threshold of 50pF and 30% hysteresis in <1ms?. <S> Hint Zc=1/(2Pi f C <S> ) I”m not designing this for you, just telling you the principle. <A> Building upon Justme's answer, it seems that the reason most capacitive touch ICs have around 10ms or higher latency is because they are catering for a market that prioritises reliability over speed . <S> I tried this with the CapacitiveSensor library with an Arduino Uno <S> and I was able to achieve very low sensor latency. <S> This library uses a simple digital-delay method and so the latency is primarily determined by the RC time constant of the circuit and the number of samples taken per reading. <S> Operating at 5V, with a 1M resistor, assumed finger capacitance of 20pF, and taking 10 samples per reading <S> I was able to get latencies as low as 0.3ms.
It is not difficult to design a faster sensor by using a microcontroller rather than a pre-built package.
Digital filtering after analog to digital conversion (ADC) I am making a PCB that receives a signal with a frequency band of 3-50 Hz and peaks of up to 10's of uV. I have implemented proper analog LP and HP (band-pass) filters and am using a 16-bit isolated ADC to send the data to a computer. I am using Python to read the lines (derial communication) from the ADC (which is acting as a slave to my MCU.) The system diagram would look something like this: simulate this circuit – Schematic created using CircuitLab When I get my data and do real-time FFT (since it is a non-stationary signal,) one obvious feature is a peak at 50 Hz (the mains has a frequency of 50 Hz in the UK,) and for that I can add a notch filter to reject the 50 Hz component, but that would mean extra cost and time to implement it. I don't have much experience with digital filtering, but I was thinking, rather than implementing a hardware-based analog filter, is it possible to do the following procedure: Perform the FFT. Reject and suppress the 50 Hz component. Convert the signal back into time domain. Perform the analysis. Will the time delay for this kind of filtering be just the number of machine cycles the computer goes thorugh to preform this task? If this is plausible, is there anything that's wrong with just amplifying the signal and getting rid of the high frequency noises and spikes with a passive filter and performing all the mentioned filtering (notch, LP and HP) in the computer with Python or any other software methodology for that matter? In terms of resolution, is it correct to assume that the final signal resolution under analysis is the multiplication of the resolution of the ADC by the digital filtering's resolution, since in my code values are saved as 32-bit floats? <Q> If your wanted band is 3 to 50 Hz, then it will not be possible to notch 50 Hz out with any practical filter without losing some of the top end of your band. <S> Can you use a digital filter, or must you use an analogue one? <S> It depends on the signal to noise ratio at the ADC. <S> If your 50 Hz interference is at such a level <S> it's causing you to turn the gain down before the ADC such that your signal becomes noisy, then you need an analogue filter before it. <S> There is a trivially simple implementation of a 50 Hz notch that you can apply, either in the MCU or in Python, there's no need to use a relatively expensive FFT operation. <S> If you add up samples over a period of 20 mS, then 50 Hz will be notched out. <S> There is no need to do all of these adds for each output sample. <S> It's more efficient to have a shift register that's 20 mS long and an accumulator, add the present sample into the accumulator, and subtract the sample of 20 mS ago. <S> This simple filter will give you a falling frequency response across your passband. <S> Will it need correction before your analysis? <S> It depends, what is your analysis, what is the specification on flatness across the band? <S> The correction could range from the simple/bodgy process of adding a bit of slope to the response with a couple of taps, to designing a proper notch filter. <S> The complexity of that task will depend on your sample rate, and your flatness and any group delay specification. <S> IIR filters are good when there's some over-sampling, and no group delay specification. <S> Should you end up with an FIR filter <S> that's more than a dozen or so taps long <S> , it may be appropriate to use Fourrier convolution to implement it faster than the more naive multiply-accumulate approach. <A> You must use active guarding technique to eliminate CM 50Hz Ingress and achieve not as good CMRR as INA but good enough for EEG. <S> They call this Right Leg Guard or drive RLD. <S> To use CM signals feedback to active body GND so that 50Hz noise is fed back to RLD. <A> Will the time delay for this kind of filtering be just the number ofmachine cycles the computer goes through to preform this task? <S> Yes it will add a delay. <S> It really depends on if you need the data to be filtered in real time (with minimal delay). <S> With real time digital filtering the delay is related to the speed of the processor, how long the processor takes to do multiply and add operations, whether the processor has to fetch memory for the FFT (you want the FFT to be in the processor cache to make the delay as small as possible, if it isn't then the processor goes to memory which can delay several clock cycles to fetch). <S> You also may want to consider an FIR or IIR bandpass filter which can be much less computing resources for similar filtering. <S> If this is plausible, is there anything that's wrong with justamplifying the signal and getting rid of the high frequency noises andspikes with a passive filter and performing all the mentionedfiltering (notch, LP and HP) in the computer with Python or any othersoftware methodology for that matter? <S> Post processing the data is fairly easy with digital filters, the nice thing about it is digital filtering <S> is it can be configurable via software. <S> Analog filtering is not as configurable. <S> The real question is: does the data need to be filtered in real time? <S> (for control loops or other feedback, delays are bad so digital filtering can be a problem). <S> An anti alasing filter before an ADC is a common way to reduce noise before it is sent to a computer. <S> In terms of resolution, is it correct to assume that the final signalresolution under analysis is the multiplication of the resolution ofthe ADC by the digital filtering's resolution, since in my code valuesare saved as 32-bit floats? <S> Digital filters can introduce quantization noise, calculating this noise is a whole science in of itself. <S> Depending on the computing resources available conversion to doubles or floats can reduce quantization noise.
If you are getting both interference and signal through at an adequate gain without overloading the ADC, then you can use a digital filter after the ADC.
A typical GPIO works at 150MHz without risk for EMI but why is there a risk of EMI at even 400KHz in I2C? In I2C the fall time is restricted to around 20ns as a risk of EMI(Even at 400Khz) but even a normal GPIO works at 150 MHz.Why is this so? <Q> You need much faster slew rate than 50ns to achieve 150 MHz square wave, which means much larger frequencies and much larger EMI. <S> The point is not the signal frequency itself, but <S> how fast transitions it has. <S> I2C is meant to just work without worrying about impedance matching, so it is also designed not to need it, so anyone can wire it and it will most likely just work, because it is supposed to have slow edges. <S> Of course since it happens less often it is not usually a problem regarding EMI, but signal integrity. <A> tl; dr version: I2C is slow and can use heavy slew-rate limiting to reduce EMI. <S> This won't work with a fast signal, which needs good signal integrity (SI) design. <S> Background <S> All digital signals emit harmonics regardless of the clock rate. <S> That's the nature of square pulses. <S> The faster the switching time, the more higher-frequency harmonics will be produced when it changes state. <S> I2C I2C is a shared bus. <S> It can be routed widely on a board, have many devices connected, and even sent over cabling (like HDMI DDC). <S> This means it can have a large loop area, and since it isn’t terminated, it can have also have noise / ringing issues (harmonics) that can lead to EMI. <S> This also improves signal integrity as ringing is reduced. <S> Fast GPIO Signals <S> The 150 MHz I/ <S> O signal also emits harmonics. <S> It’s not any 'better' than I2C, it is just different. <S> It needs a more comprehensive SI design: more attention paid to basics like return path, termination and loop area, and, <S> yes, slew rate that's fast enough but not too fast. <S> These are all essential for such a fast signal to work at all. <S> The Takeaway <S> Good SI design improves EMI and vice-versa. <S> They go hand-in-hand. <S> And because with fast signals you have to address SI, you also are addressing EMI too. <S> That doesn't mean you still won't have EMI issues with fast GPIOs, but at least your system with good SI will have laid the groundwork. <A> Fast GPIOs are absolutely an EMI risk. <S> This risk can be mitigated through various steps such as properly terminated lines, close coupling to ground planes, keeping tracks short and so-on. <S> If you don't there is a good chance your system won't work at all. <S> What is less obvious to most is that fast IO lines used for slow signals can also be an EMI risk. <S> This is an easy place to get caught out (and I have done it myself in the past). <S> You get sloppy with the wiring because you think the system slow, but because of the fast edges there is still significant possibility of interference, either to external circuits or to other lines on the same bus (A problem I have run into is signals coupling from the SCLK line to the CS line on SPI). <S> Phillips was designing I2C for use in TVs, so presumably they wanted to be able to run it over cheap wiring without causing interference either to itself or to the operation of the TV.
One way to manage EMI is to limit the edge rate so that the harmonics are reduced. A 150 MHz clock is so much harder to get right regarding even PCB trace impedance and source termination. Sometimes GPIO pins have so strong drivers that it will generate ringing on the signal, no matter if it is only toggled at 1 Hz.
What's the difference between Chip families I've been trying to follow Ben Eater's 8 bit computer design ( https://eater.net/8bit ) and I've manged to build something that broadly works but it's not very reliable. Sometimes modules in the don't work, if I reset the system and try again they might work. It's all very frustrating. The main point where I've deviated from the original design is the choice of chips; In the original design Ben used 74LS___ chip, but I had trouble getting hold of these, so instead I've used 74hc___ chips. Can somebody tell me what is the difference between 74ls___ 74hc___ 74hct___ I'm using a 5 volt bench power supply and lots of decoupling capacitors. I can see that all the chips are all getting about 5 volts. The clock is running at fractions of hertz through to 10's of hertz, so speed should not be a problem. <Q> 74LS is Low-power Schottky - <S> the output High level may be as low as 2.4 volts whne <S> Vcc is 5 volts <S> 74HC is High-speed CMOS - its inputs expect a High level to be above 2.5 volts when Vcc is 5 volts <S> 74HCT is TTL= <S> compatible High-speed CMOS. <S> Its inputs have a lower threshold for a High, to be compatible with 74LS outputs. <S> This information can be found in the datasheets for the various families. <A> There are a number of important differences. <S> One key item is that the CMOS devices (74HC and 74HCT which are high speed CMOS and high speed CMOS with TTL compatible levels) do not like slow rise and fall times. <S> Here is a snippet from the 74HC(T)173 quad D type flip flop: <S> You will notice there is a maximum transition rate. <S> You can read more on this subject at this TI application note .Here <S> it is not the clock rate, but the input rise / fall rate that matters. <S> With a slow rising or falling input, the internal CMOS structure is in the active region for quite a while and will consume significant (for CMOS) <S> class A current. <S> The fundamental internal architecture is also very different so even though functionally a 74HC74 and 74LS74 are the same (but with significant timing differences), internally they are very different indeed. <S> Another issue you may have is that due to the different propagation delays through the gates, you may be encountering logic race conditions that do not exist when using 74LS parts. <S> For illustration, here is the propagation delay for the 74HC173 (notice that clock to output high and clock to output low <S> is symmetrical): <S> Now here is the same specification for the 74LS173 : <S> You can see that not only are the propagation delays different between the two parts, for the LS device, the delay is different for high to low and low to high. <S> Any of these differences could easily cause problems. <A> In comments you said, I'm using a mixture of LS, HC and HTC. <S> As other answers have pointed out, the main difference is that LS is a TTL family and HC is a CMOS family. <S> TTL and CMOS have different ranges of voltages that are considered valid logical 1's or 0's. <S> So you have to be careful when mixing them in a design. <S> The main thing you want to watch out for is you should not connect LS outputs to HC inputs. <S> This is because TTL is quite weak when driving a "1", while CMOS requires a fairly strong "1" to work reliably. <S> This issue is exactly why HCT parts exist --- they are CMOS chips with TTL-compatible inputs, so having an LS output drive <S> an HCT input is perfectly okay. <S> Having a HC or HCT output drive an LS input is also not ideal, but will usually work acceptably. <S> If you have very large fan-outs (one output driving more than 4 or 5 input pins) you should look more carefully at whether that output can deliver enough current to drive all the inputs you have connected. <S> One other thing to watch out for: Allowing a TTL input to float is usually okay (it will be equivalent to a high input), but you should never leave a CMOS input floating, even if you aren't using the output of the gate associated with that input. <A> Welcome, the difference between these component names are 74ls = <S> Low-power Schottky <S> 74hc = <S> High-speed CMOS 74hct = <S> Best* of both worlds (*sort of), this part is a combination of characteristics of the LS & HC versions. <S> I found this out here at electronics club worth having a read through this. <S> You would expect to see very similar performance out of all the variants during general use. <S> You should only notice a difference when comparing the power consumption or the high-speed performance.
If you're seeing unreliable operation, most likely you have a TTL output driving a CMOS input somewhere.
What cap value to use for window “box” fan? Two years ago a 3-speed 19” (50 cm) 120vac window “box” fan stopped turning. I guessed the cap died so sourced a replacement and installed it. This didn’t fix the problem. Now I’m getting back to diagnosing it. With the blade removed I now see that the motor hums and if I spin it, it will run fast (can’t say if this is the rated speed). This is when powering the motor’s high-speed leads, bypassing the 3-speed switch. It’s not a mechanical issue—with power off the armature spins freely. I don’t remember the original cap markings but this one is marked “PMS405J” and measures 4 uF. I’m usually good at looking up markings and matching replacement components but there’s always the possibility I couldn’t find the exact one and tried a different value. Should I sub 2, 1.5, 1.2 uF caps and just see what works? How will I know when the value is correct? I presume torque and speed are max at one value and reduced at others? I’ve watched countless videos of repairs of 120v fans and they used caps from 7 to 1.2 uF, so no joy looking for statistical help. Suggestions welcome. Thanks. EDIT: I realize I’m going on the premise that the original cause IS a failed cap. Other ideas welcome. <Q> I presume torque and speed <S> are max at one value and reduced at others? <S> Lower capacitor values result is less speed and torque. <S> Below some minimum capacitor value, the fan will not have enough torque to start and the speed may vary a lot. <A> Thank you. <S> 6.85 uF 250v cap now starts and runs the motor. <S> Can’t yet tell how it runs with blade on, but it’s difficult to stall with fingers on high speed (of 3 speed settings). <S> Current is 300 mA, <S> 500 mA, 900 mA. Seems good. <S> I’ll watch current with blade on to see how high it goes with load. <S> Cheers! <A> If you haven't already, search for the fan by make and model to see if the information is available somewhere. <S> Maybe in a manual or from a parts replacement shop or what have you. <S> I don't consider what follows to be great advice. <S> Hopefully someone will have a better answer for you. <S> But if not, then you can consider following this advice. <S> Try several different values of start cap. <S> Once you have that range, pick a solution in the middle of the range. <S> This idea of establishing a range works for a lot of things when good analysis is not practical. <S> If the highest cap is many x bigger than the smallest, consider using the geometric mean rather than the arithmetic mean.
Increasing the capacitor value above the "correct" capacitor value, may result in increasing the torque and speed but the incremental speed increase will decline. Make sure that the current drawn does not exceed the rating marked on the fan. Try to establish a range of values that work to start the motor spinning.
Using a transistor as diode What are the advantages of using a transistor as a diode after interconnecting its collector and base? <Q> One advantage can be found: In linear scale there's very sharp knee in the forward current vs. voltage curve. <S> In logarithmic scale it's quite a straight line. <S> I had once to build a safety circuit to an existing custom digital display resistance meter. <S> The safety circuit had to guarantee the meter will never output more than 1,5 volt to the device under test. <S> The safety circuit was needed for 2 reasons: <S> people in a factory wanted to see something so simple they could understand and verify. <S> Digital measurement devices and integrated circuits weren't such things. <S> Those people made detonators. <S> there was internal safety code which said that the open circuit voltage must be 1,5 volts or less, no matter there's resistors and a fuse which would limit the current in case of faults. <S> That wasn't a problem with devices which used only a single 1,5V battery. <S> Electronic devices needed more. <S> The resistance meter was a DVM with a current source. <S> It had a differential preamp to scale the result to DVM's range from the usual measurement voltage level. <S> The safety circuit was not allowed to disturb the resistance measurement. <S> Usual diodes and zener diodes conducted too much and no complex circuits were considered reliable. <S> A transistor base and collector together (actually 2 transistors) were considered to be a good enough last resort limiter: <S> A and B were soldered directly to the test connectors. <A> Hence it is frequently used in applications such as current mirrors and temperature sensing. <S> By running matched transistors (or one transistor time-shared) at two or three different currents you can sense temperature quite accurately without calibration. <S> Two currents (typically about 10:1 apart) eliminates much of the device-to-device variation, and three (typically something like (1:6:16) can be used to cancel out the resistive component in the semiconductor (base resistance) and connecting traces. <S> That is how the CPU temperature in your PC is measured (an on-chip diode-connected transistor). <A> It depends upon context. <S> What is it being used for? <S> Actually, if you connect the collector to the base you are not just using the base-emitter junction, you are using all the junctions and the transistor is acting as a negative feedback amplifier with the collector being fed back to the base. <S> A transistor connected as a diode actually follows the Ebers-Moll equations much more closely than the great majority diodes. <S> If you are using it in a circuit where that is important <S> it functions much better than an ordinary diode. <S> Ordinary diodes not only do not follow the theoretical curves well there are also likely to be significant differences between different diodes. <S> It is mainly used in circuits such as Log and anti-log generators where such characteristics are important. <S> It has many disadvantages in other applications that have been mentioned in other answers so it is not commonly used. <A> Years ago, I used Germanium transistors, configured as diodes (by interconnecting their base and emitter or base and collector), in crystal radios. <S> The advantage was a forward voltage as low as 0.1 V.
Because the transistor as a diode has an emission coefficient that is close to one, it behaves in a more ideal manner than a diode.
Use SFP modules for HDMI or Dp TMDS line I just wonder if it's possibile to take four SFP modules and connect them dirrectly to TMDS lines of HDMI output and send such signal via four fiber to other similar end? Is it doable? <Q> HDMI, besides the TDMS lines - which certainly could be bridged over optical - has several sideband signals, notably DDC (I2C) bus. <S> HDMI needs DDC to not only identify the monitor characteristics (VESA data), but more importantly, to authenticate the receiving device and manage encryption (HDCP) keying. <S> That alone might prevent you from making it work. <A> It should work, given that all the sideband channels are also transmitted. <S> TMDS lines need DC termination, so they have to be DC terminated while the lines must be AC coupled to the module. <S> There used to exist such modules in SFP form factor that took all HDMI signals in and output over single fiber, and it includes a bidrectional low speed channel for DDC and hotplug etc. <S> These might be based on it : http://www.inneos.com/products/aoc-products/real-4k-adjustable-length-aocs/ <A> Aside from other points here, it will also depend on your SFP module. <S> I am not that familiar with SFP moduels, but when you go to some higher speed standards it becomes common to have CDR-circuits in the SFP module. <S> These generally only lock to very narrow ranges of data-rate (say, 9.8 - 11.2 Gbit/s for a 10 gbit/s module). <S> Unless you can disable them (which is sometimes possible) it could be that certain SFP modules don't work.
QSFP+ modules also include 4 SPF+ links internally with WDM, which could allow you to cut down on number of fibers you need to run.
Picking the right MOSFET I am building a small smoke machine using a vape pen atomizer as a base and connecting a small aquarium air pump to force air past the heating element in the atomizer. I want to be able to control the atomizer's heating element with an Arduino Micro (3.3V version running at 8 MHz) PWM output. For this, I figured I needed a MOSFET. I am no electrical engineer and I have been reading up on the characteristics of MOSFETS . With this information I concluded I would need a N-channel enhancement MOSFET with a low VGs(th) so that I can control it with the 3.3V PWM ports, and a minimum ID of ~3A so that it can drive the heating element. I settled on the IRFZ44N , now the question is am I correct in this assumption? I am uncertain because these MOSFETs have so many characteristics that I believe I am missing something important. Technical details: Everything is powered by a 1S 3.7V 4200 mAh Li-poly battery (26650 form factor) The heating element is a spiral with a resistance of 1.6 ohm running on 3.3-4.2V (based on battery charge) at 2.1-2.6A <Q> I settled on the IRFZ44N, now the question is am I correct in thisassumption? <S> The IRFZ44N is going to be a poor choice for this device: - The data sheet graphs don't even bother going down to show results at 3.3 volts between gate and source because the gate threshold voltage might be as high as 4 volts and this is way beyond the logic level you are considering applying to control it. <S> because they will have naturally lower on-resistance and many will be suited for low level logic drive voltages. <A> I've made good experiences with IRLML6244 (20V Vds_max, 12V Vgs_max, 5A Id_max) and PMV37ENEA <S> (60V Vds_max, 20V Vgs_max, 3,5A Id_max) <S> N-Fets for direct drive by Microcontrollers. <S> They both have a small VGS-Threshold-Voltage of roundabout 1-2V for switching on. <S> Nevertheless, the minimum RDSon is reached at 10V Vgs or so, so the maximum current may be limited due to your maximum control voltage of 3.3V and limited Charge/Discharge Current for the Mosfet. <A> It looks like an IRL3803VPBF can fit your needs. <S> Contrary to the model you mention and in addition to Andy aka's comment, it has the following Ids versus Vgs relationship : <S> For the drain current you have in worst case (2.6 A) and the gate voltage you provide (3.3 V), the voltage drop between the drain and the source will be smaller than 0.1 V, the minimum that we can see in the datasheet . <S> That means that the current that goes through the transistor will not produce excessive heat and in the end, most of the energy provided by the battery will effectively reach your heating element.
Look for a MOSFET with a maximum drain-source voltage of around 15 to 20 volts is my advice - they are much more likely to be suited to your application
How do I jump from trace here? I've been asked to reattach the positive cable that got ripped with the pad from a board given that I own a soldering iron. It seems simple enough to just jump it from a trace. Scraped a bit of the mask off from the pad space at P1, yet I don't get anything at all while measuring for continuity from the negative cable to the exposed trace. The whole board is covered in some resin if that helps. As I see it the big traces starting in P1 are clearly separated so those should be the negative and positive sides so the magic pixies should go from one side to the other, but they seem real lazy. What am I not understanding? Edit: this board is for showing battery level on some boat, theres a counter soldered on the other side <Q> There shouldn't be "continuity" between the two pins for P1. <S> You'll probably be able to measure some kiloohms of resistance between the two, but that won't tell you anything useful. <S> P1 has two pins, marked "+" and "-". <S> You've got the red wire attached to "-". <S> I hope that doesn't mean you connected the positive wire of a power supply to the minus pin. <S> If you did, then you might have killed the circuit. <S> The "+" wire was torn off. <S> It was connected to the large area to the right of the torn pad. <S> You should be able to just scrape some solder mask off of that large area and solder down the wire. <S> The board might be double sided, though, so you'll have to flip it over and see what's on the other side of the torn pad. <S> If there's nothing there, good. <S> If there's another trace leaving from the top side, though, then you'll have to add another wire from the large "+" area that goes around to the other end of the torn pad on the other side of the board. <A> The resin is most likely some kind of conformal coating, which shouldn't be a big deal. <S> If you are trying to measure continuity, you can follow the + trace to other components on the board. <S> R12, C1, and C2 all have leads that touch the + trace, so <S> once you have re-soldered <S> the wire (next to the "+" pad) you can check continuity between the wire and one of these components. <A> Power on P1 is connected but GND is not on the other pin (black Wire?) <S> Ensure you have continuity using a needle elsewhere to GND and clean P1 pad with razor blade scrapes lightly. <S> Lightly surface coat with solder without filling hole. <S> (Solder tin coat each before bonding preferably using the hole.) <S> Insert short solid wire in hole, fold and solder. <S> Then reconnect to short solid wire with heat shrink using mechanical twist strength and minimum solder to coat surfaces. <S> Then you can yank the wire pair as hard as would want if lightly coated from PCB P1 to a couple cm or 1” away. <S> They use white stuff inPSU <S> ’s for big leaded parts <S> but it not avail in DIY shops yet subfloor adhesive <S> Polyurethane is dirt cheap in a tube but the non-volatile stuff these days takes a day to get to -≈50% hardness exposed to air and harder after that. <S> when tapered you have perfect strain relief. <S> Apply like paste with a disposable tool.
Then for final strength add a dab of sub-floor adhesive and let that be your strain relief like plastic insulation and mechanical support with electrical insulation .
How can a DC spark create EM waves? I have a question please about sparks used in the early history of radio. I have read the similar questions but I still need your help please. I have learned from sources such as https://neurophysics.ucsd.edu/courses/physics_1b/SerwayCP7_Ch21.pdf and http://www.arrl.org/files/file/History/History%20of%20QST%20Volume%201%20-%20Technology/Kennedy%20N4GG.pdf that AC, whether in wire or spark, creates EM waves. This is because in AC the electrons are constantly accelerating and decelerating, and acceleration of a charged particle is required to generate EM waves. I am using 2 HV generators to generate sparks and a neon bulb to test for presence of EM waves. (1) The first generator is a small enclosed plastic cylinder. I give it 5VDC input with low amps. I couldn't find specs for output except it claims to generate 400KV output which I doubt. This generator continually produces an intermittent spark which causes the neon bulb to flash in sync. (2) The second generator is a ZVS flyback transformer ("12v-36V Zero Voltage Switching(ZVS) Tesla Coil Flyback Driver Circuit"). I give it 24VDC at 10A. This generator continuously produces a solid spark which causes the neon bulb to stay lit continuously. The specs for this generator state that it generates "High voltage direct current output, voltage input voltage of about 1000 times." If this is true then it seems to be that the DC spark is creating EM waves, which does not make sense to me. How is the neon bulb lighting up? <Q> The spark, unless it is a continuous steady arc, will fluctuate in intensity. <S> This means it will have an AC component even if the current never goes in reverse. <S> In practice sparks are very noisy and will generate frequencies over a broad spectrum. <A> It is not the DC part itself. <S> It is the raising edge. <S> The spark creates a square-like waveform which actually consists of infinitely many sine waves. <S> That is explained by the Fourier transformation. <S> Have a look at the following image to see how many sine waves can create a square one. <A> We usually use the math of sine waves ("AC") to analyze electromagnetic radiation, and there are good reasons for this. <S> However, the first treatment of how charge generates radiation that my generation of MIT physics students encountered was different. <S> Consider an isolated charge, not accelerating. <S> Its electric field lines simply point away from it uniformly. <S> Now, move it to one side suddenly. <S> Afterward, its electric field lines still point away uniformly, but from a different place. <S> It's not hard to show, using Maxwell's equations, that the boundary between the space where the field lines originate from the first position and the second will expand as a sphere at the speed of light. <S> On the boundary, the field lines are kinked. <S> That's an expanding, non-sinusoidal electromagnetic wave. <S> Your spark gap isn't exactly this, but it is closely related: a bunch of charge suddenly moves across the gap. <S> The return current through your power supply is a complication, but the basic result, an impulsive non-sinusoidal electromagnetic wave, is similar. <A> Neither one of your "DC" sources is producing a steady direct current across the gap. <S> They may produce current only in one direction, but it will be going on and off. <S> The cause of this is that a spark gap has two states with very different resistances, and behaves in a way that turns a "DC" source into an oscillator: <S> With no spark, the resistance between the electrodes is extremely high . <S> Essentially no current will flow until the voltage between the electrodes gets high enough to ionize the gas between them. <S> When the gas ionizes (visible as the spark), it creates a conducting path between the electrodes. <S> The resistance between the electrodes instantly becomes extremely low . <S> The current instantly becomes very high, and this fast transition emits EM radiation. <S> It would take an incredible amount of power to maintain your supply's very high output voltage across such a low resistance. <S> It doesn't have that kind of power, so <S> after the initial spark, the current soon drops too low to sustain the spark, and it goes out. <S> Usually there is an output capacitor that the spark will drain. <S> Now we're back to (1). <S> Resistance is high, no current flows, so the voltage can rise until the spark reforms. <S> When you use your "high power" DC generator, the spark might look continuous, but it's actually switching on and off very quickly. <A> The effect is most likely (I would think) from the votlage across the neon bulb from an electric field. <S> Could be magnetic (inductive) <S> but I think that would be more difficult with a neon bulb since there isn't much metal. <S> Could be either of these things: <S> A spark Bleeding from the HV supply into the air (capacitive coupling) <S> If the field is changing rapidly it creates oscillations of electric and magnetic waves otherwise known as radio waves. <S> The air (and any metal surface) with electric fields traveling between them can function like a capacitor <S> The change might also be coming from an HV supply if the coils are unshielded (magnetic fields)
A spark is simply the moment of electrons, moving electrons create magnetic fields.
Why the same sound source (low frequency, possibly infrasound) has different frequencies in different rooms of the house? Can someone explain me why the same sound source has different frequencies in different rooms and if there is some type of correlation between the vibrating frequency and the distance between the sound source? I am trying to locate the source of a low frequency sound that sounds like a diesel car engine or air compressor/pump, but when I record it, it has different frequencies in different rooms from the house. I think this sound is near the infrasound range as you can also feel it as vibrations (my friends can also feel it, especially if they use foam earplugs). I am using a dual array mic from my laptop to record it (surprisingly, it detects low frequency sounds as I have tested it by rapidly closing the door at about 2-4Hz and the sound was detected). The laptop array mics also record the 220V transformer at 50Hz and the fridge at 95 and 105Hz so I think it is working correctly. I use Spectrum Lab app to record it. So in one room, the frequency of the sound is ~ 16Hz and ~71Hz, while in other rooms, the same sound source (I feel the vibrations in the same way) has a frequency of 36Hz, 41Hz, 73-76Hz. I have attached a screenshot of my recording from the 3 different rooms. <Q> Google "Resonance". <S> https://en.wikipedia.org/wiki/Resonance <S> Your different rooms are not the same acoustically <S> you're in. <A> If your laptop has a fan running, then it is possible that you are recording the resonances in the room that are driven by the sound of the fan. <S> Fan sounds from a laptop are a combination of (more or less) white noise from the motion of the air, a hum or whine from the motor itself, and whistling or piping sounds due to resonances in the air ways inside the laptop. <S> I would try making a recording with a device that doesn't have a fan (like a smart phone) and then analysing the recording with Spectrum Lab. <S> There are smart phone programs that can save the recordings in a lossless format - use .wav or similar, not .mp3 or other lossy format. <S> Make sure the laptop is off while recording. <S> The same goes for other "noisy" appliances,of course. <S> You might try intentionally generating some white noise in the room as you are doing your analysis. <S> Spectrum Lab includes a signal generator that can make white noise. <S> Run the generator with the output connected to a speaker. <S> Average your spectrum readings, and you will see "hills" in your spectrum that at wavelengths corresponding to the size of the room. <S> I also hear low frequency sounds that no one else notices. <S> I've been to an ear doctor, and my hearing is normal - that sort of lets out any kind of "super hearing" or tinnitus effects. <S> I haven't, however, been able to reliably record anything that I could identify as the source, either. <S> I do know that the bass heavy music that everyone seems to love gets on my nerves - it sounds <S> like it is all bass to me. <S> I prefer music played with the bass <S> turned way down, so maybe my ears work better than average below frequencies that the ear doctors test. <S> It is also possible that it is all in my head. <S> I notice the low frequency sounds more when I'm tired or otherwise stressed, so it could all be psychosomatic (polite term for "imagining it.") <S> At any rate, good luck tracking down the source of your noise. <A> Do you have ducted air-conditioning in your house, the rectangular ducts are known for "drumming" a low frequency vibration, also the various different lengths of ducting will have different longitudinal resonances, all at very low frequencies. <S> Secondly, do you have any flues , e.g. fireplaces or rangehoods in the kitchen, <S> the wind blowing across the top can stimulate resonances, much the same as blowing across a milk bottle, search for "Helmholtz resonance". <S> If you can get hold of a signal generator and loudspeaker, you can try sweeping the frequency slowly, you can usually hear the resonances in the room, however most bass speakers have there own resonances. <S> Frequencies around 16Hz would also be typically for a wall , perhaps driven by a refrigerator leaning on the other side of the wall.
Every room will have a different natural resonance, so different frequencies will seem to be accentuated over others depending the dimensions of the space
LED lighting up dimly when uC is in reset I designed a PCB which has an STM32G431CBT6 on it. There are also two LEDs, a red and a green one, connected as shown: When I powered it on the first time (so no program on the uC yet), the red LED was lighting dimly. After loading a LED blinker program on the uC, it works fine (with full brigthness), however if I press the reset button, the red LED is lighting dimly again and the voltage across R1 is 120mV. So 120uA is flowing for some reason. The other LED doesn't do this, and the voltage across R2 is 0. Looking at the datasheet I only found this note about PB4 (page 60): "After reset, these pins are configured as JTAG/SW debug alternate functions, and the internal pull-up on PA15, PA13, PB4pins and the internal pull-down on PA14 pin are activated." But even if there is a pull-up on PB4, the LED shouldn't be on, so what causes this behaviour? <Q> It reads in the reference manual that this particular MCU series use PB4 for one of the USB-C connector CC pins. <S> This means that the pin has support for an internal 5.1k pull-down feature turned on by default at reset time, as otherwise it might not be possible to use the bootloader to download firmware over USB-C connector. <S> Thus if JTAG needs to be used then the pull-down can be disabled. <S> So it will affect the LED too. <A> What causes the behaviour is some mistake somewhere. <S> You're right. <S> The only way those can be dimly lit is if there's a pull-down. <S> Sometimes the answer is buried deep in the manual. <S> If it bugs you , put a strong pull-up on it. <A> If it is activated by a default pull-down to GND (and this should be noted in the microprocessor datasheet if this pin has at initialisation a pull-down) then yes its likley to drain some current through the led. <S> Normally the code would initialise any dual-function pins to their correct state, and/or remove any pull-downs/pull-ups that are not required. <S> But in your case you say there's no code. <S> Well with some correctly written initialisation code the LED will be initialised to the correct start-up state (probably OFF by default). <S> If you're loosing sleep over it its best to add a strong pull-up or make sure the code is running as soon as you power-up the board and execute the code.
Either you are not really connected to the pins you think (even the most veteran engineer can do this), or the manual is in error.
Connection of two open drain outputs to control common LEDs by PIC32MZ I want to use this Single Cell Li-Ion Battery Charger (MCP73833).The pins STAT1 STAT2 and /PG are an open collector outputs and it will be connected to low power LEDs as shown in the schematic.If I would also like to connect these pins to 5V tolerant open drain GPIO pins of the PIC32MZ microcontroller to also be able to control the LEDs by the microcontroller.Will this direct connection work? <Q> No it will not work because the LEDs will hold the input voltage above 2V. <S> Even at 4mA only 1V 'low' is guaranteed. <S> The PIC32MZ requires input voltage for a '0' of less than 0.2Vdd and for a '1' more than 0.8Vdd. <S> You also should provide a bit of margin. <S> Easiest thing would be to pull the pins up to Vdd with something like 10K, and drive the LEDs with a few MOSFETs or a CMOS inverter or gate package. <A> The open-drain outputs on the PIC will be High-Impedance when not switched on, so there will be no contention with the asynchronous open-collector outputs on the battery charger. <S> It will cause an issue only when one output has activated a LED, the other output will not be able to disactivate it if you wish to do that, say from software (and vice-versa from battery charger). <S> Depends if this is an issue for you … <S> Presumably the STAT1 and STAT2 are also open-drain outputs that are there to indicate various states of the battery charger, like charge ON, OFF or charger <S> FAULT condition. <S> You will need however to ensure the PiC is also running of 5V, otherwise, use external MOSFETS. <A> Is there some reason you can't do it the normal way, as shown below? <S> OK <S> You need a MOSFET like the 2n7002 with a typical 1v threshold. <S> The circuit will allow level translation to much higher voltages , e.g. 24v is quite common , and is bi-directional, so you could put a push button to ground on any or all of the signal lines. <S> (The schematic is missing Q2, it is wired the same as the other two, wasn't enough space to squeeze it in). <S> I've redrawn using a different MOSFET symbol, this shows the internal diode, and I've fitted Q2 in as well. <S> The internal diode is what makes it bi-directional, once the drain drops below 3v, it drags the source down with it, eventually causing the MOSFET to conduct below about 1.5v, and Source and drain are then at the same voltage. <S> I've also shown a pushbutton.
Also note that you've chosen to run the LEDs at a higher current than the battery charger chip guarantees the output voltage at. Perhaps your Pic is running on a lower voltage , and doesn't have "proper" open collector outputs, the solution is to use cascode type level shifters, these are just another mosfet "in series" with the internal one, with the gate tied to 3v.
Would you approve use of these PCBs??? Delamination issue Our vendor pulled some PCBA out of storage, been sitting for about a year. They found about 5% delaminated. They claim it was 'because of the storage duration', but I'm not buying that. I think these boards were defective from day one. Yes, I know a hatched pattern for the pours is better - These aren't my design. Anybody think this is a "storage" issue? They're (supposed to be) FR4, so presumably they are fiberglass resin, and shouldn't be hygroscopic. Vendor is in south-east China (Shen Zhen) where the humidity and temperatures are "jungle like" most of the year. I'm sure there was no climate control during storage, I wouldn't be surprised if they were subjected to months of 130F+ temperatures. Maybe storage EXPOSED the issue, but I don't like the theory it CAUSED the issue. In field, these boards will get quite hot during normal operation. There's a number of high-power MOSFETs on the other side, and the board regularly will see 15A, sometimes much higher during surges (about 35A max or so) Further, the vendor is suggesting subjecting the entire inventory to a heat-test, basically a shorter version of a reflow oven cycle, to ferret out the bad ones. They're suggesting use some kind of profilometer to detect the 'bubbles'. This is a 4-layer PCB. We almost "never" use multilayer boards, and I doubt our vendor sees them often either (maybe "never"). This is also a 'safety critical' component. Any and all comments & suggestions welcome!!! <Q> The fact that they delaminated in only a year calls into question the quality of the workmanship, regardless of the fact that they were in storage. <S> Like you said, if they delaminate in storage they most certainly would delaminate in the field, and in a safety-critical application this is absolutely unacceptable. <S> I would agree with John D that these should be scrapped (depending on the cost, you may be able to work out a partial refund from the supplier) and order new ones from a reputable source. <S> Also, if you have any authority to do so, I recommend pushing a redesign to hatch the copper pours. <A> If the storage conditions were relatively benign (eg. <S> not cycling back in forth between temperature extremes in an environmental chamber many times), looks like their process was defective, maybe improper process control in their lamination press. <S> Which means that the entire panel that was in the press on that run would be scrap and maybe (probably) every panel made around that time. <S> Given the low cost of 4-layer boards, you should scrap them and move on. <S> Even if it was not safety-critical the cost of field failures is too high. <S> There are hundreds of PCB suppliers in the SZ Bay area, you should be able to find a better one across the street. <A> Definitely toss them. <S> 4 layer boards even made domestically are inexpensive these days. <S> FR-4 will absorb moisture, and when laminated at high temperature and pressure the moisture turns to steam and creates pockets in the epoxy/glass substrate. <S> My bet is these were already delaminated when they shipped them. <S> If you are even considering using them, even if you have a few that do not look delaminated, I would bake them at 250 degrees F for a minimum of 4 hours. <S> Then reinspect them. <S> If you run them through reflow or wave <S> and there is moisture in them <S> it can be very ugly. <A> Also stop ordering from this supplier, you shouldn't need to worry about this in your supply chain. <S> Even if their story checks out and this is caused by storage within a year, that's going to happen again on other units. <S> Maybe if you told its for a household low power toy where margin is tiny and stakes are low, but all of those aren't the case and this is a no-go in your stated application.
I'm going to agree with what seems to be everyone else here: scrap them and try to get a refund.
Very General Question: Ways to Delay Relay Activation This is a general question to round out my knowledge of relays. Say, for example, I close a circuit that powers a NO relay. How would I go about delaying the activation of this relay for a specific amount of time, with an accuracy of 5 or 10ms? <Q> In old days, it was made like this: simulate this circuit – <S> Schematic created using CircuitLab R1, R2, C1 are not real values, you have to find it. <S> I have found this way of delaying relays in some old russian milling machine that I have retrofited it with PLC. <S> Before dismantling it, I had to understand what those delays were used for, so I could implent them in PLC. <S> It was long time ago, so I can't remember the values, but it was done in that way. <A> If the overall time is short, a simple RC circuit works well, though resetting it so you get the same time after a short off time is not necessarily trivial (you're talking 1% of a 0.5 second delay). <S> In the old days we would use a programmable UJT (a type of 4-layer thyristor) and an SCR. <S> There were CMOS counter circuits developed for long time delays. <S> In 2020 you might well choose to use a microcontroller with either an internal RC clock or an external crystal. <S> Details (where the devil is) include how quickly and how exactly you reset the circuit between operations. <S> It's easier if the minimum interruption of power is relatively long. <S> Analog circuits can have issues if a timing operation is under way and a very brief interruption takes place before it times out. <A> I would also support RC circuit to slow down the relay activation. <S> As a downside - turn off time will go up as well. <S> Of course it all depends on how much space you have and how many components and pins you're ready to use for it. <S> You can always have an additional N-ch mosfet near the relay coil that will connect it to ground. <S> So you will have 2 control signals: main relay controls and mosfet controls. <S> First you keep MOSFET closed. <S> When you need to turn the relay on, you use RC, so you'll have a pause. <S> But when you turn it off, you pull down the RC controlling line but also open MOSFET at the same time, so the discharge has no resistance. <S> P.S. <S> I didn't edit the default values in the picture, it was a made-in-30-seconds sketchP.P.S. <S> You may need to have one more resistor between the capacitor and the coil
In general you would delay application of the voltage to the coil.
USB to Serial (RS-232) cable not displaying data on Arduino serial monitor My previous post (Pictures from the previous post as well) So far all of the answers and comments yielded no solution to my problem. This post offers a different method to communicate serially with the reader. I bought a serial to USB connector cable . I connected this to my reader and then to my PC's USB port. I opened the Arduino serial monitor and behold my amazement I was reading data correctly. So I thought why couldn't I strip the USB connector and expose the Vcc, GND, TX and RX wires. So I did. I then connected the Vcc to +5V (Arduino), GND to GND (Arduino), RX to TX and TX to RX. I then opened up the serial monitor after uploading the serial code but still no data. I then changed the RX to RX and TX to TX and still no data. However, when I connected the serial to USB cable straight to my PC (before striping the USB connector) the serial data was been correctly transmitted and viewed from the serial monitor. So why when I put my Arduino as the "middle man" the data does not go to my PC serial monitor? The baud rate was 115200. I cannot change this baud rate because it is the spec of the reader. Additionally, I transmitted data successfully at 115200 by using my PC as the host (using Putty at 115200). So the baud rate is not the issue. <Q> The adapter you bought has a USB UART chip with a RS232 voltage level translator inside the DE-9 connector, so the wires you cut use the USB protocol. <S> You cannot connect USB to your Arduino, it will not work. <A> I suspect that much of the trouble you're having is from trying things haphazardly and/or not communicating very well here what you've tried and/or not understanding or following suggestions made here and in your previous question. <S> You have established that your RFID reader is communicating over its serial port by connecting it to your PC using the USB-to-RS232 <S> adapter cable. <S> This is a good start. <S> Do you have access to another USB-to-RS232 adapter which you haven't unfortunately mutilated (or are you confident that you could to a really good job repairing the one you cut the end off)? <S> It would be good if you could similarly establish that your Arduino can talk to your PC through the RS232-TTL adapter and USB-RS232 cable - and this step may also require a "null-modem" cable/adapter to swap the TX & RX pins on the RS232 side of the connection between the 2 adapters (NOT on the Arduino/TTL side). <S> For clarity - the "Gender Changer" adapter you show in the pics is almost certainly not a "null-modem". <S> Note that there a 4 different configurations here which you may need to try!If <S> you see this working - do not change the Arduino to TTL adapter connections again as this is now the only correct configuration. <S> If you're not able to complete the above step due to lack of suitable hardware <S> it's not the end of the world, but there's less certainty going forward that you don't have some other issue on the Arduino end of things. <S> So now you're at the stage where (hopefully) you know that your Arduino can talk through the RS232-TTL adapter. <S> The only piece of uncertainty left it whether or not you need a "null-modem" between that and your RFID reader to swap the RS232 TX & RX lines. <S> There are only 2 options here - either with the "null-modem" or without it. <S> One of those should work. <S> If you weren't able to verify your Arduino comms earlier, then there's also the possibility that you need to swap the Arduino-TTL adapter TX & RX lines - another 2 options. <S> So there are again 4 possible configurations - make sure you try them all! <A> given that the USB cable worked the reader is wired as a DCE augment that gender changer with a null modem adapter <S> and it should work,
You may have to try swapping the TX and RX lines between the adapter and your Arduino, as well as using or not-using a "null-modem" adapter between the TTL adapter and the USB adapter.
Wireless Relay triggered by continuous voltage Does anyone know of a wireless relay product that can be triggered by continuous voltage? Obviously that is how a wired relay works, I just want to add a load to a spot that has 12v already wired but i don't want to have to run a trigger wire to that spot. Ideally I would like to simply connect a premade transmitter to a existing switch. For my current application I have a light on one side of my boat, I want to make another light on the other side go on as well but without running a cable to it. I just want to put a relay inline and leave its switch on such that the switch on the other side light controls both lights. I have found almost what i want in the form a of a relay and a small key fob remote, but that is not what i need. Alternatively I might be better asking how to make a transmitter for the above product that is triggered by applying a constant voltage??? The above light project is my current application, but if I could make/buy something it could be applied all over my boat and be really useful in avoiding the pain and destruction involved in running wires on my boat. <Q> Common consumer products eg garage openers and may be found by searching... <S> RF remote switch <A> There are a couple of ready-made products, but they're not exactly cutting edge technology. <S> Easiest but funkiest solution: <S> X10 Powerflash Burglar Alarm Interface . <S> It has 2 screw terminals which will accept your 12 V (AC or DC) trigger signal. <S> It transmits a wireless X10 signal (carried by the power line, not radio waves) to an X10 device. <S> The X10 device can be a plug-in or hard-wired 110V relay. <S> This is 1970's technology and occasionally other devices in your home can interfere with the X10 power line signals. <S> Newer solution that requires more work: <S> Insteon Remote Control <S> Plug-In Low Voltage Controller. <S> This one uses both RF and power line signals, and works with Insteon devices (e.g. plug-in relays, etc.) <S> It is more reliable than X10, but costs a little more. <S> Also, the input is designed for 5V, not 12V. <S> This is easy to solve with a voltage divider made up of two resistors, say 1500 ohms from the 12V line to the 5V input, and 1000 ohms from the 5V input to ground. <S> Cheap and cheerful! <A> There are products to do exactly that, called 'Wireless Light Switches'. <S> Such a product would have 2 components. <S> Transmitter - A wall-mount rocker switch, without wires or batteries. <S> Receiver - A switching unit with 'Line', 'Neutral' and 'Output' terminals. <S> The indoor range would easily cover a standard dwelling unit. <S> An on-line search for 'wireless light switch' would be fruitful.
Wireless remote switches use RF encoded to target switches with latch memory.
How to generate a 10Ghz signal? I am a newbie to RF World. I need to know how to generate a 10Ghz sinusoidal wave. I have found this module: https://pl.mouser.com/new/texas-instruments/ti-lmx2694epevm-eval-module/ Is it a good option for this purpose? Does this module need any other RF source? what are other ways to generate Low phase noise oscillator? (10Ghz) <Q> I'd consider using a VCO like this one : - Link to Synergy VCOs . <S> It can be stabilized by using a phase-locked-loop and a lower reference frequency as in this example that uses a slightly different VCO (same type and manufacturer of course): - Link to ADF4156 . <S> Link to ADF5001 . <A> No, this device generates square wave outputs. <S> source: <S> page 1 of the LMX2694 datasheet Notice the output buffers. <S> They are used to generate a differential signal. <S> source: <S> page 7 of the LMX2694EPEVM Evaluation Instructions <A> Conceptually, the way you generate a 10 GHz signal is the same as the way you generate a 1 GHz of 1 MHz signal - it's just that all the components become smaller. <S> The standard 'microwave' architectures still apply: you have a resonant network (be it a crystal, LC tank, transmission line resonator, dielectric resonator, etc...) <S> and you compensate for the loss inside that resonator with a negative resistance (using an active devices such as transistor or diodes). <S> The specifics depends on what your end-goal is. <S> These often offer high quality factors (which means low phase noise), but are impossible (or at least hard) to tune over a wide range. <S> When it comes to on-chip oscillators, I think one of the most common oscillator architectures is the differential-LC-tank. <S> These are made by just cross-coupling a pair of transitors, and loading them with an LC tank. <S> This way you can make oscillators on ICs well beyond 10 GHz. <S> The tuning can be done by replacing (or adding) <S> the capacitors with a voltage-dependent capacitor.
If you want a fixed frequency, you can use something like a dielectric resonator, crystal, or transmission line.
Electric shock from laptop This is something that happened recently. I was casually using my laptop with the laptop placed on a table, charging and my feet on the marble floor below. Only one of my feet was in contact with the floor and that too was not completely in contact with it. Only my toes were actually in contact with the floor. So, I accidentally touched the metallic case of the in-built speaker and it gave me a very hard electric shock. I think it's worth mentioning that my finger's still hurting from it. I also felt like the current was alternating. I felt a very fast vibration in my hand and that is how I assumed that. I have experienced this earlier a few times as well, whenever I'm barefoot and my feet are in contact with the ground. We went to a repair shop and the employee there said that it's normal for the metallic parts to shock you and it's just 12 volts DC, so it won't be fatal. Is it normal or something is seriously wrong? <Q> This subject pops up regularly. <S> One reason is the rf filtering at the AC mains input of the power supply. <S> The filtering tries to prevent the power supply polluting the electricity with high frequency switching pulses. <S> The protective ground is directly or capacitively connected to the ground side of the DC output. <S> If you don't have AC outlet with proper protective ground - it can be nonexistent or have a voltage to your stone floor <S> - you get an AC voltage between the DC output and the stone floor. <S> If the protective GND is missing it's half of the mains AC voltage. <S> It can be more if there's voltage between the protective ground and your floor. <S> I have seen how people destroy valuable electronics by using equipment which need grounded AC input without the protective ground. <S> Sometimes they have tried to avoid ground loops which collect noise to their inter-device signals. <S> Finally there can be a fault. <S> It can even be intentional. <S> I guess you have a good possibility to get fake electronic devices if you happen to live in a place where businessmen can do what they want as long as local authorities and mobs get their part of the money. <S> Or if you order something from a foreign webshop. <S> Stop using the system and let a proper electrician test your AC outlets and the device. <S> He doesn't start "it's only the low voltage DC". <A> If the shock was hard causing you a finger hurt <S> then it is not a 12 V shock but much higher. <S> (Be assured, anyway, that no one can understand if it's DC or AC simply by judging from the shock sensation).Being the plug a 3-pin plug and assuming it is original <S> then your laptop is experiencing an insulation fault. <S> A live part near the case of the speaker is having an insulation fault and that live part is coming into contact with the case. <S> Moreover I assume that where you using your laptop there is no electric protection device equipped with a differential relay otherwise it would have prevented the shock with an emergency shut off. <S> Now you should avoid using it (at least, avoid touching the metallic parts), until you go back to the repair shop (maybe a new one) and tell them to find the fault and repair it, or at least insulate the case. <S> If you buy a test screwdriver you can check that that case is now a live part. <A> Best recommendation: Replace the obviously defective powersupply for that particular laptop. <S> Not against some chinese ripoff cheapo crap. <S> But by an original device from the respective manufacturer, made and intended for the actual laptop.
The filter has often capacitors connected to the protective ground wire from both hot and neutral AC wires. Use only a person that you know he understands the problem and wants to solve it.
LM358 as a voltage follower only reaches 1.5 V of supply voltage I am using an LM358 as a voltage follower, giving it a supply voltage of 6 volts and input voltage of 5V At the output I am getting 4.5V. By applying different configurations of input voltage and supply voltage I observed that there should a difference of 1.5V between supply voltage (Vcc) and input voltage.(IN+.) I am not able to find the reason behind it. <Q> This is to be expected from the LM358. <S> The datasheet says that the output range is from 0V to V+ minus 1.5V. <S> This is the relevant section of the datasheet: <A> The input voltage range is 1.5 V (2V) lower than the positive supply voltage. <A> Strictly speaking and going by the data sheet the upper limit is Vcc minus <S> 2 volts so, a real LM358 might be able to raise the output to 4 volts. <S> It's the same with the input pins of the LM358 - they cannot be relied upon to work when they get within 2 volts of the upper supply rail. <S> Purple is output and red is input. <S> The output spec is for a positive rail of 30 volts hence, the 28 volt typical value is Vcc minus 2 volts.
The LM358 is unable to raise it's output closer to the positive supply than about 1.5 volts and that appears to be what you are seeing.
How can a voltage source absorb power? In the following circuit, one could use a simple KVL to calculate that the voltage across the resistor equals 10V, and therefore the current flowing in the circuit is 1A, from the right side to the left side of the resistor. This then shows that the power delivered by the right voltage source (using the passive sign convention) is P = -VI = -(20)(1) = -20W = 20W delivered. However, when moving to the left voltage source, and still applying the passive sign convention, since the current enters the positive terminal, the power of the source is P = VI = (10)(1) = 10W = 10W absorbed. We have faced this situation often in my current circuit analysis course. My question is - how is it possible that a voltage source has a net absorption of power? This just doesn't make any logical sense to me. If its a source, why is it absorbing power? simulate this circuit – Schematic created using CircuitLab <Q> Imagine V1 is a rechargeable battery. <S> If you connect it through a resistor to a higher voltage, you will charge the battery. <A> Ideal voltage sources are bidirectional. <S> Even non-rechargeable batteries can be charged at low currents , just not efficiently. <S> Generators being charged with force turn into motors. <A> It's a hypothetical perfect voltage source of course. <S> But take the real, slightly imperfect lead acid battery as an example to prove that voltage sources can, in principle, absorb power. <S> Some designs of real voltage source can't, of course, for reasons like diodes getting in the way. <S> But others - not just rechargeable batteries, but also generators can absorb power too. <S> Of course, when a generator absorbs power, we call it a motor... <A> If we want to attempt understanding this at the atomic-electron level, imagine this illustration. <S> You have two sources; one which wants to output 10 electrons / second and another which outputs 20 electrons / second. <S> You connect these with a 10Ω resistor. <S> Because there is 10 electron/sec difference in "voltage", coupled by a 10Ω resistor, the current that flows is 1A. <S> But this current flows from the bigger supply, through the resistor, into the smaller supply - even though it is a "supply." <S> So yes, energy is being forced into the 10V supply from the 20V supply, even though they both are intended to be outputs. <S> Such effect might be called "back-feeding" and generally is not a good idea. <S> What happens to that energy, where does it go? <S> Well, it almost certainly is dissipated in the 10V power supply as heat. <S> There are many different topologies of power supply, and each has various strengths and weaknesses. <S> In general through, inside both supplies, components regulate the voltage and current output to safe limits. <S> Depending on how robustly the supply was engineered, this safety margin may be small ("cheap" supplies), or larger ("expensive" supplies.) <S> A supply you find on eBay, Amazon, Aliexpress for $10 is a "cheap" supply. <S> These are typically designed on the low-side of the robustness spectrum. <S> They can work fine for their intended purpose, but are not very tolerant of abuse such as back-feeding. <S> This type of supply has every conceivable cost-cutting measure taken, such as reducing or eliminating heat-sinks. <S> Without a suitable heat-sink to dissipate extra power introduced by back-feeding, such a supply could fail quickly. <S> An "expensive" supply is generally much more costly. <S> These are more expensive because a) the additional engineering work done to make them more robust, and b) <S> the addition of extra features/components such as larger heat-sinks, physically bigger components (to allow for better heat-sinking), thermal monitoring, etc. <S> In short, a more expensive supply is generally able to handle back-feeding better than a cheap supply. <S> This usually isn't much of a problem, because system designers understand that back-feeding a supply should be avoided. <S> Incidentally, this is one reason why bench power supplies for electronics engineers are expensive - <S> they are designed to be robust against several types of transient and continuous events, including accidental back-feeding. <A> Power supplies can have one, two, or four quadrants. <S> A single quadrant power supply has a pass element from high voltage to the output. <S> It will regulate the pass element to give the desired output. <S> This is a typical linear DC supply. <S> This supply can not sink current. <S> A dual quadrant supply has all the single quadrant stuff but also has a second pass element. <S> This pass element connects the output to common. <S> It has a large heat sink on it. <S> When the voltage is greater than the regulated set point it will burn off the excess with this second element. <S> This type of power supply is typically used with battery testing because it can both charge and discharge batteries. <S> A four quadrant supply has all the dual quadrant supply stuff but also a mirror image to a negative voltage. <S> This type of supply can be used with AC. <S> It can sink or source both positive and negative voltage and current.
If you put a resistor across it, it delivers power.
Wiring for solar powered house I am trying to design electrical wiring for a small 1-bedroom house which will be only powered from solar panels. The minimum appliances in a house would be: Appliances available in 12V DC: LED lights Ceiling fans Washing machine Refrigerator Air conditioner Mobile phone charger Water pump for overhead tank Appliances not available in 12V DC (so far) LED TV Laptop/sesktop computer Some of these appliances are available for DC solar power but not all. Also solar panels and battery combinations are of different voltages as 12V, 24V, 48V etc. How should I do the wiring design? Only DC wiring all over in the house while using small 220V inverters at the points where 220V AC appliance is to be connected OR do all the normal AC 220V wiring in the house while connect a big central inverter 220V AC at the point where I will put the batteries and solar panel wiring cabinet? OR maybe mix of the two wiring? Normally the DC wires have less resistance and size is 10mm copper wire while AC wire is 3/29 or 7/29 imperial guage wires mixed-copper (called china copper) used in my region. The house will be outside city where there is no mains electric supply or grid. <Q> A main driver will be your most power-hungry appliances. <S> Washing machines will likely require around 2 to 3kW. <S> it won't be practical to run one from an extra low voltage supply, through a "small" inverter. <S> You would be looking at substantial cables (perhaps 25mm² or more), and a large inverter with a surge rating above the rating plate of the washing machine, to allow for motor surges. <S> Do check the wiring rules where you live. <S> Don't assume that extra low voltage DC supplies are excluded from them. <A> Your appliances fall into three categories: Washing machine, air conditioning <S> Refrigerator Everything else. <S> Category 1 drives your requirements, especially A/C for a house. <S> If you aren't willing to restrict your A/C and washing machine usage to daylight hours (which isn't that unreasonable for the A/C), you'll definitely need a large battery bank to provide the necessary power. <S> You can get a refrigerator powered by 24 VDC, which will draw about 25 amps for a full-sized unit. <S> It is going to cycle on and off during the night, so you definitely need a decent-sized battery bank. <S> Once you've wired the house for these appliances, it will be most economical simply to extend the AC to the rest of the house and use standard power. <S> Lights, TVs and computers are commonly used at night, and often for long periods of time, so you'll need decent battery capacity. <S> Furthermore, you'll have a hard time finding DC TVs and computers - even laptops, which operate from DC, normally don't operate on standard battery voltages, so you'll need some sort of custom converter if you go that route. <S> So overall, I don't see that dual wiring is that great an idea. <S> It will cost you in the installation, and it won't save you anything much in operating costs. <S> Just go with a solar panel/battery/inverter system. <A> If it were me, I’d retrofit the motors for 220Vdc https://www.google.com/search?source=univ&tbm=isch&q=high+voltage+dc+motor.+220Vdc&client=firefox-b-m&sa=X&ved=2ahUKEwihpsK_77PrAhWQl3IEHdAbAfgQsAR6BAgKEAE&biw=1269&bih=927 <S> Then down convert as required for control items with a 48V bus as a third wire to bus accessories and small appliances <S> This could be +/-110V <S> + gnd for your application. <S> A BMS would need to be custom designed unless you can get some Tesla parts from a scrap yard. <S> Arc gap suppression insulation ratings must be higher. <S> However on retrospect, the latter may be costly <S> so my final answer is create a 48V battery powered grid in the home and then stay in the LV limits for safety ratings, which was my concept of the future 30yrs ago. <S> Then all 5V and 12V consumer goods could use DCDC converters without the low PF and have UPS to boot using cheap 10A Molex 4 pin (20A) connections keyed for polarity for <<1kW loads down to 1W USB.
Basically, you'll need both a fairly large inverter and a large battery bank to provide AC for these units.
Why does fuse rating not coincide with max power of device? I am reviewing the electrical specs for a few different devices, and I am just confused why some devices have a fuse rating that allows for a higher power input than what is listed as the "max power". For example, the specs of one device states that it has a max power consumption of 200VA and has a 4 amp fuse. But with that type of fuse, technically it could allow for a max power of 4ampx120V = 480VA before the fuse blows. Why not just have a 2 amp fuse or lower to be closer to the max power consumption? Is this just bad design? <Q> Running 2A through a 2A fuse will significantly shorten its life. <S> Also, many "2A" devices will have inrush currents or spikes that exceed 2A for short periods. <S> Fuses are a safety device, not a current limiter. <S> They're really only intended to blow if the device short-circuits, to prevent excessive current in the device itself from starting a fire or electrocuting the user if the case becomes live. <A> A fuse is used (in the vast majority of cases) to protect upstream cabling infrastructure from over currents and prevent fires. <S> It is not used to prevent a device (downstream) taking too much current except when that downstream current is excessive enough to endanger the upstream cabling infrastructure. <S> If the downstream device is consuming excessive power it is likely that it is damaged. <S> A fuse will not stop a downstream device from becoming damaged (except in the rare case of zener barriers used in intrinsically safe equipment). <A> A fuse is intended to protect the wiring, not the device. <S> There are many possible reasons not to use a fuse of the lowest possible capacity as dictated by the apparent demand of the device. <S> The device may take an inrush current, and a larger fuse may be cheaper than a time delay fuse <S> The manufacturer may only have a few fuse sizes approved within their organisation, and it saves them doing a load of documentation to add a new fuse size if one of their standard fuses will protect the wiring adequately.
Running a fuse close to its rating can shorten its life
Mounting BGA package on PCB with force without reflow I was searching for a method to use a BGA based MCU on PCB which could be easier to change frequently. There are sockets for this purpose but I want to ask what if I simply put MCU on the right place and then hold it with a 3D printed holder with some force. This idea is storming in my mind but a question is raising frequently if it is possible or not, will it work?? Any help with this??Thank you. <Q> The Ironwood sockets work like this. <S> They use an elastomer interposer with embedded wires. <S> Depending on the type they’re good for hundreds to thousands of mating cycles. <S> They use a slightly modified version of the BGA footprint, and are compatible with soldering down the BGA later. <S> The other BGA socket type uses pogo spring pins. <S> These are more common for production test boards. <S> That said, it’s not feasible to just push the BGA down onto the board with a clamp. <S> Something has to compensate for co-planarity as well as make a gas-tight contact. <A> I strongly suspect the answer is "not reliably if at all". <S> Electrical contacts need to be have pressure applied to break through surface oxidation and prevent the contacts from separating with vibration/thermal changes. <S> The problem is that without some "springy" components to take up the slack, small variations in the surface dimensions will translate to massive variations in the contact force or even some pins that are not in contact at all. <A> Probably not very reliably, <S> but I can imagine it working for prototypes. <S> Whenever I reflow BGA chips, I apply tacky flux, then push down on the BGA and sort of slide it around until it 'locks' into position. <S> The locking mechanism comes from the fact that there is a ~25 micron thin film of soldermask 'cupping' the solder ball contacts (the solder contacts probably need to be gold for planarity reasons). <S> Multiply this tiny force by 400 odd balls, and it becomes quite significant with applied downforce and doesn't allow it to slide around. <S> I don't really understand the purpose having a socketable BGA though, unless the pinouts between chips are compatible. <S> If you're looking to do it so you can easier time soldering <S> (eg, by breaking it out to header pins), you're defeating the purpose of the BGA package, which is to reduce inductance, especially to decoupling capacitors.
Not only that, but pushing the chip down with that much force will damage the solder balls, making it impossible to solder the chip later.
Creating hardware acceleration card with PCIe implemented in an FPGA PCIe offers a very high speed interface between a peripheral card and PC. Sending and receiving data from the FPGA side which contains the PCIe IP seems to make sense. However, I am confused how it would work on the computer side. On the PC side we have different operating systems and they usually do not allow direct access to I/O ports. How would one write a program on the PC side (lets say windows) to communicate with the PCIe peripheral card? I think most likely we would use C or C++ but don't know anything more than that. <Q> You just found out you need a driver to communicate with hardware. <S> Indeed! <S> And that driver will depend on what you do on the FPGA. <S> Your FPGA vendor provides examples for examples of things you can do! <A> You would either need to create a device driver or use/modify an existing driver. <S> It also depends on whether you use the "bare" PCIe IP core, or something slightly higher-level such as RIFFA, XDMA, or QDMA. <S> If you use the bare PCIe IP core, you'll probably want to write your own driver. <A> If you use PCIe on an x86 system, you will need DMA in the endpoint. <S> Otherwise your transfers will be quite slow, as x86 platforms don't tend to have host-side DMA resources. <S> Reads, especially will be painful as they're non-posted and take a long overhead for each transfer. <S> In Xilinx-land, the most popular PCIe bridge block is called 'xdma', which is documented in PG195. <S> This block supports memory-mapped or streaming DMA, and has drivers available for Linux and Windows. <S> While it's not terribly complicated, you do need some kernel expertise to integrate it with your application. <S> It's a well-known block, and there's lots of chatter on the Xilinx forums about it. <S> There's a couple of other IP blocks in Xilinx (like cdma and vdma), or you can purchase a block as IP from companies like Northwest Logic. <S> As far as how PCIe devices 'work', they are enumerated at boot time using <S> I/O, and configured by the driver to live in a specific set of memory address spaces, called 'resources' in Linux and BARs in PCIe. <S> The way you communicate with a device is you ask for its virtual address when you 'open' it, then you can read/write to that address. <S> That address isn't fixed: it changes as it's assigned by the MMU each time you open the device. <S> If you want to see how that works, the utility 'pcimem' (Linux) shows a very basic way to do that. <S> It's a simple program that does peek/poke to any PCIe device.
If you use something higher-level, it may come with its own driver, which you can then interface with from your own application software.
What is "switched neutral"? In the context of mains power, and wiring a light and switch. I thought I understood it, but what I'm thinking of I believe is something else called a "switch leg". Disclaimer: I'm a beginner with electrical. <Q> General appliance wiring looks like this: <S> This is "switched Live" and is the preferred way to do it because once you switch it off, the appliance is not connected to high voltage. <S> It's safe for servicing without risk of a shock. <S> In case you put the switch on the neutral line instead of live, that case becomes "switched neutral" as shown below: <S> In this case, you need to be extra careful while servicing the appliance. <S> Even if the switch is turned off, the appliance will get a high voltage and there is a risk of electrical shock. <S> Make sure you turn the live MCB off before servicing to avoid a shock. <A> It's a switch in the neutral wire, instead of the hot/live/phase wire. <S> It is generally considered to be a bad thing, as turning the switch off turns off the appliance, but there is still a live feed to the appliance. <S> This presents a shock risk to anybody replacing lamps or servicing an appliance. <A> Some other answers have very clearly, with nice diagrams, explained <S> the <S> what but not really the why . <S> A typical lighting fixture (or other appliance in US 120V design) has 3 connections: <S> Hot Neutral Ground <S> The important thing is that ground and neutral are bonded in the main panel. <S> That means that, if everything is wired correctly, you could stick a wet finger from one hand on neutral and a wet finger from the other hand on ground and have no problems whatsoever. <S> Of course, this is highly NOT RECOMMENDED , but the point is that the safety design allows for it. <S> If hot is switched <S> then at the device hot is "nothing" and neutral and ground <S> are "the same", so shorting everything together (with your hand or a screwdriver or whatever) will have no effect. <S> If only neutral is switched then at the device neutral is "nothing" but hot and ground are 120V apart. <S> Meaning that if you short everything together with a screwdriver then you will get sparks. <S> And if you short everything together with your hand then you will get something in the range of: Tingle - bad but no harm <S> Ouch - pull hand away, little harm Yikes - pull hand away, fall off ladder, sprain or break something Aghh!!!! <S> - pull hand away, fall off ladder, major injury <S> #() <S> $@)$#A - can't pull hand away.... <S> So switching hot instead of neutral is a really important thing . <S> All that being said, the safest thing for anything more than just "change a light bulb" is always to flip the breaker or remove the fuse so that you not only are sure to have hot "off" but also avoid someone coming in to the room where you are working and saying "oh it seems dark, let me turn on the light so you can see what you are doing", resulting in one of the items listed above. <S> In fact, there are additional requirements that for hardwired loads in certain circumstances, there has to be a way to lock out the breaker so that if someone is working in one location and flips the breaker in a different room that controls the circuit, nobody can accidentally reset the breaker. <S> But such extremes are not normally needed for "change a light bulb on a circuit with a switch in sight". <A> I replaced a doorbell button in Brazil and still nothing worked. <S> I tested then grabbed both sides of the wire and felt no shock, so figured the wiring was dead. <S> An engineer hooked a continuity tester to the bell side and showed the switch was working but the dingdong was broken. <S> Replaced the dingdong and now it works. <S> I had never seen a switch on the neutral leg. <S> I'm not recommending my jaded methods and recommend equipment testing both ends (like I didn't) before jumping to conclusions.
I confirm it is a switch on the neutral leg of a circuit and not the 110 positive or negative alongside it.
How to automatically turn off a Fan after a fixed amount of time? I have an exhaust fan in my bathroom (used for removing the steam generated by a hot bath). Currently, it can be turned on and off by a regular switch. My goal : Exhaust fan should automatically turn-off 5 minutes after it is turned on. <Q> Replace the existing switch with a UL-rated timer switch. <S> Anything else will run the risk of invalidating your fire insurance. <A> Such a timer can be purchased. <S> The fan is switched by a small triac and the timing is done by a CMOS gate. <S> Its supply voltage (12V) is from mains voltage through a capacitor and a Zener. <S> (Made in Italy) <A> The requirement will be readily met by an off-the-shelf 'Toilet Exhaust Fan Timer'. <S> Nonetheless, the following schematic, using a 555 monostable, a transistor and an electromagnetic relay, is presented for academics' sake. <S> The circuit is an adaptation of this power off delay circuit published in Seekic.com. <S> http://www.seekic.com/circuit_diagram/Control_Circuit/Power_OFF_Delay_Circuits.html <S> It's an example of a true off-delay timer. <S> After the switch is turned on the output would be energized. <S> Subsequent turning-off of the switch would signal the commencement of the delay time, at the end of which the output would be de-energized. <S> The values of 'R' and 'C' would decide the off-delay time.
The switch starts the fan (AC) and runs for a few minutes after switching off.
A "Voltage Backdrive" on DC-DC Converters? Below is a circuit I'm making. A 24 VDC PSU (VCC) goes through this switching regulator and outputs 5V to power the load. However, the load can also be powered directly by the USB 5V (USBVCC). Now if the USB is connected but the 24 VDC PSU isn't, I'm getting a ~3.3V reading on the input line of the regulator. Is there a specific name for this? I've been calling this a "voltage back-drive" for now. Also, is this ok for the regulator or will it be damaging in the long run? simulate this circuit – Schematic created using CircuitLab <Q> It's a module, and it doesn't specify that situation, <S> so you don't know if it'll be damaged or not. <S> If it were me, and I were determined to use a module there, I'd start by shopping around for one that does specify that sort of a back-drive situation. <S> If my back were up against the wall <S> and I just had to ship product with that module, and <S> I couldn't make changes, I'd measure the current flowing from the +5V line into the regulator -- <S> if it's less than a mA, I'd reluctantly say the product is OK to ship -- then I'd go home and make sure my resume is current. <A> The switching regulator is a buck and depending on the internals, there is a high chance this is due to the body diode of the switching FET simulate this circuit – <S> Schematic created using CircuitLab <A> "reverse leakage" might be the normal term. <S> It's probably in the microamps and 10K or 100K from IN to GND will probably just about eliminate it. <S> Worth trying as an experiment to measure the leakage current : I doubt it could cause any damage whatsoever. <A> You could add schottky diodes to isolate the two power supplies and prevent any reverse current being fed into them (which often is dangerous). <S> In your design, if only one power source will be on at a time, then the attached schematic will work fine. <S> Just make sure that the current rating and power dissipation of the schottky diodes exceeds your required supply current. <S> P.S - there could be a voltage drop around 0.4v for schottky diodes. <S> So the Rload may see only 4.6V input. <S> This usually isn't a problem as most 5 v sources like usb actually provide 5.1 volt, and after the diode drop it will be 4.7V which is mostly okay for a load which expects 5v. <S> A simple solution is to use a higher current rated schottky diode which will drop less voltage at currents lower than its rated max capacity, but high current schottky diodes can have a higher reverse leakage current (sometimes more than 20mA) which you need to keep in mind. <S> read the datasheet carefully.
You've got reverse current flowing in the regulator, probably through protection diodes in one or more of its chips. Ideally, if you use that module, you'd put a switch between that regulator and the rest of the circuit that cuts off the output of the regulator when the 24V supply drops below 8V, or when USB power is applied.
Substitute for solder wire and flux So I am trying to get started soldering, but I was wondering if there was any common household component that I could somehow take out the soldering wire or flux. Although any alternatives will be helpful. <Q> For normal types of electronics work, not really. <S> Solder is an alloy that melts at a low enough temperature that it doesn’t damage components when it’s applied, and it adheres well to copper and brass (hence its use in plumbing.) <S> If you were thinking about an object with lead to be recycled for solder, don’t. <S> For one thing, pure lead melts at too high a temperature. <S> Solder is a tin-lead alloy or tin-silver-copper alloy for lead-free. <S> Same story for silver: <S> melting point for the unalloyed metal is too high for soldering. <S> Silver can be used for flame brazing though. <S> Why bother, anyway? <S> Lead-free solder is widely available (it’s mandatory for plumbing), so working with it poses no health risk other than the flux fumes. <S> Even leaded solder is fairly safe, just wash your hands afterward. <S> As far as flux, rosin vaporizes when it’s heated and it’s not so great to breathe, use ventilation to draw it away. <S> To answer your second question, most mild acids can be used for flux, but that doesn’t make them any better than rosin (in fact they're probably more harsh.) <S> For example, when I did Tiffany-style stained glass I often used oxalic acid for flux, that wasn’t so great to breathe either. <S> MORE: different fluxes have different toxicity. <S> Vapor from 'no-clean' fluxes is worse than rosin types. <S> More here: https://www.bhencke.com/blog/2019/3/15/a-hill-to-die-on I should note that the Apollo Guidance Computer was built without solder or flux. <S> Instead, the wires were bonded to components by spot-welding. <S> Not sure why they did that, weight saving possibly, or eliminating a possible toxic contaminant from the spacecraft. <S> More here: http://www.righto.com/2019/08/reliable-after-50-years-apollo-guidance.html <A> Sorry, no. <S> The flux is mostly burned away, or at least changes state, during soldering so it can't be reused. <S> Recovering the solder from scrap boards is in principle possible, but unlikely to be worthwhile unless you want to spend hours and hours on recovering solder for every few minutes spent soldering your actual project. <A> I understand that you might have your reasons for trying to substitute soldering wire, but believe me when I say there is absolutely no way you can do that. <S> At least not practically. <S> Yes, many soldering tutorials will tell you to buy an expensive soldering station with temperature control, metal sponge, normal wet sponge, tip tinner, and a lot of stuff, and I do agree that for beginners that much of investment is really not necessary. <S> Just buy any 25-35watt soldering iron which directly plugs into mains, preferably with a needle or conical tip, if you will solder on small pads. <S> ( Always ensure it has a three prong plug for earth connection for your own safety). <S> And also buy a flux core solder wire. <S> Again, you are not looking for the best of the best, but these two are the bare minimum that you can get away with. <S> It will make your learning process much easier. <S> (also note, do not get plumber's flux as it is dangerous for your soldering tip and it will eventually destroy the tip).
Technically you can solder without external flux if you have a flux core solder wire, but Since you are a beginner, I recommend getting those small packs of white flux which are dirt cheap.
How to clean up DC power from interference really well? (better than RC) I built a case that houses: A battery pack as UPS with 5v and 12v outputs https://www.amazon.com/gp/product/B07H8F5HYJ 2 audio stereo amps (12v power) https://www.amazon.com/gp/product/B07V42HVYW A Raspberry Pi (5v power) with 2 stereo usb soundcards https://www.amazon.com/dp/B01N905VOY Everything is wonderful except for one problem: There is an enormous amount of interference in the speakers. These noises correlate perfectly with the activity of the Raspberry Pi, and when I power the Pi with a separate 5v power supply all noise is gone. So I built an RC filter for the 12v that goes to the 2 amps. I put a huge 4 Ohm resistor ( https://www.amazon.com/gp/product/B008ML0LE4 ) with 6 capacitors of all sorts of values (3 chemical, 3 ceramic) and it is better but still unacceptably loud. Is there a better way to clean up a DC power? And if I feel lazy, is there a little device I can buy that does that extremely well so I don't need to build one more thing from scratch? <Q> Low Pass Filters need three structures a series element (could be inductor, or FerriteBead, or Resistor); the resistor has DC_voltage drop <S> a shunt element (various capacitors, with ZERO ESR and ESL if possible; <S> X2Y.com capacitors have FOUR terminals with internal charge_flow paths that minimize the "inductively" stored energy) <S> a well_controlled GROUND plane (copper sheet) and need WELL SEPARATED return paths (ground connections) to input energy and output energy <S> ; you do not want to share VIAS between input and output Ground wires. <S> Be aware that PCB Vias have about 1 nanoHenry inductance. <S> At 100MHz, each via has 0.63 ohms reactance. <S> And why use a sheet of foil (ground plane) on which to build a successful Low Pass Filter? <S> Because WIRES are about 1 nanoHenry inductance per millimeter of length. <S> Use a plane. <A> The Pi series has little on-board filters in the form of SMD capacitors, so it cannot filter out noise from a power source. <S> But inductors can. <S> Use a 100 uH to 1 mH inductor rated at least 3 amps on the 5 volt input wire to the Pi. <S> Normally this cable is power only, no data lines to muck up. <S> Narrow body can capacitors can be soldered to the board behind the USB-C power port but not as effective as a series inductor on the 5 volt feed. <S> Some car stereos have this problem, and it takes inductors on the head unit and external power amplifiers to make the "buzz" and alternator whine go away. <A> Ergo <S> the Pi is the noise source. <S> Filter the power INPUTS to the Pi <S> and you will also be filtering the noise OUTPUTS to the PSU and thence to the audio. <S> Better still, leave the Pi's supply separate.
Although only the audio noise intrudes directly, RF may be present and may upset the PSU and/or audio circuitry causing secondary distortion, so use a low-pass filter such as an LC or LRC network. Find the +5 volt wire close to the Pi and cut it and splice in the inductor. That is why battery power creates no buzz or whining sounds-it is clean power. Isolating the Pi isolated the noise.
Distortion in CAN signal I have a scope connected to my canH line and ground and noticed there is some distortion on the waveform in my setup. Setup: PCAN-USB device( https://www.peak-system.com/produktcd/Pdf/English/PCAN-USB_UserMan_eng.pdf ) a DB9 breakout box ( https://www.amazon.com/dp/B01C2WDU78 ) 2M of CANcable ( https://www.amazon.com/dp/B078VPWPKL ). Setup details I have spliced the CAN cable to connect the PCAN-USB device via the breakout box. I measure 60 ohms across the canL and canH pins (pins 2 and 7 of the breakout, respectively). The PCAN device has two pins marked as GND (3 and 7). I connected these to the power supply ground...is that OK? The PCAN device itself is connected via USB to my laptop so I wasn't sure where to connect this. Any idea what can cause the distortion ? Do I need to tie the cable shielding to my power supply ground as well? <Q> I've seen something similar before in a setup of mine - it turned out to be a measurement error. <S> Since CAN-Communication is differential you should use a differential probe to measure your system precisely <S> (one probe to CAN-L and the other one to <S> CAN-H)By using a single-ended probe your reference changes and seemingly introduces errors in the waveform. <S> I wouldn't worry much about the shielding of the breakout-box; your impedance seems alright and your cable length is not very long. <A> While CAN lines are actively pulled apart for dominant bits, they passively pulled back together by resistors fighting line inductance. <S> For this reason the slope of a trailing edge is always different than the one of the leading edge. <S> The rest is most likely the measurement noise as @BobT <S> pointed out. <A> Your signal doesn't look distorted, and is typical of what you might expect with an ad-hoc connection of an oscilloscope probe to a digital signal. <S> You can probably improve on the noise with a better earth connection, <S> if your scope has a second BNC type input then solidly ground that to system ground using short thick cable (braid is good), Also try to minimise the area of the loop that is formed between the probe tip and the earth wire on the probe. <A> Just viewed some old messurements I made with CAN... looks normal to me in first place. <S> some little overshot is not a problem as the sampling point of can is variable (normaly) and in the middle or back section of a bit. <S> Can you make a new (better) <S> osciloscope shot with the signal scaled to full range and post the aquisition setup? <S> like bandwidth of the scope/probe, sampling rate, etc... <S> your display looks familar to me like the old tektronics desktop scopes...
I believe the main point missing from other answers is that what you call a "distortion" is perfectly normal.
Can power outlet be taken as a current source? Consider a situation where I have a power outlet and I am completely unaware of the internal circuits and the fact that the electricity comes from an ac voltage source supplied by some company. I just want to know whether I can take the power outlet as a current source for my device rather than an ac voltage source. In short, what is the property of the power outlet as a black box? I am taking a course in electronics and the difference between a current source and a voltage source is unclear to me. <Q> Both 'current source' and 'voltage source' as presented in your course in electronics are idealisations . <S> They are theoretical entities we never meet in practice. <S> But they are often good approximations to what we do meet, within a certain range. <S> The difference between them is the output impedance. <S> A voltage source has ideally a zero output impedance. <S> In practice, any source with a small output impedance is well approximated by a voltage source. <S> Its output current can vary from zero to a large output, while its voltage changes by only a small fraction. <S> A current source has an ideally infinite output impedance. <S> The voltage will vary from zero to a large value, while its current changes little. <S> The power outlet on your wall is best approximated as a voltage source, for most of the things you want to do with it, like connect lighting, heating, motor loads to it. <S> Its output impedance is very low. <S> Within the range of current that it is intended to supply, the voltage drop is small. <A> ... <S> and the fact that the electricity comes from an AC voltage source supplied by some company. <S> You have answered your own question with a "No". <S> The network operators do their best to maintain supply voltage as a constant. <S> Current is limited by source resistance and circuit breakers and fuses. <S> In short, what is the property of the power outlet as a black box? <S> It can be idealised as a voltage source with series impedance. <A> The rest of the electric circuit wouldn't see any difference. <S> Let's assume your 230 VAC outlet could output 200 A short circuit current before the wires melt if there were no tripping breakers. <S> The series impedance = <S> 230/200 Ohm = <S> 1,15 <S> Ohm. <S> The equivalent non-ideal current source would be 200A ideal current source with 1,15 impedance in parallel. <S> Everything connected to that equivalent outlet would see no difference. <S> The circuit theoretically equivalent behaviour doesn't mean that producing the current source based 230 VAC outlet needs equivalent construction effort. <S> We do not have practical electricity production methods which tend to produce certain current and high currents would cause high losses in practical wires. <S> But we still tried to construct 230 VAC outlet. <S> What if the whole electricity system including the production, distribution and construction of electric devices were based on constant current (assuming a practical constant current generator exists)? <S> There should be overvoltage breakers which short the circuit if a fault somewhere breaks a wire. <S> New electric devices would be put in series with the already connected ones. <S> Nothing unimaginable there. <S> Unfortunately I have grown up with the constant voltage system. <S> I have no collection to pick principles from to create common device functionalities that people expect. <S> I do not know if electronic components could be created with the constant current idea? <S> The semiconductor theory starts with electronvolts. <S> I haven't checked if someone in our sister site https://worldbuilding.stackexchange.com has an idea. <S> I guess the continuous energy loss in practical conductive materials would trash the whole idea as well in component-, device-, system- and infrastructure levels. <S> But low cost superconductors would help substantially.
Electric circuit theory says that a voltage source which has some serial impedance as a non-ideality can be substituted by an equivalent current source which has the same impedance in parallel.
Resistance effects on LED when connected to battery I have this doubt whether to go with theoretical method or practical. Lets say I'm using a 3.7V battery 350mAh to light up a LED which has forward voltage of 3.3V (which means LED lights up if 3.5V is provided) and forward current of 30mA. So it lasts 350mAh/30mA = 5.83 hours. The remaining 0.2 volts is reduced using a resistor. So resistor required for LED would be, (Battery voltage - LED voltage)/(Battery current) = (3.5 - 3.3)/(30mA) = 6.66 ohms My question is, even though after connecting the resistor to the LED, the intensity of the LED is more than expected. So a higher resistance is preferred here to reduce the intensity of the LED. Suppose say at 50ohm , I have matched my required intensity of light. But if I put a 50 ohm resistance over there, voltage at the LED reduces to a value where it is less than the forward voltage (3.5v, that is required). So there is a chance LED doesnt light up. Is this the case or is there any solution for this? A brief explaination would be very useful, since these minute details are much important everywhere <Q> Why do you think it needs 3.5V? <S> The forward voltage is 3.3. <S> If you use a 50ohm resistor, the current through the LED is (with full battery): <S> (3.7-3.3)/50 = 8mA <S> That is all you need. <S> The LED should light up fine with 8mA. <S> That is the thing you need to be looking at, the current through the LED. <S> LEDs don't follow Ohms Law <S> so don't worry yourself with voltage drops etc, as a beginner (which it sounds like you are) just worry about forward voltage and current for now. <A> We approximate that the voltage across the LED is always 3.3V no matter what the current is. <S> If the LED is on, its voltage is 3.3V. End of story. <S> * <S> The resistor voltage must be 0.2V because the voltage has to add up (Kirchhoff's Voltage Law). <S> But the current will change depending on the resistance. <S> You also forgot that the battery voltage changes depending on how charged it is. <S> When the battery voltage isn't much higher than the LED voltage, this causes a big change in the current. <S> This is because the resistor has to compensate for the voltage change - if the battery goes from 3.7V to 3.9V, the resistor has twice as much voltage across it, which means the current is twice as much. <S> * <S> In reality , the voltage across the LED does change depending on the current, but it changes a lot less than the voltage across the resistor does. <S> We pretend it's always the same, because it makes the math much easier, but we must remember this is approximate! <A> There is no one correct resistor that will work for all supply voltages. <S> This is especially true when your supply is a cell where the voltage drops as the cell discharges. <S> A fully charged LiIon cell gives about 4.2V. <S> By the time the cell is flat, it's as low as 3.0V. To a rough approximation, LEDs have a constant voltage drop over a wide range of currents. <S> An LED will light at currents considerably below their maximum. <S> So an LED rated for 30mA will still glow at 3mA, and will even glow dimly at 0.3mA. <S> If we calculate the correct resistance for a 4.2V cell to deliver 30mA to a 3.3V LED, we get (4.2 - 3.3) / 0.03 <S> = 30 ohms . <S> But if the battery drops to 3.7V, the current now becomes (3.7 - 3.3) / 30 <S> = 3.6mA . <S> The LED will still glow, but will be a lot less bright. <S> If you take apart an LED torch, you will usually find a little circuit board inside, including a microchip and a number of other components. <S> The only way you are going to get a constant LED brightness across a wide range of cell voltages is to use a boost/buck converter feeding a constant current power supply. <S> That's a lot more than just a resistor. <S> The design is a bit easier if your battery voltage is always lower than the LED voltage, or always higher. <S> Most people will use the reference design in the microchip's data sheet.
When the battery voltage is much higher than the LED voltage, the change is relatively small.
What are 13 oz copper PCBs used for? Reference https://www.pcbway.com/orderonline.aspx . This is from a Chinese PCB fab. You can see that they offer copper traces up to 13 oz. That seems thick, and according to my KiCad calculator, it's 0.45 mm thickness of copper carrying 23 A/mm width (25 deg. rise) . I would have thought that with so much side material and a minimum 8 mil width, the etchant would simply undercut the tracks. That's a maximum ratio of \$1:2\frac{1}{4}\$ width to height. What are such thick PCBs possibly for, and what would you mount on them? And would you have several layers? <Q> The super thick copper on PCBs is to handle large currents. <S> At high currents it is important to pay attention to voltage drop and temperature rise in your traces. <S> The thicker the copper, the better, because more cross-sectional area means less resistance. <S> Less resistance means less voltage drop and less heat (therefore less power loss as well). <S> According to Epec <S> (a PCB manufacturer) <S> they use a combination of etching and plating to achieve extreme thicknesses with accuracy (allowing tighter tolerances). <S> Here are some example pictures of extreme copper on PCBs: <S> source: epectec.com <S> source: hackaday.com <A> Standard 1 ounce/square_foot foil has Rthermal of 70 <S> ° C per watt per SQUARE . <S> In that thickness, with a trace 0.01" by 0.3", which has 0.3/0.01 = <S> 30 squares, the R_thermal is <S> R_thermal = <S> 70 <S> * 30 == <S> 2,100 <S> ° C per watt, <S> end_to_end <S> Whereas a square Ground Plane or VDD plane would have 70 <S> ° C per watt from edge_to edge . <S> Now for the THICK metal: <S> With 13 ounce (per square foot) foil, that same trace 0.01" wide by 0.3" long, has 2,100/13 or (70/13) <S> * 30 = 5.3 <S> * 30 = 160 degree per watt end_to_end. <S> And a thick <S> (square)plane has 70/13 = 5.3 ° per watt, measured edge_to_edge. <S> One of the great things about PCB design is the use of overlapping layers of foil, tho separated by FR-4, to move heat. <S> From memory (modeled decades ago), an overlap of 2cm between two layers of THIN foil, will easily move heat between layers. <S> Even tho the FR-4 has about 200X <S> the R_thermal. <S> Thus if you need to remove heat, keep all the (non_plane) layers somewhat filled with metal <S> so the heat can easily move across layers and reach the heat removal paths (in satellite PCBs <S> , we had to plan how to get heat to the metal mounting posts or card_guides) <A> If you imagine that 2oz Cu planes dissipate 1W/sq, imagine how much more this does to a heatsink. <S> The etchback shoulder is equal to the thickness without agitation and less with proper controls. <S> Can you think of any LED lamps that need this? <A> This is a " SunFire X4600 M2 Power Distribution Board" and the four connectors are for four power supplies - each of which supplies 70A, for a total of 280A . <S> Alongside the 70A supply, there are a number of other signals on the same connector for controlling and monitoring the power supplies. <S> Obviously, when the traces are so thick there are alternative options like bus bars and wires - but using a PCB lets you benefit from cheap and readily available automated PCB assembly, and you can route control and power side by side. <S> I wouldn't be surprised if you found similar PCBs in things like electric vehicle motor controllers and fast chargers.
Along with ability to handle higher currents, thick copper has much lower thermal resistance per square of foil.
Finding replacements for these "big grey" resistors in a circuit I have a resistor that I need to replace that looks like this (4 color band resistor that is significantly bigger than the others) : If I can read the colours correctly (brown / black / gold / gold) this should be a 1 ohm resistor, but it is considerably bigger than the normal resistors. Is this due to it being a higher wattage ? Can one somehow derive the wattage by looking at the size of this resistor ? Does the fact that it is grey also mean anything ? <Q> To echo other users, yes it's a 1 ohm resistor to 5% tolerance. <S> The base colour means nothing, though an experienced eye might be able to narrow down the manufacturer. <S> Wattage will depend on age and technology. <S> As time went by they got smaller and ran hotter. <S> I'd disagree with another answer as it may well be too old for that size to be 5 W rated; my guess would be somewhere between 0.5 W and 2 W, but it is just a guess. <S> But it probably doesn't matter; if you replace it with a modern one of similar size, the wattage should be at least as high. <A> Yes. <S> Just a 2 watt power resistor. <S> They are widely available. <S> The grey colour does not mean anything special. <A> That looks like a power resistor. <S> Size/wattage depends on technology and manufacturer; I have a few metal-film ones lying around from Panasonic that look similar, they are 12mm long for 2W, 15 mm for 3W, and 24mm for 5W. YMMV.
I don't think the colour is an indication of anything.
Why do voltage regulator ICs have big ripple rejection ratio? The LM7805 voltage regulator has a ripple rejection of 73bB (minimum is 62dB.) My textbook says that this gives a tremendous advantage because we do not have to use any bulkyLC filters in the power supply to minimize the ripple. I don't understand how this IC can reduce the ripple that much. A sample of the internal circuitry of LM7805: I don't see any block that will act like a filter capacitor for the input voltage to reduce that ripple that much. Why do voltage regulator ICs have such a big ripple rejection ratio? <Q> Let's look at the datasheet to see more details about this ripple rejection: <S> Note how it says "f = 120 Hz" <S> so that means this ripple rejection is measured at 120 Hz which is quite a low frequency. <S> The circuit inside the LM7805 (and many other voltage regulators) comes down to this: Source A stable reference voltage is generated with zenerdiode <S> \$V_Z\$ <S> (in the LM7805 a " bandgap circuit " is used, it has the same function). <S> This reference voltage circuit needs to have a very good ripple rejection as well, any ripple on the reference voltage will appear at the output as well. <S> In practice, this is usually not an issue as reference voltage circuits with enough ripple rejection can be made. <S> An opamp (used as an error amplifier) compares the output voltage (actually a divided-down version of the output voltage, <S> \$R_1\$ and <S> \$R_2\$ <S> are a voltage divider). <S> The output of the opamp controls a transistor, Q2. <S> If the opamp is fast enough then it can control the transistor Q2 so well that it will be fast enough to respond to the voltage changes (ripple!) at \$V_i\$ . <S> It will respond in such a way that at \$V_o\$ <S> there's as little left of the ripple as the loop can manage. <S> If you would do the proper loop analysis you would find that the ripple rejection depends on the excess loop gain inside the loop. <S> For more information, read this . <S> So with an opamp that is both fast enough and that has a high gain (for 120 Hz, that is not an issue, the gain will be quite high) <S> we can achieve quite high ripple rejection. <S> At (much) higher frequencies that 120 Hz, like for example at 1 MHz, the opamp will not be fast enough and will have less gain meaning less ripple rejection. <S> Fortunately we can then use capacitors to help us out. <S> For 1 MHz these capacitors can have a relatively small value (a few uF) so size and cost is less of an issue. <S> Also these capacitors are often needed to guarantee stability of the voltage regulator, without the input and output capacitors <S> the voltage regulator might oscillate and generate a new ripple! <A> The regulator has no energy storage (to speak of) <S> internally, what it does is to meter the power from the external storage capacitor to the output. <S> So the ripple voltage "troughs" must never get too close to the dropout voltage of the regulator under worst-case conditions. <S> Unlike an ideal LC filter, this means that power is burned up in the regulator whenever the voltage is higher than the minimum. <S> Imagine the city gives you water at 60-70 PSI, but you need 50 PSI +/- <S> 1 <S> PSI. <S> You can always control your valve to get 50 PSI provided the inlet water pressure is enough above 50 PSI to take up the losses in your valve and pipes. <A> Because filters with capcitors buffer the peaks and dips to smooth the input voltage and create the mean voltage. <S> This need big energy storage. <S> Regulators just cut of the ripple part and output a smooth voltage, with a value below the lowest value of the dips of the input voltage. <A> That is what regulators do, ideally no matter what the input voltage is (as long as it is withing limits), it will output a fixed output voltage. <S> They generate an internal reference voltage that does not change much even if input voltage changes, and then there is a feedback mechanism that compares the output voltage with the reference <S> and it keeps the output voltage quite stable. <A> from a conrol loop perspective it's a valid assumtion that most if not all voltage regulators use some sort of PI(D) controller. <S> Also there is no need for our regulator to be able to follow changes of the reference value, as the reference is const. <S> So what the manufactures will do to improve design is to tweak the PI(D) controller for improved error rejection (this normaly will also result in a poorer ability to follow changes of the reference value). <S> There are known methods how to do that. <S> But as you can see here: https://en.wikipedia.org/wiki/PID_controller#Response_to_disturbances even simple PI(D) <S> 's involve a lot of knowlede... too much to go deeper here
In essence, the loop compensates for the ripple by controlling Q2 such that the ripple is rejected .
Cheap Reliable way to convert 3.3V to 5V with a 800kHz signal I'm looking for a cheap reliable way (production) to convert an stm32's 3.3V output to the 5V input of a WS2812. I looked at a MOSFET solution with a BSS138 but internet research shows that it is not reliable for a 800kHz signal. I looked at the 74 family of chips but am somewhat confused at the naming scheme LCV, HC, AHCT, HCT, etc. I found a chip called the 74AHCT1G08GW,125 which is a single AND gate. According to the datasheet, 2 volts is the minimum input to registered as a HIGH. If I connect both AND inputs to the 3.3V signal, I should get Vcc=5V at the output. At a cost of less than 3 cents, this would seem to work for my application. Am I missing something here? Is there an easier or cheaper way I am missing? Edit:I have 2 power supply voltages 3.3V for the stm and 5V for the LED's. I assume powering the 74' chip with 5V will provide a 5V output. <Q> You don't state explicitly the power source for the 125. <S> If it is 5 V, then yes, that will work. <S> To remove the (very small) input ambiguity, drive only one input. <S> tie the other input to 5 V. <A> the WS chip has a standard CMOS Schmitt trigger input with hysteresis from 0.35 to 0.7 of Vdd=5V or a range of 1.75V. even attenuating the 0 to 3.3V swing to 2.7V swing with a passive level shifter ought to work for pennies and keep drive impedance low. <S> Since the AC coupled Schmitt trigger with bias to Vdd/2 is still a latch, you can make thus work at some defined minimum bit rate. <S> series R = 100 series <S> C= 0.01uF, R=pu+pd=1k for 10us edge decay pulses. <S> But how cheap and easy do you want to be? <S> ;) <A> One thing, it would nice if you could link the datasheets for the parts you used, you will get answers way quicker and more accurate! <S> Anyways, you don't mention what supply you have, but if you can have a 5V supply, you can use 1 BJT transistor and 2 resistors if the goal is to control jus the power flow through your LED (assuming that's what it is!) <S> , sth like this: you need to calculate R1 so that when the 3.3V from your stm32 MCU is applied, the voltage across the base and emitter of your bjt is at the rated value for saturation (it is mentioned on all bjt datasheets). <S> 800KHz would be a O.K. BJTs usually can deal with bandwidths of frequencies in MHz. <S> R2 is your current limiting resistor and you calculate it based on the avergae forward current through your LED <S> (again on the datasheet).If you are making 100's of these (since you mentioned sth about production), I don't think the cost is going to exceed 5 cents. <S> BTW, mosfets can also be used. <S> try finding an N-chan mosfet and calculate how much delay time you would have theoretically (using the parasitic capacitance stated on the datasheets) and make sure you define a reliable design margin (e.g. 10-20%) since your frequency is not that high (relatively speaking of-course). <S> Now, if you want to convert 3.3V to 5V w/o a 5V supply , you definitely need a DC-DC converter. <S> you can step your game up with a feedback loop as well, but if price and time are both on their last drips, this would not be a good option. <S> I don't know how you power up your stm32 (direct usb or mains-operated system), but if its mains operated and you use a 3.3V voltage regulator, just add a 5V regulator in parallel to that and switch it using a transistor as mentioned. <S> Hope <S> this helps you. <S> PS: like I said, if you for instance had attached a schematic, I would have had way more detail and could have helped you better. <A> This may or may not work for you <S> but we successfully drive WS2812 LEDs from both ESP8266 and ESP32 chips using this method. <S> Those chips use a 3.3V rail. <S> Simply add a 3k3 resistor from the pin driving the WS2812 to the 5V rail. <S> This brings that pin above the 3.3V rail that the chip is running from and increases the logic HI level to just enough to register properly in the WS2812. <S> This may or may not work for you <S> but it is a dirt-cheap solution if it does work. <S> Use a scope to verify the logic level voltages - both HI and LO. <S> [Edit] The pullup resistor injects current into the port pin. <S> This raises the pin above the chip's supply rail. <S> However, the current is small (about 0.5 mA) and is not sufficient to raise that supply rail. <S> This won't damage the chip if it doesn't work. <S> As such, it is worth a try. <A> You can use a proper voltage translator chip such as 74LVC1T45GW,125 with two power supplies. <S> Around 5 cents in quantity. <S> The HCT will work, but if the 5V supply ever disappears when the MCU supply is present it will cause excessive current into the input. <S> That can be mitigated with a series resistor, but it's not ideal.
you can either buy IC's, or make your own with an inductor, capacitor and a PWM generator.
What does 32 mean in QFN 32? Term is related to IC chip specification ESP8285 IC QFN32 is a chip. https://robu.in/product/esp8285-ic-qfn32-original/ What does 32 mean in QFN 32?If I have a part/ footprint having the name as QFN50P500X500X90-33N-D . Will it be different than QFN 32 ? <Q> Lets break the footprint name to its parts: <S> QFN - Quad, flat, no lead. <S> 50P - 0.5mm pitch. <S> 500X500X90 - 5mm by 5mm <S> by 0.9mm <S> 33 - 33 pads, one of them is the bottom pad. <S> N <S> - This usually means nominal footprint. <S> D - Variant, this is a manufacturer specific version of this package. <S> This naming convention is specified in an IPC Standard (I don't remember which one). <A> This is just the amount of pins on the IC. <S> QFN32 will have 32 pins on the IC Looking at the picture in your link: <S> You can see that there are 32 pins, hence the '32' after QFN. <S> You will also notice the large pad in the center. <S> Not all packages have this extra thermal pad, so always check the footprint on an IC before creating one in your preferred PCB design package. <S> This thermal pad will usually have to be created as pin no. <S> 33 <A> QFN32 is a QFN (Quad Flat No Leads) package with 32 pins. <S> See here <A> 32 is the number of perimeter pins. <S> Some parts may have a central ground or thermal pad, radio parts as you link especially. <S> Where that needs to be electrically connected <S> it becomes logically a "pin" too, and if particular PCB software cannot handle pin numbers that are not purely numeric, it would be pin 33. <A> What does 32 mean in QFN 32? <S> It means 32 "pins" or connnection points around the edge. <S> OK, so a QFN package doesn't have pins - it has solder connections. <S> There are 32 of them on the edges of the chip. <S> If I have a part/ footprint having the name as QFN50P500X500X90-33N-D. <S> Will it be different than QFN 32 ? <S> No. <S> Not unless your layout system is being very, very confusing. <S> A QFN50 package has a 5 mm x 10 mm body, while a QFN32 package has a 5 mm x 5 mm body. <S> So labelling a footprint for a QFN32 part with a starting field of "QFN50" would be an appalling way for the footprints to be identified.
32 is the number of pins on the package.
Does this circuit detect frequency or magnetic field? I have built this circuit but the LED lights even when I move it near DC not only AC. Does it detect the frequency or the magnetic field? <Q> With those three BC547 transistors arranged as they are, that circuit will probably do a pretty good imitation of an electrometer. <S> A simple electrometer looks like this: From the above linked web page. <S> It reacts to electric fields. <S> It can "see" batteries that are just standing there doing nothing. <S> They can also detect static charges, like an electrostatically charged wool sweater or blanket - or cat. <S> Being made of bipolar junction transistors (BJT) rather than a junction gate field effect transistor (JFET,) yours probabaly won't be as sensitive as the circuit above made from a JFET. <A> I have built this circuit but the LED lights even when I move it <S> nearDC <S> not only AC <S> It doesn't surprise me - <S> the copper wire spiral and your hand are integral to make this work - if your hand is picking up AC electrical fields <S> then the DC circuit is acting like a ground to the AC and enough AC voltage will appear across the base-emitter of the left transistor to operate it. <S> Does it detect the frequency or the magnetic field? <S> It detects an AC electric field and a higher frequency will be more effective up to a certain point. <A> If you bring this detector near a perfect DC source, but your hand is not being held perfectly steady, you are in effect creating an "AC" voltage. <S> As you move closer & further from the DC electric field, the strength of the field changes, which is basically the same effect as if you were near an actual 'AC' source
Your circuit is reacting to the electric fields, not specifically to AC.
Power output of a transformer with many secondary coils, each coil of turn exactly equal to that of primary? I am not a full fledged electrical engineer, and I couldn't find it on google, may be because I couldn't think of better combination of keywords.My question is, if we have a simple transformer with a primary coil of 500 turns and on the secondary side of transformer, we have 10 different independent coils of 500 turns each of exactly same thickness of wire to that of primary coil; and if we input 100 volts, 20 ampere AC into primary coil, will it produce 100 volts, 20 ampere AC into each secondary coil individually, or the voltage among each individual secondary coil will be (100 x 10)/10 and will the current be (20/10)/10 = 0.2 amps? Another quick question is, will the length of transformer core affect the total magnetic flux, if the transformer core is very long and there's huge distance between single primary and single secondary coil of same turns and thickness, will the induced voltage in secondary be lesser because less flux will reach secondary coil and some flux will be absorbed in the core during travel of long distance? <Q> If all coils have the same number of turns, they will all (theoretically) have the same voltage - 100VAC in on any coil, and all others will output 100 VAC. <S> The total current from all secondary coils will theoretically equal the current in the primary coil. <S> (There will be some losses in the transformer, so the input current will be slighty greater than the total output current.) <S> The currents in the individual secondaries will depend on the loads connected to each secondary winding. <S> One secondary could deliver 10 amps, another 5 amps, five delivering 1 amp each, and the remaining 3 secondaries not delivering any current. <A> However, the current will be split among them. <S> Otherwise you'd have a power gain in a passive device, which violates the physic law of energy conservation. <S> The flux is never "absorbed", it can just deviate from the core, ie. <S> to the air. <S> But yes, you'll have a lower induced voltage on the secondary, as the flux deviates to the air and less reaches the secondary. <A> The voltage on the secondaries will be the same as the voltage on the primary, since the turns ratio is 1:1. <S> But you can't say anything specific about the current. <S> Each secondary will have a current flowing that depends on the load connected to it, and to a first approximation, the primary current will be the sum of the secondary currents. <A> Imagine that when winding your ten secondaries you took the approach of twisting ten lots of insulated wire and creating a single secondary where the ten wires were soldered up at the ends. <S> That is equivalent to winding your secondary with one single thicker wire. <S> Power out has to equal power in and hence, if your "multi-strand" secondary has the same number of turns as the primary, then the output current from this multi-strand winding <S> has to be equal to the input current in the primary. <S> In each of the ten wire strands, the current would be one-tenth of the primary current. <S> I’m neglecting magnetization current in this simplified picture. <S> Magnetization current flows in the primary come what may. <A> That's just a transformer used to isolate heavy loads. <S> The isolation is done by the core. <S> If I sell a UPS to supply a heavy industrial motor or anything like that, we advise that they use a double conversion online UPS with an isolation transformer between the output of the inverter and the actual output of the UPS. <S> It's stops AC feedback causing trouble for the output of the machine. <S> It does step the voltage up a bit.. <S> From 200VAC (output of inverter) to the actual output of the machine which here in SA is 230VAC 50Hz. <S> Maybe that will give you a bit more clarity. <S> Three phase isolation transformers will that, to split the phasing (so it can be used as a single phase supply) to go to various areas of an electrical environment, all the while still having a common neutral. <S> So all three phases just need to use one earth and one neutral. <S> Instead of an earth and neutral for each phase.
From the electromagnetism theory, the voltage will be the same on all 10 secondary windings.
Is there a difference between PCB trace impedance and transmission line characteristic impedance? PCB trace impedance doesn't seem to take into account frequency, I have been considering this to be a characteristic impedance i.e the distributed impedance of the line 'viewed' from a certain point on the line for a given frequency. So is the PCB trace impedance an impedance or a resistance? <Q> Depends how the term "trace impedance" is being used. <S> It may be used to mean the series impedance (primarily resistance) of the trace, which is important at high current. <S> Or it may be synonymous with characteristic impedance. <S> Context may help. <S> If the "impedance" is a fraction of an ohm, or the context is high DC currents, or you're working on a buck converter or motor driver <S> , it means the trace resistance (thicker the trace, the lower the impedance). <S> Nobody thinks about transmission line characteristics in a PSU; you usually want the lowest possible trace resistance - and inductance in switching circuits. <S> If the "impedance" is 50 or 75 ohms or close to these, or the context is an antenna input or an RF filter, then characteristic impedance (in which case the actual trace resistance will appear not as"impedance" but as transmission line "loss".) <S> Now, you haven't given us any of the context, so... <A> A PCB trace is a transmission line. <S> An ideal transmission line has a resistive impedance. <S> A transmission line with loss will have an impedance so close to resistive that few people would treat it as anything but resistive. <S> On a real substrate, say FR4, the impedance of a real PCB trace will vary with frequency due to the dielectric constant and loss of the dielectric varying, and the resistance of the copper varying with frequency. <S> In addition, if the trace is microstrip, then the amount of field in air and in the board will vary with frequency causing speed and impedance variations. <A> So is the PCB trace impedance an impedance or a resistance? <S> It's both (short story)... <S> The difference between a cable and a printed circuit board track is length. <S> Cables can be miles long but a PCB trace is likely to be no longer than a foot. <S> At a foot length (300 mm), a signal frequency having this wavelength is about 1 GHz. <S> However, we say in EE that anything approaching one tenth of a wavelength is starting to be significant hence, for a foot (300 mm) <S> anything around 100 MHz or above is relevant to start thinking about characteristic impedance and, importantly anything seriously higher than 1 MHz is going to have a purely resistive impedance. <S> The general formula for a t-line is this: - $$Z_0 = \sqrt{\dfrac{R <S> + <S> j\omega L}{G <S> + j\omega C}}$$ R is the series loop resistance per metre <S> L is the series loop inductance per metre <S> G is the parallel conductance per metre <S> C is the parallel capacitance per metre <S> As frequency rises beyond several hundred kHz, the \$j\omega\$ terms dominate and we get this: - $$Z_0 = \sqrt{\dfrac{j\omega L}{j\omega C}} = <S> \sqrt{\dfrac{L}{C}}$$ <S> That formula is not related to frequency and it is also resistive. <S> Finishing off; any PCB t-line calculation won't bother thinking of anything other than resistive terms because it just won't be physically long enough to be a practical consideration. <A> PCB traces have resistance, and they have impedance. <S> That is, a trace can act as a resistor, an inductor, and a capacitor. <S> They are all three at once. <S> Resistance is independent of the frequency of the signals. <S> The inductance and the capacitance of the trace are also (largely) independent of the frequency. <S> Resistance depends on the length and the cross section area of the trace. <S> Inductance depends on the length of the trace an how it is routed (curlicues make higher impedances.) <S> Capacitance depends on the length and the surface area of the trace, as well as the area of adjacent conductors - a wide trace over a ground plane has more capacitance to ground than a narrow trace crossing a narrow ground trace at right angles. <S> For a given trace, resistance, inductance, and capacitance are pretty well fixed and don't greatly change with the frequency of the signal. <S> Impedance, however, is frequency dependent. <S> That is inherent in the definitions of impedance for inductors and capacitors: <S> Capacitor: $$ Z_C = <S> -\frac{j}{2 <S> \pi fC}$$ <S> Inductor: $$ X_L = 2 <S> \pi fL$$ <S> Any time you want to know the impedance of a trace, you must know the frequency of the signal. <S> Transmission lines (strip lines, microstrip lines, and all their other PCB relatives) play the inductance and the capacitance against one another to achieve an impedance that is mostly independent of the frequency of the signal. <S> That's thevsame as the characteristic impedance of a coax cable, except you can design it to an impedance of your liking rather than what the cable manufacturer delivered. <S> If you look into the (simplified) equations used to design striplines, you will see that there are no frequencies involved. <S> This Analog Devices paper on striplines has a lot of examples. <S> There are no frequencies involved, just the dimensions and properties of the materials used. <S> The impedances designed into a PCB will be indepedent of the frequency to the extent that the material properties and the precision of the making allow it. <S> At extremely high frequencies, you do have to use different materials and probably different tooling. <S> The principles remain the same, though. <A> PCB trace impedance doesn't seem to take into account frequency <S> That’s not true at all. <S> What about high speed circuits? <S> Any interface with a differential pair, like PCIe or USB, will consider frequency for designing a trace. <S> I’m not a believer of “pure resistance”. <S> As long as electromagnetism exists, there will always be impedance, even if the imaginary (e.g. inductance/capacitance) part of it is extremely tiny. <S> I think what you’re looking for is a microstrip, which is a type of transmission line for PCB board. <S> They contain a trace, ground plane, and a dielectric substrate. <S> Altium has their own design guides specifically for traces and frequency.
The impedance of a trace is therefore dependent on the frequency of the signal traveling through it.
Can an electrostatic motor produce constant torque at varied speed? The idea of this question came from a DC motor that produces less torque by greater speed. Can an electrostatic motor produce constant torque at varied speed? How can I make a mathematic model of this type of motor (for comparison with a DC motor?) For question #2 as far as I know \$ F = \frac{k Q_1Q_2}{r^2} \$ and the current will flow while charging/discharging the rotor. Note: Referece motor for my question youtube video. THis is picture capture from video. <Q> There are many types and configurations of electromagnetic motors. <S> Many of those configurations can be operated in a way that the motor has the capacity to produce constant torque with variable speed over a substantial speed range. <S> Electrostatic motors are generally duals of various types of electromagnetic motors. <S> As a dual, various aspects of an electrostatic motor are reversed with respect to their electromagnetic duals. <S> In electromagnetic motors, speed is generally proportional to armature voltage and torque is generally proportional to armature current. <S> In electrostatic motors, armature current is proportional to speed and armature voltage is proportional to torque. <S> Electrostatic motors have some capability for constant torque with variable speed. <S> There are technical papers describing current and recent electrostatic motor research. <S> Some of them may be openly available. <S> I will see what I can find. <S> I believe these are open source: Aditya N. Ghule and Daniel C. Ludois, <S> High Torque Density Macro-scale Electrostatic Rotating Machines: Electrical Design, Generalized d−q Framework, and Demonstration IEEE <S> TRANSACTIONS ON INDUSTRY APPLICATIONS, VOL. <S> 55, NO. 2, MARCH/APRIL 2019 <S> Aditya N. Ghule, Peter Killeen, and Daniel C. Ludois, Synchronous Electrostatic Machine Torque Modulation via Complex Vector Voltage Control With a Current Source Inverter IEEE JOURNAL OF EMERGING AND <S> SELECTED TOPICS IN POWER ELECTRONICS, VOL. <S> 8, NO. 2, JUNE 2020 <A> SEMs have declining torque with increasing RPM just like magnetic ones but can be only 5% of the stall power at the same torque at 0 RPM. <S> But what they consider “medium voltage” 5kV for electrostatics we consider Ultra High conductors for semiconductors , so speed control or constant torque using transistors in <S> thus range are worth a hundred bucks because of the overkill on current ratings. <S> So your torque is not constant with RPM. <S> I wonder if the e in SEM’s are excited or electrostatic. <S> (Lol) <S> but 5kV would be exciting with partial discharge sparks flying thru the dust. <S> It could kill a thousand mosquitoes per second. <S> Ref <S> ixys/IXTL2N470/ <A> The inversely proportional relationship between torque and speed is universal and can never change. <S> Torque = <S> Power/Speed (T=P/ω) <S> At constant power, there would be increasing torque with decreasing speed and vice versa. <S> A VFD controlled induction motor is one such example. ' <S> V/f' would remain constant up to the rated speed after which 'V' would remain constant at the rated voltage and 'f' would continue to increase. <S> Thus there would be a linear increase in power, with the torque remaining constant up to the rated speed, after which the power would remain constant and the torque would drop. <S> The behaviour would be the same with a DC motor having 'armature control' up to the rated speed and 'field weakening' after that.
In any motor, torque would remain constant as the speed is reduced, should the power also be simultaneously reduced, and vice versa.
Would a person receive a shock/risk death if they completed two ends of a neutral wire? I know this seems like a silly question but I'm trying to make sure I understand the neutral wire. So I know if someone touched a neutral wire (assuming everything is wired 100% correctly) carrying current, they would not receive a shock because they are at the same potential of the earth which the neutral is hooked up to. However, it is carrying current, which is what causes a shock/kills a person. So in a perfectly wired scenario, say a person grabs hold of the neutral wire exiting an appliance and also the neutral completing the circuit to the end of the source. (Here is a picture of scenario, all values are completely arbitrary. The 1k resistor represents the appliance while the 1 Ohm resistor represents the person) Even though this person remains at a single a potential, the current has no choice but to travel through them right? And since current is what kills people, this scenario could be deadly given enough amperage, correct? <Q> When you cut the neutral the side connected to the load is no longer neutralised and is connected to live through the load resistance/ impedance. <S> That means that when you grab both wires the mains circuit will be completed through your body. <S> A potential divider will be formed by the load and your body and due to the high resistance of your body most of the voltage drop will be across you rather than the load (except for very low current devices) simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> Breaking the neutral causes one side of the break to go live. <S> The current is limited by the load (the lamp in this case). <S> Closing the circuit with your body would, most likely, not end well. <A> If you get between the appliance and the return circuit that will be bad. <S> If you come in contact with a neutral that is grounded elsewhere and is carrying current in a complete circuit that is less bad, most of the current will continue to flow in the wire as it presents a much lower resistance than than you do. <S> If something was to break the neutral you would find yourself in the first situation. <S> There are situations where neutral is not grounded, these include SWER supplies and UK building site power, in those situations touching "neutral" would likely result in electric shock. <A> I think your circuit diagram is wrong. <S> If you just "touch" a wire, you simply have a path from the touch point through your body to earth ground (or whatever other potential you are connected to). <S> In most cases, neutral is also (more or less) at the same potential than earth ground, so the potential difference across your body is zero and no current flows through your body. <S> What you actually have drawn would require you to cut the neutral wire and grab both ends of the split. <S> That is indeed a bad idea since now one hand is on neutral potential and the other one is connected to the voltage source through the load. <S> If the load impedance is relatively low, most of the voltage drops across your hands & arms and significant current will flow through your body. <S> In other words: <S> DON'T DO THAT. <S> HOWEVER, it's never guaranteed that the neutral is at or close to ground potential, so it is NOT SAFE to touch a wire without verifying with a proper measurement device that's indeed safe to do.
So in general if the neutral wire is at the same potential as earth ground, you can touch it without any ill consequences.
How to connect two current sensors together? I have two ACS712 current sensor modules, sensing different things, connected to a PIC 12F683. I'd like the PIC to do something if either of them senses a current. Individually, the sensors work fine and the PIC responds correctly. However, if I connect two of them to the same pin on the PIC, both stop working. Scoping the combined output, it looks almost flat, almost as if they cancel each other out?? Is there a simple way to solve this and have them work together on the same PIC pin? (Yes, I could put them on different pins, but that would involve using a bigger PIC as I'm already using all the I/O pins on this one, so I'm trying to figure out if there's an easier way to make this work.) <Q> It's not clear how you ever thought this would work. <S> You haven't provided a link to the module datasheet but if they are analog out then connecting them together would create a problem if they're trying to output different analog voltages. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> A simple diode arrangement can detect the highest input signal. <S> This may be adequate for an analog input but remember that you'll have a voltage drop across the diodes. <S> It might also work if the analog voltages are high enough to exceed the threshold voltage of the GPIO. <A> Current sharing loads with separate sensing combined into one blocks the ability to detect the sharing differential. <S> But if you also want to regulate shared voltage or total current, these must be sensed separately from differential current. <S> Also unless these sources have matched impedances and matched voltage within a certain tolerance it will be unstable and resonate without a 10% preload. <S> If one is a current source e.g. PV or windpower and the other a battery, then you must regulate and sense battery current from any other to regulate CC, CV and cutoff. <S> Start with design variables and specs for every input and output for the system then break it down for each module or component and repeat <S> and then you have a list of design specs to understand what to do next. <A> There is no need to combine their outputs outside the PIC. <S> The routine that does something if either sensor detects current can read the two existing inputs without interfereing witn the present routines.
If the two sensors are already connected to separate pins in the PIC, you just have to combine their outputs in software.
How can you power a device using a relay when the device uses power cables to change its operating mode? I am working on a custom automative install on my car. I have a few lighting fixtures that change colour based on which power +12v wire is being used. For example, each lighting fixture can display a purple light, or a white light. To switch between the colour options, the +12v wire connected to the power source must be changed. The red wire gives me a purple light, and the yellow wire gives me a white light. I want to use a switch panel for individually turning each fixture on and off, but a separate switch for changing the colour of all fixtures as a whole. What is the best way of doing this? If the devices only had one colour option, I could build a simple relay panel for each device into my fuse box, but I do not understand how to achieve something similar to this with devices that use multiple +12v power wires to change their operating modes. Any help is much appreciated. <Q> Here's the schematic, using one SPST On / Off switch per light fixture and a common SPDT switch for light colour selection. <S> It goes without saying that, should relays be used, the switch contacts would be replaced by the relay contacts. <A> simulate this circuit – <S> Schematic created using CircuitLab <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> (Left) <S> The individual strings of LEDs can be independently switched. <S> The resistors are internal to the lights. <S> (Right) Priority switching using changeover switches. <S> You only need relays if the LED current is higher than the switch rating or to avoid running high current cables over a long distance. <A> Since you are using relays, I'm assuming the loads are too big to power through a switch directly? <S> That's going to need a few extra parts, and running ground wires back to the switch panel: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> @Jasen's answer has that diagram.
Use a dual-throw switch to select the colour, and dual-pole switchtes to turn each accessory on or off. If you can use the typical 10 to 20 amp switches, only the main relay should be needed, maybe (again depends on the total current of all your devices.)
How to find the nodal voltage when there is a voltage source across two nodes? How to find the nodal voltage when there is a 40V across Node 1 & 3? V1= 22.4 VV2= 65.6VV3= 62.4 V My Nodal Analysis Node 1 (SuperNode): -V1/4 - V1-V2/3 + V2-V3/2 - V3/6 = 0 Node 2 V1-V2/3 + 16 - V2-V3/2 = 0 Constraint Equation V1-V3 = 40 Any help is greatly appreciated! <Q> I'd just rearrange the diagram and use source-splitting techniques: - From left to right <S> , it's the same circuit but, breaking it down step by step is easier to analyse. <S> Each step saves maths and is a pictorial record of what you did thus, making it easier to parse. <S> $$\boxed{\text{So, why do I prefer this method?}}$$ <S> Well, my turn to solution is simulation (because I don't do exams any more) but, source-splitting is my 2nd choice because it's clearer at each stage and, teaches you how to properly analyse circuits using your brain. <S> It makes you more EE savvy . <S> So, from the diagram on the above right, I'm going to calculate the voltage between node 1 and node 2. <S> Note that the earth/ground point originally in the question's circuit is irrelevant here. <S> The 40 volt source in series with the 2 ohm resistor is equivalent to a current source of 20 amps in parallel with 2 ohms. <S> That current source and 2 ohm resistor are now in parallel with a 3 ohm resistor and a 16 amp current source: - <S> Hence, the voltage between node 1 and node 2 is $$(20\text{ amps}+16\text{ amps})\cdot\dfrac{3\text{ ohms}\times 2\text{ ohms}}{3\text{ ohms}+2\text{ ohms}} = <S> 43.2 \text{ volts}$$ <S> And, if you looked at the answer given (V1= 22.4 V V2= 65.6V) that is what you see. <S> Then just add what you know (from one calculation) to your original circuit: <S> - And I'm going to stop here in the expectation that the OP will solve the rest. <A> Thus we are only left with two unknowns nodal voltages \$V_1\$ <S> and \$V_2\$ <S> And the nodal equation for two nodes are: \$V_1\$ <S> Super-node, <S> additional I assume that all current flows out from \$V_1\$ <S> node ( \$V_1\$ is the highest voltage and this is why \$V_1\$ is "always first" in the numerator). <S> $$\frac{V_1}{4\Omega} + \frac{V_1 <S> - V_2}{3\Omega} + \frac{V_1 <S> +40V}{6\Omega}+ <S> \frac{(V_1 +40V) <S> - V_2}{2\Omega} = 0$$ <S> And for the \$V_2\$ node, and again I assume that \$V_2\$ is the highest voltage so, all the current will flow out of the \$V_2\$ node (this is why \$V_2\$ is "always first" in the numerator). <S> $$\frac{V_2 - <S> V_1}{3\Omega}+\frac{V_2 - <S> (V_1 <S> +40)}{2\Omega} - <S> 16A = <S> 0$$ <S> So all you need to do is to solve it: https://www.wolframalpha.com/input/?i=x1%2F4+%2B+%28x1+-+x2%29%2F3+%2B+%28x1%2B40%29%2F6+%2B+%28x1%2B40+-+x2%29%2F2%3D0%2C+%28x2+-+x1%29%2F3+%2B+%28x2+-+%28x1+%2B40%29%29%2F2+-16%3D0 <S> And if you have time try to watch this https://www.youtube.com/watch?v=NA_zlZTDiKU&feature=emb_logo <A> OK , Here is the basic method Move the ground connection to node 1 , and just call the old ground node 4 <S> Set the 40v source to zero volts, as a voltage source, it has zero ohms impedance, so <S> this step basically shorts together nodes 1 and 3 Call nodes 1+3 node 0 <S> (i.e. ground ), you then have a current source with the positive end connected to ground via 3//2ohms and the negative end connected to ground via 4//6ohms <S> , you can then work out currents sources contributions to each resistors voltage, write this down somewhere. <S> Set the voltage source back to 40v , and set current source to zero , (i.e. disconnect it) <S> Now work out the voltages across the 2 and 3 ohm resistors, should be 2/5 and 3/5 of 40v , 16v and 24v ; and the 4 and 6 ohm resistors 4/10ths and 6/10ths of 40 or 24v and 16v , write these down somewhere. <S> Now simply add algebraically the voltages for each resistor from steps 2 and 5 , <S> (the voltage on the 2ohm resistor will be slightly less than 16v and 3 ohm slightly more than 24v) <S> Now subtract the voltage across the 4ohm resistor from all nodes, this will result in node 4 being at 0v , i.e. ground potential, and all the other node voltages will be the wanted voltages. <S> This is not the only method, but shows one way to break the problem down to manageable steps. <S> Another approach would be to work out the thevenin equivalent of the voltage source and resistors ) <S> this will give 2 thevenin voltages and resistance, then apply the current across the thevenin equivalent and work from there. <S> You should really try both ways. <S> You can also convert the current source to its equivalent thevenin voltage source , then paralle both thevenin sources. <S> You will find if you try all three methods, you will find yourself seeing the same numbers in each step. <S> There is even a boring yet very complex way of working it out by writing equations for each resistance . <S> The circuit shown is actually a Wheatstone bridge, more obvious if you rotate it <S> 90 degrees CCW. <S> Getting back to your working , it is common to use subscripts to denote voltages so V1 is then $V_1 <S> $ and the voltage of node 2 wrt node <S> one is $V_1_2$ <A> BobT's answer uses superposition . <S> Normally, I avoid superposition because it is so very difficult to keep current directions straight, and sum them properly. <S> It takes practice to find a way to be consistent with assigning current directions. <S> But in this case, superposition is fairly straightforward... <S> First, isolate the current source by shorting the voltage source. <S> It helps to re-draw the circuit - once you do so, solving currents becomes super-easy. <S> 16 amps gets divided into two parts \$ \frac{2}{5}16 , \frac{3}{5}16\$ : <S> Now open up the current source, and make the voltage source active. <S> Again redraw the circuit, which makes solving currents very straightforward. <S> This skill of re-drawing circuits is one that needs practice. <S> An electrical engineer is adept at re-arranging circuit components this way. <S> Again, solving currents in the two paths is super-easy: <S> Now the most difficult part is summing both together, and then assigning current direction to the final answer. <S> Note that current directions from each source acting alone oppose each other in the 4-ohm and 2-ohm resistor. <S> Usually, we don't write final currents as signed numbers, but translate signs to a direction - an assignment marker will appreciate this sign-assignment <S> : it saves him/her some extra work.
The classic book method is to use a supernode:
How do I find the effective resistance of a Thevenin circuit if the points are in between resistors I just started taking classes on circuit analysis. have a question regarding this Thevenin circuit. My end goal is to find the maximum power that can be obtained at A and B. I managed to find the potential difference across A and B, to be 10V, and current I, to be 2A, in the circuit using Kirchhoff’s voltage law. However I’m unable to resolve the resistors in a way that gives me the effective resistance across A and B and I’m not too sure how to move on from there to calculate the maximum power. Any advice would be greatly appreciated. Edit: additional question, I was wondering in which direction would current flow when it passes the 6v cell. Based on my calculation, the resulting current flowing through the 4 ohm resistor is 1.5A <Q> For thevenin resistance- <S> In 2nd fig. , 4ohm resistor is shorted so remove it <S> and you'll get 1ohm parllel to 2ohm <S> so equivalent resistance would be 2/3ohm and that is thevenin resistance <S> For maximum power - there are 2-3different methods <S> butYou can connect a resistor of value equal to thevenin resistance (2/3) between point a and b (in 1st fig.) <S> And calculate current through that resistor and then you can calculate power by formula P = <S> I² × R. direction and value of current can be found using mesh,nodal , superposition theorem whatever you like you can use to calculate it <A> Your resulting circuit will then look like this: - <S> Now, we look through the terminals. <S> Looking into a, we see that current can flow two ways - either through the 1ohm or the 2ohm resistor. <S> Both currents will end up at b regardless. <S> When looking into the terminals, try redrawing the circuit you progressively, like this: - <S> Now it's very easy to find the equivalent resistance, and thereby the Thevenin resistance. <A> For more complicated circuits , you can also calculate the open circuit voltage e.g 10v , and then calculate the short circuit current e.g. 12A+3A = 15A . <S> The Thevenin resistance is simply Rt = <S> Voc/Isc or 10/15 or 0.6666ohm. <S> Max power transfer is Rload = <S> Rsource = 0.6666ohm. <S> The 4ohm resistor , and the 2A internal current flow are just red herrings. <S> Oh, and the additional question , 2A flows into the 6v battery, and 1.5A comes out of the battery into the 4 ohm resistor, so <S> the difference of 0.5A is flowing into the battery, i.e. it is charging the battery. <S> If the resistor was changed to 3 ohm then there would be zero amps flowing into the battery, so the same voltage as if the battery was not there, however if you were to remove the 6v battery at this time, all the voltages would stay the same, but the thevenin equivalent would be different. <S> Voc is the same , but Isc will be less.
To find the Thevenin resistance you have to find the equivalent resistance seen through the terminals , when all independent voltage sources are shorted, and all independent current sources are open circuits.
Relays turning on randomly when 24VAC sprinkler solenoid valve is shut off tl;dr: I'm having a problem with 8-relay module boards that control sprinkler solenoid valves. When 24VAC is present, sometimes turning a relay off causes other relays to randomly turn on. Long version: My configuration is as follows: I'm using an ESP32 Pico kit microcontroller. Three of the 3.3V ESP32 pins are connected are connected to a 3.3V to 5V bi-directional logic level shifter (one level shifter per pin, three total). The 5V logic level shifter outputs are connected to the RCLK, SRCLK, and SER pins of a SN74HC595 8-bit shift register. Three shift registers are daisy-chained together, providing 24 outputs total. Each of the 24 shift register outputs are connected to an input of one of three 8-module relay boards . The 8-module relay boards are powered by a standalone 5V supply (in other words, not the 5V linear regulator on the Pico board). The 5V supply is a 1.5A supply, large enough to turn on several relays at once. When there are no connections to the relay outputs (NC, COM, NO) on the 8-module boards, the relays can be turned on and off in any order or combination, so I believe the shift registers, connections to the relay boards, and software are correct. I then connect 24VAC sprinkler solenoid valves to the relays like so: Notice in particular that one leg of the 24VAC transformer is connected to the COM port of multiple relays in the 8-module relay boards. When I enable just one relay it looks like this: If 24VAC power is not enabled, I can turn on and off the relay just fine. When I plug in the 24VAC transformer and then enable the relay, again, everything works ok. The sprinkler solenoid energizes and all is well. Most of the time, say 4 out of 5 times, when I turn off the relay the solenoid shuts off and everything is good. However, 1 out of 5 times, when I turn off the relay, numerous other relays just randomly turn on. When that happens it looks like this: I'm wondering if anyone can help me diagnose what might be happening and/or give me some troubleshooting tips. I've disconnected things down to just one solenoid in the system and it still happens. Random notes on my setup: The leftmost relay of the bottom, horizontally oriented 8-module board is where the COM cable comes in from the 24VAC transformer. It then connects to the COM of the relay to its right, then that COM connects to the COM of the bottom-most relay of the left 8-module relay board, runs up through each COM of the left board, then runs across the top to the COM of the upper right 8-module board, down through each of its 8 relays, and terminates there. The rightmost 6 relays of the bottom horizontal board do not share the COM channel. I am using those as dry contactors to operate different (non-sprinkler solenoid) devices. <Q> Do your sprinkler solenoid valve have a freewheel diode attached? <S> like here <S> : https://en.wikipedia.org/wiki/Flyback_diode <S> In case of AC supply of the solenoid, use a varistor (an Element which has high resistance below a certain voltage and a low resistance above) [! <S> [solenoid protection by varistor][1]][1]public domain from https://de.wikipedia.org/wiki/Schutzbeschaltung <S> If your circuit lacks a protection which consumes the solenoids stored energy when turned off, please attach one appropriate solution and report if the problem still persists. <S> In case you do not provide a controlled path to annihilate the stored energy it will certainly damage your circuits over the time.[1]: https://i.stack.imgur.com/HKyCY.png [2]: <S> https://de.wikipedia.org/wiki/Schutzbeschaltung <A> I think you have an EMI (electromagnetic interference) problem. <S> Take a 24VAC supply, a fairly long cable with an inductor (i.e. solenoid) on the far end, and a relay contact being opened, and you have: a fine Spark Gap Transmitter from the early days of wireless! <S> Bring an AM transistor radio nearby and see if you hear a crash of static when you deactivate a relay. <S> Looking at the disturbance, which turns on several circuits that should be off, I'm guessing the EMI is getting into the inputs to the shift register. <S> However, it's also possible <S> it's causing the ESP32 to reboot or something else strange. <S> Your 8-relay modules have opto-isolated inputs, so try moving your ESP32/shift register boards farther away from the 24VAC solenoid wiring, or shield them. <S> The grounds for your ESP32 and shift registers should be tied together, and NOT tied to the relay board ground. <S> The relay board ground should connect to nothing except the 5V supply for the relay coils. <S> Of course, if you can get an oscilloscope, you could verify this possibility. <S> Otherwise, keep experimenting and observing as you've been doing. <S> Good luck! <A> The optoisolators on the relay boards are intended to help with this kind of issue. <S> Relays, especially inexpensive ones as those boards have, do not provide very good isolation against EMI. <S> That means not even a common ground between the relay power and the control input signal and return.
If you separate completely the supply to the relays from the supply to the other bits it may help (though your layout is not great- the relay contact wires should be kept well away from the control wires).
Connect Ethernet pairs directly to PCB with 'magnetics' IC instead RJ45 MagJack? I'm working in an application where I have to use different connector type system as a Ethernet plug. I did test this already in a single cable inserting this connector in the middle acting as a breakout and it works. For the final design one of the solutions is to populate a standard RJ45 on the PCB and then make an adapter from the Ethernet plug to our connector system. This should work fine but the problem is that it takes quite a lot of space into the PCB enclosure. Another solution which would solve the space issue is to use a magnetics IC like this one and solder the Ethernet pairs directly into the PCB board but not sure if this would work fine, I have not seen any working examples/applications of this... Does anyone know if this last solution (magnetics IC + soldering pairs) would work fine? <Q> The idea behind the magnetics is to isolate the grounding of the differential pair (for esd and stopping DC currents), the second is to create impedance with common mode chokes to stop common mode noise. <S> Locating the magnetics away from the phy could create problems, but is doable if you do these things: Ethernet differential lines need a characteristic impedance of 100Ω, make sure the lines cables and connectors leading up to the magnetics are routed as differential lines and have the proper impedance. <S> So if you are soldering pairs, and you can maintain a 100Ω characteristic impedance then then go for it. <S> Why? <S> because you no longer get the benefit of the common mode choke in the magnetics. <S> The longer you make the cable between the phy and magnetics, the larger loop area and more chance that the ground of the phy and the ground of the magnetics will be a different potential. <S> Make sure that the ground of the phy side of the magentics and the phy are the same. <S> If the environment is noisy this could be a problem, the best way to check would be to build the design then check the eye diagram with a differential probe. <A> Ethernet "magnetics" are traditionally a board mount dual transformer component. <S> The idea of putting them in the RJ45, eg, a "Magjack" was a later innovation. <S> One could certainly retreat to the original norm with a separate transformer component, and if the non-standard connector or wiring interface meets the impedance match well enough for the desired speed mode, that should work. <S> It's worth noting that the term "integrated circuit" traditionally applies to multiple active components on a semiconductor substrate. <S> It is not traditionally applied to mechanically assembled coils, resistor arrays and other non-semiconductor products even if those "components" or "modules" contain "circuitry" which is "integrated" and might even have resembled to some earlier generation sort of IC package (eg, a DIP with only sparse pin positions used). <A> Well you can solder the Ethernet cable directly to the PCB. <S> Done right it's even better. <S> Connectors are not ideal! <S> (this will be a kind of inductance in series with the shield - the least you want is blocking HF here) <S> attach shield propperly <S> PS: why not using a indusrial M12(preferable) or M8 Connector? <S> RJ45 is not very reliable, except if no movement, no vibration, etc.. is involved
This is often done with messurement adapters, when you only want to qualify the cable - not the connectors. Locating the magnetics away from the phy could introduce noise. strictly ensure imperdance of the PCB traces keep pairs twisted as long as you can keep shield as long as possible do not "roll" shield tail to something which equals a round wire
ADC resolution vs Accuracy of signal measurement? I want to get accuracy of 0.1% in the following analog signal measurement:AC voltage in the range of 0-300V (0.1% = 300 mV) Then what is the minimum no of bits or resolution of ADC that I can use? My understanding is following: If I use 16 bit ADC then I get: 300/65536 => 0.0045 => 0.4% So I need an ADC with better than 16-bit resolution. Is my understanding correct in this calculation? Edit: adding more details: I want to do all calculations based on ideal cases only at this time. I am not worried about the frequency of signal, sampling rate or power supply issues of the design at the moment. If I also need to use the same ADC for following signal measurements with 0.1% accuracy:Current (DC and AC) in the range of 0-50 A. (0.1% = 50m A)Resistance in the range 0f 0-10 MOhm. (0.1% = 10k Ohms) Then what additional conversion factors I had to include in my calculations? For example how will it effect my calculation when I convert a current signal or resistance related signal into voltage to feed into my ADC? Can a 16-bit ADC fulfill the 0.1% accuracy design requirement in all of the above V, A, R measurements? <Q> Generate an error budget. <S> for each voltage divider for each opamp for each Switching Regulator that will inject trash into Ground and into Rails know the PSRR for each opamp, at switch_reg ringing frequencies injected trash, from line_voltage switch_regs that couple electrostatically (displacement currents) into your high impedance voltage dividers <S> how to initially set the signal_chains to be "accurate" (that is, calibrated) <S> how often to reexamine the Calibration. <S> Must the system remain 0.1% or better for 40 years in orbit? <S> Your goal of 0.1% (does someone DIE if that is not met? <S> or just get Least Significant Digit flicker on a display?) <S> can be met by 10 bit ADC but requires an error budget that is extreme for all the other error sources. <S> Thus 12 bits or 14 bits (with Temperature Stability spec'd in the ADC data sheet) is more reasonable. <A> 300/65536 = <S> > <S> 0.0045 <S> You just calculated that if everything is ideal, measuring a 300 V signal with a 16-bit ADC gives a resolution of 4.5 mV. <S> Earlier you said you want an accuracy of 300 mV, so this resolution is more than enough to achieve your desired accuracy. <S> However, resolution is only one of the requirements to achieve your accuracy goal. <S> You must also be careful of the initial accuracy of your ADC and any preconditioning circuit used, as well as power supply rejection, any interference sources, any thermal drift, etc. <S> Depending on your signal frequency, you may need to worry about the frequency response of your system and any drift. <A> "I want to get accuracy of 0.1% in ... <S> Then what is the minimum <S> no of bits" <S> You need error below 1 part in 1000. <S> That can be done assuming a perfect ADC , with 500 steps correctly placed, such that no step is more than 1/1000 away from the actual signal value. <S> So select N the no. of bits to give at least 500 steps : so the MINIMUM is N = <S> 9 <S> giving 512 steps. <S> Now nothing is perfect so a practical minimum would be 10 bits, 1024 steps. <S> Then, with a perfect 10 bit ADC, the gap between steps is about 0.1% so you are never more than 0.05% (0.5 LSB) away from a step. <S> You need those steps to be correctly spaced : look for an ADC with INL and DNL (Integral and Differential Non-Linearity) better than 0.25 or 0.5 LSB. <S> This describes the actual step sizes, which may be 0.25 or 0.5 LSB (0.025% or 0.05%) away from the perfect step value. <S> This also assumes you can map the 0 to 300V range to the ADC's input range (e.g. 0 to 5V), with an accurate attenuator. <S> So if you can eliminate other sources of error you can JUST meet your accuracy goal (error budget) with a 10 bit ADC. <S> There may be good economic reasons for using a 12 bit ADC and simplifying the rest of the error budget.
In principle, a 10 bit ADC will give a resolution of about 0.1% of full scale, but to make sure the discretization error is only a small part of your error budget, I'd recommend to use a 14 or 16 bit ADC for this project.
What is the purpose of tiny "bumps" on LED legs? A lot (if not most) LEDs have some kind of small thickenings on their legs. Sometimes they are almost as wide as the leg itself and barely visible, sometimes they are twice as wide and instantly noticeable. When present they seem to be the same on all legs, so I doubt they are used to indicate anode or cathode. The only explanations that come to mind are: They are a manufacturing by-product, possibly a place for holding LEDs during manufacture. They are designed to provide a bigger soldering surface. Here's an image that shows them on both legs (sized 1 x 0.6mm): They might not be specific to LEDs alone, but are commonly seen on them. <Q> From here <S> this is what the leadframe looks like. <S> This is what they look like when they are molded in small scale production: <S> After this, the parts are separated but the die is made so that it does not weaken the lead, which means it has to be a bit wider in that area. <S> So the remaining nubs are artifacts of the production process, like ejector pin marks on a molding. <A> Your first guess is correct. <S> The leads are held together in a strip of lead frame, until individual LEDs and their leads are cut off. <A> The purpose of the flange is to promote a standoff gap between base and pad soldering @600’F. <S> Without heatsink tools, the soldering heat velocity is 1mm/s along the lead and soldering time <S> must be <5s preferably 3s to avoid heat damage to epoxy moisture seal on the base. <S> Clear epoxy is worse than black epoxy for moisture seals.
5mm LEDs can be made without flanges from lead frames that attach at the end instead and temporarily held in place during fabrication, then cut to specified lengths after factory separation. Moisture ingress can damage life expectancy from corrosion.
Grinder hums but won't run. Capacitor seems good, and so do windings My Grandpa gave me a bench grinder recently to fix. He said he was using it a lot, grinding and grinding, then he heard a pop, and it stopped working. Now it just hums, and starting it by hand doesn't work. I think it's a capacitor run motor, but not 100% sure. There are 2 windings, and a capacitor in series with one of them, I belive it is 6uF. I charged that capacitor up with 32 volts and it seemed ok. It did discharge kind of quickly, but that's most likely just because it's so small, and the multimeter I was using is discharging it a little. I also put a digital ohm meter across it, and at first, it started at low resistance, and slowly went up, and then it jumped to open circuit and stayed there. I'm guessing that was just because it was a tiny bit charged yet. I saw somewhere it was supposed to start at 0 and go up and then drop off and go back to 0 and repeat if it's good, and it's not doing that. But how is that supposed to work? If the ohm meter is applying DC voltage on one side and measuring on the other, shouldn't a good capacitor get open circuit like I did? There shouldn't be any capacitive coupling across it with a DC voltage. I also measured the resistance of the windings, and the one with the capacitor measures 38 ohms, while the one without it measures 27 ohms. Is one of the windings shorted or burned out or will a new capacitor fix it? Thanks! Edit: I found a cap with the same value in an old fan my dad had lying around, and it didn't work. One of the windings must be shorted. It's probably not worth rewinding, I can buy a new one for $35. <Q> I think the description you "saw somewhere" is something that you are not recalling correctly or is somehow missing some detail. <S> Since the motor hums and won't start manually, it seems likely that a winding is shorted or partially shorted. <S> Try manual starting with the capacitor and its winding disconnected - only the main winding connected. <A> It is 99% the capacitor. <S> You can try removing the capacitor and then starting it by hand. <S> Some of the cap failure modes (e.g. shorting) may prevent the starting-by-hand magic. <A> It's possible the capacitor has dropped drastically in value. <S> Other that swapping it out or measuring it with a multimeter on capacitance range etc. <S> it's hard to test it easily. <S> It's also possible a winding is shorted. <S> Rewinding motors is possible, but unless it's a very good quality grinder it is probably not worth it. <S> Finally, there is a failure mode on some grinders where the armature spins freely without the power on, but seizes when power is applied because of lateral force on the shaft. <S> You can rule that out by seeing if it spins freely with power applied. <A> Might also be the centrifugal switch that puts the capacitor in and out of the circuit. <S> Grinders are notorious for causing centrifugal switch failures because the grinding dust gets into them and burns them out. <S> Inside of the motor, on one end or the other, is a little switch wiht a weight system on it. <S> If those contacts burn out and never close, the capacitor is not in the circuit and the motor cannot start, it just sits there and hums. <S> People think they can manually spin the motor to test to see if that's the problem, but the motor shaft needs to get to around 80% speed, and on a grinder that is using a 2 pole motor and has grinding wheels on it, you can't even get close manually. <S> A motor shop will likely charge you more than the grinder is worth to fix it, but since it was free, it might be worth experimenting with disassembling the motor bell ends to get to the switch. <S> But it's not a task for the uninitiated. <S> Here is a YouTube on this exact issue though. <S> Good luck! <S> Replace centrifugal switch in grinder
The switch is closed at standstill, connecting the capacitor, then as the motor speeds up, the weights move the switch to an open position and the capacitor is removed from the circuit. The capacitor tests that you performed seem valid and seem to indicate that the capacitor is ok.
Best way to implement a global FAULT input I've got several microcontrollers multiple feet away from each other in a network that must be able to be put into a shutdown state all at once, ideally before power loss. I want to trigger a shutdown from a button, like an e-stop. A pair of "FAULT" wires that gets shorted together to trigger the shutdown sounds logical, but if I use a pull up resistor on these boards, there may be current between the 3.3V rails of each microcontroller, which I don't prefer. What's the best way to implement this sort of thing? <Q> This will block leakage between devices and avoid any voltage compatibility issues. <A> Proverbially this is what it would look like. <S> If you want some redundancy then use two pins on each micro. <S> This circuit would fail-safe. <S> If a wire is open then the pull down would trigger the micro to shut down. <S> If you put a diode further downstream of the switch then the micros could detect the loss of power because the estop lines would go low before the power supply. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> I'm assuming several feet means there is a wiring harness involved. <S> You can avoid leakage between devices. <S> You can make a fairly tolerant fault line kept up by only one source , but sensed and triggered by multiple. <S> Below circuit provides a noise tolerant circuit of a node requiring at least 3mA at 3.3V to register a high. <S> This makes it robust against floating wires or nearby transients. <S> And the option for each node to trip the fault line. <S> The 1 kOhm and ESD diode are to protect the input from overvoltage and reverse bias. <S> simulate this circuit – <S> Schematic created using CircuitLab Or have each node pulls the line up via a diode and resistor of 470 Ohm. <S> There are many ways to do this.
Use an active-low FAULT signal driven by an open-collector or open-drain driver, and add a diode to each input. You could also add a capacitor to increase the time required to activate the input schmitt trigger.
Power rating not equal to voltage rating times current rating I am looking at the 10.1 inch touch screen for RPi , and am puzzled by its power specifications. Under Features tab in the above link, it says: Power: DC12V/2A Consumption: 5W Obviously \$12 \times 2 \neq 5\$ , I wonder what those numbers mean now. How can I correctly estimate the power consumed by the screen under normal operating conditions? <Q> Looking through the photos on the site you linked, it shows that a 5V 2.5A USB power output plug is included. <S> This means that in order to power both the LCD and that USB power output reliably, more than the 5W which the LCD (mostly its backlight) consumes must be available. <S> The USB output would be 12.5W, added to the 5W of the LCD portion, you could potentially consume 17.5W. <S> The extra 6.5W would be for inefficiency and overhead. <A> Added to the 5 watts that the screen uses results in a potential power usage of 17.5 watts That is much closer to the specified 12 V 2 amps which is 24 watts. <S> Part of the difference could be the power lost in generating the 5 V output from the 12 V input. <S> The rest could be simply a matter of rounding up the numbers to get a nice even number like 2 amp rather than a fractional number. <A> Additional to the USB output (whose power is passed on, not consumed) ... <S> Current ratings tend to be conservative, both to allow for tolerances, and to cover surge currents such as startup. <S> If imprecise, they must be on the high side, because they are used to determine the correct fuse if you are fitting one. <S> It's reasonable to round them up to the next even number or easily available fuse or PSU rating.
According to the data sheet, there is a USB connector on the board with a rated power output of 5 V at 2.5 amps which is 12.5 watts.
Polarised capacitor vs. unpolarised capacitor. Which to use when? Polarised capacitor has polarity (+ and -). Is it also called electrolytic capacitor? (Question 1) Unpolarised capacitor does not have polarity (there is no + and -). Unpolarised capacitor can be connected in any direction, but this is not so with polarised capacitor. Under what circumstances should one use polarised capacitor and similarly unpolarised capacitor? (Question 2) <Q> In any DC power supply or feed-lines on a circuit board, you will see many large value capacitors that MUST be polarized. <S> That is <S> the (+) lead must be more positive than the (-) lead. <S> They can be electrolytic or the more expensive tantalum types. <S> Hook these in reverse polarity and they might go BANG, depending on the current available. <S> They are used for bulk filtering of the power supply voltage. <S> Smaller SMD ceramic or thru-hole ceramic are to filter high frequency noise, thus are very close to their point of use such as a CPU or MPU, or most any IC. <S> Bulk capacitors that smooth low-medium frequency ripple can be inches away, and their high ESR is tolerated. <S> Some are very large and need their own reserved space. <S> Tiny SMD capacitors (not polarized) have very low ESR so are used to filter out RF noise, and are often less than 1/4 inch from the device that needs them. <S> In DC power supply feeds both polarized and non-polarized are used and safe as long as polarized capacitors are inserted correctly and no capacitor is exposed to a voltage beyond its rating. <S> In AC power feeds non-polarized capacitors are mandatory, and if connected to AC mains they need to be X or Y rated for safety reasons. <S> For <S> AC / RF signals with no DC offset voltage <S> it is best to use non-polarized capacitors. <S> These circuits can have a high impedance which allows for tiny SMD packages to be use. <S> Some less common types include bipolar electrolytics for high-pass, band-pass and low-pass filters for speakers, often combined with inductors and low-ohm resistors. <S> The design engineer should plan out reserve space for all of these types of capacitors. <A> A polarised capacitor is also known as an electrolytic capacitor. <S> With its electrodes immersed in gel electrolyte, it is polarised by design, to form and maintain a thin oxide layer on the anode serving as the dielectric. <S> The resulting very low gap between the electrodes and the high surface area of the anode, obtained by etching, make for very high value capacitors having a smaller volume. <S> They are used for low-frequency coupling and decoupling, energy storage and filtering in power supplies. <S> An electrolytic capacitor is chosen mainly for its relatively small size and only for DC applications. <S> Reversal of polarity or application of AC would impair the dielectric layer and cause irreparable / catastrophic damage to the capacitor. <S> An electrolytic capacitor for a speaker crossover network would be like an identical pair of them connected in series opposition. <S> It would be specifically designed with two anodes in the same package serving as the non-polarised electrodes. <S> No damage would be caused by the audio (AC) coupling since the dielectric impairment and re-formation on the anodes would occur in alternate half-cycles. <A> Another difference is that non-polarized capacitors can run at much higher frequencies. <S> Read more here . <S> An answer to the first question: As far as I know all electrolytic are polarized <S> Forgive me if my info is incorrect, I really am trying. <A> f -3dB BW = <S> ~0.25/(ESR*C= <S> Tau @64%) <S> Because of the dielectric, electrode interface, non-electrolytic caps tend to have a much higher f-3dB yet much lower density than low ESR e-caps which are ~2us <S> and 100x more bandwidth than general purpose e-caps ≈200us. <S> Thus to span a wider f range, multiple caps are used.
An answer to the second question: The main difference between a polarized and non-polarized capacitor is capacity, how much voltage it can store.
Output capacitor in buck converter I am working with the buck converter AOZ1284 Datasheet I want to get 5V with 12V in input so I chose R1=52.3k and R2=10k (Vout = 0.8 x (1+R1/R2) =0.8x(1+52,3k/10k)=4.984V).Also I fixed L=4.7uH. How do I calculate the value of Co and Cin (input and output capacitors?) I found a section in the datasheet about the output capacitor but I don't know the acceptable value for DLETA_Vo the cut off frequency for the LC filter in the output <Q> For future use, use Q = <S> C <S> * V (charge = capacitance times voltage). <S> If you take the derivative with respect to time, you get dQ <S> /dT = <S> C <S> * dV/dT + V <S> * dC/ <S> dT <S> If we define dQ/dT = current (I), and define dC/dT = ZERO, we now have <S> dQ <S> /dT = <S> I = <S> C <S> * dV/dT <S> Now let us use that for ripple of 0.01 volt, for 1microSecond delay time, with 1 amp load: <S> I = <S> C <S> * dV/dT ===> <S> > <S> C = <S> I <S> * dT <S> /dV <S> and we substitute <S> C = <S> 1 <S> amp <S> * 1uSecond <S> / 0.01 volt = <S> 1uF/0.01 <S> = 100 microfarad Notice <S> this does not bring up the Resonance of the Inductor with this Capacitor <S> which affects the SwitchReg regulation_loop (negative feedback) stability and phase margin. <S> ======================================= <S> Read the comment by "BobT" for appropriate caution on Capacitor ESR. <A> You are expected to specify the value of \$\Delta V_O\$ yourself. <S> How much ripple do you want to allow on your output? <S> Running a microprocessor from it? <S> You might allow 50mV of ripple. <S> Running an audio amplifier? <S> You might want ripple lower than 1mV. <S> The \$f\$ referred to in the equations for \$\Delta V_O\$ <S> is the switching frequency of the regulator. <S> You might attack it backwards. <S> Take a common capacitor value, then calculate the ripple and ask yourself if it is acceptable. <S> No, pick a bigger capacitor and try again. <A> If the input is already smooth DC , then for Cin you just need a small low ESR capacitor. <S> one or two 22uF 35v ceramic capacitors , or a handful of 10uF 35V ceramic capacitors, X5R would be cheapest option. <S> If you have a transformer / rectifier then you will need some bulk energy storage, like 1000uF electrolytic. <S> For Cout you will need another couple of 22uF ceramic capacitors, e.g 2 x 22uf or 4 x 10uF if running at 400kHz , half that if running at 800kHz . <S> Running at a higher frequency allows smaller capacitors, but reduces efficiency (i.e. runs hotter). <S> The TI website has some useful tools , including web-bench. <S> Here is a snip from the LMR36520 datasheet , this is commonly used on the Adafruit and pololu DC-DC modules. <S> As with most power supply electronics, don't try running on the hairy edge, if you need a 1A supply , then use a 2A rated device. <S> The Pololu 12v-5v 1A module is here <S> https://www.pololu.com/product/2831 <S> (you can see the schematic if you scroll down) <S> it uses 4 x 10uF ceramics on the output, and only one on the input. <S> You can get 10uF ceramics in an 0805 package at a better cost point than 22uF in a 1206, for roughly the same space. <S> Designers and manufacturers try to minimise the variety of parts in their designs, for example I use 10uF/35v in 1206 , 10uF/10v in 0805 and 1uF/50v in 0805. <S> A full reel (5000) of 10uF/35v cost less than a half reel of 22u/35v.
The capacitor values depend on whether you are trying to make a physically small converter , or if the input is from a transformer + rectifier, or you want a low cost design.
Source of initial magnetic field in an alternator I have been reading about how alternators work and I am wondering where the initial magnetic field comes from when no current is running through the field coils that excite the magnetic field in the rotor. I have found alternators that are using a permanent magnet, where it seems obvious and alternators that apparently do not seem to be using permanent magnets, where it is not clear to me. I can also find on the wikipedia article about excitation that there are such generators: The magnetic field may be produced by permanent magnets or by field coils. <Q> In an automotive alternator, AC output from the star-connected 3-phase winding is rectified by a 3-phase full-wave bridge rectifier, to charge the battery through terminal B+. <S> The same AC output is also rectified by a 3-phase half-wave rectifier, to supply excitation current to the field winding. <S> The regulator maintains the alternator's output voltage within permissible limits by switching on the field current at the lower limit and switching it off at the upper limit. <S> The output of the half-wave rectifier is brought out to terminal D+ which is connected to the battery through the ignition light and the ignition switch. <S> On the ignition switch being turned on, the excitation current, fed to the field winding via the D+ terminal, switches on the ignition light. <S> When the engine starts and the alternator is driven, the external excitation induces armature current. <S> As the speed increases and the B+ and D+ voltages take over the battery voltage, the ignition light goes out. <S> The ignition light remaining on, indicates that the alternator is faulty. <A> In an automobile, obviously the initial field current can come from the battery. <S> But even without that, there is often enough "residual" magnetism in the ferrous parts of the alternator to "bootstrap" the process. <A> any AC electrical generator can be called an alternator, but usually the term refers to small rotating machines driven by automotive and other internal combustion engines. <S> Since the RPM is proportional to the voltage it can create the field current is used to control the current instead by mutual coupling if the stator to the rotor and voltage integrated by the large battery capacitance after the alternator 3 phase rectifier. <S> Since the Alternator must be able to charge the battery at idle near 700 RPM, in theory it could generate 10x the voltage at max RPM but impossible due to load effects of the battery. <S> Thus you can consider the alternator as being an amplifier of field current regulated by feedback with a 14.2V limiter and have sufficient gain to achieve max power in the kW range at some low RPM such as 1200 RPM. <S> You might imagine the field flux as a magnetic clutch that affects torque load with field current to meet the load current which has a linear relationship with output torque load and electrical current load. <S> PM alternators are called Magnetos. <S> You could run an alternator without a battery but use a ultracap to smoothen the ripple (but RC>>1/f) <S> and thus the field windings have a current source to couple the rotor and amplify the current. <S> The initial voltage comes from the remanence of the transformer steel and cap charge voltage created with sufficient low ESR (≈1 mOhm) and integrated voltage such that current amplification occurs. <S> Some snowmobiles use this method. <S> the first pull charges the cap which can then power the starter https://www.ski-doo.com/technologies/shot.html <S> This solves the cold temp battery issues for some snowmobiles. <S> You might wonder... <S> what current gain does a good alternator need ?
The initial field excitation, in an automotive alternator, is provided by the battery.
Can I power something directly from an IC, for example a little relay? I am trying to design a tiny circuit to control a DC motor using buttons. The motor needs 12 volts to move in one direction and -12 volts to move in the other. The design I came up with is in this picture: The special added component is a relay with this lay out: Vin - NC GND - COMM / - NO The top left relay is to turn the whole system off. The top right is to prevent short circuits. The bottom 2 special two state relays are to switch the direction of the voltage. The problem is that I do not know if I can connect the XOR gate on an IC directly to a power using object (the relay.) Also, do I need to place a resistor in series with the relay becouse it is essentially a coil? (I know that coils act as a short after a long time of DC current.) If there is a better and easier way to achieve this function, I would be very interested. <Q> If Relay0 is a reed relay, then it might work. <S> Reed relays are available with coils that only draw a few milliamperes. <S> The more typical way to do this is to use a single transistor from the output of the XOR to drive the coils of your relays. <S> This circuit shows how to drive a motor safely from a digital IC: <S> The original answer <S> I borrowed that from explains the details. <S> You can use the same circuit to drive your relay. <S> Regardless of which circuit you use, you need the diode as shown across the motor. <S> Turning off a motor or relay coil causes high voltage spikes that can kill your processor, digital IC, or transistor. <A> If you use solid state relays you can of course do it. <S> Suppose you are using a mechanical relay. <S> If we look at very small relay (like Coto 9900 ) we see that the operating voltage is 3,8-5,0V with the coil resistance 150Omh. <S> Which gives to us 25-33mA coil current. <S> According to the pg.206 of the PIC16F877A datasheet we can get up to 25mA from single pin at a voltage of 1,5-3,3V (with nominal MCU power voltage of the 5,0V). <S> So I think you cannot reliably power any mechanical relay directly from a single pin of something like a MCU IC. <S> But there is one bad (but working) practice. <S> According to the pg.175 PIC16F877A datasheet you can get up to 200mA by combining several pins. <A> Only one relay would suffice for the required function.
You'll need to look at the datasheet of your XOR IC, find out how much current it can deliver, then find a reed relay that can operate on that current and the supply voltage of your IC.
PCB Layout Optimization Regarding VCC and GND I have two questions regarding routing power and ground. With respect to power, is it generally better to flood copper planes and have one via per pin/pad connecting directly to the plane under, or is it better to branch out from one via with a star topology? Pardon the sloppy layout, but see the below images where I have three bypass capacitors and a single via in the bottom picture compared to the individual vias for each pad connecting to a pour on the top one. Secondly, in regards to ground, I was viewing some board layouts based around RF chips that flooded all the empty spots with GND pours on top and bottom layers- what is the purpose/benefit of this? Free real estate for possible noise to couple onto? <Q> In my opinion, none of those 2 layouts are clean. <S> Create a +5V_FUSE shape/polygon on top layer <S> Connect the shape using one (or more vias <S> , if you anticipate current to be >1A) on the north side of the northern capacitor to the L3 +5V_FUSE trace Connect the +5V_FUSE shape to all capacitors and pads, either by "capturing" them with the shape or running traces from the pad to the shape <S> This creates a neat power distribution to your chip, the capacitors acting a tanks for high-speed current transients with little to no parasitic to the chip's pads. <S> I'm gonna answer your second question with another question. <S> Do you have layer(s) with a lot of copper and others with only a small amount? <S> If you do, you should know that copper balance between layer is very important in high-volume production boards to prevent boards from warping during manufacturing heating/cooling phases. <S> Unbalanced copper creates disparity in copper expansion and relaxation. <S> Pouring a ground shape on all layers is recommended, accompanied by plenty of ground vias. <S> It also greatly helps with EMI reduction, as others mentioned. <S> as long as you have plenty of ground vias all over your board and don't miss an isolated island of copper. <A> Star topology will prevent forming of loops that pick up unwanted signals. <S> Use large vias, with enough copper ring or a teardrop so that a misaligned via drill won't reduce the current path too much If you have the room for multiple large vias, then it's preferred to stich to the plane from each point. <S> You can also use multiple vias to reduce cumulative via resistance Copper GND planes provide low impedance path for current, reduce the effect of GND loops and provide EMC shielding. <A> If you can control the distance between the power plane and ground plane that is ideal. <S> If you're talking about filling unused areas on signals planes <S> I think that is a bad idea. <S> Your board house will probably recommend this but it can cause unintended consequences. <S> You can couple signals in the Z direction as well as the x,y. Filling empty space with ground however can protect from signal and fields in the z direction.
Having the vias further away from the chip simply creates a shorted power path in your case.
Best design practice for relying on IC input diode current clamping? I have a question about what the "best design practice is" for using ICs with current clamping diodes. Take for example the following IC: CD74AC251M (datasheet : https://www.digikey.com/product-detail/en/texas-instruments/CD74AC251M/296-32961-5-ND/1691823 ) On page 3 of the datasheet it lists a current specification of +/- 20ma for the DC inputs, rather than a voltage specification. My understanding is that this means you can exceed the supply voltage (3.3V in my case) as long as you don’t exceed the input current. Texas Instruments has an “Understanding and Interpreting Standard-Logic Data Sheets” document that was helpful with this as well ( https://www.mouser.com/datasheet/2/405/szza036b-89603.pdf ). Figure 10 indicates a clamping diode is placed on the inputs in this logic family series, as does the IC datasheet. So, with this in mind, I want to hook up the inputs of this CD74AC251M decoder to a signal that can be from GND to 12V through a 10kOhm series resistor. If my understanding is correct, that will mean that I’m only roughly sinking 0.82mA through the input diode when the input is 12V. (12V-3.3V-0.5V = 8.2V. 8.2V/10kOhm = 0.82mA). Which is well within the input current specifications. My question is if this is considered a "good/best" design practice. Or is it considered better practice to place an additional diode, like a 3.3V Zener, after the 10kOhm resistor as well? If so, why is that a better design? Thanks <Q> 0.7V. <S> This is different than placing a zener which will clamp independently of the rail voltage and do so even in the absence of a power supply, but also dissipate more heat (3.3V in reverse breakdown instead of 0.3V in forward conduction). <S> Using an external diode lets you use a smaller resistance to alleviate the RC time constant since you can dissipate more heat. <A> The on_silicon clamp structures have to dump that current somewhere, and that often includes some current injected into the substrate. <S> The IC behaviors (such as bandgap voltage references) may be upset by currents seeking return paths. <S> If you use multiple opamps on one package, and expect one OpAmp to remain precision, whilst another has inputs used ESD structures to clamp over_voltages, then beware of possible errors. <A> In my opinion it's usually bad practice to put substantial current through the input diodes in normal operation. <S> They are designed to handle moderate ESD discharge, not for normal operation and normal operation is not guaranteed with substantial current flowing. <S> The datasheet current limits apply in the Absolute Maximum section of the datasheet, the input limits during normal operation are usually something like 300mV outside the rails, which means very little current flows, even at elevated Tj. <S> The current that flows can increase the power consumption, cause substantial leakage on nearby inputs, affecting analog functions, and may possibly have long term reliability issues through mechanisms such as electromigration. <S> I say "usually", because there's always some exception such as a consumer product where cost is overwhelmingly important and product lifetime is short.
It's better to place an external clamp diode so the diode heats up instead of the IC, but you have to make sure the external diode turns on first and this can be a crapshoot unless you go for a Schottky since internal ESD clamp diodes often turn on at voltage less than
Why did my transistor break? Let's consider this device I have built: It is essentially a power supply for a 24V DC motor. The power supply is switched on and off according to a proper control signal (which drives a relay) which is not important at the moment since it has always been put to ON while the device was working. Let's focus on the final part of the circuit, with the motor, the fuse of 10A and the transistor BUV20 . The motor should require an average current of 8A at 24V and BUV20 can provide 50A. BUV20 is cooled through a fan (shown at left in the picture) and a metal heatsink (with thermal paste.) The motor's nominal voltage is 24V, but I have inserted a potentiometer in order to decide its value (generally I will use a voltage between 17-20 V since I do not need its maximum speed.) The device was working at these values of voltage, then it suddenly started to rotate at an exaggerated speed. Then, the 10A fuse stopped it after some seconds. (Maybe since it is a delay fuse.) After this event, I checked the fuse of 10A and it is broken. Then I have measured the collector - emitter resistance of BUV20, and I have seen it is 0. So, my opinion is that BUV20 has broken while it was working, and its collector and emitter terminals shorted. So, 27Vpeak were provided to the motor, which started to run at exaggerated speed. What might be the cause of this transistor problem? I may change it with another BUV20, but I think its accident may not be casual, and there may be a design problem. So, what may be the cause of collector and emitter short while the transistor is working? A motor spike, a transistor defect etc. Do you have any advice? <Q> which may be the cause of this transistor problem? <S> Too much heat generated and the transistor internals suffered melt down. <S> You didn't mention the amount of heat-sinking you had applied to the transistor so this is a definite maybe. <S> Back emf from the DC motor exceeded the reverse bias for the base-emitter junction. <S> This is rated at -7 volts <S> so be aware of this. <S> Try putting a reverse diode across base and emitter. <S> I would also put a 100 nF capacitor across the motor because if the potentiometer made a slight stutter and produced a wildly changing demand voltage at the emitter <S> the back-emf generated from the motor's inductance will be high (potentially hundreds of volts). <S> Put a 100 nF capacitor across R2 as well (to keep the pot output steady). <S> Also check that the BDX53C hasn't suffered - this could be another clue - <S> maybe the BDX53 went pop (due to reverse base-emitter voltage (it is only rated at 5 volts) and, in turn, destroyed the BUV20 output transistor. <A> Usually the load is on the collector side when being switched. <S> Now there is more losses as the load is driven with an emitter follower configuration. <S> Another thing is the darlingon is directly connecting the power transistor base to supply voltage without any current limiting. <S> There is also nothing to prevent inductive kickback from destroying the power transistor when the load is turned off. <A> Two obvious potential failure causes (assuming adequate heatsinking on the transistor. <S> As there is Vbe * 3 or at least 2V across the transistor by design, you are wasting a lot of power here, at least 16W at 8A.In fact even at rated conditions, 25V <S> in, 17V motor, 8A current, you are dissipating 64W in the transistor. <S> With Theta(j-c) = <S> 0.7C/W, the junction is 45C warmer than the transistor case, which is warmer than the (unknown) heatsink ... get the picture? <S> And that's at 8A ... <S> but see below) <S> Reverse breakdown voltages during inductive spikes. <S> This could be base-emitter reverse breakdown ... <S> only a few V as Andy points out. <S> A reverse diode across B-E only passes the problem back to the driver transistor. <S> Put one to the supply as well, and note these must be fast diodes not 1N4007s. <S> Excessive current (combined with Vce>2V and the SOA curve in the transistor datasheet). <S> You assume the motor is only taking 8A yet when the transistor goes short circuit, the 10A fuse blows. <S> So clearly the motor current is exceeding 10A.On starting, an 8A motor may even exceed 50A : check its stall current rating in the datasheet. <S> It will momentarily take this, and if excessively loaded, will take more than its rated current while running. <S> So it may be momentarily taking more than 50A (pop!) or it may be taking enough while running that, combined with the rather high Vce (either from the driver, or the fact this is a linear regulator) <S> the SOA is exceeded. <S> And there's no Safe Operating Area (SOA) curve in that datasheet, nor secondary breakdown specs, <S> so ... <S> how to determine SOA violation? <S> Measure the startup and actual operating current to determine if these may be the problem. <S> It may be better <S> so simply move to a PWM motor controller, saving a lot of power, rather than fixing this one.
It is possible that turning the power transistor on exceeded the Vbe and Ib of the power transistor and it broke.
2 reset sources for the CD4017 are interefering I have a CD4017 counter configured so that any of its outputs can be connected to the reset pin, I also have manual reset button connected to the reset pin, this switch is buffered by a schmitt trigger. The problem is that the schmitt trigger holds the reset pin low and any CD4017 output connected to reset pin is not able to drive it high and trigger the reset.I tried adding a resistor in series with the schmitt trigger output but this only reverses the problem... the CD4017 output overpowers the reset pulse from the schmitt trigger. How would you suggest solving this problem? <Q> You want reset to be triggered when the schmitt trigger is high <S> OR <S> the CD4017 output is high. <S> This is the classic use case for an OR gate. <A> You can do this. <S> You don't really need the ST gate on an asynchronous RESET input, and if you did, you'd need more parts to make it work properly. <S> simulate this circuit – <S> Schematic created using CircuitLab Edit (retaining the gate): simulate this circuit <A> You've rediscovered an important principle - standard logic outputs cannot be connected together. <S> If they are set to different values (one 0, the other 1) they will pull their common connection to an indeterminate value. <S> You may damage one or both gates due to excessive current. <S> Any inputs fed from their common connection will not see a clean logic level and may misfunction. <S> (Instead of seeing a clean '0' or '1' voltage they can see something in-between.) <S> The standard solution is that posted by Justin. <S> Each output you wish to combine needs to be taken to a separate input on a suitable logic gate (here an OR gate) that combines the signals and provides a single output to drive the next stage (your reset input). <S> Another method used to combine outputs, not applicable here, is the wired-OR connection. <S> This uses a pull-up resistor, connected to the +ve supply line, and gates with special outputs known as open-drain (MOS) or open-collector (bipolar transistor). <S> Speaking of pull-up resistors, your manual reset circuit would benefit from a pull-down resistor to ground between the switch and the Schmitt trigger input. <S> Whilst a CMOS Schmitt trigger input apparently doesn't have to have one it is still good practice to provide one <S> and it is required for non-Schmitt CMOS inputs, which should never be left to float. <A> Try these simple additions in red: - <A> Two things. <S> First, you show no passive components around the triangle symbol, what I assume is the Schmitt trigger component you mentioned. <S> There are many sites with circuits and descriptions for switch debouncing. <S> Second, there is no Schmitt trigger OR gate (that I know of). <S> You can add a 2-input OR gate after your debounce circuit, and tie in the output from the 4017. <S> Or, you can create one with two diodes and a resistor. <S> This is called a diode-OR circuit. <S> Edit: Andy posted a diode-OR circuit while I was typing.
Without some timing components, a Schmitt trigger gate will do very little by itself to debounce a switch. You can, as variously suggested, build your own diode OR gate but the normal practice is to use a logic gate of the logic family you are already using, which retains the speed and drive ability of that family.