source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
How does this LDR controlled light work? Consider: The circuit here works based on the resistance of the LDR. I don't understand how it exactly works. It's said when the resistance in the LDR is high, current flows through R2 and the base of the transistor. Which direction would current flow? I know the convention is it flows from the positive of the battery. But from the explanation it confuses me that current is flowing from the negative terminal. And if the convention is from the positive, shouldn't the current skip R2 and go through the path of lowest resistance which is R3? <Q> For reference and to protect against future edits, here is the circuit being described: When analyzing such things, it can be helpful to consider the limiting cases. <S> In this example, they are the LDR (R1) being a short and being infinite. <S> Let's examine each case. <S> When R1 is a short, then the B-E voltage of the transistor is 0. <S> That keeps the transistor off. <S> That means no collector current will flow, so the LED (D1) won't light. <S> When R1 is open, current can flow into the base of T1 thru R2. <S> Figure about 700 mV for the B-E drop of T1, which leaves 5.3 V across R2. <S> By Ohms law, the current thru R2 is therefore 530 µA. <S> That is also the base current, since that is the only place the current thru R2 can flow. <S> If T1 is saturated (we'll check this shortly), then figure the collector is at about 200 mV. <S> If this is a typical green LED, it drops about 2.1 V when normally lit. <S> That leaves 3.7 V across R3. <S> That results in 14 mA thru R3, which is also thru D1. <S> 14 mA should quite nicely light any ordinary indicator LED. <S> That was assuming T1 is saturated. <S> Let's see what gain it would need for that to be true. <S> We already know the collector current would be 14 mA, and that the base current is 530 µA. <S> That comes out to a minimum gain requirement of 26. <S> Just about any small signal transistor can do that at these current levels, so T1 is in fact saturated. <S> So to review, D1 is off when R1 is shorted, and nicely lit when R1 is infinite. <S> Somewhere in between there is a transition region between full on and full off. <S> Since you haven't given any particulars about the LDR, we can't say if it's light and dark resistances are suitable for this circuit. <S> However, the basic idea is workable for a crude "night light". <S> A better circuit adds some positive feedback, or hysteresis . <S> That causes the circuit to snap between the on and off states. <S> For more information, see my answer to a similar question at https://electronics.stackexchange.com/a/53681/4512 . <A> R1 and R2 form a voltage divider. <S> If R1 (the LDR) has a sufficiently low value, the transistor base will be held at a low voltage so the transistor will not conduct. <S> When R1 has a high resistance, current will flow from the R1/R2 junction into the base of the transistor, allowing the transitor to conduct, and lighting the LED. <S> Try to think in terms of Conventional (positive) current - it flows in the direction of the arrow in transistor and diode symbols (except Zener diodes, which are used "backwards" - arrow pointing against the conventional current direction). <A> Google "hole flow versus electron flow"... <S> electron flow is more prevalent in teaching/usage, but I learned hole flow in the US Navy (~1985), and had to "flip" my thinking when I went to college afterward... especially transistors... <S> all of a sudden they worked "backward" <S> resistance in LDR is high current flows through R2 and the base of the transistor <S> I think your question setup answers your question(?) <S> If LDR resistance is "much greater" than R2, R3 will have "much less" current flow through it. <S> Maybe KCL/KVL loops prove this(?) <A> It is not necessary to consider which direction current flows: positive to negative or vice versa. <S> However, whichever direction is chosen, it is necessary to be completely consistent: If current is considered to flow from positive to negative, then it works in the "positive universe". <S> Perform whatever analysis calculations desired. <S> If one then switch universes for the same circuit, and perform the same analysis, the results are exactly the same. <S> Likewise, when considering current flow through a point, one can either assume inflows are positive and outflows negative; or vice versa. <S> As long as the choice is absolutely consistent throughout the circuit, one obtains correct results.
This circuit "works" if the LDR was chosen so that its resistance is somewhat below the transition point when light, and somewhat above when dark.
Shock from Capacitive Coupling In an AC supply which is not earth grounded, I see a small amount of current flowing to ground from both wires of the supply (live wire has higher) even though the circuit is incomplete. It is due to capacitive coupling? Can anyone explain it? And why do I get more current from the live wire to ground than the neutral to ground even though neither are grounded? Here is a photo for context. <Q> I see where the diagram is attempting an isolated system. <S> However, that is wrong. <S> The system is not isolated: it is bonded to earth. <S> You can't miss the neutral-ground bond in the diagram; it looks like a human! <S> What can be said about isolated systems is "the first ground fault is free". <S> It doesn't do any harm, because the systems aren't connected except for that, and that does not complete a circuit. <S> This first ground fault effectively becomes the neutral-ground bond. <S> That can work in an industrial setting where there is staff maintenance doing frequent testing to detect that "first ground fault" and fix it before there is a second. <S> In your ideal diagram, the human is not shocked because he's the only ground fault. <S> However if there's a second ground fault, he's dead . <S> Capacitive coupling doesn't tingle. <S> What's more, capacitive coupling can't occur at all unless wires are running in parallel for some distance. <S> You are trying to use "capacitive coupling" as a catch-all for all unexplained current and that's just wrong. <S> We often get people on diy.se who say they've replaced their GFCI 3 times and can't understand why it trips when they use their expresso machine. <S> Duh , <S> but they are too vain to accept their precious little appliance could possibly have a ground fault. <S> Don't fall into that trap. <S> Newsflash: Your machine isn't isolated. <S> If it's supposed to be isolated, <S> then it has a ground fault . <S> That's why it shocks you when you touch it. <S> The reason more current flows hot-earth than "neutral"-earth is that the ground fault is closer to "neutral" than to hot. <A> This could be from any number of wires or other elements of your equipment being too close to a grounded object. <S> This could also be coming from your isolation transformer itself. <S> The fact that you're getting a higher reading on your live vs your neutral leads me to suspect it's due to your isolation transformer. <S> Your mains power is most likely earth referenced with a low resistance path between neutral and ground. <S> If your transformer is wired in phase, and the coupling is at the transformer, the proportionally reduced difference in potential will translate to your "isolated" secondary. <S> The truth is that not all isolation is made equal. <S> Even between transformers from the same manufacturer both marketed for isolation, there are significant differences in quality and coupling. <S> One major difference you should check for is if your isolation transformer has a Faraday shield. <S> This helps minimize capacitive coupling and leakage current, and is found in higher grade isolation transformers. <S> This difference can be seen in two isolation transformer datasheet schematics: N-76U without shield <S> N-48X with shield. <S> Even with shielding, it's still not bullet proof. <S> The marketing pitch from a higher end medical grade isolation transformer claims: Faraday shield reduces the cumulative leakage current of the Isolator and connected equipment to levels less than 100 microamps. <S> The goal of most power isolation is not to be perfect, but to reduce the potential to "safe" levels in the event of someone accidentally touching a live line. <S> You're still not supposed to touch it! <S> The take away is that "isolated" does not necessarily mean perfect or zero current. <S> As long as your source is coming from something that is ground referenced (mains) <S> and/or your AC lines have anything grounded anywhere near their magnetic field, you will have some potential for coupling and current flow. <S> Please stop touching power lines. <A> In an AC supply which is not earth grounded, I see a small amount of current flowing to ground from both wires of the supply (live wire has higher) even though the circuit is incomplete. <S> It is due to capacitive coupling? <S> Can anyone explain it? <S> The circuit looks like this: simulate this circuit – <S> Schematic created using CircuitLab Air is just a gap, <S> anytime you have two conductors and a gap, you have capacitance and if you have AC, current can flow. <S> You'll still have some current flow and a mild shock. <S> The values of this simple circuit depend on a wide variety of conditions, but may stand in for an approximation.
Yes, assuming there is not some other physical connection or fault causing the ground loop, you most likely have some level of capacitive coupling to ground from the mains.
Understanding memory requirements for an image file I want to understand the memory requirements for image resource files to be displayed on a 240x400 resolution display. The display has the following specs: It supports upto 18 bits color depth and uses ILI9327 display driver. Assuming that I need to display 50 different icons, each of size 10 mm X 10 mm, what is the storage space required? Here are my calculations: Pixels per mm = 400/61.2 = 6.536 Number of pixels in one image = 65.36 x 65.36 = 4272 pixels Each pixel will require 18 bits X 3 (for R, G and B) = 54 bits Total bits required = 4272 x 54 = 230688 bits = 28.16 kilobytes For 50 images, I will require 1.375 megabytes of storage. Is my calculation correct? <Q> Pixels per mm = <S> 400/61.2 = <S> 6.536 <S> Yup. <S> Number of pixels in one image = <S> 65.36 x <S> 65.36 = 4272 pixels <S> Well, you mean pixels per icon. <S> But even so, you cannot produce fractional pixels, so your number should either be 65 x 65 or 66 x 66. <S> And this leads to a further simplification. <S> Why not make your icons 64 x 64? <S> This will simplify address calculations for your memory, and will only produce a "shrinkage" of about 2%. <S> And trust me, at this size nobody will notice. <S> Then your icons will be 4096 pixels in size. <S> Each pixel will require 18 bits X 3 (for R, G and B) = 54 bits <S> Nope. <S> As jms just answered, it's 18 bits per pixel total, or 6 bits per color. <S> Again, though, you should consider not worrying quite so much about the bit level. <S> Store your color values as partial bytes (6 bits per byte) with separate bytes per color. <S> This will take 33% more memory, but will drastically reduce your processing load when transferring from memory to screen. <S> Total bits required = <S> 4272 <S> x 54 = 230688 bits = <S> 28.16 kilobytes <S> Total bits is 4096 x 24, or 98304 bits, or 12288 bytes. <S> For 50 images, I will require 1.375 megabytes of storage. <S> 12288 times 50 gives 614400 bytes. <A> Make life simple for yourself by making the icons 64×64 pixels. <S> Draw a border around them if you want them to look larger. <S> With the 16-bit color format, this only requires 8 kB per icon, or 400 kB for the set of 50. <S> One simple form of compression is to use a color table instead of storing every pixel's color directly. <S> 16 colors is frequently more than enough for an icon, especially if you apply a little creative dithering. <S> This reduces the storage to 2 kB per icon, plus 32 bytes for the color table. <S> Total storage is a little over 101 kB if every icon has its own color table. <S> Just to satisfy my own curiosity, I grabbed the following "worst case" image (from here ): <S> This ImageMagick command line convert <S> image.jpg -crop 267x267 <S> +66+0 -resize 64x64 <S> -colors 16 <S> final.png turned it into this: Not bad, and of course source images with a more limited range of colors will come out even better. <S> For example, here's Olin, processed the same way: <A> More about color depth Expanding on Dave Tweed's answer, you can do even better than what he showed. <S> Here is the same large-size original he used: <S> Cropped to be square and shrunk to 64 x 64 pixels but using full (8 bit per red, grn, blu) color yields: Rounding the color information from 8 bits per channel to 6 bits results in: <S> That is what your display can do, since you say it supports 18 bit color depth. <S> Rounding the color information further to 5 bits for red, 6 for green, and 5 for blue, for a total of 16 bits/pixel yields: <S> This really should be plenty good enough for icons. <S> Even without any compression, icons of this format take only 64 x 64 x 2 = 8192 bytes. <A> Each pixel will require 18 bits X 3 (for R, G and B) = <S> 54 bits Your estimate is incorrect. <S> The "18 bits" value is per pixel , not per colour. <S> The red, green and blue channels each have a maximum bit depth of 6 bits (64 different values), 18 bits in total. <S> This display controller also supports a 16-bit mode (where pixel data only has 5 bits for red, 6 for green and 5 for blue) which makes it easy to pack each pixel into just two bytes. <S> This makes it easier to store bitmaps efficiently and increases the amount of pixels you can write to the display per second. <S> Number of pixels in one image = <S> 65.36 x 65.36 <S> = 4272 pixels <S> You can't practically store fractional pixels, so your actual bitmaps (images/sprites/characters/whatever) would probably be 65 2 <S> = 4225 pixels. <S> Going the easy route (16-bit R5G6B5 pixel format), 4225 * 16 bits would amount to 67600 bits per bitmap, or 8450 bytes per bitmap. <S> 50 images would require 423 kB (with no compression). <S> If you really want the full colour depth, you need more than 2 bytes per pixel. <S> At that stage you might just as well devote one byte for each colour (as WhatRoughBeast suggests), which will further inflate the storage requirement by 3/2 (634 kB for 50 65x65 bitmaps). <S> You could also pack the 18-bit pixels right next to each other in memory (subpixel bits unaligned with byte boundaries), without wasting any bits. <S> You would only need 476 kB for the 50 65x65 18-bit bitmaps, but it would be a pain to program and slower to process.
50 such images would require 409,600 bytes.
24v Power supplies - input and output power I have been reading your articles on power supply in readiness for starting to build a home automation system using Loxone equipment. I feel confident in the project but the power supply situation leaves me a bit perplexed. I am intending to use 8 TDK Lambda (DRF240-24-1) power packs to drive the 24V DC LED lighting in my new house. Each power pack has a rated input of 100 – 240 VAC 2.7A.The output is 24 – 28 V DC 10 – 8.6A. So that is a power requirement of 648W for an output of 240W. My first question is where is the missing 408W? I realise that the pack itself will require some energy to work, but I would have thought that would be around 20% of the input. Secondly; if the input is rated at 2.7A x 8 power packs then I will need an RCB in the consumer unit rated at over 21.6A, - or more likely several lower rated RCBs to split the load into zones. Am I missing something here? From the 8 Power packs there is a total power available at 24V DC x 80 A = almost 2,000W whereas to provide this I have to supply 21.6A x 240VAC = over 5,000W. Am I going wrong somewhere? Any observations would be appreciated especially if I am completely failing to understand this issue. Thanks in anticipation. <Q> 100 <S> – 240 VAC 2.7A. <S> The output is 24 – 28 V DC 10 – 8.6A. <S> The input current will be maximum at the minimum input voltage. <S> So \$ P = <S> VI = <S> 100 \times 2.7 <S> = 270\ \text <S> W \$. Output is \$ 24 \times 10 = 240 \ \text <S> W \$ or \$ 28 \times 8.6 <S> = 240.8 \ \text <S> W \$. Efficiency is \$ \frac {P_{OUT}}{P_{IN}} = \frac {240}{270} = 89% \$ which is OK. <S> From this information we can work backwards and see what the input current will be at 240 V: \$ <S> I = \frac { <S> P}{V} = \frac {270}{240} = <S> 1.1\ \text A \$. <S> My first question is where is the missing 408W? <S> It's still back at the power station. <S> Everything is OK. <S> If the input is rated at 2.7 A x 8 power packs then I will need an RCB in the consumer unit rated at over 21.6 A. <S> You have omitted location and supply voltage details from both your question and your user profile. <S> If you are in 110 V land your max current will be probably 2.5 A per unit. <S> In 230 V land it will be about 1.2 A per unit. <A> You've misread the intent of your input specs. <S> 2.7 A is the maximum current, which occurs when the input is 100 volts. <S> It's useful to specify this maximum current, since that determines the size of the wire required for safety. <S> However, assuming 270 watt in, at 240 volts the current will only be 270/240, or 1.1 amps. <S> TL;DR - 2.7 amps doesn't occur at higher input voltages, so the input power does not increase then, either. <A> Another way to approach the operating input current is to start with the load. <S> The input power equals the output power divided by the efficiency of the supply. <S> Assuming you are not running each supply at full power all the time, the input current will increase and decrease with the load current. <S> Note that the typical efficiency on the datasheet (94%) is at full load (even though not stated in the notes). <S> At lower output currents the supply's efficiency decreases. <S> Don't be surprised if it measures something like 75%-80% at half power. <A> Thank you to all – I knew I was missing something obvious. <S> This was illustrated by Olin Lathrop using apples in another thread. <S> I should have said that I am in the UK where the supply voltage is 240V. Just to put this to bed; I should work back from the final load <S> i.e. assume that each power pack is only loaded to say 90% of its maximum output of 10A that is 9A and at 24V <S> that is 216W. <S> Then assume that the efficiency of the pack is around 80% so 216W output requires 270W input and at 240V that is 1.125A. With 8 units that is now only 9A in total <S> So by carefully selecting zones for the lighting I can easily supply the system through two 5A RCBs. <S> This also assumes that all of the 24V lighting will be on at the same time which is unlikely. <S> Additionally I am sharing the load between the power packs in such a way that none of them will come close to the maximum output load. <S> I hope I have now got it. <S> Thanks for putting me on the right track.
You can only use as much energy as the ultimate load requires!
Jumper wire solution for short header pins / I installed header pins that fit into a feather microcontroller, but since they are not double sided header pins, the top side is too short to attach normal jumper wires to. Is there some clean, non-permanent solution to this where I can still attach jumper wires, but not solder or desolder any existing pins? <Q> These pins are very easy to desolder: grab them one by one with needle nose pliers, heat the other side, and pull. <S> Once the pin is heated, it will soften the plastic and slide through with very little force. <S> You don't need to hack the plastic. <S> This will take like 2 minutes. <A> Either cut the plastic and lift it off the pins, or use test clips or micro grabber clips to attach to the remaining headers. <S> You could also use wire wrap. <S> Or solder a second header to that header. <S> It's possible just ugly. <S> Or save the hassle and just desolder and resolder a new one of the right length. <S> It will take you less time than hacking something. <A> They are soldered the wrong way around. <S> Desolder them and solder the short end to the board. <A> These pins can be connected to jumper cables just fine if jumper cables have the right kind of connectors. <S> Remove the black cover to see what connector you have. <S> Bad: <S> Better: <S> Good: <S> The good variety can be connected to the pins you have. <S> The one in the middle will be on its limits, but may hold in place if you don't pull on the wires. <S> The bad variety won't hold on anything but a full-length pin, plus it only works well once. <S> With the bad kind, it's sometimes possible to push the springs further down to make it temporarily better, but don't hold your breath. <S> These take much more space than regular connectors and are quite unstable, but can hook up to very small pins.
If you can't get your connectors to hold in place, your next solderless option is the clamp wires: Desoldering seems to be the easiest.
Can a surface-mount ceramic capacitor fail partially and intermittently? My focus is on surface-mount ceramic capacitors. The obvious failure extremes are open and short. Other than these extremes, can the failure be that the effective value of the capacitor is either higher or lower than the spec? Can this failure be intermittent in that it disappears when the technician eventually comes around to examining the circuit? I don't mean intermittent in the sense that it lasts seconds or less but that the failure lasts minutes but only at random time of day and random day of week. If yes then I'm curious as to what the failure mechanism could be. Also, is there a test to confirm such a bad installed capacitor? <Q> 3 possible conditions I can think of that could cause psudo-random appearing intermittent issues. <S> Temperature. <S> Ambient and operational temperatures can cause dramatic changes in performance depending on the specific component specs and tolerances. <S> Physical stress. <S> They usually don't have much give in them before they crack and fail open/short, but a light flex or moderate pressure during operation can cause unpredictable results. <S> Piezoelectric Effects. <S> Certain electrical conditions can cause multilayer ceramic capacitors to vibrate, and any vibration can case them to generate a voltage back into the circuit. <S> If your circuit only enters a state where it causes a piezoelectric vibration under certain conditions, or the usage conditions create random bumps and vibrations by the user, then you could have undesired and intermittent issues. <A> There are bunch of different failure modes that basically boil down to cracks in the ceramic (including micro-cracks) or termination failures. <S> Such things can certainly be intermittent and sensitive to flexing of the PCB or other seemingly random factors. <S> Here is an AVX document with a fairly detailed description of various causes. <S> Not mentioned in the AVX document, but some makers have "soft" terminations that are resistant to some sources of problems. <A> If the capacitance changes are significant, it's likely one of the endcaps is broken off. <S> This can happen if the board flexes with the cap attached. <S> The result is that both sides of the cap are materially separate, but held in place mechanically with enough precision to allow the cap to work. <S> Subsequently, slight twisting or bending will result in total or partial failure of the component. <S> If you unsolder such a component, it will fall apart immediately. <A> SMT ceramic capacitors are very sensitive to strain. <S> Class II dielectrics (everything except NP0) are also piezoelectric. <S> Stresses on the board, including thermal stress can change the capacitance significantly.
Bending of the mounting surface can cause deformation and therefore changes in capacitance.
How many capacitors do I need in my PCB design? I have designed a PCB that includes an STM32L1xx MCU, a Micro SD Card, a pressure sensor, an accelerometer, a battery 18650 type and a buck-boost converter for a stable output of 3.3V (ISL9120IRTNZ). I have followed the instructions from all the datasheets in order to connect the appropriate capacitors, make the correct connections etc. I think that I have used too many capacitors for my design. Since every module requires some capacitors, can I omit some of them? Do you find any other error in the schematic? <Q> I think that I have used too many capacitors for my design. <S> Since every module requires some capacitors, can I omit some of them? <S> The only technical case where it would be too many is that an overly capacitive load could destabilize certain power supplies – not happening here. <S> Of course, caps cost money and space (and time when soldering). <S> Oh, and weight, considering your affiliation. <S> But, generally, you'll need decoupling caps as close as possible to the individual components, and by spatial considerations alone you can't omit "duplicates". <S> Especially since you have sensors in your circuitry, you also wouldn't want things to share capacitors – by sharing, you'd lose a good part of the isolation between supply noise source. <S> From looking at your schematic, I wouldn't get rid of a single one of your capacitors (in fact, I'd even add a couple of "do not populate" caps, so that if things later happen to not work out of sheer bad luck, you can easily try and add more). <S> I must admit that I don't think 10 µF at every end is necessary, and I'd replace these at the NRST and at left sensor with maybe 1/10 of the capacitance, but they don't hurt, either, as the low-ESR fast-acting compensation is done with 100 nF. <S> Also, I'd drawn the schematic slightly different with respect to C7 to C10: make it clear that they all belong to their "own" VCC pin by not first having them all connected to one wire and then splitting that, but by placing them in connection with one pin each. <S> Oh and also, add test points. <S> These cost nothing but are tremendously helpful during assembly, testing and potentially debugging. <S> For anything that's not a high speed/RF signal, I'd actually recommend using a 2 pin pin header footprint – <S> that way, you can just solder in a pin header if you need to test something for a little longer, and if you don't, it's easy to "hit" the contact with the pointy probe of a multimeter if that contact is a hole ;) <S> You really cannot have enough test points, believe me. <S> Omitting test points is a mistake I still do to this day, and I always regret it. <S> If you have the space: a fuse in line with the battery would be good style! <A> I normally have one 100nF per supply pin, which is what you have too. <S> The extra 10uF is good but <S> you have rather lot if you add up them all up in the in various places. <S> Fine if you can place them on the PCB and keep the adjacent to the 100nF where they are needed. <S> For a commercial product it may become a bit expensive. <S> Also I always add a resistor between 3V3 and VDDA. <S> You can solder a zero-ohm in there <S> but it gives the possibility for extra noise filtering. <S> (You can even place an L if your want) <S> Internal pull ups are fine to 'tie-off' a pin <S> but I would not rely on them for a reset-RC. <S> Also the value can vary a lot. <S> As mentioned: add a pull-up resistor. <S> Post edit: I also make some testpoints to a few unused pins: Murphy's law says you suddenly find you're in need for one more <S> I/ <S> O pin then expected. <S> (e.g. : if I would have connect my serial RX to another input pin <S> I could have made auto baud detection...). <S> Murphy's law also says the test point is always on the wrong pin, because it has does not have the special .... <S> function you need. <A> I don't think these are too many caps, rather have "too much" than too less. <S> Just make sure to have them close to the supply pins of the IC and in case of the MCU you rather want to have one at each VCC pin instead of all at the same pin - just in case. <S> I'd probably consider to add a pull-up resistor to the NRST input circuit.
It's nearly impossible to have "too many".
Npn transistor failed to work Sometimes after long time working correctly and turning on and off inductive load, Darlington NPN transistor (ONSEMI BD679) which should follow signal (IN4), fails to work and turns on inductive load continuously.It's part of my schematic: It usually works correctly and this problem maybe happen after a while.What issues can do this? <Q> Switching an inductive load, even with the flyback diode, is hard on the transistor, and you may be seeing an SOA (Safe Operating Area) issue that is causing the transistor to fail. <S> When the transistor is turning off there will be a time during which the Vce is >30V and the current is still 1.2A. <S> Here is the SOA for a beefier Darlington- <S> the TIP122: <S> For the first problem, the most obvious solution is to use a beefier transistor (and, though I don't think it's the problem, you might want to use a 1N5819 rather than a 1N4007 for the flyback diode). <S> For the second problem, make sure your flyback diode is connected near to the transistor, and that there is sufficient capacitance on the +30V rail to prevent overvoltage. <S> This is a function of the energy stored in the stray inductance. <S> Alternatively, put a TVS directly across the transistor E-C leads. <S> You can use an oscilloscope and measure the E-C spike at turn off to determine if the second issue is a likely cause. <A> I guess the problem starts with the lack of base current. <S> A 30 volt supply via a 10 k resistor can provide 3 mA into the base of the BD679 darlington. <S> However, if you look at the Collector-emitter saturation voltage in the data sheet it says: - 2.5 volts (IC = 1.5 <S> A IB = 30 mA) <S> Because you are only providing one-tenth of that recommended base current to properly turn on the transistor it may be dropping 3, 4 or 5 volts whilst powering your solenoid and <S> this results in maybe 3 to 5 watts of power being dissipated over a period of 5 seconds whilst activated. <S> there is no heatsink <S> So it's going to be fairly hot when you turn it off then, if you rapidly switch it on again it is possibly failing due to the junction temperature being exceeded. <S> Transistor doesn't warm up in that 5 seconds of turning inductor on <S> I'm not buying that. <S> In the Multicomp data sheet or this one for the device I read: - Junction to Ambient in Free Air 100 °C/W <S> So, without a heatsink or other form of adequate cooling you could be damaging the device. <S> I think this is your main problem. <A> If the op amp acts as a perfect switch, this should work. <S> There is a possibility of heating or oscillation, though, because there is no clear indication of the slew rate of the IN4 input signal, and the LM258 can be a slow-slewing drive to the transistor base. <S> Since the BD679 can be carrying over an ampere of current, it willself-heat <S> when partly ON. <S> Aquick ON-to-OFF transition is important; consider adding some positive feedback,pin 7 to pin 5 with a 500k resistor, and IN4 to pin 5 with a 5k resistor,to make the transitions swift.
It's also possible that there is stray inductance in your setup (or inadequate bypassing of the 30V rail) that is causing the transistor to see overvoltage.
Is there a wireless protocol for 100m-1km range in rural property? I am an electornics hobbyist. A friend of mine, who is building an organics farm, wants to wirelessly automate some devices in his property, and asked for ideas. His problem is to "talk" to remote devices, namely the front driveway sliding door (around 100m away from home) and water pump (200m away from home in the opposite direction). This "talk", that is, sending and receiving commands and data, would be handled by some sort of dashbord or "control center" yet to be devised. At first, he expressed the desire to use WiFi, but as far as I know, at least the water pump would be too far from the control center. I am pretty sure this type of scenario is pretty common, but could not find an obvious protocol for the "100+ meters" range, up to, say, 500m or 1km. What are the protocols commonly used for this, specially in rural areas? UPDATE: At first, we would not like to depend on third-parties, such as cell-phone operators or similar paid services. <Q> This sounds like a perfect match for LoRa . <S> 10km in rural areas, no additional licence required, and lots of example designs to learn from. <A> In large the right wireless solution for you will depend on the automation (MCU selection) at the remote points. <S> If you are building based on a single board computer such as Raspberry Pi then you might consider the Nordic Semi NRF24L01 <S> + . <S> This is readily available at low cost ($3-5) on Ebay with a PA that raises the line of sight distance to about 1Km. <S> Hard to beat for the price. <S> There are readily available libraries to support this device and endless follow the bouncing ball projects for Raspberry Pi and Arduino that should be able to kick off your project. <A> A picture worth thousand words. <S> You should first ask the question yourself, "what is the data rate I'm looking at? <S> " If you're looking for higher data rate, then sigfox will not work. <S> At first, he expressed the desire to use WiFi, but as far as I know, at least the water pump would be too far from the control center. <S> In order to solve this problem, extended wifi is introduced with 802.11ah standard called WiFi HaLow . <S> It works at lower frequency of 900MHz and thus bigger range upto 1km as per your requirement. <S> LTE Category 0 is another option you should look at as it is now begin adopted in M2M. <A> If power is a concern, 802.15.4 is designed specifically for low rate, low power communications over these ranges. <A> I currently use TP-Link. <S> Google for CPE210 from them. <S> It goes 5k+ <S> and it is relatively cheap. <S> Just set it up as a repeater from your current router or you can use it as an AP.
You could potentially use WiFi (or ESP8266 with a PA) based endpoints with a directional antenna, but the antenna cost alone will be outlandish, and most modern APs have multiple antenna to deal with, and if you have multiple directions to service this will become very challenging. If you don't want to write your own mesh stack, Zigbee and 6lowpan are available over the 802.15.4 transport.
Information tables for operational amplifiers Is there a place in the web (or elsewhere) where it is possible to find tables for operational amplifiers (and why not, other electronic components) like the one, for instance, in "The Art of Electronics", table 4.2.a. I know big companies have their own catalogue, but it would be nice if this was done by electrical engineers for all the companies, possibly with some filtering system. <Q> There's not, as far as I know, a central maintained database of this information. <S> It would simply be too time consuming to do, given the huge number of products. <S> The best suggestion I can give would be to use a large parts distributor (Digikey, for example) and use the parametric search options for the whole of their opamp collection. <A> If you are buying things like op-amps you probably already know that there are only a limited number of companies that make them, particularly high performance ones. <S> You can go to parametric search at, say, Digikey, which might help you identify emergent suppliers, but it's also useful to go to the websites of the usual suspects (Analog.com (also includes Linear.com now), Ti.com etc.) and use their parametric search engines. <S> Digikey is pretty good, but they still miss things like listing Vos typical values rather than worst-case. <S> Anything less is 2nd hand information, and that's not good enough. <S> Personally, I don't think I would use a list contributed by volunteers on, say, Wikipedia. <A> As addition to @awjlogan there is also https://octopart.com/ <S> which is also a search engine for electronical parts containing hundreds of distributors and thousands of manufacturers. <S> And finally there are of course paid options like https://www.siliconexpert.com/products/part-search which has billions of parts and can assist with building Bill Of Materials or finding cross reference parts. <A> No, there aren't any tables like that, and they would instantly become outdated. <S> The best places to find op amps are: 1) From the manufacturers. <S> Linear\Analog <S> All Operational Amplifier Selection Table Texas instruments Operational Amplifier Selection Table <S> Maxim Integrated Operational Amplifier Selection Table <S> ST Operational Amplifier Selection Table ect From distributors (this one has most all the parts) <S> Mouser Table of Op amps <S> Yeah, it takes some additional time, but the tables are current and they also have pricing and stock information (why would you want an opamp if you couldn't order or buy it)
Digikey Table of Op amps In the end you have to go to information such as datasheets and app notes from the real manufacturer.
Operating a switch mode power supply at its limits I have a few SMPSs with over current protection. When reaching the maximum power output they simply start dropping the voltage. I am powering LEDs and the alternative would be to add a small resistor in series. The power heating the resistor would however be lost. Is it safe and power efficient to operate SMPS at their limits? If this depends on the PS (maybe the IC) is there an easy way to know which PSs I can use this way and which not? If it's not safe / power efficient, why? <Q> Is it safe and power efficient to operate SMPS at their limits? <S> Yes, but not safe to operate them above their limits. <S> Although an SMPS with appropriate testing should be able to handle a direct short. <S> If this depends on the PS (maybe the IC) is there an easy way to know which PSs I can use this way and which not? <S> Check the datasheet, make sure it has the appropriate ETL certifications (UL ect). <S> Buy from a reputible company (ie, a cheaper supply one area they usually save money on is the testing and components). <S> All supplies that are tested to IEC standards are tested to the following (and a few more that I will not list):1) Make sure that there is appropriate insulation or gaps for high voltage sections in the PCB, cables and components 2) <S> Components that are above a certain voltage (mains voltage) have to be tested under additional ETL requirements 3) <S> A fault won't shock the user 4) <S> The supply can handle shorts at the rated current without overheating or destructing If it's not safe / power efficient, why? <S> Power efficiency has nothing do do with saftey of the design. <S> And at DC, the supply doesn't care what kind of load you place on it. <S> If you have something that is switching on and off this can become a problem. <S> IF you really want a safe supply then get a medical grade supply. <A> It does depend on the design of the power supply. <S> Unfortunately many power supplies are poorly designed and either can't put out their rated power continuously or can't operate at current limit continuously and reliably. <S> The only ways to know for sure are: Contact the manufacturer to see if they have data showing reliability (including temperature rise on critical components) in current limit along with lifetime and reliability predictions or testing. <S> If you can, run the tests at high ambient in a thermal chamber. <S> Reverse engineer the supply and analyze it to see if it should be reliable. <S> I have tested many wall adapter supplies in this way, all within their rated specs and a high percentage of them permanently failed, so try to get your supplies from a quality supplier. <A> Is it safe and power efficient to operate SMPS at their limits? <S> Let's say a certain manufacturer said something like: - Can be operated indefinitely into and out of current overload protection at any temperature <S> So, going back to your requirement: - I am powering LEDs and the alternative would be to add a small resistor in series. <S> The power heating the resistor would however be lost. <S> Without an active limiting device like a resistor you would be relying on the current limiting circuit designed to protect the power supply and, is there any guarantee that this will operate reliably at a certain limit and act immediately? <S> Not acting immediately might mean that when the supply goes into "current limit" it oscillates in a loop such that only the average current at the output is limited. <S> This would be a disaster for LEDs running close to their own limits. <S> The current could exceed the peak LED current cyclically. <S> Also, who guarantees that a current limiter won't change its characteristic limit value at different temperatures. <S> Who is going to guarantee that? <S> is there an easy way to know which PSs I can use this way and which not? <S> Not even by "black box" testing can this be properly known.
Run your own tests on the supply, instrumenting temperatures of critical components.
Can we switch ground in relay I am having a 3 pin relay used in bike horns. My need is to turn on and off ground using the positive as trigger. That means the positive terminal of the device is connected to the 12v supply. Usually we are turn on and off positive using ground. I need the opposite. Is it possible? If yes i can connect it to the device. I don't have any test environment. So i have to confirm before going forward. <Q> Table 1. <S> Pin functions <S> Terminal/ <S> Pin number 85 Coil 86 Coil 87 <S> Normally Open (NO) simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> Using a 3-pin, 12 V relay to use a switched positive signal to control a switched negative load. <S> For more on auto relays see 12 volt planet . <A> This is called a low side switch and is very common in automotive and industrial systems. <S> Switching power is called a High side switch. <A> I think you have one side of the horn permanently connected to negative ground (so just one wire comes from the horn). <S> The below paragraph is based on that assumption. <S> So you should connect pin 86 to +12, pin 87 to the horn wire, and to make the horn beep <S> , you ground pin 85. <S> Otherwise there is no way to do it with a 3-pin relay as shown.
If you have only a positive signal for "horn" then you can add a small 12V relay to operate the horn relay or add a transistor (and a resistor and a flyback diode). There also exists smart IC switches in automotive to do the same with protection.
A question about capacitor type and temperature limits Is it possible for a 100u or 10u electrolytic capacitor to operate at -30C ambient temperature? What type of capacitors can this be replaced for such low temperatures to operate fine and better stability? <Q> Operating temperature range <S> The Operating Temperature Range is the temperature range over which the part will function, when electrified, within the limits given in the specification. <S> It is the range of ambient temperatures for which the capacitor has been designed to operate continuously. <S> Largely the formation voltage sets the high-temperature limit. <S> Higher formation voltages permit higher operating temperatures but reduce the capacitance. <S> The low-temperature limit of an electrolytic capacitor is set largely by the cold resistivity of the electrolyte. <S> The higher cold resistivity increases the capacitor’s ESR 10 to 100 fold and reduces the available capacitance. <S> The electrolyte is a complex blend of ingredients with different formulations according to voltage and operating temperature range. <S> The principal ingredients are a solvent and a conductive salt – a solute – to produce electrical conduction. <S> The common solvent is ethylene glycol (EG) and is typically used for capacitors rated –20 ºC or –40 ºC. Dimethylformamide (DMF) and gammabutyrolactone (GBL) are often used for capacitors rated –55 ºC. Common solutes are ammonium borate and other ammonium salts. <S> Storage Temperature Range <S> The Storage Temperature Range is the temperature range to which the part can be subjected unbiased, and retain conformance to specified electrical limits. <S> It is the range of ambient temperatures over which the capacitor may be stored without damage for short periods. <S> For long periods of storage keep capacitors at cool room temperatures and in an atmosphere free of halogen gases like chlorine and fluorine that can corrode aluminum. <S> Storage temperature ranges are from –55 ºC to the upper limit of the operating-temperature ranges. <S> Sources: Capacitor Selection Guide - KEMET <S> (.PDF) <S> Aluminum Electrolytic Capacitor Application Guide - Cornell Dubilier <S> (.PDF) <A> They and most capacitors DO have a maximum temperature rating. <S> Most are rated to 85 C but for SMPS and other power devices you may need to buy 105 C rated versions. <S> An 85 C capacitor exposed to 100 C will have a short life. <S> It may dry up and do nothing, or pressure build-up may make it go BANG. <S> I had to do a bit of research for marketing one day to find out how cold our products could get and still keep working. <S> The weak spot was the LCD surge counter, which froze at -40 <S> C/F. <S> The liquid crystal itself froze and would not change state until it was nice and warm again. <S> If you are planting a device in brutal cold weather the batteries should be your main concern, not capacitors. <S> Some parts may drift a little in such cold. <S> If temperature goes below -100 C, you risk cracking of the solder to ICs. <S> Except for LCD displays, cold should not be an issue with stable parts down to -40 C/ <S> F. Below that, your on your own. <A> If you go to digikey.com and start looking at electrolytic caps, their filter system gives 11 different 100 uF caps rated for -55 to +150 C. <S> So it's not what you call a real problem. <A> I've linked a couple datasheets; check the ESR vs. temp graph on hybrid polymers (pretty much flat to -40C) and ESR values in the standard electrolytic table (go from 0.2Ohm to 3 Ohm between 20C and -40C). <S> Hybrid Polymer vs. Standard <S> You cannot just use standard (e.g. not hybrid) polymer if you care about similar performance against high vibration or humidity.
Aside from noting that there are electrolytic caps rated for < 30C, if you are worried about performance you could use hybrid aluminum polymer caps as generally better replacements at cold (if ESR is your figure of merit). To be honest I have never seen an electrolytic capacitor with a minimum temperature rating.
What is the purpose of an AND gate with the same signal on both inputs? If this is a buffer, why use an AND gate, aside from better availability of that gate in a single package? This is on an Analog Devices SHARC eval board. <Q> This is a buffer. <S> Two gates means twice the output current. <S> But why use AND gates instead of buffers, you might ask? <S> I was originally going to say that they probably used one or two AND gates elsewhere in the circuit and just popped down a single quad AND gate chip, using two of the AND gates as buffers instead of calling for an actual buffer to save board space and parts count. <S> However, it seems they are the single gate variety. <S> So I presume they had a lot of AND gate chips on hand for whatever reason - perhaps they are used elsewhere in the circuit, or in other designs manufactured on the same production line - and they didn't want to pay for another line item/part feeder on the pick and place machine, so they just specified more AND gates instead of some AND gates and some buffers. <S> One thing to note about using two AND gates (or another two input logic gate) in this way instead of buffers (or inverters) is that there are twice as many input pins, so the input capacitance will be double. <S> This probably won't be an issue in most cases. <S> If it could possibly be an issue, tie one input high (or low, depending on the gate) instead of connecting both to the input signal. <S> Edit: looks like one of them is marked DNP, and hence may be an empty footprint on the board. <A> The designers have probably chosen the AND gates because of availability or some other such convenience. <S> Maybe they had the AND gates on the bill of materials for that board already. <S> The gates are used as a buffer for driving the cable. <S> The two gates can output more current than the part which generates the signal initially. <S> There are ICs that do just buffering without logic functions ( SN74LVC2G34 , for example.) <A> SPDIF is designed to drive 1Vp-p from 75 ohm source into a 75 ohm load. <S> Having worked out the current required from the driver, presumably the designers decided that was the cheapest way (or smallest in terms of PCB space, or otherwise optimal in their design) <S> way to supply it.
I presume this was done just in case one gate couldn't provide sufficient drive strength, they could add a second without having to re-spin the board.
SMD IC mounted upside-down inside a drill hole for extreme low-profile requirements I don't know if the title is descriptive enough, but I came across this PCB and could stop to wonder about its brilliant design. It is an aftermarket trigger controller for an airsoft gun that works linear Hall sensors, such that you may glue tiny neodymium magnets to the different moving parts (not shown in the picture) to detect their position. Notice the Hall sensor at the very left. It's buried within the PCB! And it even looks like it has some exposed vias to aid with soldering. This way the designers could place the sensor right between the shell and one of the moving gears (removed in the picture). Beautiful! Is this common practice? And how difficult would it be to use on my own designs? Are there any references or guidelines I could read? This design really impressed me, and gave me many many new ideas for future projects I would like to try out. UPDATE: As discussed in the comments and in some of the answers, it seems that the cost of manufacturing this PCB will increase because these components must be hand-soldered. I would like to clarify that this is no issue for me. I produce only very low quantity PCB's for prototypes (which I usually solder myself). But still, thank you for bringing this extra cost to my attention. I didn't account for it because of this same reason :) About the accepted answer: Sadly I can only accept one answer, though I find all of them very useful and insightful. I now know that this type of assembly is not common practice, but can be done if one is willing to pay for the extra cost (or solder oneself by hand). However, I've accepted the answer that gave me the key concept, namely castellated holes , plus the idea of doing the milling right at the edge of the board (just as in the attached screenshot). Thank you all again for helping me out on this, and I'm glad this question lead to a healthy discussion on the pros and cons of z-milling . <Q> Common enough. <S> The process is called "Z-axis milling". <S> Used for LEDs sometimes too. <S> It requires extra steps so expect extra costs or MOQ or both. <S> For small quantities the costs may be prohibitive, even from China. <A> Is this common practice? <S> And how difficult would it be to use on my own designs? <S> Are there any references or guidelines I could read? <S> This design really impressed me, and gave me many many new ideas for future projects I would like to try out. <S> No it's not a common practice <S> , it would probably incur some kind of cost outside of regular charges because of the additional time and effort it would take to install the part (most likely by hand). <S> But they needed a hall effect sensor on the board and a good way to keep it there, which is ingenious. <S> There are no rules for this type of thing, just a lot of creativity. <S> It may have taken them a revision or two (or three) to get it right. <S> But the sky is the limit, if you can dream it up and the board house can manufacture it then you can build it. <S> I think the most limiting factor would be your layout software and the ability to make components on multiple layers. <A> This isn't best practice from the DFM (design for manufacturing) standpoint. <S> The PCB assembly house will charge more for mounting that part upside down. <S> It's a non-standard operation for them. <S> It makes me wonder why the designers didn't mount the sensor on the other side of the board in a normal way, and make a pocket for it in the enclosure. <S> Maybe this arrangement was a last moment kludge (albeit a good looking one). <S> Having said that, there are SMT parts made specially for through-board mounting. <S> When they come on tape, they are in the correct orientation, and pick&place machines can work with them. <A> Getting the PCB itself manufactured probably doesn't cost extra. <S> The features you need are milling slots and castellated holes . <S> These are already part of the base service for many PCB shops. <S> In your example the space for the component is at the edge of the board, so it gets made the same time they route rest of the board outline. <S> But it could also be a separate milled hole in the center. <S> Castellated holes means a through-plated hole cut in half. <S> This requires that the PCB manufacturer has a milling step after the through-plating, and that the milling tool can cut through copper without tearing it off. <S> Castellated holes are quite common in breakout boards so nothing too special. <S> But for example on the PCB in question, there are through hole parts and wires also so some manual assembly would be needed anyways. <A> This method is/was quite commonly used to mount bulky (usually non-SMD-specific) components (watch crystals, ferrite rod transformers, small non-SMD transistors (think 2SC2785 sized, not 2N3904 sized!) <S> , electrolytic capacitors) in very small but relatively low-tech devices: credit card sized calculators, stopwatches, wristwatches, remote controls, simple handheld games....
You can even bury low-profile parts such as bypass capacitors and resistors in cavities entirely within multilayer PCBs. It is true that if you pay for automatic pick & place of SMD parts, they usually cannot place that part upside down automatically.
Identification of filter component in sewing machine foot pedal My sewing machine foot pedal appears to short circuit intermittently, causing the sewing machine to be at full power randomly. Given the limited number of components on the PCB, I suspect the component labeled VT1. On component VT1 it says "50k". There are three pins for this component. Top and bottom-right are connected to neutral, bottom-left is connected to the wire marked 'L'. What part is VT1 and what is its purpose in this foot pedal? <Q> Something related to the VR1 slide-pot is the most likely culprit. <S> It may not be the slide pot directly, although those are notorious for getting "scratchy". <S> However, that wouldn't likely cause sudden full speed operation. <S> I see that this is a single layer board. <S> This is common with single-sided boards and parts that take mechanical stress. <S> Single-sided boards don't have plated-thru holes, so the solder is only stuck to the board on the back side only in a ring around the pin. <S> The pin sticks thru the blob of solder, which is also what holds the pin in place. <S> These arrangements can develop hairline cracks in the solder such that the pin and a little solder around it becomes a free-moving "plug" inside the rest of the solder blob. <S> It will make contact much of the time, but then sometimes intermittently not. <S> That seems to be exactly what's happening with the pin for the low speed end of the pot travel. <S> Without that pin connected, the voltage out of the pot is that for high speed, largely regardless of the pot setting. <S> The slide pot is probably mechanically linked to the foot pedal, and therefore gets regular stress. <S> A single-sided board for mounting something like that is really the wrong tradeoff for everything except price. <S> This thing was cheap in more ways than one. <S> Single sided boards are cheap in high volume because they can be stamped instead of routed, for one thing. <S> You may want to note the manufacturer and think carefully before buying anything from them again. <S> Reflow <S> all the solder joints on the back of the board, and add a little fresh solder while you're at it. <S> That should make it last another few years until you need to do that again. <S> Added For completeness, VT1 is a 50 kΩ trimpot used as a rheostat (variable resistor). <A> The 50K trimpot looks fine to me. <S> It is a calibration adjustment, to adjust either the maximum or minimum speed (minimum, I would think). <A> It looks like a trimpot, or miniature potentiometer. <A> I can't say what its purpose is in the foot pedal without a schematic, but the part is definitely a single-turn 50,000-ohm potentiometer. <A> VR1 seems more likely. <S> It's a linear potentiometer and is probably going intermitently open.
I would think it's more likely VR1 (especially if something got into it) or something on the other PCB with the actual speed controller. Most likely the solder joints of the slide pot pins on the back of the board have partially failed. It looks like its purpose is to set minimum speed for when the slider is all the way at the slow end.
Chosing R and C values for a given RC filter design I'm currently into designing passive LP filters such as RC topology and active filters such as Sallen-Key topology. I'm fully aware that what matters in the choice of values for the resistors and the capacitors is their product so increasing one will result in decreasing the other in order to keep the same cut-off frequency. What I have trouble with is knowing whether I should chose my capacitor first and adjust the resistor or the opposite. And for each option, how should I chose the component's value. I'd like to know if there's any rule of thumb to chose quickly the values for my filters, knowing the impedance of the load or other parameters. For example, I'm currently designing a filter (active or passive) for a PWM running at around 10kHz and I want my cut-off frequency to be around 1kHz, the load having an impedance of around 100 kOhms. <Q> Sallen-Key filters are very gain- <S> sensitive!That means: <S> A small deviation from the required (fixed and finite) closed-loop gain Acl of the active stage will cause relatively large deviations of the desired Q-factor of the filter. <S> Therefore, two Sallen-Key alternatives are preferrable: Acl=1 (feedback path is a short) or Acl=2 (two identical resistors in the feedback path). <S> Do not use the "equal-component" form of the Sallen-Key structure (R1=R2, C1=C2) because the required gain value is uneven (not easy to realize). <S> For designing the passive RC-network follow the recommendations mentioned in the other answers. <S> Recommandation (edit): 1 <S> ) Unity-gain version: In case of Butterworth response (Q=0.7071), two equal resistors are possible (capacitor ratio of 2) 2.) <S> For gain-of-two (Acl=2): Two equal capacitors are possible (for all Q values) 3.) <S> When a second opamp is available, you can decouple the first node from the rest. <S> In this case, you can use two unity-gain amplifiers and have the same properties/advatges as in case 2) (equal capacitors). <A> It depends a lot on topology and also on other factors like getting a reasonable input (and sometimes output) impedance, and capacitor types. <S> For most well known topologies there are "cookbook" equations that you can use, or you can work things out by modeling. <A> Big caps might not function as a cap above the self-resonance frequency caused by the inductances of the leads. <S> I would also consider the current capability of your source. <S> It will behave as an ideal voltage source - <S> I assume you have a voltage-to-voltage filter - as long as its output impedance is much lower than the load presented by the filter. <S> If your topology does not have a low output impedance, i.e. you have no opamp at the output node, you should also take into account the load in your calculation. <A> You need to take account of filter source impedance and filter load impedance: - At high frequencies, the loading impedance of a filter on the signal source can be onerous. <S> If an MCU pin is the source then it will be typically around 10 to 100 ohms output impedance. <S> This means you should use a value of "R" that doesn't create a problem. <S> Possibly 1 kohm to 10 kohm. <S> Given that the load might be 100 kohm, and "R" might be 1 kohm, there would be a potential-divider error of 1% and this may not be a problem. <S> However, if "R" is 10 kohm then there will be a potential-divider error of 10% and this could easily be a problem. <S> So, choose "R" first in order to match the source and load impedances and if this cannot be adequately met then you need to consider an output buffer. <S> Clearly if a Sallen-key design is used you get an output buffer for free and, assuming the load is 1 kohm or greater, the op-amp will handle it. <S> You still have to consider the input loading effects though because like the simple RC filter, at high frequencies the input impedance is the first resistor seen by the source (R1 below): -
Typicaly for an RC low-pass filter, the impedance seen by the source will be "R" at high frequencies so, make sure "R" is big enough to not cause errors due to excessive loading. You should choose components which are available for you at a reasonable price and accuracy.
Why am I not dead after repeatedly touching a high-voltage source? While playing with mosquito racket in my home, I unscrewed the racket and touched the 2 wires with my hands. I felt that my bones were dislocated, I got shocked, but I am not dead. My calculations say that I should die: the output voltage is 5 kV to 10 kV, my body resistance is approx. 50 kΩ, the current through my body is 0.1 A if 5 kV to 0.2 A if 10 kV. According to the table at https://www.physics.ohio-state.edu/~p616/safety/fatal_current.html I should die; I tried this many times but I am still alive. I think my interpretation regarding current, voltage and my body resistance is wrong (if right I would be dead by now) - please tell me why I am not dead? <Q> As stated in the comments (amongst the sea of humor), is that a bug zapper is not an ideal voltage source. <S> It can't deliver very much power, even though the voltage is high. <S> You can consider the circuit more like this: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> (values are guestimates). <S> The net result is you will get an initial current spike of maybe a few 10's of milliamps, but only for a few microseconds. <S> After that the bug zapper simply cannot sustain the current, and so the terminal voltage will drop, and the current will most likely end up being less than a milliamp. <S> It's not the peak current that kills you, but a current sustained long enough to deliver enough energy to kill you. <S> As to why it kills the bugs, that is simply a case of bugs being smaller than you. <S> It will take far less energy to cook a small bug than it will to stop a human heart. <A> Passing the current through a finger is relatively safe, as there is not enough current to burn you, and it's far from your heart. <S> Passing the current from hand to hand puts the heart somewhere "in the middle" of the path, but clearly not in direct series. <S> Plus your skin can still present a large resistance. <S> If you pass the current across your chest, the chance of death is higher. <S> If you had probes that went deep into your chest, and passed the current through the probes, you'd dramatically increase the risk. <S> As others have stated: The bug zapper has a very limited amount of power that it can deliver. <S> There is enough energy to fibrillate a bare heart, but yours is protected in your body. <A> <A> Death from electrocution occurs mainly in two situations and is not directly correlated with the actual current/voltage values: 1) Enough current and energy passed through your body to actually burn you inside out2) <S> A voltage passed through your heart and put you into a fibrillation state. <S> Both can come into play at the same time! <S> The first is mainly caused by excessive current into your body. <S> Once the skin is penetrated, it is easy to pass a surprisingly high current into your body. <S> This is why wet + electricity is so bad. <S> It reduce drastically your skin resistance. <S> Before venturing into the 2nd part, you need also to understand that electricity will have an entry point and an exit point. <S> You can often see a burnt mark at those points when it occurs (in hard situation). <S> Directly related to that: if the current pass through your heart with a voltage high enough or with some weird frequency, it can put your heart into fibrillation: desync it. <S> When this occurs, you need to reset your heart using a defibrillator like in all poorly written medical drama. <S> A shock does not so much when the heart is flat-lining, but help fibrillation cases. <S> As for your question, you didn't die because the current entered finger and exited through your finger. <S> It didn't pass through your heart. <S> Also, the current in play we're not enough to cause any significant burns. <S> Specific injuries prediction is on a case by case basis. <S> In a nutshell, your heart either fail or you burn to death when you die from an electric shock... <S> you might also survive and be severely burnt or maimed by the aftermath. <S> If you want to know more, the wikipedia article is well written. <A> It is not only current and voltage that matter, but duration. <S> 10kV at 1A for a microsecond is about 10 microjoules. <S> You might feel a shock, but it is not enough to actually tense all your heart muscles into paralysis long enough to make you unconscious, or even cause physical damage from heating or muscle contraction. <S> Maybe you are just lucky <A> Another aspect to consider is frequency. <S> Mosquito zappers are DC, but they don't supply constant DC. <S> After the voltage is stepped up from 3-6 VDC from the batteries through a voltage multiplier, it comes out in rapid pulses. <S> As soon as voltage is applied and your body begins to take the energy, the current is stopped. <S> I don't know exactly at what frequency mosquito zappers operate, but at high enough frequencies, the human body can simply absorb the shock in the skin before it reaches deeper into the nervous system and your heart. <S> That's why you're able to be shocked by a tesla coil without dying. <S> You still feel it, but it doesn't penetrate far before the pulse ends and simply dissipates before the next pulse comes along.
On the other hand, IF you have a bad heart it might be enough to upset the rhythm and send you heart into fibrillation, which can be fatal. The circuit is not quite as you have described. Losing limb is unfortunately not so uncommon. To put this more like an electrical engineer would put it: this high-voltage source has a high internal resistance, and understanding what that means answers your question.
Minimum PCB Trace width with SMD components and Autorouter problem I would like to receive some suggestions from you about the trace width for my PCB.I'm using some SMD components (ATmega328p TQFP32 and FT232), the main power is 5VDC at maximum 2A. I use also a ESP Wi-Fi module, but the maximum current comsumption will be lower than 2A for sure. My PCB manufacturer says that the minimum trace width should be 16 mils with copper thickness 105um. I used an online calculator and it recommends to use a width of 7 mil for the external traces on the PCB (my PCB will use only two layers). So, it is OK to set 16 mils for the traces? Thank you and sorry if the question looks too much stupid. This is the result of the Eagle autorouter and as it is possible to see the problem is with the SMD components. I think it's because the traces are still too wide for the SMD components pins. <Q> The 7 mil reccomendation is a minimum to avoid excess heating from a 2 A current. <S> A wider trace is no problem. <S> The challenge will be making footprints for your fairly fine-pitch SMD parts that can be manufactured with your heavy copper requirement. <A> Probably they also want the spaces to be 16 mils, or maybe a bit tighter is possible depending on how their etch process works. <S> That's a bit coarse- <S> your TQFP-32 has 0.8mm pitch pins (assuming that's the tightest pitch part) so your track width and space should be better than 15.7 mils just to get to the package, the optimum pad width might be a bit different (my IPC-compliant generator says 0.55mm wide, which is 21.6 mils, so the space will be less than 10 mils). <S> Check with your supplier that the space is okay. <S> The main problem is that when you specify very thick copper ( <S> 3-oz = 105um is relatively thick) <S> the etching process limits how narrow the traces can be and how narrow the spaces can be because of undercutting or non-orthogonal etching. <S> You could also find a better supplier- <S> one I've used allows (for 3-oz Cu) <S> 10 mil tracks and spaces which is (just) okay, or go to the more common 2-oz or 1-oz copper and widen your power traces. <S> You'll definitely save a fair bit of money and have more choices. <A> The requirements are usually not set by your PCB manufacturer they are set by you. <S> Two problems arise when traces are small: 1) <S> More resistance, this causes power loss <S> , it also 'creates' a resistor that was not on your schematic which can cause unintended operation. <S> Make sure the resistance will not be a problem for your design (as small as it may be) 2) <S> Self heating from power loss, while related to resistance, extra heat on your board may create a problem for components or even your board. <S> If the temperature rise is too high (~100C) it can cause delamination of the layers. <S> Tens of degrees higher then that and the board will start to burn. <S> Make sure your power loss is not going to cause a destructive temperature rise. <S> The second thing to consider is how long will you be drawing the 2A of power, is it a max current rating or an average power rating, if it only draws 2A for 1s every minute or so, your average power will lower and can be considered differently in a temperature rise situation. <S> If it draws 2A all the time then you would size the trace larger. <S> The other thing to consider is board size, if you have lots of room, make the traces bigger and don't worry about the calculations. <S> As far as the SMT pads go, they are what they are, and they are sized appropriately. <S> You can run bigger traces into a smaller pad to cut back on resistance, realize that more copper around a pad can make it harder to solder because it wicks heat away from the part when soldering which can make it harder to hand prototype.
If your board size really is a limiting factor, then go to a higher weight of copper which makes the traces taller and cuts back on resistance. You can always use a wider trace, provided it's possible to make the footprints and spacing that is required for your parts and layout.
Is there a way to define 26mV thermal voltage with simple words This 26mV thermal voltage at room temperature is used in non-linear diode equation.I tried to learn about it to see what it means without getting involved in too much physics but failed to find a simple explanation. Is there a way to describe it without involving in too much theory and background? Is this just a number that fits the empirical results like a constant? <Q> Intuitively, it is the mean potential caused by the thermal motion of electrons. <S> It is \$ <S> \displaystyle <S> V_T=\frac{kT}{q}\$ <S> where T is the absolute temperature, k is the Boltzman constant and q is the charge on an electron. <S> If you would like to think of the cloud of electrons as a gas it is also \$\displaystyle <S> V_T=\frac{RT}{F}\$ <S> where T is the absolute temperature, R is the gas <S> constant (which relates energy to temperature) and F is the Faraday constant (charge per mole of electrons). <A> I always think it is better to talk in terms of about thermal energy than thermal voltage. <S> I open up Bart whenever I have to remember how we walk the walk from solid state to I-V curves: <S> https://ecee.colorado.edu/~bart/book/book/chapter1/ch1_4.htm <S> Quoting: <S> Finally, we need to introduce the thermal voltage, Vt, the potential an electron needs to traverse to gain an energy equal to the thermal energy <S> kT. <S> This voltage equals the thermal energy divided by the electronic charge, q, of the electron: $$V_t = <S> \frac{kT}{q}$$ <S> The numeric value of thermal voltage in Volt also equals the thermal energy in units of electron-Volt. <S> At 300K (27oC) <S> Vt equals 25.86 mV. <S> Whereas the thermal energy relates an energy to an occupancy probability directly through the Boltzmann distribution, which comes with the exponential and whatnot. <S> $$ \propto <S> \exp \left <S> ( \Delta E / k_B T\right)$$ <S> Bart states that the thermal voltage is just the potential in which an electron would increase its energy by the thermal energy \$ k_BT \$ when it traverses through. <S> It is not evident to me that it carries an extra insight than this. <S> Sometimes they do, sometimes they don't. <S> (: <A> When we talk about semiconductors, there exists thermal voltage which ranges from 25 to 26 mV as you mentioned. <S> I'm no chemist <S> but it comes from the Boltzmann <S> Constant that is arbitrarily noted as \$k\$. <S> We use \$k\$ for a lot of things including the Ideal Gas Law in chemistry or thermodynamics, etc. <S> Consider this equation: \$k= <S> R/N_A\$ <S> where \$R\$ is a gas constant that is related to the molar with ideal gases and \$N_A\$ <S> is simply Avogardro's Number . <S> In Shockley Diode Equation, thermal voltage is equal to \$ <S> \displaystyle V_T=\frac{kT}{q}\$ where \$T\$ is an ambient temperature and \$q\$ is the charge of an electron. <S> At 300 Kelvin, thermal voltage is \$\approx\$25.85 mV... <S> and that's pretty much it... <S> It's a relationship between electrostatic potential and electric current across a P-N junction. <S> You can utilize the calculation of the thermal voltage when you model a diode. <A> You really need to do some more research before you post a question. <S> A web search for 26mV thermal voltage led to thermal voltage equation . <S> That resulted in this. <S> posted by Jose21 Thermal Voltage <S> At 0 K, electrons in a semiconductor are in rest..or you can say 0 energy state. <S> As we increase the temperature, electron starts getting energy proportional to the temperature and this constant of proportionality is k, the Boltzmann constant. <S> kT/q is the voltage corresponding to this energy. <S> Since the cause of this voltage is temperature, it is so called Thermal Voltage. <S> It is an average value. <S> For individual electrons, it can vary a little, but on an average, it will be kT/q. <S> At a given temperature, an electron can have energies as multiples of kT. Reference https://www.physicsforums.com/threads/what-is-thermal-voltage.589409/
It relates to the kinetic energy of the particles in gas state of matter.
How can I "filter out" a small offset current from a current source? I have a current source that produces a 1 kHz 1 mA sinusoidal current. Unfortunately it also outputs a small DC offset current (microamps). The current source does have a small trim pot to zero out the offset, but it is never perfect, and I need to hook this current source up to another circuit that can't sink any net current. Therefor I'd like to "filter out" the small offset current. My first attempt was to put a fairly large capacitor (1 microF) in series to block the offset. This would work if it were a voltage source, but since it is a current source, the small trickle of current eventually charges up the capacitor until it hits its voltage rails since there is no way for the current to escape. Can you suggest a way to zero out the current source reliably other than just twiddling the trim pot? Thanks! <Q> If you are not too concerned about the output impedance being too low you can add a resistor to ground before the capacitor. <S> For example, if you have 2uA offset and add 470K the offset will settle out at ~1VDC. <S> The resistor decreases the output impedance and the offset voltage reduces the compliance. <S> Edit: <S> Like this:- simulate this circuit – <S> Schematic created using CircuitLab <S> You could also add a slow feedback loop to cancel out the average output voltage. <A> Consider using a 1:1 transformer rated for the appropriate impedance, current and frequency range. <S> It won't pass DC. <S> Depending on the precision needed, it might not be an exactly 1.000:1.000 current ratio, so a calibration step should be included. <S> Audio transformers for 600 Ohm drive are usually pretty good around this frequency. <A> Turn off the current source by adding a mosfet in series with the current source. <S> simulate this circuit – <S> Schematic created using CircuitLab
Or use more accurate parts in your current source to reduce the offset current (perhaps a zero-drift amplifier) and avoid the capacitor.
Would this component require a heat sink? Would this LM7805 voltage regulator require a heat sink? It will regulate 12V to 5V and will be used for a 5V sensor which draws 4mA current. <Q> To do this, it is a simple calculation of P  =  IV . <S> Thus, your power dissipated would be 4  <S> mA * (12 V − 5 V) = 0.028 W which is equal to 28 mW. <S> Your next step is to look at the thermal properties of the component. <S> As you can see, the Max operating temperature is 125 °C. <S> Now you look at the Junction to Air Thermal Resistance. <S> For the TO-220 package, it is 65 °C/W. Using this, you take your power value that you calculated earlier (0.028 W) and plug it into this equation. <S> Doing that, you get: 65 °C/W * 0.028 W = 1.82 °C which means your 7805 will heat up by approximately 2 °C above the ambient temperature. <S> If we assume you are working in an ambient of 25 °C, this means your component wil heat up to approximately 27 °C, this is well within the specified temperature range, and thus does not need a heatsink. <S> Following these steps will enable you to calculate similar things in the future. <S> ADDED <S> As Colin pointed out in his answer, the 78L05 might be cheaper for you, and is meant to be used in low current applications, as it has a max output current of 100 mA, which is still more than what you need. <S> Using the calculations from before, we can look at any datasheet for the component. <S> I am using THIS one and we can find the thermal characteristics. <S> The TO-92 package is the 'Z' package which has a Junction to Air Thermal Resistance of 230 ° <S> C/W. <S> We can now use this value in the previous equation: <S> 230 °C/W * 0.028  <S> W = 6.44 °C, which again, is more than fine for you to use without worrying. <S> EDIT: <S> I did forget to include the current of the 7805 IC itself. <S> This was however, mentioned in the answer by Spehro Pefhany. <S> However, if you remember to include the current of the IC you use, this method should enable you to calculate power and heat dissipation in future. <A> The power dissipated is (12V - 5V) <S> * 0.004A <S> + 12V <S> * 0.006A (the latter term is to account for maximum regulator internal consumption). <S> Total is 100mW, which is well within the very conservative 600mW you can dissipate from a TO-220 without a heatsink. <S> You could use an LM78L05 as others have suggested, which would have similar dissipation, and still would be fine, however the line and load regulation is poorer for the LM78L05, it's not the same die. <S> The TO-252 version of the LM78M05 is a good compromise. <A> The power dissipated will be 7 (V <S> ) * 0.004 <S> (A) = 0.028 <S> W. <S> You shouldn't need a heatsink for that. <S> edit <S> As Chris Stratton pointed out, I neglected the power dissipated by the regulator itself, which would be 12 (V <S> ) * 0.006 <S> (A <S> ) = 0.072 <S> W, giving a total dissipation of 100 mW. <S> You should still be fine without a heatsink. <A> The power dissipation of this regulator is directly associated with the voltage it drops and the current the circuit draws. <S> At 4mA, dropping 12-5 = 7V, would be 4mA * 7V = 28 mW. <S> A <S> TO-220 package has a thermal resistance to air (heatsink-to-ambient) of about 70 C/ <S> W. Meaning the unit will heat up approximately 2 degree C above ambient. <S> Heatsink is not required. <A> Supply Power = <S> 12V <S> * (4mA + 8mA max {Iq(reg)} = <S> 144 mW. Load = 48mW. , <S> Regulator= 144-48=96mW <S> * 65’C <S> /W =6.5’C junction rise above board temp Conclusion < 40’C rise of insulated junction above board temp ambient is ok if the board is <40’C otherwise derate acceptable rise. <S> If load is much greater , recalc junction rise and consider heatsink designs. <S> “cool”. <A> Regulating from 12V to 5V means a voltage drop of 7V in the regulator. <S> At 4mA, the total power dissipation in the regulator is of 0.028W. <S> This is quite low, and the 7805 can handle it without a heatsink
No, this would not require a heatsink. To answer your problem, you first need to know the power dissipated by the component. You may find a 78l05 is cheaper, which is a TO92 packaged version of the regulator, it's rated for less current, and can dissipate less power, but would still be adequate for this.
How to make a relay ON for few seconds after power goes OFF? I want to make relay circuit that can remain ON if power is supplied but as soon power is cut off i want the relay to go OFF after few seconds atleast 10 sec. <Q> A 12 volt relay might have a coil resistance of 1000 ohms and the relay might drop-out when the coil voltage reaches (say) 6 volts. <S> This means the voltage shouldn't fall by more than 6 volts in ten seconds. <S> That's a \$\dfrac{dv}{dt}\$ of 0.6. <S> If the current needed to sustain the relay is 6 volts/1000 ohm that is 6 mA hence: - 6 mA = C dV/dt or, <S> C = 10,000 <S> uF. <A> The basic equation for a discharging capacitor with a resistor is: V2/V1 = 1 - e^(t/RC) <S> This equation relates the time (t) <S> it takes a cap (value C in farads) to discharge into a resistor (value R in ohms) from an initial voltage of V1 to a lower voltage of V2. <S> There are five variables in the equation, so you need to know four of them for a unique solution. <S> From the example above: <S> V1 = <S> 12 <S> V V2 = <S> 6 <S> V <S> t = 10 seconds R <S> = 1000 ohms <S> Solving, <S> C = 14,427 <S> uF. <S> A way to estimate things with less complex math is to use the equation for a constant-current discharge: <S> ec= <S> it <S> e <S> x C = <S> i <S> x t voltage drop times capacitance equals the discharge current times the time. <S> For this estimation using a constant resistance instead of a constant current, the average voltage on the capacitor is (V1 + V2) / 2, or 9 V. <S> This gives an average current of 9 mA. <S> 6 x C = <S> 0.009 <S> x 10 <S> Solving, C = 15,000 uF, a 4% error and the closest value to 14,427 uF anyway. <S> Given the poor tolerance of electrolytic capacitors, I recommend 20,000 or 22,000 uF as a starting value. <A> Time delay relays are what you are looking for. <S> Try entering "time delay relay" in your favorite search engine. <S> : ) <A> Since you don't mention your application, it's possible that you don't care how long the relay is on after power is removed. <S> If "infinite" fits within your spec, you could use the relay's NC (normally closed) contacts, and the switch would close upon loss of power, and stay that way until power is restored.
Providing the circuit that drives the relay electrically disconnects itself when power is removed (i.e. the power gets switched on then the power is removed by a switch), think about using an electrolytic capacitor to sustain the coil current for a few seconds.
Advantages/Disadvantages of ground fill on both layers (of a 2-layers-board) There are many similar questions but I didn't really find the answer I want. I have many 2-layer boards for analogue-audio-stuff. I use both layers for routing and I have ground fills on just one layer. (mostly on bottom layer). Well it works this way but.. Why shouldn't I fill also the other layer with ground copper and connect them using multiple small stitches/vias? That would reduce the impedance between some grounding components which were connected through narrow ground paths on one layer. (Image source: forum.kicad.info) Do you see any reasons not to fill the both layers with ground? <Q> You can pour power supply (or supplies with a split plane or polygon pours) on the other side too. <S> Either way, be sure you're not coupling noise from ground or power supply currents from power back to low level circuits. <A> If this is for Audio I wouldn't think impedance performance of the ground plane matters that much. <S> However it may help to have the pour on both sides because you are more likely to have a shorter ground return path. <S> If you have gone through your single ground plane and verified that there is plenty of return path for the amount of current being consumed, you should be fine. <S> There is no reason not to fill both planes. <A> <A> What your really doing is increasing the capacitance between the traces on the top and the ground plane that is filled on the top. <S> So if your design can tolerate a tiny amount of capacitance (you can calculate plane to plane capacitance , since the tool only accepts one width, use the smaller of the two, which will most likely be the plane size). <S> Most likely this capacitance will be a few pF's. <S> The only other caveat is if the current from what ever source you have on the top plane is going to the bottom plane through the vias, then you have a small amount of inductance in the nH range which will be parallel inductance for each via. <S> This would create a filter most likely in the range of GHz and above, so it probably doesn't apply to an audio design and the effects of the small parasitics will be negligible. <S> If you were doing something above 100MHz or transmission lines generally is where you start to worry about these effects.
Fill located near sensitive traces will tend to shield the trace against Electric Field interference, because the Fill copper will grab some of the Efield flux lines, and you may be 3 to 10 dB lower interference.
Help with Voltage Divider driven NPN emitter follower I am trying to solve the Exercise 2.5 in Art of Electronics. Use a voltage divider and emitter follower with 15V supply to make a 5V output, and within 5% of 5V at a 25mA load. This has been solved before in this forum: Designing a stiff voltage source using an emitter follower They seemed to use a guess-and-test method for choosing the voltage divider resistors and I am wondering if there is a way to work backwards, saying that the emitter voltage is 4.75V with the 25mA load (worse case, 5% below the 5V target, and say a worst case beta of 30), to algebraically figure out the exact and most efficient resistors to choose to meet these requirements. <Q> You are the designer, which means that you are going to choose the NPN transistor to be used. <S> As the load is around \$25 mA\$, a small signal model can be used which normally has a \$\beta = 100\$ or more. <S> Take your pick of a transistor with say <S> \$\beta = 150\$.Good specs give a range of beta, say \$\beta = 100.. <S> 200\$. <S> Then there's the \$V_{be}\$ that's of importance, look them up for the transistor you chose and in the operating points of \$0.. <S> 5V/25 mA\$, assuming the current through \$R_3\$ neglible with respect to \$I_1=25 mA\$. <S> Now establish 'worst' and 'best' conditions. <S> It's clear that the output voltage will be highest if \$I_1=0\$ <S> and \$\beta\$ is maximal and <S> \$V_{be}\$ is minimal. <S> The other way around, \$V_1\$ will be lowest if \$I_1\$ highest, \$\beta\$ is minal and \$V_{be}\$ is maximal. <S> Now write the output voltage as function of the parameters \$R_1.. <S> R_3\$, \$V_{be}\$, \$\beta\$, \$I_1\$: <S> \$U_1 = <S> f (R_1, R_2, R_3, V_{be}, \beta, I_1)\$. Establish the total differential of this function with respect to \$V_{be},\beta, <S> I\$, like: <S> \$\partial U_1 = <S> \frac{\partial U_1}{\partial V_{be}} . <S> dV_{be} <S> + \frac{\partial U_1}{\partial \beta} . <S> d\beta <S> + \frac{\partial U_1}{\partial I_1} . <S> dI_1\$, 'simplify' to \$\Delta U_1=\frac{\partial U_1}{\partial V_{be}} . <S> \Delta V_{be} + \frac{\partial U_1}{\partial \beta} . <S> \Delta\beta + \frac{\partial U_1}{\partial I_1} . <S> \Delta I_1\$ and put in the \$\Delta\$s the minima and maxima that lead to the worst and best results respectively. <S> Now solve \$R_1, R_2, R_3\$ to stay within your desired 95..100% of 5V.This last step <S> is the tricky part, and that's where electrical engineers developed a preference to a mixture of 'educated guesses' and iteration ('trial and error') that you seem to want to pass-by at the cost of higher efforts in solving sets of mathematical equations. <S> Actually your approach might be better in very complex situations which most engineers would try to avoid during their design by chopping up the problem is small partial problems, which then can be solved with the methodologies of 'guess and iterate'. <A> There is a wide range of resistors you can use. <S> We usually use rules of thumb like 'at least 10x current flowing through the divider to current supplied by it'. <S> But it could be 20x, or 50x, or 5x, with only slightly different performance. <S> The main thing is to use resistors low enough to swamp the 2:1 beta variation that the transistor will throw at you, and still keep within output voltage spec. <S> For instance, let's put a lower limit on R1/2 for a beta variation of 30:100 at 25mA output current. <S> The base current will vary between 25mA/30 and 25mA/100 which is 830uA to 250uA. <S> You have a voltage output spec of +/- <S> 5%, let's assign <S> +/-1% to beta variation, as there are other error terms like load variation, VBE tempco, line variation that need to fit into that 5%. <S> A 2% swing on 5v is 100mV. <S> So with a deltaI of 580uA, you can tolerate a deltaV of 100mV, so R1/2 needs a tap point resistance of less than 100m/580u = 172 ohms. <S> As the resistors are roughly a 2:1 ratio, that puts them in the ballpark of 250 and 500 ohms. <S> They can be less, which will result in less voltage variation. <S> Fiddle about with the exact values to get the right ratio, while maintaining their parallel resistance less than 172 ohms. <S> That illustrates to some extent why we don't use as simple a circuit as this for a regulator, and/or use transistors with a higher minimum beta. <S> Once you've factored in load variation, which also puts a constraint on minimum R1/2 values, and the other error terms, you can then see how close you are to your +/- <S> 5% spec, and if well clear, perhaps increase that <S> +/- <S> 1% error allocation to beta variation to allow those resistors to be bigger, and so use less current. <S> That's why it seems like we 'guess and test' to get these values. <S> There are so many assumptions and tradeoffs that we're rarely happy with the first values we arrive at, when we see the consequences of the assumptions we have made to get to them. <A> Whatever your intended output voltage is, your base voltage should be about 0.65V higher. <S> If you're trying for 5V, create a voltage divider that will hold the base at 5.65V. <S> If the 25mA load accounts for most of the current (R3 will take some) and you have a gain (hfe) of at least 50, <S> 3K would be a good total resistance. <S> That should get you close. <S> If you want it more exact, then do the stuff Neil_UK said. <A> Unless this is just an academic exercise you need to include hFE and Vbe variations with temperature (including self heating). <S> If it's an oversimplified academic exercise (ideal source, ideal resistors, real or semi-real transistor, junction temperature constant at some default value), you can easily determine the maximum R1||R2 if you consider minimum hFE and Vbe constant. <S> We know Vbe will not be constant with current though, so R1||R2 will have to be lower to account for the change. <S> Determining the exact value involves a nonlinear equation (because of Vbe) so it will be a hassle to solve it in closed form. <S> Probably possible though. <S> This is the kind of problem University professors love to set- just possible to solve algebraically- and is not necessarily how you should create real designs. <S> It's trivial to set up the equation and solve it iteratively though. <S> Or just use SPICE and manually do a binary search if you don't feel like setting up and running a solver. <S> In reality, with some judgment, one or two iterations is close enough (particularly when our rules of thumb get us into the ballpark), but if you wanted to get it to within 6 decimal places, it's not that much harder (just even more useless).
Nailing the exact resistor values, or 'most efficient' resistor values, is not possible.
At what resistance can a real inductor act like an ideal inductor? So it's my understanding that an ideal inductor with a constant voltage applied should have a constant ramp for the current through it (a triangle wave), but an inductor that's not ideal (with resistance) will have an exponential charging curve for it's current (like with an RC circuit's voltage). But is there a low resistance at which point the current would increase at a constant rate like an ideal inductor? If the RL time constant is larger or smaller than the time it takes for an ideal current source with constant current I to charge the inductor with energy equal to (1/2)LI^2, will the inductor basically act as an ideal inductor? <Q> But is there a low resistance at which point the current would increase at a constant rate like an ideal inductor? <S> Sure that point is where the inductor is ideal meaning that the series resistance is zero . <S> So you could say that in the real world (where there are no ideal inductors only ones that have some series resistance, also assuming no tricks such as superconductivity at low temperatures) there is no inductor which behaves as an ideal inductor. <S> And you would be correct. <S> The thing is, how significant is the difference caused by the series resistance. <S> Let's assume that the current decreases 0.1% because of the series resistance <S> then you already need a pretty accurate current measuring setup to be able to measure that change. <S> In electronics many things are not ideal. <S> Even a 0 ohm resistor has a series inductance of a few nH. <S> Does that affect the behavior of all circuits? <S> No only some RF (high frequency) circuits. <S> RF designers know this and take the that (parasitic) inductance into account. <S> In non-RF circuits the small inductance of a resistor is insignificant . <S> Same with inductors. <S> A designer using an inductor will take into account that it has some series resistance. <S> If the series resistance is too high then maybe the designer selected the wrong inductor. <S> A designer should choose the right inductor such that the series resistance become insignificant . <A> An inductor connected to a DC voltage source will act 'as if it were ideal' as long as the voltage drop over the internal resistance is negligible compared to the DC voltage applied. <S> In other words: It's a matter of how much current flows through the inductor, or, how long the voltage has been or will be applied. <S> Meaning: the current will look like a straight ramp within the current and time measurement accuracies. <A> Depends upon the Q (the Quality Factor) and the dampening of any ringing associated with parasitic capacitances. <S> For non-ringing, pick the resistor as Rdamp = sqrt( L / C) <S> Thus 1uH and 0.01uF produces sqrt(1u / 0.01u <S> ) = sqrt(100 <S> ) == 10 ohms.
So the lower the applied DC voltage, or the shorter it will be applied, the higher the internal resistance of the inductor can be while still acting as if it were 'ideal'.
minimal delay between input and output possible to implement in FPGA I am trying to find out how fast can I get the transition of a digital 500MHz signal from FPGA input to it's output. The delay will need to be adjusted, but that's a different task. For now I just need to know if I could make it around 4-8 ns. FPGA is not chosen yet, probably one from Altera. Need to find a suitable one. <Q> The simplest way to find out, is to pick an FPGA you like (e.g. based on cost and size), and compile a simple design in the FPGA vendors toolkit. <S> You could take a piece of code as simple as: module a (input b, output c); assign c = <S> b;endmodule <S> Pick to pins that would be in useful places for what you need. <S> Then compile the design. <S> You can then run timing analysis to find out exactly what delay the toolkit suggests the path with take under different temperature and silicon performance corners. <S> You can simplify the timing analysis by creating a design constraints (e.g. SDC for Intel FPGA) and specifying the delay target for the net. <S> The fitter will then try its very best to meet the requirements, telling you if it fails. <A> What you're looking for is called the propagation delay, so time a signal needs to pass a LUT. <S> Then you have the distinction between internal and external propagation delay. <S> The propagation delay usually is the range of a few ns and the external is slightly bigger than the internal. <S> Here's an example from a Lattice ICE Datasheet <A> you have to read data_sheet of different FPGA's, and after than choosing the best choice(cost, size and etc are of course important) you can write your code on the vendor's toolkit and check the synthesis, translation, place and route reports and find out the best frequency you can apply to design.
This depends on the FPGA you're using.
Most advantageous decoupling for multiple voltages I'm trying to figure out if I can improve the elimination of noise. I always decouple my IC's by connecting VCC and ground together with a 100nF ceramic capacitor, But I'm curious. In each picture below, assume the top battery is 2V higher than the lower battery and all batteries are fully charged. Also assume the capacitors are all electrolytic and are at least 10uF and can handle 16V. The mid-point between the two sets of batteries deliver the lower voltage that's needed. Which of the circuits shown is the best for decoupling? Should I follow the left-most circuit where I decouple each battery set individually? or should I follow the middle circuit where I combine the sets together first before decoupling as if all batteries are one big voltage source? or should I just continue to follow the last circuit where each voltage point above 0 gets grounded via a capacitor? or should I combine any of those circuit ideas? Also, there are no negative voltages. <Q> Could be that I have a completely wrong assumption on how decoupling capacitors work, but here goes: <S> You have to analyze the current loops and place decoupling capacitors in the loop to help reduce the size of the loop. <S> So let's assume you have some ICs working on the top rail and some working on the bottom rail. <S> So you want decoupling on both rails. <S> This approach would rule out the middle suggestion, there is no decoupling on the bottom rail. <S> The left approach helps if you have currents which will flow from the top rail to the bottom rail, but I guess most of the ICs will have current loops from their supply to ground. <S> So the left solution will provide decoupling for the top rail and the bottom rail, but the top rail sees a series connection of capacitors to ground which will result in a lower capacity and thus might reduce the effectiveness of the decoupling. <S> So I'd vote for the right approach because that provides decoupling on both rails with the actual capacity of the capacitors for both rails. <S> I'd also say that an electrolytic cap alone will not provide very good decoupling as they have higher ESR and ESL values, which is not what you want in decoupling, you want to provide a very low impedance path for the noise to go. <S> Even the capacity between the power plane and the ground plane around an IC can act as a decoupling capacitor for very high frequencies if the connection is done in a low impedance way. <A> The important bit in decoupling is low inductance. <S> Larger capacitors have more internal ("parasitic") inductance, and longer traces do so as well. <S> So, your decoupling capacitors should be placed right next to the ICs, and between each voltage rail and the corresponding ground (i.e. digital supply to digital ground, and analog supply to analog ground). <S> The size of the capacitors depends on the frequency that the IC operates at, and the range that the supply current may vary in. <S> For tens of MHz, a single 100n capacitor (just use a normal ceramic, no need for electrolytic) is sufficient. <S> Faster ICs might need a 10n or 1n capacitor near the supply pin, and possibly another larger capacitor a few mm further away, where there is more space. <A> Mike unless you know the equivalent circuit of your load and batteries , your question is pointless. <S> Batteries are about 1000 times higher capacitance than a capacitor and in many cases much lower ESR than a 100uF cap. <S> Fundamentally what does “decoupling” mean? <S> Decoupling means the step or impulse load current follows the shorter path of least impedance. <S> This is chiefly due to rise time <S> dV/dt= <S> Ic/C + I*ESR step load error. <S> Before you ask any question like this , all unknowns must be specified for load current spectrum(f), source impedance (f) and cap Z(f). <S> If don’t know it, you ought to learn it. <S> The question is irrelevant without values on voltage error, slew rate or spectrum and acceptance criteria with defined load characteristics.
So placing a ceramic cap (or several with different capacities for different noise frequencies) as close as possible to the IC is usually a good approach.
Sensing a tag passes through a virtual "fence" We have two cats who like to hide in our house. It would be great to know where they are in the house. At first I thought about setting up an indoor localization system (iBeacon, etc.) in place, but those seem expensive. So now I'm thinking that it would be good enough to know which part of the house they're in. There's a short hallway in our house that connects the two parts of the house together. I'm thinking about setting up two sensors, one on each side of the hallway, and put a tag (Bluetooth?) on the cats' collars. The sensor would send a message to the central system whenever the tag gets near it within, say, 50 cm. Would be great if the tag is passive. Any idea on where I should start? Thanks! Background: I have some experience with Arduino projects. <Q> Most active tags are heavy enough to annoy the cats. <S> And the readers are relatively expensive. <S> So, save money and go with IR photointerrupters as was suggested above. <S> I'd put them in groups of 3, two near the floor to get direction and one higher to detect humans. <S> Cheap and easy + some interesting programming. <S> Alternative would be to use PIR motion detectors. <S> These give you a bit more flexibility in placement around house than photointerrupters. <S> Ready made PIR modules can be found for just a couple bucks. <A> Bluetooth Low Energy Beacons were meant for exactly that kind of application! <S> (or at least, very similar ones). <S> Your system would boil down to buying cheap BLE beacon tags, and distributing e.g. raspberry Pi Zeros in your house, equipped with appropriate USB bluetooth dongles. <S> Add in software that periodically checks for visible Bluetooth devices, and something that combines observations into a cat state space estimator. <A> You can buy cheap bluetooth beacons from Alibaba or Aliexpress which pair with your mobile phone and make sound when you press a button on the app. <S> Link to such a device - https://www.alibaba.com/product-detail/Cheap-Price-Bluetooth-4-0-Eddystone_60538752951.html?spm=a2700.7724857.main07.23.634ef094XsZOQx <A> You can use 4x pir sensors on each gate to get the readings. <S> 2 on the upper portion to get if any person passes, and 2 on the lower portion to check if any living object is passing by there. <S> if any man passes then all four will get activated. <S> if any cat passes then lower ones will be active but not the upper ones. <S> and 2 for each upper and lower part to detect the motion of cat from inside to outside or vice versa.
"BLE beacons" come in the shape of tags and run for weeks to months on coin cells, reach a couple of meters, and can be detected with any Bluetooth 4.0 or higher compatible USB dongle. Unfortunately your requirements collide with your price expectations. Passive tags have either too short range (e.g. 10 cm for RFIDs) or require high radiation readers (you don't want those in your house 24/7).
My PCBs etch all bad! (sodium persulfate) I've recently started having problems with etching my PCBs. I use a permanent marker to do the traces and etch them in a stainless steel cup, heated with a tea light (small candle.) The PCBs come out very badly, the traces have holes in them and some thinner ones have completely disappeared. Pictures: It's before removing the marker, BTW. I also sandpapered the board before. This is my setup, the tea light goes in the can under the cup: What can be the cause of it coming out so badly? Should I use some different etching compound? I'm thinking about either ferric chloride or vinegar (or bleach?) + peroxide. <Q> Your main problem is coverage with the permanent marker. <S> They do work as an etch stop, but it is hard to get uniform coverage - you end up with more ink in the middle, and less at the edges (it flows). <S> For very large plane areas you will also get blotchy coverage. <S> Any areas where the pen puts down less ink will let some of the etchant through, giving you the patchy results you are seeing. <S> This is especially the case for thin traces. <S> If you want to keep trying PM, try going over the areas multiple times. <S> Failing that, another option is to switch to the toner transfer method - which in short uses laser printer toner as an etch stop rather than permanent marker. <S> This tends to give slightly better coverage. <S> There are also companies that offer special paper that bonds to the toner to fill in small gaps. <S> When it comes to etching, if you were thinking of switching to Ferric-Chloride, don't submerge the board in it. <S> Instead wear a rubber glove and put a tiny amount of the etchant on a sponge (like you would use for washing dishes, but not the same one you use for washing dishes!). <S> Wipe the sponge back and forth gently over the board. <S> Once the sponge goes green, add a drop more etchant. <S> This approach is far faster because you use mechanical action to keep fresh etchant on the board surface. <S> It doesn't require heating to speed up the reaction. <S> And the best bit is, your storage jar of etchant stays at full strength because you never put the copper into the storage jar. <A> Main problem is indeed that the permanent marker is coming off for some reason. <S> It's difficult to say for sure, but two general tips: Wash the board before applying the marker, and let it dry longer than you think it'd need . <S> It seems that the copper surface easily retains a bit of water on it even after it appears dry. <S> Heating with e.g. hair dryer helps it dry off faster. <S> You mention sandpapering the board, which can also work, but if there is anything oily on the surface, might not be as good as washing. <S> Let the marker also dry longer than you'd think it would need. <S> It will keep forming more chemical bonds for a while after all the solvent has dried off. <S> These apply equally for any kind of coating, be it marker, photoresist etc. <S> Even for toner transfer, 1. is important (toner hardens quite fast because it has no solvent, so 2. is irrelevant). <A> Had similar problems with etching. <S> First thing would be to buy a new set of markers and use them only for PCBs to prevent any contamination with oils and fats. <S> You don't need to sand the board <S> it's better to take some steel wool or a wire brush, because it won't remove so much copper. <S> After cleaning, wipe the board down with some isopropyl alcohol, then draw the traces. <S> Also, you can do the etching on the kitchen stove, as persulfate isn't toxic. <S> use a plastic container with persulfate solution and put it into a bigger pot, which I fill with water and then set on the stove. <S> This way, you can regulate how much heat gets to the solution and keep it at its optimal etching temperature, which is around 50°C for persulfate. <A> Thanks for all your help!I used 2/5 peroxide and 3/5 vinegar and a bit of salt and my pcb etched no problem! <S> I also retraced my pernament marker traces and look at the results! <S> Btw, I used edding 142, M size.
You could also switch to a different pen such as sharpie, as they tend to give better coverage.
Simplest circuit to briefly (100ms) power a 1W LED? I am very new to electronics. My project calls for an array (20) of addressable high power LEDs. Each LED needs to be on for at most 100ms. Only one of 20 LEDs is going to be on at any given time(running lights kind of arrangement). I am considering driving those LEDs off single MOSFET per LED with aruduino's digital pin gating the MOSFET. I realize LEDs like constant current but hand-soldering 20 constant current circuits for every LED feels like overkill. What do you think? On a scale of 1 to 10, how sloppy is this approach? Should i also include a beefy current limiting resistor or there is no need given the short duration of pulse? <Q> Assume you have 20 digital outputs available to drive 20 LEDs <S> It is like connecting anodes of all the LEDs to the VDD via MOSFETs separately but cathode of all LEDs, tie them together and connect them to constant current sink <S> One simple constant current sink is BJT with emitter resistor.. <S> current is set using (voltage at the base <S> minus 0.7 ) <S> / emitter resistor. <S> MOSFETs can act like switch to connect to the positive voltage while the BJT constant circuit will control the current for each LEDs.. <S> Brightness will drop if two or more LEDs are turned on simultaneously <A> Philosophically, the question is not whether it is sloppy. <S> The question is, does it satisfy all design requirements? <S> If it does, then it is a good idea. <S> If it doesn't, then you need to continue brainstorming. <S> Parts cost should be reasonable. <S> You asked whether a beefy resistor is required. <S> Likely not. <S> Because 100 ms is short, your resistor power dissipation rating can be based on the average power in the resistor. <S> You say that you are only on for at most 100 ms, but you don't say how long you will be off for. <S> Let's say it is going to be 0.1s on and 1.9 seconds off. <S> Then the duty cycle, D, will be 0.1 / (0.1 + 1.9) = 0.05. <S> Pa = <S> Pp <S> * D <S> Where Pa is the average power, Pp is the peak power, and D is the duty cycle. <S> Pp = <S> Vr <S> * Ir <S> Where Vr is the voltage across the resistor and Ir is the current through the resistor during the time that the LED is on. <S> Since you didn't share any details of the circuit, we have no way to know what this is. <S> Hopefully you can calculate it yourself. <S> I would double whatever you calculate for Pa and choose a resistor based on that power dissipation. <S> For example, if Pa is around 250mW, then use a 500mW resistor. <S> You don't have to exactly double it. <S> That is just a guideline. <S> Just don't cut it too close. <S> What about efficiency? <S> If the resistor voltage is around the same as the diode voltage (or higher), you may need to consider using a DC-DC voltage regulator or DC-DC LED driver to improve efficiency. <S> This is just a guideline. <S> If you want to calculate the efficiency more precisely, ask about that. <S> Most likely if you are driving from 5V, efficiency will be good enough just using a resistor. <A> If you are driving 1-watt LEDs, I would recommend using a current limiter to make sure that you don't get LED meltdown. <S> If you get thermal runaway , that can happen very quickly. <S> You could use a single, high-side current-limited buck regulator to supply the power, then use one low-side MOSFET for each of the LEDs. <S> Don't worry about what will happen if all the LEDs are off: the answer is "nothing".
So each of them can be independently addressed Since, only one LED is driven at a time you can have single constant current sink circuitry In general, if the resistor voltage (when on) is lower than the diode voltage, efficiency will be OK.
Determining potentiometer sensor output resistance with parallel resistor The data I'm trying to understand a sensor circuit I've come across, which I've simplified to the following: simulate this circuit – Schematic created using CircuitLab In short, it's a potentiometer segment in parallel with a a resistor of lower value. The output voltage at Vwiper is fed into an automotive ECU. I can't measure the potentiometer resistance without modifying the circuit, but for the sake of the example, I've given Rpot a value of 1K. I understand that the parallel resistor (Rpar) will limit the potentiometer's resistance range to the value of the parallel resistor. I've also read that the curve of resistance seen at Vwiper vs. potentiometer wiper position should be non-linear. Update: after the feedback in answers, I've further simplified the circuit and modelled the potentiometer as two resistors the value of which depends on the wiper position: The voltage increases linearly with position in the simulation results, which seems to be confirmed by my measurements on the physical circuit. I have also measured Rwiper vs position on the real circuit, which does not seem to be linear. It's a tiny potentiometer strip, so measurement is not exactly accurate: Notice how the output resistance starts at about 65 Ω, peaks to ca. 250 Ω and ends up decreasing to the Rpar value (30 Ω). I assume it starts at 65 Ω because the wiper rest position does not go all the way down to 0 Ω. For more background (skip if not needed), the sensor has a continuous resistor track, divided in 7 segments. Each segment of the track has a parallel resistor as the one shown, each with a decreasing value in logarithmic progression. I've lumped together the rest of the stacked segments into R4 for simplicity. The output, taken between Vwiper and GND, is a logarithmic curve. I believe the purpose of the segments and the parallel resistors is to do piecewise approximation to obtain this voltage curve. The question I can measure, and plot the output voltage, but I somehow cannot grasp how the resistor network actually works. In other words, given this simplified circuit, I would like to understand and if possible, plot, how the output resistance between Vwiper and Vinit varies as a function of the wiper travel. It's been many years since I've done any circuit analysis, so any pointers would be helpful on the question: What is the equation that determines the output resistance seen from Vwiper? <Q> If you measure the resistance between Vwiper and GND then R4 and voltage source do not matter and can be removed for clarity. <S> If you measure from Vinit then R2 also irrelevant. <S> What you left with is two resistors in parallel, with wiper measuring from 0 at the bottom to Rpot||Rpar at the top. <S> Now, to understand the resistance in the middle I suggest you replace Rpar with a wire, since it's resistance <S> is very small comparing to Rpot. <S> All this will do is make wiper resistance 0 at both ends, and your plot will be symmetrical. <S> Now, as you move wiper along, it will go further and further from the end, increasing resistance to (Rpot/2)||(Rpot/2) in the middle. <S> Then it will be coming closer to the other end, eventually reducing resistance back to 0. <S> BTW, this gives you an easy way to measure actual Rpot value. <S> If you return Rpar back into the picture you will see that all it does is raising one side of the curve, skewing it a little. <S> I hope this gives you enough pointers to come up with an equation. <A> Don't let the fact that there is a potentiometer in the circuit confuse you. <S> In any one setting, you can replace the potentiometer with two fixed resistors. <S> Once you have done that, you have a simple 4-resistor network to solve. <S> Solve this at as many pot settings as you like to get a graph of voltage as a function of pot position. <A> The equation where Rlow is the potentiometer low side resistance simulate this circuit – Schematic created using CircuitLab R = Rlow || (Rpot-Rlow +Rpar) = <S> Rlow <S> * (Rpot-Rlow +Rpar)/(Rlow + Rpot-Rlow +Rpar) <S> = <S> Rlow <S> * (Rpot-Rlow +Rpar)/(Rpot+Rpar) <S> You can find the pot value from the maximum value that is ~260 ohm <S> R has a maximum at the Rlow = <S> Rpot-Rlow +Rpar (both pats are equal) and Rlow = 2 <S> * Rmax = 520 ohm <S> From here we find out that Rpot = <S> 2*Rlow - Rpar = 1010 ohm , your guess was close. <S> For a linear potentiometer the R graph (% Rlow from Rpot) looks like this: <S> As you see it doesn't look like your graph, that means the pot is non linear.
With a little extra math defining the two resistors you are modeling the pot as, you can write down the closed form equation of output voltage as a function of pot position.
What microphone (sound sensor) that can work with Arduino to detect gunshot? I am working on a project to detect a very loud sound/Pop(like gunshot).I am using a microcontroller like Arduino. Currently I am using this simple sound sensor . But the issue is, it is very sensitive, I connected it with 3.3V and the highest it gets is around 560's from analog read, whether it is a simple clap or loud bang, it maxes-out at 568. I have tried to adjust the potentialmeter but no difference. Can this sensor measure gunshot intensity? If not what sensor can I use? <Q> Piezo disks are a usable, insensitive, microphone for gunshot, depending on distance A gunshot definitely can slap the electret microphones diaphragm into the stops if close. <S> You need to look at the microphone output with an oscilloscope to see if the mcirophone is saturating, or the amplifier following it. <A> Upon visiting the manufacturer website and looking at the schematic they provide, the most likely cause of the problem you are having is that the pre-amp that follows the mic capsule has too much gain. <S> Microphone Sound Detector <S> For a first attempt, simply remove R4. <S> This changes the pre-amp to have unity gain. <S> If the output signal is now too low, choose a suitable value for R4 that gives you the gain that you need. <S> It's hard to give you more concrete information because the manufacturer does not provide component values on the schematic. <S> But this should get you started. <S> One of the other answers suggested monitoring the output signal with an oscilloscope. <S> This is great advice and you should do that if at all possible. <A> If your sensor is too sensitive then you could do well to find ways to muffle the sound that the sensor receives. <S> This could be anything from putting cloth, felt or even paper over the sensor. <S> It could even go so far as to place the sensor with insulation around it and allow some sound to enter the sensor through the insulation. <A> The product description says that the potentiometer adjusts the threshold for the digital output of the microphone, not the analog output. <S> You need to measure the voltage of the digital output of the microphone to determine whether the sound level is past the threshold set by the potentiometer or not. <A> Simple answer: Put tape over mic and seal tight until you can peak detect a linear range over 40dB or 1 to 100%. <S> ——— <S> This is a physics issue with sound isolation from ambient and general handling and not about detection. <S> Acoustic measurement devices are usually high quality wideband cardiod moving coil microphones not cheap electrets. <S> But with skill, one could calibrate cheap mics with suitable peak and hold detection and very low gain. <S> Your PCB is clipping it. <S> But like any measurement device , directional control gain and and acoustic measurement of "Loudness" according to Fletcher Munson curves are very dynamic <S> so there is poor correlation with distance with loudness. <S> Also reflections from structures nearby can amplify the sound levels.)
You could use a ceramic cap and amplifier to detect a gunshot with a suitable substrate but again the background low frequency noise must be isolated.
lock the 10 outputs of 4017 to HIGH I am a beginner in electronics. For a project I have to use five 4017 counter and I understood how they works: one of ten outputs is high at the same time. But at some time, I need to set HIGH the 10 outputs of the five counters simultaneously. In your opinion, what is the best way to achieve that ? I thought about using OR gates with one input set to HIGH after the counters but I can't find IC with more than 4 gates (CD4072B for example) so there will be a lot of OR gates on the circuit. Also, I thought about using diodes, is this a good idea or is there IC which can achieve what I want ? <Q> There is an IC that can lend itself to this problem. <S> Use a CPLD part or an FPGA to implement the logic of the five Johnson counters (4017's). <S> Then change the logic to either add in a layer of OR functions at each counter output or change the fundamental design of each of the Johnson counters such that there is an "force all outputs high" mode. <S> If you look at the equivalent circuit of typical 4017 such as this one from an old Intersil / Renesas data sheet: You will be able to get a good idea of the logic function to implement in the CPLD/FPGA. <S> You will also notice that the "force all outputs high <S> " (AOH) mode can be implemented simply as: <A> There are plenty of obvious ways, but they all use a fair few components. <S> This dirty trick relies on the internal diodes U1a,U1b that are on every cmos input and output pin. <S> When VSS is connected to +5V, then internal diodes U1b power the leds connected to the outputs. <S> SW2 could be a couple of transistors, or a couple of gates in parallel e.g. 74hc04 simulate this circuit – Schematic created using CircuitLab <A> A CD4017 won't directly drive much current. <S> Nor will gates in the high voltage 4000 series. <S> You could use two diodes per output (20 diodes or 10 duals such as the SMT BAV99 or BAT54) to make an or gate per output. <S> Or you could use 2-1/2 quad gates as you suggest. <S> Either way, pretty simple. <S> There might be some obscure IC that would drive 8 or 10 outputs and reduce the part count from 2.5 to 1 or 2 <S> but it would likely be surface mount only and limited to much less supply voltage than the 4000 series. <S> An FPGA or CPLD would be an option <S> but there is a learning curve and some things to buy. <S> For example two AT28C64B 8 <S> K x 8. <S> Feed the 10 inputs + control input into the address lines of each chip and take the 8 outputs from one and two from the other. <S> You would need to create the hex (etc.) file to describe the desired outputs. <S> Also this is a really dumb way to get the desired functionality and might inspire you to learn Verilog or VHDL and program an FPGA.
If your circuit is 5V you could use one or two old-school parallel EEPROM(s).
How does a TLC5917 LED Driver work? I have been messing around with TLC5917 LED Constant Current Sink Drivers and I don't fully understand how they work. Because of how I was taught how Voltage/Current works, to my understanding, a voltage of 5V should be able to be measured between an active pin on the driver and a 5V source going through an LED. What I measure however appears the be the forward voltage of the LED.It is my understanding that current is drawn and voltage is "applied". Since the driver is constant current , the behavior makes sense but how exactly does the driver supply the correct voltage? Or is my conceptual understanding of how voltage/current work misguided? <Q> If you look on the datasheet you'll see that the external voltage applied to the LEDs is on the anode of the LED. <S> The cathode of the LED is connected to the pin of the TLC device. <S> In this case the TLC is sinking current. <S> To reiterate, the driver doesn't supply the voltage, the voltage is applied externally. <S> The driver does, however, ensure the correct current flows through the LEDs. <S> It should also be noted that the driver takes up any difference between supply voltage and what is dropped across the LED. <S> So you have to take care that you don't have a combination of external voltage and current drawn that would damage the chip. <S> The higher VLED <S> the higher the power dissipated by the the TLC. <S> The image below gives you a very basic internal schematic of the IC. <S> Remember that the LEDs' cathodes are connected to OUT0, OUT1 etc, with the anode connected to the external voltage. <S> The little circles with the down pointing arrows are representing constant current sink . <S> It is this that ensures the current drawn by the LEDs is the same and constant. <S> It might be that you're not familiar with the difference between a current source and a current sink, so it might be worth doing a little reading up of the difference between them if that is the case. <A> The clue is in the name of the device. <S> It is a current sink which means instead of sourcing the current, it provides a place to sink current. <S> This means that the LED cathode must be connected to the device pin, not the anode. <S> Standard LED current limiting resistors are NOT required. <S> The voltage must be supplied from the power rail, the device is basically providing a ground. <A> The question in this case is more how does a current source or in this case a current sink work rather than how does the TLC5917 work. <S> As you noticed, when connected to the driver chip, you measure only the LED's forward voltage between the source and the driver pin. <S> Usually it works the opposite way that you have a current source instead of a sink and it generates an output voltage high enough to have the desired output current. <S> It may helps to understand if you take it as a variable internal series-resistor to the LED. <S> If you configure it to draw more current, the resistor will become smaller and if you configure it to draw less current the resistor will become larger. <S> simulate this circuit – <S> Schematic created using CircuitLab Notice, this is just an explanation why you're not measuring V_LED between the LED's anode and the input pin of the TLC5917 <S> , it's not how the chip actually works.
What the driver does is, it puts the voltage level of the sink pin high enough so only the specified current will flow through the LED - by regulating its forward voltage.
Can some clamp meters measure voltage through their clamp? A simple question, is it possible any clamp meters to provide voltage readings when a cable is between their clamp? I see from specifications for meters that they don't seem to do that and instead provide an amp reading. I assume this is likely because its not possible via this kind of non contact measurement but can someone confirm? <Q> Not with your kit but Fluke has just released a non-contact voltage meter with a U shaped probe (not quite a clamp). <S> It believe it works by capacatively sensing the voltage, where the conductor forms one half, and the user forms the other half of the capacitor by touching a metal plate on the back of the meter. <S> Reviews are mixed. <S> Check it out: Fluke T6-1000 <A> It is not possible. <S> The voltage measurement mode on clamp meters uses some conventional banana plug terminals on the meter. <S> Non-contact voltage detection does exist, though how that works is an answer for a different question. <S> But it can't measure the voltage <S> , only detect that it's there. <S> (edit: <S> as pointed out in the comments, there are some devices that can measure voltage without contact. <S> They are very inaccurate, though.) <A> Simple answer: not possible without modifications. <S> Not so simple answer: <S> This is called a capacitance transformer. <S> Capacitance is due to gap and area of surface between non-contact conductor. <S> As impedance rises with lower frequency it becomes much harder to measure due to coupling E-field to C to small C probe. <S> Inductive coupling is used for single wires and both wires for common mode noise to detect current from B field transformed into a voltage with a burden resistor. <S> The coupling must near ideal to record accurately and often has a lower bandwidth than other methods due to clamp size as defined by probe specs. <S> There is a wide variation of clamp types. <S> One example is you can detect partial stray line voltage by touching a 10:1 probe then put other hand finger near insulated line single wire and see voltage rise towards line voltage. <S> This is safe due to insulated wire but finger capacitance can be greater than 20pF 10:1 probe so it rises near line voltage but limiting current <S> ~ <S> 30 uA via 10M probe resistance. <S> Then short probe of scope with its ground wire around a small battery wire <S> and now you can detect pulses of short circuit current in probe above <S> say 100k~1MHz and see a glitch <S> where decay time =0.35/f-3dB of this HPF current probe. <S> See what you get and report back. <S> So voltage is measuring E field with very high impedance and current is measuring B field with current loop into low impedance detecting voltage rise.
It is possible to measure voltage by non-contact method measuring via high impedance probe via a larger coupling capacitance to a single wire but not around both.
Crystal's ESR or Frequency Stability/Tolerance, which is more of a priority? I'll be using a 12MHz crystal, CL=20pF on an NXP chip. Currently choosing between lower ESR (60ohms vs 100ohms) or lower stability (50ppm vs 10ppm). Which spec is more important? Should I choose a lower ESR @50ppm or higher ESR @10ppm? <Q> What "stability" means in this context is a bound on the effects of temperature. <S> For example, the manufacturer may guarantee that the frequency will not change more than 10ppm over the range of -10 to +60°C. <S> It is distinct from initial tolerance. <S> ESR has an effect on the pullability of the crystal and the power dissipation and probably jitter. <S> If you have too much power dissipation you can cause the crystal to drift over time just from that cause. <S> Personally I would be inclined to pick the one with lower ESR unless precise timing was of some great importance in the application. <S> Or maybe the one with high availability, pedigreed supplier and lower price. <A> There are several sources of error in XO crystal oscillators. <S> ESR is not one of them, but for series resonant oscillators which resonate at a slightly offset frequency, and Q dependent VCXO tuning range ESR is very important. <S> So consider all below. <S> Tolerance error at 25'C (ppm) due to factory sorting and smaller tolerance angle cuts on crystal Temperature stability error over defined range can make a big difference as the curve for AT XTals is a 3rd order characteristics depending on Xtal angle cut. <S> One can choose a narrow range and get a lower slope temp error curve near room temp but wider offset range at extremes like -20~50'C, -30~60'C or -40~70'C depending on your environment. <S> aging error; this depends on quality of synthetic purified SiO2 (quartz) crystal from electrode migration of impurities and package seal. <S> It can also be dependent on drive level in uW where lower is better and lower temperature. <S> But often spec'd as 5ppm in 1st year at 25'C and may reduce per year after this vibration and shock error , wire bond stress to crystal can offset the frequency and they are prone to early failure if Xtals are dropped on the floor. <S> This can shift as much as temperature but depends on high level of vibration. <S> When I had a database of stock part numbers, my description would include xx MHz 25/50/5 <S> -40~70'C <S> (for tol./stab/age) , package size and load <S> pF <A> It completely depends on your application. <S> What are the specs of the NXP chip? <S> How much -R does it have, and how much accuracy do you need? <S> ESR affects how quickly and easily the crystal starts. <S> Basically, how hard it needs to get "hit" with current to start oscillating. <S> If the NXP chip has substantial -R, then you don't need a lower ESR crystal. <S> In fact, the extra power is just going to cause faster aging of the crystal. <S> The rule of thumb is that -R should be 3x the ESR. <S> If your application needs better accuracy, then obviously you'll want to use the low ppm crystal (assuming that you can guarantee that it will start up across conditions). <S> Tony Steward older than dirt has already covered accuracy in his answer.
Low ESR means more reliable startup of the crystal across PVT.
Why are these traces on the PCB zigzag? I recently found my old Raspberry Pi laying in a drawer and I took a look at it. I noticed that the conductor traces are in a zigzag form. What's the reason behind this? Especially because there's plenty of space to just make a straight trace. I am sure there has to be reason for this because I have never noticed this on the PCBs I deal with at work. <Q> They are used for trace length matching. <S> Differential high-speed signals need to have their traces routed with lengths as close as possible to each other, so by adding curves like this one can add more length to one trace than the other and bring the trace lengths closer to each other. <A> Those are probably differential pairs for a LVDS comms scheme. <S> That means some of them need to be scrunched up. <S> As an aside, I haven't heard zick-zack before, but I'd recognize zigzag, which means a back-and-forth pattern. <S> Hope <S> that's the word you were looking for. <A> There are two features there. <S> One is the pairs of tracks close to each other. <S> That's because they are designed to have a controlled characteristic impedance. <S> The thickness and dielectric constant of the PCB through to the ground plane underneath and the desired impedance determines the width and spacing of the conductors. <S> That keeps the signals relatively free from reflections and clean. <S> Each pair represents a current path to and from the receiver. <S> It takes stripline signals about 1 to 1.1 nanosecond to travel 15cm (6"). <S> The second feature is the switchback configuration of the pairs. <S> That's to equalize the length between chip and connector (for each pair), so that the differential signals arrive at the connector at very close to the same time.
To make sure the signals arrive at the same time, all the traces are the same length.
Where can I find the IC06 74HC/HCT/HCU/HCMOS Logic Package Outlines I am looking at using the 74HCT4514PW I want to ensure the footprint I am using is correct (I have screwed up in the past using a 0.4mm "TSSOP" footprint when I should have used a 0.65mm "TSSOP" footprint) The mouser product page links to a datasheet but unfortunately it does not contain details of the package outlines, instead it references "IC06 74HC/HCT/HCU/HCMOS Logic Package Outlines" Where can I find this document, it does not appear to be obvious in a google search. <Q> On the second page of google results I found a question on the arduino forum this had a link to http://ics.nxp.com/support/documents/logic/ <S> The link was dead, presumablly as a result of the NXP/Nexperia split, but the internet archive has a copy <S> There doesn't seem to be any document whose title precisely matches the referenced "IC06 74HC/HCT/HCU/HCMOS Logic Package Outlines" , however there seem to be a pair of documents containing the relavent information IC06 74HC <S> /T High-Speed CMOS Package Information contains a mapping table showing which IC goes with which footprint. <A> The Mouser listing you link to specifies the package as "SOT-355". <S> Make sure you check the package width of your footprint too. <A> Philips Semiconductor division spun out to become NXP, and you can find these documents here on page 2 for old SOIC’s https://www.nxp.com/docs/en/application-note/AN2409.pdf <S> But they dropped the Philips package style number. <S> Look for SOT355-1, TSSOP24, plastic, thin shrink small outline package; 24 leads; 0.65 mm pitch; 7.8 mm x <S> 4.4 mm <S> x 1.1 mm ... https://componentsearchengine.com/common/footprintPreview.php?partID=908132 <S> Philip’s Name SOT355-1. <S> Second Name TSSOP24. <S> JEDEC MO-153
IC06 74HC/T Package Outline Drawings Package Information has the actual package drawings. Nexperia has a datasheet for their SOT355-1 package where it's described as having a 0.65mm pitch.
How to calculate the voltage used to light up the emergency light from the given details of manual..? I have an emergency light device which is given by a small manual back side of it with some electrical specification. They are: Voltage: AC90-240V 50-60Hz Current: 0.1A Power: 18W Can I calculate the actual voltage rating of this device? The device has a rechargeable battery inside it and there is no other informations available in its manual. When I used the formula: $$P = V \cdot I$$$$V=\frac{P}{I}=\frac{18}{0.1}=180~V$$ Is it correct that the device's output is 180V? (I think it is very high and my calculating approach is failed). <Q> Since the device has a wide operating voltage <S> it is likely that it has a switched-mode universal power-supply. <S> We can do some maths and work out the current at 18 W for both 110 V (North America) and 230 V (Europe) power. <S> For 110 V, \$ <S> I = \frac { <S> P}{V} = \frac {18}{110} <S> = 0.163 <S> \ \text <S> A \$. <S> For 230 V, \$ <S> I = \frac { <S> P}{V} = \frac {18}{230} = 0.078 \ \text <S> A \$. <S> The 0.1 A rating on the PSU is normally the worst case at 90 V in your case. <S> We can see that there is something wrong here <S> so it may be that the manufacturer has erred or has given some sort of average current since once charged it will trickle-charge the battery and the power consumed will be very low. <A> Voltage: <S> AC90-240V <S> 50-60Hz <S> This describes a line voltage input, probably to a switching power supply. <S> There isn't any "actual" voltage rating -- the device can accept an input anywhere in the range from 90 to 240 volts. <S> (The rating of "0.1 A" seems a little off, but it's approximate anyway.) <A> The emergency light lights up only when the AC power goes out. <S> To find out the voltage that is used to light up the emergency light, check the replacement battery voltage, if it is stated in the manual. <S> Otherwise, open the device and check the label on the battery.
The electrical specification that you included in your question is for the charging circuit which is active only when the AC power is on. The amperage it draws from the line input will vary based on the voltage, probably to keep the total power around 18 watts.
Redesign circuit to use LM317 instead of MFC 6030 I have a failed obsolete adjustable voltage regulator (Motorola MFC 6030). Could this 6-terminal device be replaced with a modern 3-terminal voltage regulator? The regulator is used to drive the base of a pass transistor for a DC power supply. The power supply (Heatkit HWA-202-1) delivers 10 V DC to 15 V DC at 2 amps. <Q> Most likely yes, your going from 20V-rms down to 13.8V so a 2A voltage regulator should be able to do that, but there is a caveat. <S> The voltage drop, which is 6.2V at full load with 2A that will be 12W (which may be a little lower if the 20VDC is really 20-18V or something like that). <S> So if you do get a regulator, its going to have to need a package to handle the heat. <S> A simple (inefficient) AC to DC power supply circuit looks like this: Source: https://www.elprocus.com/steps-to-convert-the-230v-ac-to-5v-dc/ <S> Which you already have the transformer and rectifier. <S> The stage you will need to replace is the regulation stage, which in your case is done by Q1 and IC-1 <S> There are probably better ways to handle this circuit, just ditch the whole thing and get a 13.8V wall wart that can source 2A <S> , I'm willing to bet this circuit is not built up on a PCB to UL standards today. <S> If you buy a wall wart this will be tested and will be less likely to kill you or burn your house down. <S> The last thing is they do have DC to DC regulators that are drop in replacements for voltage regulators, then you wouldn't have to deal with the heat. <A> No, it will not. <S> For two reasons, one, which comes directly from the pinout/datasheet of the original device, and another that comes from experience. <S> The original device features a current sense pin, also hinted at by the low-value resistors across which it measures in the Heathkit schematic (oh, how I know those supplies well...). <S> This protects from damage to the transistor as well as the transformer, because the original will drop the output voltage when the maximum current is exceeded. <S> So, in the same setting the supply will no longer be sufficiently protected from damage. <S> The second reason is that a device designed to provide an output directly, proportionally measured through resistances or otherwise, is not optimised for an external pass-transistor. <S> The LM317 your title mentions is an excellent example of such a regulator. <S> Its output is designed to be measured directly by its feedback pin. <S> If you just willy-nilly add a pass-transistor before it's measured <S> you may very well get instability and oscillations. <S> These can cause your Transistor, Transformer or even Capacitors to blow up even before you try to take the full 2A from the device. <S> You need to do analysis of the total effective resulting schematic and see if the phase-margin and total path gain across a range of frequencies are such that the device stays stable, or at least stable enough. <S> And if not, add tuning paths to prevent oscillations at those frequencies that those values are not favourable. <S> Of course, you can simply try and see what happens, but you need to be fully prepared for unwanted consequences of any sort. <S> And in any replacement not the actual original I would strongly suggest you use an oscilloscope to inspect all signals over several different known loads. <A> You might find useful to use a fixed linear voltage regulator instead of an adjustable one. <S> The LM78S15 gives 15V at 2A maximun, a little higher voltage than the 13.8V, but do the job without using adjusting resistors. <S> Use this with a proper thermal dissipation and the proper caps at the input and output of regulator and it should work without any problem. <S> If the 13.8V is a must then use the LM317, but in any case there's not a direct substitution to the MFC6030 and you will have to think how connect the new regulator to the circuit. <A> Could this 6-terminal device be replaced with a modern<\s> 3-terminal voltage regulator? <S> YES simulate this circuit – <S> Schematic created using CircuitLab
If you want to substitute the device, you need to find something that is indicated as a compatible substitute, or you need quite a bit more background information.
How to estimate Li Ion Battery SOC? In a simple model of a renewable energy system, I have a residential inverer and Lithium ion battery system with a round-trip efficiency (for inverter and battery, i.e. ac to ac) of 89% (at 25 degrees and a given charge / discharge power). The model needs to calculate the SOC of the battery (to determine when it's fully charged, etc.) which requires me to distinguish between charging and discharging efficiencies. Some studies assume the inefficiency is in charging, so SOC = 89% of charging energy, but this seems unlikely. Is it reasonable to assume that the losses for charging and discharging are approximately equal, so the charge and discharge efficiencies would both be approximately 94.3% (square root of 89%) or is there some other rule of thumb? To clarify: this is a techno-economic model and is only concerned with energy flows in the system. If n(charge) is the charging efficiency and n(discharge) the discharge efficiency, all I know (from the manufacturer) is n(cycle) = n(charge) * n(discharge) = 0.89 For example, in time period t1 , energy delta(E) is sent to the battery-inverter system and - if the battery has unused capacity - increases the energy stored in the battery by delta(E) * n(charge) . The change in the state of charge is then: delta(SOC) = delta(E) * n(charge) / usable capacity I need to estimate SOC to know whether the battery has capacity to take delta(E) . <Q> It is not entirely clear what you are getting at. <S> What you SHOULD do if your model is detailed enough is periodically measure battery current and sum during charge and discharge to keep track of Amp-hours. <S> Charge amp-hours and discharge amp-hours are very close to equal (very high Coulombic efficiency). <S> The energy loss due to charge and discharge is mostly due to voltage differences. <S> The voltage during discharge is lower than the voltage during charge, so even though the cumulative charge is the same, the energy is not. <S> The figures you are quoting may involve DC-DC converter losses or inverter losses. <S> It is hard to tell from your question. <S> But if the round-trip efficiency for the battery itself is 89%, that is probably due entirely to voltage difference. <S> I don't really see how it can be apportioned between charge and discharge, nor do I see why it would be necessary to apportion it that way. <S> Maybe it would be more clear if you provided more detail about your model. <S> Maybe your battery model could just use an ideal battery with a small resistor in series. <A> (insane right?). <S> So the rest of the inefficiencies are going to be from the charge controller (which is essentially a DC to DC converter with different control hardware). <S> The rule of thumb I like to use for DC to is 85% for a reasonable low end <S> ( there are some that are worse than this) and 95% for the high end. <S> In low current conditions the efficiency is much worse, but we are charging a battery, so the current is high. <S> So if we take 90% by 99% we get 0.891 or 89% to get the charge into the battery, to take it out, I'd knock off another 80%. <S> So 89% by 80% is 0.71 or 71% for a non-detailed number. <S> This is only for DC to DC, if you need to convert to AC then the numbers might be lower. <S> Once you actually start designing the system you can plug in real efficiency numbers. <S> The battery is highly efficient. <S> Li-ion has 99 percent charge efficiency, and the discharge loss is small. <S> In comparison, the energy efficiency of the fuel cell is 20 to 60 percent, and the ICE is 25 to 30 percent. <S> At optimal air intake speed and temperature, the GE90-115 on the Boeing 777 jetliner achieves an efficiency of 37 percent. <S> The charge efficiency of a battery is connected with the ability to accept charge. <S> (See BU-808b: What causes Li-ion to die? <S> under Coulombinc Efficiency.) <S> Source: http://batteryuniversity.com/learn/article/comparing_the_battery_with_other_power_sources <S> On to battery capacity in watt hours: <S> If you aren't sure if you need the capacity in WH or just AH <S> well ah is easily found by just finding the capacity that relates to the cutoff voltage you want in the discharge curve. <S> If you do want WH though: If we say the voltage range is 4.1 to 3.1, and the capacity is 3.2ah <S> well then you get a rectangle with a triangle on top of it that you can find the area of and know your Watt Hours. <S> WH = <S> (3.2*3.1) <S> + 1/2(3.2* (4.1-3.1)) Source: Lithium Ion Battery Pack - Looking to calculate watt-hours from V1 to V2 <S> So after you calculate your battery size in watts, multiply it by the efficiency to find the total capacity in watts. <A> The question arose from a misunderstanding, but maybe useful to leave it here. <S> The meaning of "battery capacity" is not "energy stored in the battery" but instead "useful discharge capacity", i.e. the electrical energy that can be delivered after the charge and discharge losses. <S> e.g. if the battery capacity is 13.2kWh, the battery actually stores more chemical energy than this (though we don't know exactly how much), but can deliver 13.2kWh. <S> Therefore, the model can use the simplifying assumption that all losses are on the charging cycle ( n(charge) = n(cycle) <S> = <S> 89% and n(discharge) = 100% ). <S> Then we don't need to know the actual energy stored, just the useful deliverable energy. <S> e.g.if <S> the SOC is 80%, the useful deliverable energy stored is 0.8 <S> * 13.2kWh = <S> 10.56kWh and the amount of additional energy I can send to the battery is 20% <S> * rated capacity <S> / n(cycle) <S> = <S> 0.2 <S> * 13.2kWh <S> / 0.89 <S> = 2.97kWh. <S> With thanks to @mkeith for helping me work through this.
Lithium batteries have a charge efficiency around 99%
BU2505FV - Can I use SPI with this part? I am planning to use the BU2505FV DAC in my design and to communicate with it using SPI. Is the 3 Wire interface described in the datasheet compatible with SPI? The DAC expect 14 bits to configure an output, and my Microcontroller SPI can send only bytes (8 bits per byte). So what will happen if I try to configure an analog output by sending 16 bits (2 bytes) to the DAC? Also, I plan to connect other devices to the SPI bus, such as the MCP23S17 I/O expander . Are there any compatibility issues with using both parts in the same design? Thank you all for your help! <Q> The only real difference between the chip's serial protocol and SPI is that LD (the Slave Select analogue) must be pulsed high to latch the internal shift register but kept low at all other times. <S> If you add a pulse former to that line you can make it behave like any other SPI device. <S> When sending 2 bytes the first 2 bits sent will be discarded by the chip (will actually get shifted out of DO with 14 clocks of delay), the rest are as described in the spec. <A> Apologies if I'm wrong ! <S> Shifting a shift register with bitbang method isn't a hard thing to do. <S> But, it is doable with SPI. <S> In the datasheet , there is a nice illustration showing that the device can be cascaded or should I say daisy-chained (like some SPI devices). <S> Now the implementation, BU2505FV has a 14-bit shift register, so, you have to left-shift the data 2 bit first and then do a ordinary SPI transfer. <S> A little advice, timing characteristics and pin functionality should be "studied" carefully. <S> A comfirmation: look at Data Interface section in this product detail . <A> That part is not SPI compatible. <S> It uses its own serial protocol.
The clearance between SPI and shift register shifting is uncertain.
How do USB hubs work when same device is connected I was reading on how USB hubs work and since there is only 1 master, master sends a command to an endpoint. However, how does a USB hub work when there are 2 same devices plugged into a USB hub? How does the device know which is being addressed? <Q> You can distinguish them by the port they are connected to, otherwise they will appear identical. <S> The way we distinguish between two devices is with a serial number in the embedded software, <S> if the embedded software has no distinguishing fields you can read, then you can only distinguish them by port. <S> Reading the port is dependent on the software of the operating system you are using. <A> USB has a process called “enumeration” where each device, including hubs, is assigned an 7-bit number used to identify it to the host. <S> When a hub is attached, it is enumerated and then each device downstream is enumerated. <S> This is the reason that no more than 127 devices may be attached at any time. <S> Therefore, each of your identical devices receives a different number. <S> Which one gets what number depends on the order they are enumerated. <A> I think the question comes from not very-well described behavior of USB hubs when various devices are connected to its downstream ports. <S> The process is as follows: <S> Initially the hub is in reset state and all downstream <S> (DFP, downstream facing port) ports are disabled. <S> So any traffic coming to upstream port of the hub from host (most packets in HS hubs are broadcasted, and can be visible on all root ports) is initially blocked to DFPs, and no device sees any activity. <S> Then the hub gets "enumerated" by receiving its own unique device address. <S> The DFPs are still disabled. <S> Each DFP however has a hardwired ability to detect connect event (D+ or D- gets pulled up by device). <S> The connect status gets reported to USB host via a dedicated hub control pipe (the hub is already enumerated and has an assigned address). <S> So the host knows that something is connected, but it doesn't know yet what it is. <S> Upon getting hub status, the host enables only one DFP at a time , starting in arbitrary order (usually the lowest port that reports new connection). <S> Then the host starts to communicate with the connected device using so-called "default control pipe", at endpoint 0 address 0. <S> Every device must have one ready after power-up or reset. <S> Since there is only one new port enabled, only one device will be responding. <S> All other devices already would have individual addresses assigned to them, and therefore wouldn't respond to this default (0,0) pipe. <S> In the process of enumeration this device receives new available device address, and will stop responding to default pipe. <S> All communication with this particular device will go to this new address. <S> The Host then enables the next port that reports the connected status, and repeats steps (4 - 5). <S> The host repeats step (6) until all ports with connect status are enabled and all devices behind them are enumerated (got individual device addresses), so the host can address their pipes individually. <S> This concludes the device enumeration behind hub's DFPs. <S> In the process each device ends up with unique device address, and host knows who is who and where to address it, even if the devices are physically identical.
If you need to programmatically tell the difference, you must use the devices’ serial numbers, if they have them.
Doubt about USB bus powered device I want to improve my project to be more robust, because it needs to be available 24 hours a day. Initially, my design had one microcontroller and a USB (FT232R) interface. The FT232 is 5V powered and my microcontroller is 3.3V. I was using an external regulator to supply power to the microcontroller, but, to minimize possible issues that the approach of using two voltage sources can bring, I thought to use a bus powered solution. I read on FT232's datasheet that the basic rules for USB bus powered devices are as follows: On plug-in to USB, the device should draw no more current than 100mA. In USB Suspend mode, the device should draw no more than 2.5mA. A bus powered high power USB device (one that draws more than 100mA) should use one of the CBUS pins configured as PWREN# and use it to keep the current below 100mA on plug-in and 2.5mA on USB suspend. A device that consumes more than 100mA cannot be plugged into a USB bus powered hub. No device can draw more than 500mA from the USB bus. My concerns: Trying to satisfy this rule, I analyzed the current consumption of the microcontroller: The microcontroller is a dsPIC33EP64MC202, and it has the following current's consumption according to its datasheet: DC Characteristics: Operating Current(IDD) at +85°C 3.3V 70 MIPS : Typical ........................................... 41 mA Maximum ........................................... 60 mA Absolute Maximum Ratings: Maximum current into VDD pin ...................... 300 mA Considering the operating conditions, it seems to be ok to use a bus powered approach, but, I'm afraid of the absolute maximum current that it can draw and what could happens if it draws this amount of current. So, my doubt here is, should I consider a high power USB device or not? Would be safe to consider a non-high power USB device? I read what "Suspend mode" is, I understood that the host (the computer in this case) will decrease current when there is no activity on the bus for a time greater than a few milliseconds and, afterwards, it will decrease the current until shutdown the device.Well, if this is right, I have a problem here, my device will receive a requisition via USB and, after a time, a few milliseconds, it will answer the requisition. How can I handle with this? The device can not be shut down so early in the middle of an operation I did not understand this rule. If my device is a high power USB device, I should use one of the CBUS pins configured as PWREN# and use it to keep the current below 100mA on plug-in and 2.5mA on USB suspend. But how I will do this if my microcontroller is BUS powered? I need to configure the FT232 before mounting it on the PCB? (4 & 5). The rule (4) is sufficient to rule (5), so, why specification on rule (5) was necessary? <Q> I'm afraid of the absolute maximum current that it can draw and what could happens if it draws this amount of current. <S> Absolute maximum ratings are "if this is exceeded then the device may be damaged", not specifying that they will happen. <S> You do not need to worry about that number. <S> You do need to make sure that your current draw is under 100 mA or 2.5 mA when applicable by making sure the actual current draw due to program execution, internal peripherals, and attached devices does not sum up to over the USB-specified limit. <S> I understood that the host (the computer in this case) will decrease current … <S> No. <S> The USB host cannot "decrease current" because it is supplying a specified voltage . <S> What this means is that when your device is commanded to suspend , according to the USB protocol, it must reduce its current draw or be in violation of the spec. <S> (4 & 5). <S> The rule (4) is sufficient to rule (5), so, why specification on rule (5) was necessary? <S> 4 applies only when your device is plugged into a bus-powered hub. <S> If it is plugged directly into the host then there is no bus-powered hub involved, and the 500 mA limit applies. <A> Power specification in Absolute Maximum Ratings is a worst-case scenario when pretty much all pins are sourcing maximum current. <S> Only you can tell whether it ever happens in your design. <S> If it ever draws more than 100mA then you should configure max power in FTDI EEPROM. <S> All the configuration of the FT232 can be done via USB after mounting on PCB. <S> The software can be downloaded from FTDI website. <S> There are two ways you can support low powered mode. <S> Since you need to drop supply to 3.3V anyway you can use LDO with "enable" pin, controlled by PWREN/SLEEP. <S> Another option to use power switch as illustrated in 6.3 of FT232 datasheet. <S> This will cut power to your circuit, so you need to carefully plan your reset sequence. <S> This method leaves your code in control over the process. <S> In either case, note that suspend <S> signal from USB host usually means your computer goes into sleep/hibernation/shutdown. <S> As such, your device should not expect any requests coming from PC until it is brought back from suspend. <S> On the other hand, this is two-way street. <S> If your device has some data it wants to communicate to PC it can use remote-wakeup signal (supported by FT232) to get its attention. <S> Regarding decreasing power when bus is inactive - host does not do it. <S> It is important to understand what this feature is for. <S> It was introduced mostly for devices that have their active operation and USB communication inherently tied. <S> For example keyboard or mouse need to communicate with PC when they are used, but can safely go to sleep as soon as you stop typing or moving. <S> If your USB device has something to do in between (e.g. data collection) it can continue doing so. <S> It is quite common to use timer interrupts to wake up, do some sensor readings (e.g. temperature) and go to low-power mode again. <A> The absolute maximum rating is not a promise that the part will never draw more than 300 mA. <S> It's a warning that if you put it into a state where it draws more than 300 mA, you could damage the part. <S> You, as the designer and firmware writer, are responsible for connecting the microcontroller correctly, and writing firmware that doesn't draw more than 100 mA at start-up, doesn't draw more than 2.5 mA in suspend mode, etc. <S> I understood that the host (the computer in this case) will decrease current when there is no activity on the bus... <S> The host can not unilaterally decrease the current drawn by your peripheral. <S> It can only tell the peripheral to enter suspend mode. <S> It's your responsibility to reduce the current below 2.5 mA when you're told to enter suspend mode. <S> Normally you'd do this by putting your micro into a sleep mode. <S> The device can not be shut down so early in the middle of an operation As you said, the host will only request suspend mode when there has been no activity on the bus for several milliseconds. <S> It won't happen in the middle of an operation.
You can use low quiescent current LDO to always supply your MCU and use PWREN/SLEEP to put MCU to sleep or wake up.
Need help analyzing a circuit? so basically i ran on this schematic , an led Color Organ from Circuit Skills. Now following the explanation of the circuit i pretty much understand the basic principle of it. However i have some problems figuring out about two things(I am an entry level Electronics hobbyist, so sorry about the dumb questions). Q1: The elements following the op amp (Red Rectangle) are supposed to condition the signal (ac signal from the aux jack), however are they really necessary ? And what is their purpose ? The ones in the yellow box i think are for smoothing the blinking of the Leds in order not the blink instantly but add a little dimming effect. Q2: Here in the circuit they use "Virtual Ground" for the Op Amps, however can they be powered by a single supply ? Hope i can get some answers from the Electronic Gurus .P.S. Here is the link from the website Circuit Skills <Q> Q1: <S> The elements following the op amp (Red Rectangle) are supposed to condition the signal (ac signal from the aux jack), however are they really necessary ? <S> And what is their purpose ? <S> The ones in the yellow box i think are for smoothing the blinking of the Leds in order not the blink instantly but add a little dimming effect <S> It functions like a half wave rectifier (only using the positive portion of the wave coming into it and the cap and resistor filter it. <S> You may be able to drive the transistor directly but it might not give you the effect you want. <S> The other problem with driving the transistor directly is you would at minimum need a resistor to separate the low impedance sink of the transistor from the feedback network of the op amp. <S> (there transistor might sink too much current and eliminating the cap could affect your sound signals) <S> Q2: <S> Here in the circuit they use "Virtual Ground" for the Op Amps, <S> however can they be powered by a single supply ? <S> Virtual grounds are typically used for cables and other situations when your ground cant be trusted (like battery powered applications) to force the ground to be 0V. <S> In this case, its not really a virtual ground, it's a reference functioning at half of the supply voltage and probably exists to create a bias current (which is really weird). <S> The best thing would be to try it with the virutal ground or without and see which is better for your application. <A> The circuit in the red rectangle is an AM detector or peak detector . <S> The diode will conduct if the input voltage is higher than the voltage across the capacitor to ground on its right. <S> Dave from the EEVBlog made a video about peak detectors, go watch it! <S> Here the peak detector basically translates the amplitude of the audio signal (and more amplitude means louder) into a changing DC voltage to control the lights. <S> The virtual ground circuit in the blue rectangle is a way to prevent having to use a symmetrical supply voltage. <S> A symmetrical supply voltage could be for example +10 <S> V, ground and -10 V. <S> That requires a slightly more complex power supply than a "normal" (non-symmetric) powersupply. <S> Opamps are easier to work with if you use a symmetric supply <S> but if you want to avoid that you can "fake" it using this virtual ground circuit. <S> If you have a +20V and ground supply (so non-symmetrical) this circuit would generate +10 V as an extra voltage. <S> When we then use this +10 V as a reference voltage for the opamps (note how the opamp's + inputs are all connected to it instead of to the real ground) <S> then this <S> +10 <S> V becomes a "virtual ground". <S> It's not the circuit's real ground but for the opamps it is the ground. <S> When this virtual grounding scheme is done properly, the opamps aren't able to tell the difference and will behave the same. <S> But note that the opamp's outputs might have a DC voltage on them, in this case it would be +10 V. <S> That's why in this circuit there are capacitors at the opamp's outputs, they block that DC voltage. <A> The virtual ground opamp is not needed in this circuit because its voltage divider and filter capacitor can be calculated or simply made 4 times the existing current to make the half supply voltage reference voltage for the very low input current on the (+) inputs of the other opamps.
The diode is an essential part of the circuit.
What is the difference between usb root hub and usb host controller? From the oracle wiki (usb controller): The USB host controller has an embedded hub called the root hub. The ports that are visible at the system's back panel are the ports of the root hub. What I understand from this is that the root hub merely is a point where all usb hubs come toghether. -Is the root hub a piece of hardware, or is it a term used to denote the point where all data from usb devices come toghether? -There are different types of interfaces between the root hub and the controller (UHCI,OHCI,EHCI), is it then correct to think of the controller as a "middleman" between the root hub and the actual computer? <Q> A regular USB hub is a USB device that can split USB traffic from one (upstream) link to several downstream ports, and mux the upcoming traffic from many ports into one upstream. <S> To do so, each hub has special control pipe that controls port functions such as connect/disconnect/suspend/resume/disable etc. <S> These functions are controlled via USB-type control transactions, which are directed to each particular port, all using USB packet-token protocol. <S> This protocol works up to any valid level of hub stackup, and each port has well-defined status bits within USB responses. <S> A root hub performs similar function, except (a) the upstream is associated directly with host controller pipe/bus, and (b) various status bits of each ports are mapped directly into 32-bit registers in host PCI space. <S> This is a piece of hardware. <S> However, to maintain bit-wise compatibility between ALL ports in USB tree and provide universal access to all ports, the host controller driver software usually has a special layer that converts the register-based port control statuses (PORTSC) into standard USB port status format. <S> This is sort-of illustrated in the following Microsoft documentation . <S> where the circled layer, I believe, provides this port status translation. <S> After that the system knows no difference between a root hub port and any regular hub port. <A> You can have more than one root hub, so no, it is not the point where all hubs come together. <S> It might be more convenient to think of root hub as one of the several starting points for enumeration. <S> Root hub is a piece of hardware. <S> The interfaces that you mention are Host Controller Interfaces (HCI), i.e. interfaces of host controller, not root hub. <S> Basically they are registers that software can access in order to communicate with host controller. <S> From the above I don't think term "middleman" is applicable as you pictured it. <S> UPDATE: <S> Here is a simple analogue to illustrate to relationships: A vehicle is a controller. <S> It has an interface (pedals) that software (driver) can use to operate the controller. <S> It also has an engine (root hub) that performs essential part of the car functionality. <S> You can say that driver operates an engine using pedals, and that would be correct but not precise, because there are quite a few parts between the pedals and an engine. <S> These parts correspond to internal logic circuitry of the controller. <S> So, more precise statement would be "driver controls the car using pedals, steering wheel and a stick, and since engine is part of the car it does its job share in the whole driving process". <S> In a computer terms that would translate into "software controls the host controller using HCI, and since root hub is part of the host controller it does its job share in supporting USB communication". <A> This is an implementation detail, for the most part. <S> USB hubs implement insertion/removal detection, port power control and the upstream side of the enumeration protocol that is used before the device is assigned a number. <S> The same functionality is required for each USB downstream port, whether it is directly attached to the controller or part of a separate device, and it would be silly to have two different specifications.
More specifically, it is a part of host controller (which itself can be either separate chip or a part of chipset).
Why does this H-bridge have PWM and Enable pins? The BTS7960 H-brige has 6 pins (excluding current warning pins). Right Turn PWM Left Turn PWM Right Turn Enable Left Turn Enable VCC GND I usually connect all the "Enable" pins to HIGH and only use the PWM pins to control the motor speed and direction. That works perfectly, but is that a good practice? Are the "Enable" pins really unnecessary or am I missing something? <Q> If you don't need the enable pins, there is nothing wrong with tying them high. <S> Just because they are unnecessary in your design, doesn't mean they are in some other design. <S> The purpose of the pin is to allow both transistors in each half-bridge to be turned off. <S> If for example you wanted the motor to freewheel (soft breaking in @vicatcu's answer), you would need to turn off both high and low sides, leaving the motor current to flow through the diodes in the bridge. <S> If you want to stop the motor instantly (hard breaking), you switch both h-bridges to the same transistor (both high, or both low). <A> It's the difference between a "soft brake" and a "hard brake". <S> In one case the motor is floating and not under control, in the other case, it's locked in position. <A> Read the BTS7960B datasheet until you fully understand deadtime and motor stored energy calaculations with inertia load currents driving the motor in controlled accelerating and braking. <S> Since you are using PWM extermal commutation, you must be aware of cross-conduction when changing directions and to stop slowly with PWM ramp before doing so.. <S> This smart chip board allows flexibility on methods of controlling PWM for optimal control of switching losses in each direction rather than one PWM method for both acceleration and braking. <S> This is why it is not suggested. <S> But it depends on your motor and load energy size relative to Pd dissipation capacity of board and heatsink/fan and estimated inefficiency losses. <A> It may simplify the topic to think of it from another angle than that of "hard braking" <S> Perhaps you have another axis driving the same mechanical load and therefor have the same considerations in as far as things like inertia. <S> In this case you may wish to have a "PWM bus" which gives the speed control to both axes. <S> You would then use the enable pins to address the different axes.
The PWM pin (called IN by the datasheet ) is used to select whether the high or low transistor is on, whist the Enable pin (called INH by datasheet) is used to switch of both transistors. Some combinations of 4 inputs shunt the motor windings for braking BEMF currents rather than switching between supply and ground which cannot be used in your simple method and thus draws more power.
Why are DIMMs not equipped with a heat sink like a CPU? I know that a DIMM is composed of a set of chips that contain control logic managing the decode and prefetching memory operations. According to a product specification , I found that newer RAM works at a high clock rate (> 1Ghz) that is comparable to some CPUs. And that's what made me wonder why only the CPU is equipped with a heat sink, and not also the DIMM, besides a certain high clock rate (and thus the amount of heat needing to be cooled). <Q> You're assuming that the power dissipation is directly related to the clock rate. <S> That's true <S> but there's more. <S> Suppose I have this chip A where only 10% of the chip area (die size) <S> runs at the highest clock rate. <S> Compared to a chip B of equal size where 100% of the circuits are running at the high clock rate, chip A would dissipate only about 1/10th of the power that chip B dissipates. <S> My point: not only the clock rate matters, also how much of the chip is actually running at that clock rate. <S> For a DRAM chips (PC DIMMs use DRAM) <S> most of the area on the chip is DRAM cells (obviously) and these are run at a significantly lower speed than the external clock rate. <S> The DRAM controller access the chips in parallel and in a sequence so that this lower speed is somewhat compensated for by parallelism. <S> On a CPU a much larger part of the circuits actually run on the maximum clock rate (depending on how busy the CPU is of course) so it is bound to dissipate a lot more power than a DRAM chip where only a small part of the chip is running very fast. <A> DIMMs don't dissipate the same power a CPU does, so they don't need the same cooling. <S> In addition, the power the memory and control chips do dissipate is much more spread out physically. <S> Power dissipation may be roughly proportional to clock rate, but that proportionality constant is quite different between a CPU and a memory. <S> The CPU has many more transistors and gates switching at the clock transitions than the memory does. <S> Remember that for CMOS, by the time you get to current being roughly proportional to clock speed, the dominant current is charging and discharging all the little parasitic capacitors on the outputs of every gate. <S> If you have fewer gates changing state, then there is lower current, which results in lower dissipation at the same clock rate. <A> Heat is electricity converted to a change in temperature of some mass <S> Now, in a modern CPU, what uses electric energy is mainly the process of switching a transistor. <S> Every single transistor switching costs energy, and the faster that switching has to happen increases the amount of energy per switching. <S> Now, for every clock cycle, your CPU does a lot complicated things like multiplying numbers, caclulating addresses, speculating what the next operation might compute before that actually happens, and so on. <S> Those operations lead to a lot of transistors switching at once. <S> A DRAM chip (like the one on your DIMMs) is different in that there's no complex operations to do – it's just memory, which means that it basically has to switch about <S> (word length)×(memory address bits) – <S> so, really, less than 2000 transistors for a single chip (there's a bit of address and command decode overhead, but that's very "cute" compared to the complexity of a CPU). <S> Sure, the things these transistors switch need more energy (because that charging and discharging relatively large capacitors, whose charge is the actual bit), but it's really very few transistors only. <S> Then, DRAM also needs to be periodically refreshed, but that happens every few milliseconds or so only, so only every couple million memory clock cycles – and hence doesn't contribute greatly to overall power consumption. <A> Some types of DIMMs do have (and need) heatsinks. <S> While the ones on gamer-oriented memory sticks are mostly for design/show reasons, there are e.g. FBDIMMs for servers which, due to their different architecture, require significantly more power (the last ones I used were roughly at 10W per stick) and thus need more cooling capacity than the bare plastic chip package can provide. <A> DRAM is built from gates and capacitors. <S> Think of glasses of water, some empty, some full. <S> Pour some water in and periodically refill as it evaporates. <S> CPU cache is made of flip-flops. <S> Think of faucets full blasting cold or warm water. <S> You don't need refilling, but they do use a lot of water (energy). <S> Because of that difference DRAM chips usually don't need heatsinks (not much energy loss) but CPU does. <S> Mind that CPU also does the calculations (another set of fire hoses) that contribute to the heat.
You need a heatsink if your component produces more heat than it can dissipate through its own package.
Why is there a divider circuit here? So I'm pretty new to electronics and just started playing around with the Arduino to learn the basics. In one of the projects there was just a simple button and 3 LEDs that are controlled by the Arduino. Following is the schematic: As there is no explanation in the book as to why there's a 10KΩ resistor, I did some Googling as to why it's there. I found out it's a voltage divider and keeps a 5V \$V_{out}\$ into the Arduino 2 pin. My question is, is this resistor necessary? I know it follows the following equation: $$V_{out} = V_{in} \times \dfrac{R_2}{R_1 + R_2}$$ So if there's no \$R_2\$, I'd be dividing 0 by 0. In which I'm guessing it's a short circuit? But any resistor of like 1Ω would still allow the 5V \$V_{out}\$. Which would mean that any resistor avoids short circuits? What if I don't connect it to ground at all? Can't it flow just directly from 5V to pin 2 through some internal ground? I'm kind of reluctant to just try it out myself and see what happens out of fear I'm going to fry some components. <Q> That's a pull-down resistor for the Arduino's input pin. <S> It's there to handle the case when the button is not pushed. <S> The pin would have an undefined voltage, which the Arduino might interpret as either a logical HIGH or LOW. <S> Your program that needs to read the button state would not work correctly. <S> If you tried to replace the pull-down resistor with a straight piece of wire, it would create a short-circuit between +5V and ground whenever the button is pushed. <S> So a resistor is required. <S> There's nothing magic about the value 10KΩ, but it's a common "standard" resistor value for pull-downs and pull-ups in digital circuits. <S> The resistor must be large enough to prevent dangerous levels of current from flowing between +5V and ground when the button is pushed, but also small enough that the input pin is correctly sensed as a logic LOW when the button is not pushed. <A> it's not a divider. <S> The input pin 2 floats at an undefined potential without it. <S> So the resistor pulls the pin to 0V when the switch is not pressed. <S> When the switch is pressed the pin goes to Vcc. <S> It's called a pull-down resistor (you will also see pullups quite often). <A> R2 is 10k. <S> R1 is milliohms ( <S> im <S> guessing 10) resistance of the switch. <S> When the switch is closed the voltage would be approximately 5 <S> * <S> (10k / 10000.01) <S> which is basically 5V <S> (it is reduced by maybe 5 microvolts if my estimations are accurate
Without the resistor, when the button is not pushed, nothing would be connected to the input pin.
Is there a motor designed to be constantly overloaded? So I'm very, very new to electronics so this may be a really dumb question but here goes. Is there a motor that either a. is designed to be constantly overloaded or b. run in such a way that overloading it will not cause it to fail? Here is the thought experiment that I would like to solve. Imagine an electric winch towing in a truck with say 1,000 lbs of force, though capable of towing in with let's say 10,000 lbs of force total. The truck is just in neutral and not providing any force in the opposite direction. Now, imagine that the truck was put into drive and started pulling on the winch with a force of 1,100 lbs of force. In this situation the winch would be overloaded (is that the right word) and the truck would start to increase it's distance away from the winch. Next, imagine the winch being able to sense this increased force by the truck (let's just assume that this is possible through the use of other sensors and microcontrollers) and then automatically increases it's towing force to 1,200 lbs. At this point that truck will now be pulled back in towards to winch. Let's assume that this push and pull process continues indefinitely until the truck runs out of gas and is eventually towed all the way in. Also, let's assume that the force the truck exerts in the opposite direction NEVER exceeds the maximum 10,000 lbs total towing capability of the winch. Also, let's assume that the winch should always exert a pulling force. Meaning that we should not ever have it halt even when being overloaded by the truck. Are there such motors out there that can operate effectively under these conditions? In my mind it seems illogical that motors would be designed for these types of purposes but I'm not sure. Anyways, despite being very, very new to electronics here is my current thinking on this problem. From what I've read simply overloading a motor isn't the problem, but instead the overheating caused by overloading is the problem. And any time a motor is overheated beyond specifications then failure can occur. However, if a motor is overloaded while operating at only 1/10th (or some other small percentage) of it's total capabilities then the heat caused by overloading will probably not be too much for the motor to handle, right? Like, I said this may be a really dumb question but it's one that I'm curious about and could not find the answer to anywhere else. It could be that this type of action is impossible from a physics standpoint as well, but I'm unsure. Thanks in advance for the help!! <Q> Engineers use "overload" to indicate that that level is not intended for continuous use. <S> I mean, if a product is rated for say 900 W but a continuous overload at 1000 W is allowed, then why not simply call it 1000 W. As it can handle 1000 W continuously, the 900 W level loses its meaning. <S> What would make sense is 900 W continuous allowed load and an allowed overload of 1000 W for 10 seconds every 200 seconds. <S> Note the time restriction. <S> It indicates that you cannot have this condition continuously, only for a limited time. <A> There are " torque motors " which are designed to operate continuously stalled. <S> Most motors can be operated stalled provided the current is kept within appropriate limits, though they may not be designed for that operation (for example, the cooling may not be optimal because no internal fan is spinning). <S> An example from the distant past might be a motor that drives a reel to keep the magnetic tape taut as it emerges from the capstan drive in an old-fashioned reel-to-reel tape drive. <S> This is not considered 'overload' but just a mode of operation. <A> The ability of a motor to operate at low speed and high torque - in the extreme, to operate while stalled - is a matter of thermal design of the motor, providing a thermal path which will allow the motor to survive. <S> This is not normally done, since it produces a bulky, heavy motor which also needs careful attention to how and where it is mounted. <S> After all, if the heat produced by the motor can't go anywhere the temperature will rise (more or less) indefinitely. <S> They are intended for high-torque, low-speed operation, and are commonly rated for continuous stall. <S> As direct-drive motors, the load is connected directly to their shafts, and the body is commonly press-fit into a metal housing, which allows good heat transfer. <A> DC winches with brushed motors yield the highest torque and RPM depends on number of poles . <S> Gear reduction also transforms torque while the product with speed RPM is almost equal power on both sides with some gear losses in between. <S> The cooling is normally fan driven on the motor rotor if designed for high power in a small weight. <S> Normally if a fuse blows to protect the motor it leaves the motor to free wheel so and better electronic protection from overload is to open the electronic switches or typically a solenoid. <S> While shorting the motor to act as a safety brake, might be a good idea but adds extra cost. <S> The also have manual dial controlled brakes since an operator should be nearby.
There is a class of motors which does this, and they are generally called torque motors .
How does electrical power relate to Ohm's law? I have some difficulty grasping these concepts. Let's say, for example, a power source of 10W operating at 5V is connected to a load of 0.5 ohms. According to Ohm's law, it is expected that a current of 10A should flow through the circuit. However as given above, the power is 10W so a current of 2A is expected, using the voltage-power relationship. My question is: What is the expected current in this particular case and why? <Q> 10W is the maximum power that the supply can provide. <S> In your example, the smallest resistor that can be safely connected to the supply is 2.5 ohms, which will result in a current of 2A and power of 10W. <S> If a resistor smaller than that is used, it will attempt to draw more than 2A, with a power greater than 10W. <S> What happens next will depend on the power supply, but the supply's output voltage will fall below the rated 5V, and the supply may overheat or the protection fuse may trip. <A> Assume power can source infinite current at 5V for the moment. <S> With 0.5 ohms of resistance, <S> now definitely 10 <S> A will flow through the resistor. <S> It follows ohms law. <S> Once power source has limited abilities such as only 10 W, it means that it is able to deliver up to 10 W happily but not more. <S> If you connect a 5 ohm resistance, 10W power supply will supply 1 A as current. <S> So, the power supplied is 5W though the capacity of power supply is 10 W. As soon as the power expected by the load goes beyond the power supply capability of source, one can't assume ohms law.. <S> Because the output voltage from the source will not be 5V. <S> Either the output voltage from the power supply may drop or even cutoff the lower all together (over load protection or short circuit protection circuits may kick in) <S> Stay below the power capacity of the supply and the ohms law will be valid. <A> Power law and Ohm's law are two different things. <S> First, power law use the relation between voltage and current (P = VI). <S> You can represent it as the dissipated energy in your system. <S> Usually, a power supply is defined by his voltage and his current output. <S> In your case, the supply is a 5 V and the 10 W would go on your load (resistance). <S> With power law, you get a maximum current of 2 A at 5 V for safe use. <S> Then comes the Ohm's law. <S> If your resistance is at 0,5 ohms and your supply at 5 V, you get 10 <S> A (V = RI). <S> You can assume that 10 A will flow if your resistance if the supply is able to. <S> Knowing that only 2 A can safely circulate, then your resistance would burn. <A> Firstly, you should not connect a 50w load to a 10w power supply. <S> Another way of looking at it is, it is a 5v 2A power supply. <S> You are likely to overheat, damage or blow up the power supply and suffer voltage drop. <S> If the power supply is particularly well designed with most components and construction overrated by a factor of 500% then the only effect will be much voltage drop on the output and your load will not operate as expected. <S> Your basic understanding of the operation of Ohms law seems to be correct but what you have overlooked is powers supply ratings. <S> A 10w power supply is only rated to supply 10w of power, which in your example you have correctly calculated for 5v to be 2A. <S> No matter how big the load you connect, the power supply is only rated for 10w. <S> To connect a 50w load safely you need a 50w (or greater) power supply. <S> If your 10w power supply can provide 10A without blowing up you will see the supply voltage drops by 4v meaning an effective supply of 1v 10A (10w) if the power supply is indeed capable. <S> If it cannot deliver that much current it will go bang or the voltage drop will be greater also.
The actual power (and current) will depend on the load connected to the supply.
Can radar/lidar sensors for self-driving cars be designed to ignore deliberate interference? A previous question asked about how to avoid interference between sensors on different self driving cars. The answer was that systems could be designed to avoid interference, with correct signal coding, time sharing, etc. A separate question that arises is what happens when a bad actor deliberately attempts to jam the sensors? Can deliberate interference with the radar/lidar be avoided, or does the driving software just have to include a fail safe mode (e.g. pull over until the interference is gone) to handle it? Going further, would it be possible to assure that the sensors were not receiving deliberately false but apparently valid data that could cause the vehicle to crash? <Q> You'd be surprised. <S> This is actually topic of ongoing research, several PhD dissertations and a lot of money invested in the auto radar jamming industry. <S> Military researches were made for jamming/misleading radars and also to prevent that from an opponent. <S> The efficacy of jammers made them illegal in most countries in the world, not that many drivers were caught and fined for using it since it's hard to find which one used the jammer from many cars passing by. <S> Just search google for police radar and laser jammers and you will find plenty of options. <S> There is a major difference that makes the requirements for an auto radar much higher to be used for unattended driving, they must to be available any moment. <S> Successful jamming or misleading for just one second may in this case lead to a major crash unlike in police radar where you must blind the radar for a long time and the worst that can happen is that you can pass without a fine( which is bad but not that bad) <S> Even military applications can survive few seconds of blindness without major damages. <S> Lidar is somehow more resilient to jamming <S> but it cannot be used in close proximity as crowded crossroads. <S> What can be done? <S> Somehow, the best is to combine data from all sensors and rely less on weak ones. <S> Tesla's bet is to use visual camera as the main sensor in taking decisions which makes sense to me since the best self driving system ever use only two cameras and two accelerometer/gyroscope units. <S> That is a human driver . <S> I pointed this in my answer to the other related question <S> but it seems that there are many fanatics ready to blindly rely on the new advanced technologies. <S> It seems that people that used radioactive blankets for treating arthritis (as the cutting edge technology of their time) in the early 1900s still were capable of having descendants. <S> The industry is still playing with different solutions that might work while based on the good will of the others but in the end I think that the authorities will transition to smart roads equipped with sensors and AI that will guide the vehicles which overall is much cheaper and much efficient. <S> Of course this will take "self driving" out of it's meaning. <A> I think that it is always possible to create the interference required to disturb the signal. <S> Put in another way: it is impossible to make a system which can handle any kind of interference. <S> So the "fail safe mode" cannot exist, <S> when I know how your "fail safe" mode works, I am sure I can interfere with it. <S> At its simplest, I just generate a similar signal with a stronger magnitude and that will then overload your receiver preventing you from receiving your own signal. <S> So proper collaboration between the sensors (making sure they are resistance to interference from each other) is needed and in everyone's interest. <A> I hate to just post a link, but to be honest this article is a better answer than anything someone will type here for free. <S> It answers your question quite directly from the perspective of systems designers directly working on this problem. <S> Automotive Radar Sensors and Congested Radio Spectrum: <S> An Urban Electronic Battlefield? <S> What you'll see is that there are two types of jamming to address in FMCW automotive radars: <S> Denial , where a strong tone is smeared by your modulation pattern and raises your noise floor. <S> Deceptive , where a malicious actor/other entity using a similar modulation and frequency creates a false target. <S> The article details scalable solutions in a very readable way. <S> Denial can be solved by first identifying and removing the tone in the frequency domain from the raw IF coming out of your FMCW transceiver, although this is quite computationally expensive. <S> Deceptive jamming requires more exotic mitigation techniques. <A> This is a defence in depth issue <S> Any given sensor can be jammed or be fed data that is valid (to the sensor), and we must assume that a bad actor will do those things, and sometimes with multiple attack vectors. <S> The various mechanisms to deal with it come from many backgrounds including defence, avionics and systems and network architectures to name but a few areas of research. <S> From my time working with flight control computers, the first line of defence when a sensor was jammed (these are normally triplex systems, so the system voted ) was to ignore the outvoted unit and reset that channel. <S> With sufficient sensors of a given type it should be possible to determine whether an attack is taking place (the data for the different radar / lidar sensors would not be the same under normal conditions so an attempt to inject data would result in a detection for a 3 or 4 channel system). <S> This would require that the sensors are being compared for such things, of course. <S> Whether that is currently being done is a question I cannot answer. <S> During an attack event, the rules (known as control laws in avionics and seem quite appropriate for self driving cars) might need to be relaxed to ride through the event. <S> The three fundamental types of control laws may be found in the previous link. <S> One example of where injected data would be implausible is a 3 beam doppler radar (often used for navigation), where the only time all 3 beams would return the same result is if the vehicle is not in motion; combined with other sensors, an attack could quite easily be detected.
With sufficient different types of sensors (which would all be multiple units for basic safety anyway), it should be possible to defend against both jamming and data injection attempts if the algorithms to identify implausible inputs are properly defined; this is an area of intense research.
High current melting a spanner - what's happening? Just a couple of guys doing fun things with a DIY low voltage very high current transformer. One of the things is putting a spanner on a brick and touching the two ends with an extremely thick copper cable carrying several thousand amps. The spanner then becomes red hot and melts. And here we come to the question: Why does the spanner turn red hot at the ends first and then later towards the center? I would have thought uniform current would have heated it evenly <Q> There is heating from the contact points, but not enough to make them turn red. <S> More heat comes from the thin section. <S> Where both sources heat the metal it gets hotter than the rest of the thin section, causing the resistance to rise as it heats, yielding more localized heating (positive feedback), and so on, so the ends of the thin section get hot first and the hot area propagates toward the center of the thin section. <S> It may only take a relatively small temperature difference to start the positive feedback in a given section. <S> See, for example, this curve. <A> The current density where you make contact is much greater than the current density a couple of cm further into the spanner/wrench. <S> That's one point. <S> The contact resistance is much greater where the copper wires make contact. <S> Both these points make the wrench get hotter at the ends first. <A> The highest resistance is, initially, at the points where your conductors connect. <S> As a gross general rule, high carbon steel has a slightly Negative Temperature Coefficient (NTC) of Resistance, meaning the resistance decreases as temperature increases, so once the wrench heats up, resistance drops across the entire length to a more uniform level. <A> The Ohm's law works there in one of its most educational ways. <S> Joule's heat can be calculated as $$P=UI$$ where U is the voltage drop over the part <S> and I is a current through it. <S> Ohm's law says $$R=\frac <S> UI.$$ <S> Putting this together <S> we know that high current power source was used. <S> The resistance and current are therefore known and we have enough information to estimate the heating power as $$P= <S> RI^2.$$ <S> The highest resistance is at the contact between the spanner and the clamps and the crossection is lowest there as well <S> , that's why the glowing started there and propagated through whole spanner. <S> That means: the higher current, the higher heating power and thus higher temperature the higher resistance, the higher heating power. <S> (One need to provide higher voltage to sustain same current) <S> The thinner and longer the conductor is, the higher resistance it has, therefore the narrow part is heated more <S> The thinner part has smaller weight so its temperature rises even faster, Metals usually have higher heat conductivity, so the heat spreads through the spanner effectively increasing the resistance in the "colder" parts.
Additionally: metals have higher resistance when heated, therefore the hot parts are heated even more
Why does inverter synchronization with the grid take 5 minutes? We had some solar panels & an inverter installed recently. Every time the inverter is turned on (after maintenance or with the first light of the day) it has to synchronize its generation phase with the grid, and it is easy to understand. But why does it take around 5 minutes? When I asked the guy installing it, he said "it is some sort of standard, every inverter takes around 5 minutes to sync" and had no idea about the reason. The inverter has 60 changes per second to sync with the grid. Sometimes it might be needed to observe the grid but still, 5 minutes is too much time and missed opportunities to synchronize: 60 Hz x 60 seconds x 5 minutes = 18,000 cycles Am I missing something? My inverter is Delta SOLIVIA Solar Inverter 3.8 TL . <Q> It's nothing to do with synchronization. <S> It has to do with ensuring safety of utility workers. <S> The inverter should be quick to disconnect in the case of a grid failure (seconds) <S> wait a period of time (in this case 5 minutes) after the grid is restored before beginning to supply power out to the grid. <S> See, for example this exchange (the "standard" in question is UL 1741/IEEE 1547). <S> Question: <S> I understand the requirement to cease energizing within 2 seconds. <S> How long does the inverter have to be de-energized before coming up to provide power to a local load <S> w/ the utility breaker open? <S> Answer: <S> The standard does not directly address it, but from a lab perspective, common practice is to have the inverter wait a minimum of 5 minutes after the Area EPS steady-state voltage and frequency have been restored. <S> Further comments indicate that some European countries require 3 minutes and Australia requires 1 minute. <A> This is intentional. <S> It waits 5 minutes to make sure it is connected to a stable grid. <S> An inverter could theoretically connect and go full power in seconds. <S> But it doesn't. <S> For example, if after a power failure, all inverters immediately went online a started outputting full power, the network would be overwhelmed and will fail again due to overspeed. <S> Instead, it waits for a stable mains connection. <S> Since it can be less stable after a large scale failure, when there is still a lot of switching going on. <S> And then slowly ramps up the power in a controlled slope. <S> Some regions have specific regulations for inverters, see your local grid code. <A> As per my observations and experience, 30 to 60 seconds time is sufficient to synchronization of solar grid inverter to connect with grid and export power to grid. <S> The time 30 secs to 60 secs are required for monitoring grid voltage, frequency and phase and estimate angle i.e to satisfy phase lock loop function to sync with grid.
The inverter has a software delay.
how long should an I2C slave wait for a STOP bit (if at all)? I2C frames each group of message bytes in START and STOP conditions, defined as SDA changing state 1>0 or 0>1 (respectively) while SCL is high, as described here . I am writing interrupt driven handlers for PIC32MX170, and I got quite far using the STOP bit as the signal to the software that the message is done. This then allows for things like checking the rx/tx byte count and so on. I found testing the STOP flag in software to be quite reliable, with the combination of hardware and clock that I used. However, I now discover that it is not reliable at all : either using a faster clock or slower driver means that the ISR can exit and miss the STOP bit completely. Worse, as the next byte will be START of a new message, there is no way to know if it ever arrived (unless you sit there polling the bus, which is not really the kind of thing I want in an ISR, even with timeout). However, code that depends on flaky combinations of hardware and clocks is also pretty bad, so I am facing a redesign that assumes STOP bits to be unreliable (luckily I don't try to do variable byte counts). (Some uC's always raise an interrupt on STOP, but unfortunately not this one, as far as I can tell.) But this raises the question : should an ISR wait on the STOP bit? If so, for how long? Is there anything in the spec about this? EDIT: I am adding some information, as perhaps I did not express myself completely clearly in my original. My question was really about the means of detecting the message start and stop, which of course is essential. (We have some discussion below about related matters such as where in the code the decoding is done - also very valuable but not what I was asking.) The issue is basically that, although START and STOP (S and P) conditions (actually the status bits that signal them on the device) are not always set when the ISR runs, even though this might be the last time for the message. (There is also the question of whether the ISR needs to look at those bits, which I think is more about system design, but also interesting and relevant.) As well as S/P flags, there are also flags which tell you what kind of byte you just received: Address R/W and Data R/W. Address Write always signals the start of a message. After this point a certain structure must be observed, which may involve repeated S conditions and so on. Depending on how you design your message protocol (especially whether you support variable length or not) these can also be used to understand the structure of the message. This is what the question is about. <Q> I <S> 2 C has got an acknowledge bit and a stop condition . <S> I'm making an operational assumption that you are asking about those. <S> Please correct me if I'm wrong. <S> (I 2 C doesn't have a stop bit .) <S> But this raises the question: should an ISR wait on the STOP bit? <S> If so, for how long? <S> Is there anything in the spec about this? <S> The I 2 C specification doesn't cover any timeouts. <S> Likewise, the master shall wait indefinitely when the slave does clock stretching. <S> You could introduce a timeout in the slave device. <S> However, you'd have to address the next layer of questions about the overall handling of the timeout. <S> If the slave had timed out, that means that communication got corrupt. <S> How will you signal that kind of exception back to the master controller? <S> Do you try to recover? <S> Do you try to shut down the entire system gracefully? <S> ... <S> flaky combinations of hardware and clocks... <S> , so I am facing a redesign that assumes STOP bits to be unreliable (luckily I don't try to do variable byte counts). <S> I've been in a similar situation . <S> Get the hardware fixed. <S> You have to have stop condition in the I 2 C. <A> You really need proper firmware architecture for something like this where you react to external asynchronous events not under your control. <S> Interrupt routines should service the immediate hardware event, then get out of the way. <S> This is NOT where dealing with arbitrary timing between events should take place. <S> I is also NOT where you should be trying to understand the individual events at a higher level, like a whole IIC message. <S> Last time I had to implement a IIC slave on a dsPIC, I used the hardware to receive events in a interrupt routine. <S> However, that interrupt routine mostly pushed events onto a FIFO. <S> That FIFO was then drained in a separate dedicated tasks to interpret the events as IIC sequences and act upon them. <S> This worked quite well. <S> REsponse <S> to comments "Foreground" means running a task from your main loop, right? <S> It means running from not-interrupt code. <S> Whether that is from the main event loop or a different task is up to your firmware design. <S> the I2c ISR is at a higher or lower priority? <S> Higher, obviously. <S> That's part of the point of interrupts. <S> If they weren't at a higher priority, they wouldn't be able to interrupt anything. <S> if it is clock stretching while it waits for the message <S> - doesn't that actually make it longer running, not shorter? <S> No. <S> The interrupt routine isn't running at all during the clock stretch time. <S> The interrupt routine gets the address byte. <S> It pushes that on a FIFO and exits. <S> The foreground code interprets the start of the IIC message, realizes that it must respond, fills in a buffer of response bytes, and enables the IIC byte-sending interrupt. <S> That interrupt happens immediately. <S> The interrupt routine fetches the first byte from the buffer and writes it to the IIC hardware. <S> That ends the clock stretch and starts the first data byte getting sent. <S> The interrupt routine exits and is run again when the IIC hardware is ready to accept the next data byte. <A> ISR should not wait. <S> Ever. <S> In fact, it should not do any message processing at all. <S> It should stuff received data into buffer, ACKing when necessary, triggering "ready" flag when encountering stop condition and resetting buffer counter to the beginning on start condition. <S> The main program then can start processing message in parallel. <S> It can control ISR by flags like "stretch the clock, I am not ready to respond yet" etc. <S> Or, if you want to be fancy, make several buffers so that one can be filling up while the other(s) are processed in main (assuming that incoming messages do not require immediate response). <A> Don't rely on the stop bit being present at all. <S> In many cases, transfers will end with a repeated start at the beginning of the next transfer.
In theory, the slave shall wait indefinitely. It is not necessary for a transfer to end with a stop bit.
SMD solder failure due to probing? How to solve it? I was visually inspecting a board that had functional problems, and I have noticed a strange pattern in the pads surrounding the IC. Upon electrical inspection, there are two pads that are shorted out: the second and third one on the horizontal part right to left. This is a prototype board and there was lots of debugging and probing the board to solve some problems. Does it seem to be consequence of mechanical damage, such as external probing with pointy tip, or a defect from the reflow process? Could just a touch up with the iron reshape the soldering joint? I am afraid the IC pins are bent with the surrounding solder, which would make the repair difficult. <Q> I suspect your idea is correct. <S> Second, invest in some needle-tip probes. <S> These will make good contact with less force, and will also leave smaller divots. <S> Finally, whoever did the debugging should be shown your pictures, or even better, shown the board. <S> If you don't know which person did it, show them all. <A> You need two things: Thing #1) <S> The first one is flux Thing #2) <S> The second one is a soldering iron. <S> (it need not be a fine tip, but it does need to make contact with the pads and clear the package) <S> You put the flux on (not too much but enough to cover the pads) <S> Then you clean the iron on a brass or water sponge and clear the solder off the iron. <S> Wipe the iron tip by the pads , and they will magically fix themselves. <S> Oh, actually you need three things, then you need to remove the flux with flux remover. <S> I only use solder braid to remove solder if there is a inordinate amount. <S> For small bridges only flux and an iron is needed. <S> It really is amazing what flux will do. <S> Here is a video for illustration. <A> I would use copper litze. <S> First add flux then put the thinnest lize you can find on it. <S> Short press with solder iron. <S> Sometimes you have to repeat it twice, <S> I find that solves the problem 99% of the time. <S> I would not use knifes until the solution above fails.
First, it shouldn't be too hard to fix the damage - take an Xacto knife and bend the solder "lips" upward, then touch up with a very fine iron.
Converting appliance LEDs from constant current to constant voltage to allow for dimming I'm trying to implement dimming control for the lights in my kitchen hob extractor. The lights are 4x LED spotlights which are each 3v 700mA (2.1W). They are currently wired in series to a 700mA 10W constant current LED driver. The LED dimmer module I'm trying to use is taken from an Ikea TRÅDFRI LED driver . The PWM dimming module can easily be removed and powered with an external 12v source instead of the 24v supplied by the Ikea power supply. ( see here ). The 700mA 10W CC power supply puts out about 12v with the LEDs connected in series. I tried wiring the dimmer module directly into the output of the CC power supply and connecting the LEDs to the output of the dimmer, however this did not work. I think constant voltage is the only way to go with this dimmer. I was thinking about finding a 12v constant voltage LED driver to power the dimmer and the LEDs in series, however I'd need to use a 6+ watt resistor to limit current to the LEDs, which seems a little inefficient. Could anyone suggest a better arrangement for achieving this LED dimming setup? <Q> st2000's answer is on the right track, but does not go far enough. <S> The problem is that, for a given voltage, the current drawn will increase with increasing LED temperature. <S> In the worst case, as the LED warms up, it will draw more current. <S> Since power is voltage times current, the power dissipated by the LED goes up. <S> This increases the LED temperature, which causes the current to increase, etc. <S> It's called thermal runaway. <S> Don't do it. <S> And yes, you get around this by adding a series resistor with a decent voltage drop across it, so that small changes do not have big results. <S> And yes, it's terribly inefficient. <S> The solution is to drive the LED with constant current. <S> You can make a switching constant-current supply which is compact and efficient - which is why commercial LED drivers do it that way. <S> Granted <S> , this isn't the answer you're looking for, but reality can be cruel that way. <A> Consider the voltage verses current chart of a diode with the current plotted on the vertical axis. <S> Look at the forward biased region in this image from wiki.analog.com. <S> Note were the diode turns on (Vt). <S> The curve goes up really really fast. <S> To safely operate in this region, it is easier to make a constant current power supply rather than a constant voltage power supply . <S> This is because a little voltage change (noise and supply to supply variations) can make a huge current change through the diode. <S> Which might damage the LED. <S> The PWM is the right idea. <S> But it does not sound like you have compatible devices. <S> There are constant current PWM integrated circuits available. <S> Such as <S> this one from OnSemi . <S> So it follows there are COTS solutions available. <A> For your application I would use a $28 HLG-40H-12B <S> The type B gives you 3 dimming options. <S> High efficiency and 7 year warranty. <S> CATALOG LINK <S> Mean <S> Well Standard LED Drivers
A constant voltage drive is likely to destroy the LED. I would use a Mean Well LED CC driver with dimming.
Why did my micro-controller short out even though the alligator clip of the oscilloscope was connected to a ground pin? I have a STM32F407G-Discovery board, and I bought a DS1054Z oscilloscope for the purposes of debugging. Before I did anything, I went through videos and articles about how to use it. From my very basic understanding of them, I gathered that since my MCU was connected to my computer through a USB, it was a mains earth reference, and so I need to be careful about where I plug the alligator clip of the oscilloscope. As such, I made sure to connect the alligator clip to a pin titled GND. However, as soon as I did, the LEDs on the MCU faded away and they just stopped working. I can no longer flash any code onto my MCU. Here's a picture of the board: This is where I connected the alligator clip: the far right side of the board. The GND pin above the 5V pin which is above the 3V pin which is above the PH1 pin. My plan was to connect the alligator clip to this GND pin, and then use the longer probe (not sure what's it called) to hook onto the PE3 pin (since I'm trying to debug a SPI issue). Was my logic incorrect? What did I do wrong? <Q> This is a dangerous-looking setup. <S> I think it's 80% likely that the ground clip swiveled around and touched the 5 V pin when you didn't notice. <S> This can happen very easily. <S> I wouldn't use a alligator clip on a pin like that for exactly this reason. <S> It is OK to use a "hook" clip, but be careful about them coming loose and popping off the pin and then hitting something else. <S> A possible option for your case is to clip to both GND pins together. <S> The alligator clip would come from the top of the picture, and only reach far enough to touch the two GND pins. <S> I still don't like that since it will pop off eventually, <S> and then you've got a ground connection flailing around randomly shorting things. <S> What I use for these cases is a short wire that has a female pin meant for a RS-232 connector on one end and about ¼ inch of bare wire on the other. <S> The whole thing is about 1½ inches long. <S> The female connector has heat shrink tubing around it so that it is insulated on the outside. <S> Slide the female connector over the pin, then clip the scope probe ground to the short end of bare wire. <A> If you have shorted the 5V pin to GND as @Hein suspects, it would overload and burn out the D1 diode to the right of the USB socket, if the overload protection of the host port does not shut it down fast enough. <S> See the schematics in the board manual <S> U5V comes from the USB wire, 5V goes directly to the pin. <S> You can do a quick test: <S> connect the board to a powered hub or an USB charger <S> connect the pins of the diode together, e.g. with a pair of tweezers <S> If the board comes back to life, then you can try replacing the diode with a similar one. <S> You can even short it permanently, but then you should be really careful with what you are connecting to the board, as this diode would protect the host USB port from overvoltage. <S> I did the same with a discovery board once. <S> The diode actually went up in a puff of smoke, as it was connected through a cheap USB hub that apparently lacked proper overcurrent protection. <A> You understood it correctly it seems. <S> The ground of the oscilloscope is connected to the ground of your DISCO through the mains, you were correct in using precaution. <S> But, is it possible that you crocodile clip accidentally swirled around the ground pin, and so touched 5V pin? <S> This would have burned out something, but it should not have damaged the MCU. <S> This is also something that you have to look out for. <S> A typical USB port can only handle 500mA, and such a short can definitely damage it. <S> Try another USB port. <S> You damaged your board. <S> On the datasheet it seems those pins can only handle 100mA, which gives this a higher chance of breaking. <S> This is harder to fix, as I struggle to find enough information on the datasheet. <S> If you have another DISCO board, then you could that one's programmer (ST-LinkV2) to try and program your broken board's MCU. <S> If that works, it means your ST-LinkV2 burnt out. <S> Hope this helps. <S> Update: <S> Seems @berendi has better eyes than I do. <S> He suggests that diode D1 might have burnt out, which seems like the obvious problem. <S> Please see his answer for further details on how debug/fix it.
My guesses: You burnt out your USB port. Connecting the ground clip of the scope probe to one of the GND pins was correct electrically, but a bad idea because stuff happens.
How can I indicate that an IR LED is functioning without detecting its emissions? I have salvaged, non-documented, IR LEDs. Without a datasheet I do not know how much current they can handle. I have run into this before: I confirm the LED is good with by viewing it through a camera. I set up my circuit and begin troubleshooting. Only after eliminating all other possibilities, do I resort to a camera to discover that along the way the IR LED stopped emitting. It would be great if I could be confident that I am using the right resistor but even then accidents happen. What I would like is a simple indicator that the IR LED is functioning without detecting its emissions. I would prefer an "idiot" light such as a visible spectrum LED that is lit when the IR is functioning properly and can be relied on to go dark should the IR LED fail. I was thinking that I could trigger this from a voltage drop using a transistor, pull-down resistor, and a variable pot that I could tune to toggle my visual indicator. Is this feasible? <Q> Rig up a photosensitive resistor - they usually are sensitive far into the IR, and, as a bonus also into the UV. <S> they have huge resistance without light, so you can use a battery without depleting it too fast. <S> Another, normal resistor in series with that, to cap the maximum current to a few mA, and then an old school mA-indicator. <S> Put the photoresistor at the end of a shiny (aluminium?) <S> tube, and stick the LEDS you are testin into that (or, if they are SMD, put the tube over them, you'll have to isolate the tube then, though) <A> Generally if the forward voltage is appropriate (usually about 1.2V +/-0.1 or 0.2V) then the LED is working. <S> Description says: Applications: <S> Testing IR LEDs and IR laser diodes in prototypes, remote controls, audio transmitters, light sensors, optical fibre systems, etc. <A> Maybe but fault prevention is easier by understanding specs and temperature rise of similar sized LEDs and then using current sensing or temperature sensing for optimal control. <S> Usually all these solutions just require an understanding of Vf at <S> If then compensate for temperature rise $$\Delta T=Rja*V(t)*I(t)*t$$ for similar size chip’s junction to ambient Rja. <S> Heatsink design will help greatly on the cathode to lower Rja as the anode is more thermally insulated with it’s gold whisker wire.
There are IR indicator cards such as this one, but I think it would be easier to use a camera or a simple phototransistor sensor. There is no point checking an IR LED with a camera if it has 0V or 2V across it, assuming a reasonable current of, say, 10mA.
How should I protect from overvoltage ADC? I have a microcontroller with a built in ADC that I am using to read from an input pin (ATMEGA328P to be specific). I want to allow switching of resolutions on the input for our users (0-5V range, and 0-10V range) which i was planning on doing via a voltage divider. The thing I'm worried about is if the user has our unit in 0-5V mode and plugs in a higher voltage by mistake. I want some sort of overvoltage protection on the output of the voltage divider to protect my ADC. I don't care if this is a crowbar circuit that doesn't reset without removing power, anything that protects the unit will do. I'm open to all suggestions. Thanks! <Q> You can use a non-inverting comparator op-amp such that the basic configuration for the circuit detects when the input signal, VIN is ABOVE or more positive than the reference voltage, VREF producing an output at VOUT which is HIGH as shown. <S> credits go to : electronics-tutorials.com With the help of a NPN <S> you can pull the voltage applied to the ADC Pin down to zero by using this circuit " one of my designs " <A> A good source of information on the subject is on Maxim <A> The approach I've most often used has been diode clamps, usually to a convenient power rail or a buffered version of the reference that can sink current. <S> Even if you include other auto-detection circuits for scaling, it can be nice to also have them for ESD protection. <S> App notes like Ti's tend to show diode clamps (or suggest buffering with an op-amp that has a limited output range), though you have to be careful about leakage currents. <S> Over temperature it can cause a great deal of skew, so BAV199 and CMPD6001S <S> low leakage variants are helpful. <S> If you must use a schottky at least avoid BAT54s (some ADCs behave poorly with slightly out of range inputs). <S> Edited to add links to diodes.
Zeners may be a good solution, however in practice a little bit complex circuitry is required to get low capacitance and leakage current:
step down voltage follower I'm trying to create a circuit that will divide the input voltage in half, but still be able to supply a high current to the load. My input voltage varies from 10-15v and I want the output voltage to variate in proportion to this. So between 5-7.5V. The load should be able to draw about 1A, so the components needs to be able to handle this. I'm thinking it's going to be a voltage diveder and a voltage follower, but I'm not completely sure. Whats the best solution to this? Tnx. <Q> Ok, you can do the following: Use a simple resistor divider to create 1/2 of the input voltage. <S> Then create a simple voltage follower/buffer with a high current opamp, like e.g. the OPA548 . <A> Here's a generalized schematic. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The current Iadj increases linearly with the input voltage. <S> This pulls current out of the voltage feedback net which causes the output voltage to increase. <S> You can pick out a buck SMPS IC that meets your needs and then design the current mirror around that. <A> One solution to this is a buck regulator. <S> It transforms the (higher potential) input voltage to a lower output voltage by means of a switch, a diode and an inductor.
If you needed better efficiency than a linear regulator, you could use a buck SMPS and use a current mirror to adjust the voltage based on the input voltage.
5v, 12v, -12v from 12v, 5A supply I need 5v, 12v, and -12v in my circuit. What would be the best way to get this from a 12v, 5A supply? For 5v, I could use a regulator. Not too sure about -12v. <Q> To get all the voltages you need from just a 5 V USB or an adapter, I would use this board Input: 5 to 24 V DC Output: + 12 V, -12 V, + 5 V, - 5 V, +3.3 Vmaximum output current: 300 mA per channel <S> You can buy these <S> are a DIY kit or soldered and ready to use. <S> The design is based on a Cuk converter . <S> I have one <S> and it does the job. <S> Much safe than an ATX supply as it cannot deliver so much current that wires will melt. <S> It's short-circuit proof. <A> They output everything that you need. <S> Just ground the PSON wire. <A> I've used this type of circuit to generate -12 volts from a positive supply: - Add a 79L05 to produce - 5 volts and your done. <S> If you decided you need higher power then consider this: - <S> This Q&A has a couple of other options. <A> Check out 78XX series DC to DC regulators, they are drop in linear compatible and you can generate negative voltages as shown below:
THe easiest way to deal with this is to get a used ATX PC power supply.
Passive reset circuit for multi-chip game design I've been building a small handheld gaming device based around the ATTiny85 and an SSD1306 OLED screen. It's a very limited system and as such I needed to be creative about how I used the I/O pins. I asked a question for replacing the SSD1306 reset logic with passive? components. This worked in my initial prototype and I was happy. Today I received new PCBs with a smaller, closer layout and a different power source and the reset circuit no-longer works properly. This is the circuit in question: simulate this circuit – Schematic created using CircuitLab The schematic shows the original design when I was using a 3.7v lipo cell to power it. I'n my new design, I'm using a CR2032 lithium cell and I'm wondering if that has caused the issue. When the system is powered on 'cold' everything works fine. If I power off and then on again within about 10 seconds, the OLED doesn't get the proper reset signal and displays garbage. Pressing the reset button resets the micro controller but not the screen properly - it'll display progressively less garbage until it just goes blank on successive resets, MC still resetting fine (it has a 'startup' tone that plays, and button presses beep as expected). As mentioned - I got the reset circuit from another question I asked, but I'm not sure I completely understand how it works. I'd really appreciate a short description of what happens when it powers on / reset button pressed. Is my issue likely the small change in voltage? I know that when I first put together my first prototype I accidentally used the wrong resistor, putting a 1k ohm in place of the 10k ohm one and this also caused the circuit to stop working properly - Am I naive in hoping that I can tweak the resistor value to make things work again? Things I've tried based on comments below: Added a delay to program start-up of 200ms. No Effect. Replaced 3v CR2032 with original 3.7v LIPO. No Effect. Holding a 10uF capacitor in parallel with the existing 0.1 (C1). No Effect. Bypassed D2 with a bit of wire. No Effect. On my old prototype, holding down the reset button caused the screen to blank and reset, holding down the reset button here doesn't affect the screen at all until it's released. All I did between revisions was move pads around, connections are all the same. My multimeter appears to confirm this too. #4 though makes me wonder if there's something mechanical wrong though. <Q> Bulking the cap to a few 10s of uF (at least 3us of low reset pulse is expected during power on.. <S> Currently, it looks like it is marginal.. ) should improve reset timing. <S> and I don't see any negative effect of the same. <S> What is the reason for D2? <S> It is also avoiding press switch reset to provide reset to this display by keeping the reset pin above forward voltage drop of the diode. <S> If possible, I would use a dedicated reset generator ICs too <S> but I am not sure about the constraints you have. <S> Place a 100nF cap if possible near VCC pin of the display module. <S> 10k pull up for MCU is missing currently. <S> It will not hurt to have it pulled high to VCC via 10k. <S> Please also share the waveform shape for first power on subsequent power on. <S> When Reset button is pressed: The capacitor immediately discharges through the switch. <S> The reset pin of both MCU and the display module will be held to ground. <S> When reset button is released: The capacitor slowly charges to 3 V via the 10k resistor. <S> 3RC time is roughly 3 * 10k <S> * 100n <S> which is 3 mili seconds. <S> Hence, the current capacitor resistor way too small to generate a low pulse of 3us. <S> When power is removed: The charge in this capacitor is discharged via diode which is in parallel with the Resistor in KiCAD schematics version. <S> Hence, discharge happens faster. <A> I think you'll need to actively reset the OLED from your program code, to achieve reliable operation. <S> This passive reset circuit could maybe be tuned to work when the reset button is pressed, but it'll be more difficult to handle the case when the power is turned off and then quickly back on. <S> Since you don't have any spare MCU output pins to use for OLED reset, one of the existing pins will need to serve double duty. <S> I suggest using the OLED's D/C# input signal, with this simple circuit: simulate this circuit – Schematic created using CircuitLab <S> The microcontroller can hold <S> D/C# low for about 30 milliseconds to reset the OLED. <S> In normal operation D/C# is almost always high, and there is no reason you'd ever want it to be low for 30 ms, so accidental OLED resets shouldn't be a problem. <S> This solution also uses fewer components than the proposed passive reset circuit. <A> Designing a bulletproof reset circuit is, as you have found, non-trivial. <S> Many consumer products are cursed with substandard reset circuits because the designer chose to save a dime or two. <S> I strongly suggest you simply buy a proper reset circuit that handles brownout and other conditions reliably. <S> ADM80x is one such circuit. <S> It incorporates a reference, an comparator and a timer, all of which are guaranteed to function (and thus assert valid reset levels) down to less than 1V supply voltage. <S> Don't be passive, be assertive! <S> There are some that have a manual reset option if you really need that.
I would short both reset pins together (by replacing diode with 0 ohm resistor) Increasing capacitor value to higher value will help.
Why solder mask are not applied to RF PCBs I've gone through some of the RF PCB designs. In which solder masking on the traces are not present. Like this one Is there a specific reason or performance issue to remove that? <Q> There are several reasons. <S> 1) Soldermask is lossy, and different types of mask are differently lossy. <S> So having no soldermask where the RF fields are gives the best transmission, and if your board is made by different fabs, the most repeatable transmission. <S> 2) Line dimensions, which affect characteristic impedance, are critical. <S> It's difficult to optically inspect them if they're covered with resist. <S> 3) <S> In development, you might just want to add an attenuator pad, or pickoff resistor, to the line. <S> This is tricky enough as it is, without having to start by scraping resist off. <A> In addition to the reasons given by Niel_UK, there is the matter of predictability and modeling. <S> Soldermask is applied as a liquid. <S> As such, its thickness may not be as well controlled and predicable as the thickness of the substrate and conductor layers. <S> In addition, it may have an unpredictable profile - how does it "flow" in between the traces? <S> All of this means that you cannot accurately model the impact of the solder mask on your line, and cannot predict the impedance of the trace. <S> This is even important on any distributed element filter or microwave component such as a directional coupler, resonator, power combiner, etc. <S> In these cases, a very small shift in the \$\epsilon_{eff}\$ of the system will potentially shift the center frequency out of the band of interest. <S> The unpredictable nature of solder mask ruins this. <A> Zo decreases by about 1 Ohm / mil of soldermask thickness . <S> LPI solder mask affects Zo by about 2 ohms and dry film by as much as 7 ohms.
With high-performance RF substrates we can get very accurate models, provided we know very precisely the etch profile of the process. Aside from the lossy nature, solder mask has a high dielectric constant relative to air and poorly controlled thickness, so the characteristic impedance will be harder to control with solder mask applied.
Does a pickup microphone work in space (vacuum)? Of course in space there is no sound transmitted via air, so there is no air-borne sound, but there is structure borne sound. This sound can be recorded with a pickup microphone, but do pickup microphones need air to work as well? Considering that a pickup is really just recording the surface waves, but if it is mounted on the same surface with the same vibrations, it in theory should measure nothing, correct? My assumption is that pickups measure the difference between the air damped surrounding and the material itself, so it should not work in vaccum as there is nothing to damp against. The other theory I have is that it depends on the mounting of the microphone. So if I fully connect it in a sphere around a certain point, it would measure the surface wave within this mounting area, but wouldn't that limit the measurement to sound waves smaller than the mounting area (higher frequencies)? <Q> A contact microphone is basically an accelerometer. <S> It does not require any air for its operation. <A> if it is mounted on the same surface with the same vibrations, it in theory should measure nothing. <S> When sound waves propagate through solid material, it's not just the whole rigid object shaking back and forth: It's waves of strain . <S> Those strain waves will pass through a contact microphone that is attached to some small area of the surface. <S> It will work better still if it can be wedged in between two different parts of some flexible structure: <S> Piezo pickup wedged into the bridge of a string bass (double bass) <A> Pickups, like the ones used in guitars, are not strictly microphones. <S> They work on a similar principle, but are coupled in some way to the object producing the vibration. <S> I'm not sure exactly what kind of pickup <S> you are thinking of, but I'm aware of two primary kinds: <S> Magnetic Pickup Piezo Pickup <S> In the case of the first, the magnetic field inside the pickup will oscillate along with the (guitar) string's vibration; this causes an electric current which can be transmitted to a speaker. <S> In the case of the second, the vibrations are carried through solid material (again, not air) into the magnet/coil pair which produces the electrical current. <S> This will also work in a vacuum.
Magnetic fields can propagate through space without any air.
Delaying an electrical signal I want to be able to delay the signal that goes from the cdi box to the igniton coil on my moped. I would like to be able to control the delay with something simple like a potentiometer, i don't need to be able to know how much the signal is delayed. Besides this, the device should have some switch to turn it on or off with so that I can set the delay once and then not touch the potentiometer or whatever it may be, just the switch that controls if the signal is retarded or not. What's the easiest way to do this? <Q> Unfortunately, this is all but simple. <S> Moped CDI boxes are extremely optimized on parts count for reliablity purposes. <S> It's usually nothing more than an extra coil on the alternator for generating the trigger pulse, a fat thyristor, a capacitor and a resistor. <S> And the spark plug coil of course. <S> Meddling with it means redesigning the whole CDI box. <S> BUY ONE with the properties you need. <S> They are available below $100. <A> Trying to delay the output of the CDI box is going to be a non starter. <S> What you want to do instead is to apply a delay in the path of the input trigger pulse to the CDI. <S> You will not be able to delay the trigger signal by fixed amount however. <S> So what you really probably need to do is to deploy a microprocessor into the design that constantly monitors the time from trigger pulse to trigger pulse. <S> Then you can monitor your POT using an A/D input to the MCU. <S> This measurement will then be used to scale the time between the incoming trigger pulses to come up with a time delay to apply to the delayed trigger. <A> There is no circuit that will introduce delay to an arbitrary electric signal except a really long wire (and even then, only if impedances are matched). <S> This is just not an easy thing to do. <S> You can, however, design circuits that will delay some kinds of signals, under some circumstances, OR make a circuit that will produce a second signal a while after the first one triggers it. <S> In the case of a CDI box, the signal that activates the ignition coil is really awkward to delay without essentially making a new CDI box. <S> In that case, it's best if you get its specs. <A> The easiest way to delay the ignition is to move the crank position sensor. <S> Perhaps you could mount a second sensor and use a switch to select which sensor the CDI sees.
This will be an essentially digital trigger type signal that should be easy to delay. A timer module on the MCU and some simple software can get that job done. The amount you need to adjust the "delay" will depend upon the RPM of the motor itself.
Linking Android phone to motorcycle helmet comm set I have a little mystery for you... I want to connect my motorcycle helmet communication set to my Android phone, including the push-to-talk (PTT) functionality. This is a simple wired setup, not Bluetooth. The communication set in the helmet is straightforward: two 32 Ohm drivers and a microphone. I made a cable according to the CTIA specifications for 3.5 mm headjacks at source.android.com. In the cable I spliced in a push button for the PTT function: simulate this circuit – Schematic created using CircuitLab (More about the resistor later) It can't be much simpler than this, right? Now the weird part: Push to talk doesn't work. The speakers are working; the microphone works fine, I can talk and record sound from it. Yes, I know ground is the 3rd ring, not the 4th (last). However, whatever I do, pushing the button does not activate the PTT function. Of course I tested it with an off-the-shelf headset which works perfectly. I measured its characteristics: drivers are 32-33 ohm, microphone 1.13 kOhm and pushing the button shorts the microphone circuit. The microphone in my helmet has a slightly lower DC impedance (around 890 Ohm) than the Android specification (>= 1000 Ohm), so I inserted a resistor in line with the microphone; I tried values from 100 to 1 kOhm, but still no PTT function. Electrically I cannot find any difference between the off-the-shelf headset and my setup when measuring at the 4-pin connector. But, it even get's weirder. If I unplug the cable from the helmet (so no drivers or microphone, just the cable with the switch), PTT works. Of course there's no sound but the application reacts to the pushes. And oh, I tested with two different Android phones by different manufacturers: the same result. The only difference that I can possibly think of is that the microphone in the helmet might a dynamic type while the one in the headset could be an electret; but how to test that without breaking the headset open? Could it be that Android phones put a low-frequency signal on the microphone line to detect one? But surely, a 1 kOhm resistor would be enough to fool that. More info: Mic open circuit voltage: 1.79 Volt (measured at the headphone jack) My cable: Microphone DC resistance: 0.90 kOhm With microphone attached: 0.54 Volt Button closed: 0.00 Volt Headset: Microphone DC resistance: 1.13 kOhm WIth microphone attached: 1.32 Volt Button closed: 0.00 Volt Fixed 1 kOhm resistor: 0.58 Volt So definetely a different voltage, which is not explained solely by DC resistance.. <Q> Well, I figured it out. <S> First, I discovered that the helmet microphone is an electret <S> and I reverse-biased it. <S> Oops. <S> I discovered this by plotting a U/ <S> I curve of the microphone; I noticed the diode-like curve <S> so I reversed polarity and also measured two other headsets. <S> (Horizontal is milliVolt, vertical is micro-Ampères) <S> Still, the helmet_rev curve is way higher and even with the correct polarity PTT didn't work because the voltage over the mic was still low (0.74 V). <S> So I plugged in the second helmet set that I have, and that worked immediately. <S> Conclusion: <S> the microphone in the helmet is broken. <S> Not sure how since it still captures sound, but in any case it is out of spec for this application. <S> Could I have damaged it by connecting it in reverse, even at such low voltages? <A> From reading your fairly long question posting it seems to me that you have to do some very careful quantitative evaluation of both the working setup with the external setup that seems to work and the helmet kit that does not seem to work. <S> For the best setup you should measure things from GND at the phone's jack. <S> Things that I can think of for you to check and compare: <S> DC voltage between MIC and GND when the PTT switch is pressed. <S> Measure at the phone. <S> Compare the size and series resistance of the connecting wires. <S> Does sparing GND between the speakers, MIC circuits cause an elevation of the GND level between the phone and the MIC ground due to current traveling through the common wire. <S> Have you tried running separate GND wires from the plug at the phone for the speakers and for the MIC/PTT switch? <A> So, the first thing I would try is disconnect M wire and see if speakers still work. <S> If not, then you have LRMG pinout, which somehow makes more sense to me. <S> Also the link you provided has very simple reference test circuit for headset (with bias resistor and 1.8V~2.9V bias voltage). <S> Why don't you make it and try as they suggesting? <S> That link has "device spec" too, with exact specification as to how the phone detects various hardware configurations. <S> Compare those to what you measure on your cable.
The funny thing about this wiring is that depending on Mic DC characteristics the LRMG pinout might actually work too.
Parallel resistor in series with LEDs I have seen two parallel resistors used in series with LEDs in several LED bulbs.Why are parallel resistors used instead of series one? <Q> Because doubling the current paths halves the power dissipation in each path, allowing use of cheaper resistors. <A> You mean instead of single resistor?It depends on the use case. <S> Assume a power of 600 mW has to be dissipated across the resistor. <S> Instead of choosing one single resistor of standard wattage, say 1 W, one will choose a resistor (double value of intended resistance) and a power wattage of 500 mW.. <S> Effectively, you have same resistance value and you are distributing power dissipation in two resistors instead of one.. <S> These two resistors price combined may be lesser than one single bulky resistor because 500 mW resistors may be used widely compared to 1W resistors. <S> Also, you have now chance to use multiple resistance values.. <S> You can re use the parts used in other designs, also manage if the currently used resistor is no more available. <S> It also distributes the heat to wider region than compared to single resistor avoiding local heating. <S> If LEDs are in parallel, and assuming random LEDs which is more probable for a lab user: <S> This is how it will fail sooner or later: <S> User will power on the board <S> The LEDs will need certain voltage (forward voltage, Vf ) to turn on. <S> Assume <S> all LEDs have VD between 1.3 and 1.6 <S> The LED <S> with least Vf (1.3 V) will turn on first <S> This keeps the voltage across all remaining LEDs at 1.3 V <S> It means entire current is flowing through only one LED!! <S> As other LEDs are off (or dim) <S> This single LED will be very bright, also raises its temperate due to heat dissipation Raise in temperature leads to further drop in its forward voltage. <S> Further drop in forward voltage leads to further increase in current (also, remaining LEDs will be completely off) <S> LED burns out eventually Soon after that the LED with next low forward voltage (say 1.35V) will turn on step 5 to 11 will repeat for this LED and all other LEDs in parallel <S> This may happen instantly or over a period of time Adding individual resistors in series with each LEDs <S> helps in bringing down this sequence by limiting the current. <S> Why not connect? <S> Useful answer here <A> Most likely reason is inventory. <S> I have 1000's of 5.1Ω 5W resistors so I would use two of them if the current was an amp or more. <S> Maybe two at half value is cheaper than one, likely not true especially if Vcc is 3.3V. <S> Not easier or cheaper to assemble. <S> To make any other comment on the validity of the circuit is fruitless due to the unknowns such as Vcc and LED part number. <S> Without an known value for Vcc most of the comments made so far are invalid. <S> What is the difference if Vcc were 3.3V vs. 12V? <S> Parallel current mismatch is more of an issue with strings of multiple high power LEDs wired in parallel. <S> Single mid-power LEDs wired in parallel today rarely creates a problem. <S> Today connecting single LEDs is parallel is very common and works very well. <S> Samsung and Bridgelux sell many high quality strips with parallel LEDs and they have no problem. <S> A few years ago it was a different story. <S> LEDs today are producing 80% light, 20% heat, with very little variation in Vf, so many of the comments made are no longer valid. <S> Then there is this "6. <S> It means entire current is flowing through only one LED!! <S> As other LEDs are off (or dim)". <S> So <S> NOT true. <S> The LEDs have different Vf when measured individually. <S> When wired in parallel they all are operating at the same Vf. <S> The combined Vf is that of the highest individual Vf. <S> It is true the LED with <S> the lowest individual Vf will be drawing more current, but all will be on and the difference in perceived intensity will likely be indistinguishable. <S> For example Samsung's best selling F-Series Gen3 strips are wiring sets of 9 or 18 LEDs in parallel. <S> The issue is not LEDs wired in parallel <S> it's about failure recovery: <S> OSRAM App note LED circuit comparison
Parallel combination of multiple resistors can lead to same value of required resistance.
How to test for shorts on a breakout? Working on LoRa project with the RFM95W . Most online resources like 1 and 2 suggest using a PCB since the module itself is quite small and hard to work with; but where's the fun (and learning) in that! After soldering it looks like: (it isn't meant to be deployed, just testing it out on my workbench at the moment) Please see photos: And the back side: To my untrained eye, they don't look like they would cause a short. Googling brings up continuity testing, which would be proving the negative (no continuity means no shorting) but I am wondering if there's something better and what the procedure is like? I do have this Multimeter . <Q> Clean the board with flux and let it shine use a good magnifying lens to visually check if there are any shorts, especially between two pins of the module Measure power supply pins with respect to ground to make sure there is no short waiting for first power on <S> check the assembly BOM again once more to see that all the components required to be mounted <S> are indeed mounted (and also, components that are not supposed to be mounted are left open) measure resistance values (you should be able to read approximately actual values, but not for all cases), at least they should not just read zero or Very less ohms.. <S> Multimeter is your friend. <S> Check neighbor IC pins one by one. <S> Pin4 can be short with pin 5 or pin 3.. <S> so, that can be performed for all the pins. <S> Check for diode polarity and capacitor polarity (if any) Repeat the same test for the connectors power on the board with current limited power supply <A> An addition to the suggestions above : don't use the meter on "beep" and just listen. <S> Put it on ohms and actually look at it for each measurement. <S> On a board like this you will see all kinds of resistances (even negative when a cap has some charge on it, in this case the reading will take a while to stabilise), so you are looking for anything suspiciously low. <S> But when you do a cable (where you do every pin to every other pin) <S> any resistance that is not infinity is a sign something is not quite right. <S> (It's rare but once <S> in a while you see shorts that actually have significant numbers of ohms.) <A> First, select resistance or continuity on the switch on the front of the meter and make sure that there are no shorts between adjacent wires in the ribbon cable. <S> Next, plug the cable into your Raspberry Pi with the ribbon running away from the board and the polarizing bump pointing into the board. <S> Do not power up your Raspberry Pi yet. <S> Next measure the voltage between the ground and the two 3V3 connections in turn. <S> Again, you should see a value very close to 3V3. <S> If these checks fail, shut down the Raspberry Pi disconnect the cable and check all your wiring.
You will know it is a short when the continuity indicator bleeps or the resistance measurement shows zero or a very low ohm reading (less than 10 ohms).
Why do cascading D-Flip Flops prevent metastability? I understand what metastability is but don't understand how linking together flip flops reduces this? If the output of the first flipflop is metastable, this gets used as input for the second one. But I don't see how the 2nd flip flop will be able to do anything with this input and make it stable. Thanks in advance! <Q> Once you've got it down to once in the age of the universe, it's probably unlikely to cause you trouble. <S> It's like balancing a pencil on its point. <S> It's likely to fall over, and the longer you wait, the less likely it is to remain standing. <S> There are two problems with waiting a long time, and one of them is fundamental. <S> The fundamental problem is that if you have a single memory element (latch or flip-flop, they both suffer from metastability) in a clocked system receiving the output from an asynchronous external system, then you physically cannot define a lower limit to the waiting time, sometimes the external signal will make a transition near the latching control edge. <S> You have to pipeline the signal to another flip-flop to let it wait there. <S> This gives you a guaranteed one clock cycle minimum wait time. <S> The second problem is that often you're trying to run a system as fast as possible, and the system clock rate cannot be slowed down to give enough time in the second flip-flop. <S> The only way to increase the signal latency to what's necessary, without decreasing the throughput, is to pipeline the waiting to more stages. <S> Some people have trouble visualising what's happening between the flip-flops. <S> There are two ways to induce metastability, and they both involve violating the flip-flop rules. <S> One way is to violate the input setup and hold times, to make a transition when the flip-flop expects the input to be stable. <S> The other is to violate the input logic levels, to make the flip-flop data input sit at an intermediate voltage level. <S> A flip-flop that's being metastable can produce either type of violation on its output, to cascade on to the next flip-flop. <A> It reduces the probability of metastability affecting the circuit by allowing more time until the signal is actually used. <S> With two flip-flops, it allows a whole extra clock cycle for the signal to settle. <S> With three, it allows two extra clock cycles. <A> They don't prevent metastability from affecting the output, but they can greatly increase the mean time between incidents since the metastability would have to be of relatively long duration. <S> Cascading <S> three (or more) well-designed flip-flops can increase the time between incidents to something like the age of the earth. <A> Because the first flip-flop, even if it is metastable, will have all the period of the clock to stabilize. <S> By the time the second flip-flop samples the first flip-flop, its output could be already stable. <A> If you want the excitement of metastability, implement TWO VERY SLOW INVERTERS, connect them back-to-back, and bias them (in a simulation) at VDD/2. <S> Then remove the biasing, and watch the speed of resolving to logic1 and logic0 levels. <S> You may need to pick an initial bias voltage other than VDD/2. <S> If your 2 or 3 flipflops are SLOW compared to the clock period, life may be filled with problems. <A> Metastability simply means that, if you have a data transtion within a particular time window referenced to the clock, the output will behave badly for a certain period after the clock edge. <S> However, the window is not a fixed interval. <S> Rather, the likelihood of a bad value (oscillation or intermediate voltage level) declines exponentially with time. <S> So, if you sample the signal with a clock, and then wait a bit before applying the clock to the second flip-flop, you can reduce the chances of a bad bit to any desired (but non-zero) probability. <S> If the required time is too long, you can use 3 or more flip-flops in series.
Metastability cannot be 'cured', but if you wait long enough , the likelihood of it occurring can be made arbitrarily small.
Unable to trigger 12V DC Stepper Motor without driver I am trying to test a 12V stepper motor using just a 12V DC adapter without any driver, but I am unable to get it triggered. I am using Velleman's MOTS1 motor and as per the data sheet attaching the power's negative terminal to the red wire and the positive terminal one by one to the other four wires. 1). To eliminate the possibility of a faulty motor, I even tried with two different motors of the same model. But both motors did not work. 2). I also realized that the adapter is delivering 11.8V instead of exact 12V. So, to eliminate the possibility of lower voltage, I supplied 15V using batteries, but that too did not work. 3). Also, using the same adapter and battery sets, I am able to trigger other regular 12V DC motors. So most probably, I am doing something wrong here specific to stepper motors. Please help! Let me know if you need more information from me. I am an absolute newbie electronics hobbyist and have just 3 months of basic theory and practical experience. So, I guess, every suggestion is helpful :) . Motors specifications from the Velleman's website - https://www.vellemanusa.com/products/view/?id=351245&country=us&lang=enu resistance: 280 ohm rated voltage: 12 Vdc current: 32 mA impedance: 380 ohm phase: 4 step angle / step: 5.625° / 64 reduction ratio: 1/64 detent torque: 4.86 ozf.in pull-in torque: 4.17 ozf.in max. starting pulse rate: 550 pps max. slewing pulse rate: 90 pps temperature range: 77 °F noise: 40 dB cable: 420 mm AWG 1095#28 terminal: JST SPH-002T-P0.5S insulation strength: AC 600 V - 1 sec. cut-off current: 10 mA colors: B1: pink A1: orange A2: yellow B2: blue GND: red GND2 (for MOTS2): brown DC Adapter specifications: DC Volt Output: 12V DC Current: 2.5 A <Q> Driving a stepper motor is a bit more complicated than driving a regular brushed DC motor. <S> I strongly recommend you build yourself a driver for this motor. <S> All the best, keep well. <A> You can test your motor(s) by simply applying voltage (below 12V is also acceptable) and seeing a small movement only. <S> For further spin test requires more advanced driver circuitry. <S> Looking at the reference page, your motor looks like a 5-wire unipolar motor. <S> 5-Wire Motor <S> This style is common in smaller unipolar motors. <S> All of the common coil wires are tied together <S> internally abd brought out as a 5th wire. <S> This motor can only be driven as a unipolar motor. <S> (Refer to: https://learn.adafruit.com/all-about-stepper-motors/types-of-steppers ) <S> Simply tie GND pin to ground and apply positive voltage to A1, A2, B1 and B2 pins one-by-one. <S> What a simple stepper driver does is applying sequential pulses to the windings. <S> This application manual is very explanatory for beginners. <A> the ST28 datasheet does not indicate if the /64 and the 5.625 are a repetition of the same parameter or describing two processes in series, this has cause some confusion. <S> However the motor st24 is interesting it has 7.5 degree steps and a 85.56 reduction ratio... <S> clearly the steps and the reduction ratio are two separate parameters here. <S> so this ST28 motor has a gear chain between the rotor and the output shaft reducing the 5.625 degree steps but a further factor of 64. <S> it may not be possible to see the shaft stepping with only a manual drive. <S> The shaft turns less than one tenth of a degree with each step. <S> You should be able to make the motor turn by pulsing the coil wires in the correct order if you can identify coil1 and coil2 and repeatedly pulse the wires in the right order <S> repeatedly it should rotate slowly <S> the order is either A1 B1 <S> A2 <S> B2 <S> if A and B are coils and 1 and 2 are ends or A1 A2 <S> B1 <S> B2 <S> if 1 and 2 are coils and <S> A and B are ends. <S> eg: lay out some bare wires on a solderless breadboard wired and wire them to terminals in the order given above and drag the negative feed across them. <S> if you hold the motor in the other hand you may be able to feel the rotor stepping. <S> 11 volts should be plenty, it will be a little weaker than with 12V but should have plenty of strength to move a light pointer <A> Thank you all for helping me figure out the issue. <S> Here is the problem. <S> In the Velleman specs, the red wire is designated as GND. <S> Thats the issue. <S> Once I used the red wire as positive, and applied negative voltage one by one to the other 4 pins, the motor turned very small steps. <S> Less than one degree per pulse. <S> Now, I am trying to design a driver circuit for this motor using a 555 timer, 4017 counter and 2N222 Transistors and facing another issue. <S> But I will post that in another thread. <S> Thanks again for helping me figure out the problem Anurag
Stepper motors require a stepper controller to energize the phases in a timely sequence to make the motor turn.
Attaching PCBs to Lego plates I am working with arduino/raspberry pi modules and trying to secure them to a lego plate. Because of the soldering joints on the bottom, there isn't a flat surface to work with. I have tried crazy glue which works. I also tried a sculpting clay which attempted to take care of the bumpy surface of the joints, but that didn't hold (the clay had crazy glue on both sides). Even though the modules still worked, I would imagine that this introduces added resistance to the circuit where it wasn't intended. It looks like standoffs are the best way to go, even though there is nothing readily available for this purpose. I'm wondering if there are any other options to consider? <Q> Maybe you can use "Technic pin joiners" as standoffs (this kind of standoff): (some luck and bodging may be involved in getting them to line up) <S> Not this kind of standoff: <A> Since 1963, Lego pieces have been manufactured from a strong, resilient plastic known as acrylonitrile butadiene styrene (ABS).[12][30] <S> As of September 2008, Lego engineers use the NX CAD/CAM/CAE PLM software suite to model the elements. <S> The software allows the parts to be optimized by way of mould flow and stress analysis. <S> Prototype moulds are sometimes built before the design is committed to mass production. <S> The ABS plastic is heated to 232 °C (450 °F) until it reaches a dough-like consistency. <S> It is then injected into the moulds at pressures between 25 and 150 tonnes, and takes approximately 15 seconds to cool. <S> The moulds are permitted a tolerance of up to twenty micrometres, to ensure the bricks remain connected.[33] <S> Source: Wikipedia <S> Generic ABS has a surface and volume resistivity of \$ 10^{15} \$ and \$ 10^{16} cm \$ respectively. <S> FR4 (which is what most pcb's are made out of) has a resistivity of \$ ~10^ <S> 9 \$ and \$ <S> ~10^{10} cm \$ for volume. <S> These are dependent on factors like contamination and humidity. <S> So glue away, your going to lose less current through ABS than FR4 (both will be in the nA range and below for 10's of volts) <A> Use the mounting holes which already exist. <S> Looking at a Raspberry Pi, they have four mounting holes. <S> That part is easy. <S> You still need a fixing which lines up with the Lego dots underneath. <S> You can get around this by using four 2x2 flat tiles. <S> Once you've got your one-dot pillars fixed to the PCB mounting holes, put those flat tiles onto a base plate in the right places, and glue your one-dot pillars onto these tiles. <S> Since Lego is made from ABS, model aircraft glue (polystyrene cement) works well. <A> If your beef about the clay is that it didn't work, try epoxy putty.
For the PCB side, either glue one-dot pillars onto the mounting pads, or drill out the holes to take a Lego Technic rod. Since most bricks are made primarily out of ABS, they have a high resistivity.
PNP instead of NPN in series voltage regulator I have a question regarding PNP transistor, since I am not very familiar with it. What would be the difference in the circuit below, if we switched NPN to PNP? Right now the output voltage is equal to \$U_D\cdot\left(1+\frac{R_4}{R_4}\right)\$ The value of \$R_1\$ is limited by \$R_{1max}<\frac{U_{INmin}-U_D}{I_{Dmin}}\$ I know that for NPN the base's voltage must be positive, while for PNP - negative. But I just don't see how this would affect this circuit. <Q> The difference is that in a "positive" regulator (the regulator regulates the positive side of the input voltage) like this an NPN is used in a common collector (emitter follower) configuration. <S> This means that the voltage gain of the NPN from base to emitter (and note that the emitter is the output) is about 1x. <S> This means that the NPN does not add gain to the feedback loop. <S> This means that it is fairly easy to stabilize the loop. <S> When using a PNP the emitter will have to be at the input side making the circuit a common emitter . <S> A common emitter has a gain depending on the load on collector. <S> Here the circuit fed from this regulator is the load. <S> So if the load changes, the gain changes ! <S> This makes stabilizing the circuit much more challenging . <S> Also a common emitter has a negative gain meaning the output voltage is inverted compared to the input voltage. <S> This means for the PNP version you also need to swap the + and - inputs of the opamp for the circuit to work. <S> Another difference is the minimum voltage drop needed for the regulator to work properly. <S> I'd say that swapping the NPN for a PNP looks like a small change but really, it is not. <S> It results in a fundamentally different circuit. <S> Even if both circuits are still voltage regulators. <S> With the PNP version you run a much higher risk of actually making an oscillator instead of a regulator. <A> There are several important differences, assuming a positive input and positive output, and a common ground. <S> a) <S> An NPN is a follower, a PNP would be an inverting common emitter, so the op-amp sense would have to be inverted. <S> b) <S> An NPN needs 0.7v VBE, so the dropout across the circuit would be at least that, plus whatever headroom the amplifier needed. <S> A PNP would only need its VCE(sat) for dropout voltage. <S> c) <S> An NPN is a low output impedance follower. <S> A PNP is a high output impedance current source. <S> This is why old design LDOs have such a finicky output capacitor requirement. <A> Anytime you invert output , you must use non-inverting input for negative feedback, then unity gain phase margin degrades.
In this case using a PNP will result in a lower dropout voltage compared to the NPN version. The stability compensation required around the amplifier, and required of any output capacitors, is very different.
Why do we use Laplace transforms to analyse transient circuits? I just learned transient circuits and we solved them both in the time domain and the Laplace domain and I can't understand why we would use the Laplace domain as it seems it is a lot more simple to use the time domain especially in series RLC circuits. <Q> It's easy to solve simple filter circuits in the time domain but there becomes a tipping-point where most engineers would prefer to solve problems in the frequency domain and apply (for example) a step-function. <S> Finding the inverse Laplace is fairly straightforward because of Laplace tables. <S> As an example of an RLC low pass filter, engineers become accustomed to the transfer function: - $$H(s) <S> = \dfrac{\omega_n^2}{s^2+2\zeta\omega_n^2 s + \omega_n^2}$$ <S> And, applying (for example) a step function is as simple as multiplying by 1/s: - $$ <S> \dfrac{1}{s}\cdot\dfrac{\omega_n^2}{s^2 <S> +2\zeta\omega_n^2 s <S> + \omega_n^2}$$ <S> Engineers who are familiar with this get to recognize that this converts to a standard form and the next step is just using the tables to derive the transient response. <S> In addition, the term \$\omega_n\$ (the natural resonant frequency) can be is factored out a lot of the time so that solving the step-function formula for \$\omega_n=1\$ begins with: - <S> $$\dfrac{1}{s}\cdot\dfrac{1}{s^2+ <S> 2\zeta s <S> + 1}$$ <S> This is rearranged to a standard form such as this (underdamped resonance) <S> : - $$\dfrac{1}{s[(s+a)^2 + b^2]}$$ <S> Where \$a =\zeta\$ and \$b=\sqrt{1-\zeta^2}\$ <S> The Laplace tables give us this: - $$H(t) = <S> 1+\dfrac{1}{\sqrt{1-\zeta^2}}\cdot <S> e^{-\zeta t}\cdot <S> \sin(t\cdot\sqrt{1-\zeta^2}+\phi)$$ <S> Where <S> \$\phi = \arccos(\zeta)\$ <S> But you will probably only be convinced when you are dealing with slightly more complex situations or really do need to analyse the frequency spectrum. <A> In this context, the Laplace transform is simply a tool that we use to deal with differential equations. <S> I think it provides a slightly more intuitive feel for how responses change with frequency, but really, it's just a tool for dealing with differential equations. <S> The transform really starts to shine when you're cascading signals. <S> A variety of properties of the transform really become very useful then. <S> For example, convolutions in the time domain become simple multiplications in the frequency domain. <S> There are also a variety of frequency domain tools that make control easier. <S> You start using the transforms for simple systems, so you're facile when you start using them for more advanced situations -- not because they're so intuitively easy. <S> In fact, the understanding is very quantal. <S> You'll be able to "do" problems successfully, but it may take many iterations, even years, before you grok the transforms. <A> Some day you will need to understand a system design requirement for both frequency and time domain response. <S> Laplace Transforms are useful for many applications in the frequency domain with order of polynominal giving standard slopes of 6dB/octave per or 20 dB/decade. <S> But the skirts can be made sharp or smooth as seen by this Bandpass filter at 50Hz <S> +/-10%. <S> Some day you may need this and the Math will help you understand the relationships.
The time domain helps you understand why the small ringing comes from the step response or abrupt change in phase and voltage of this sweep generator from 200Hz to the start at 20 Hz.
Power indicator for circuits with voltages much higher than LED forward voltages (say 15-48V) I have a circuit that has a 24V power rail and I put an LED and series resistor on it for power indication. Even at 10mA forward current, over 200mW of power is dissipated, over 90% of it in the series resistor. This is more than many (but not all) SMD resistors can even provide. This seems like a lot of power for a simple LED. Neon indicators might work at the higher voltage end, but they aren't commonly available in SMD packages and they're bulky, expensive and can have limited life. I also considered an astable multivibrator to do a low-duty cycle flash to keep average power down, but that needs 4 resistors, 2 capacitors and 2 transistors, or an IC (which would be unlikely to work at 24V) and some passives. Is there a very simple (low component count, cheap, low-power and low-board-area) way to show power indication in circuits with a rail voltage more than about 10 times the LED \$V_f\$ (say around 15V up to 48V). <Q> Use a different LED. <S> High brightness LEDs should still be plenty bright enough for an indicator at 1-5 mA. <S> The problem you have is whatever component(s) <S> you use to do this <S> linearly will be dissipating the excess energy as heat. <S> The only way to perform this more efficiently if you wish to run from a high voltage, and put 20 mA thru the LED is to use some kind of switching device but that goes against one or more of the simple, cheap and low component count requirements. <A> At the cost of a little board space, you can stick with standard-sized parts. <S> If you use the same value resistors the power dissipation will be (approximately) equal across them... <S> So for a \$3V\$ LED at \$10mA\$ , you need to drop \$21V\$ <S> so you need \$2.1k\Omega\$ ; if you use 2x \$1.05k\Omega\$ ( \$\le\$ 2%) resistors that's \$2.1k\Omega\$ <S> which allows the requisite \$10mA\$ across the LED, and the resistors will dissipate \$(0.01A \times 21V) <S> \div 2 <S> = 105mW\$ apiece. <S> If you're using 125mW+ resistors you should be fine. <S> If you're using 5% resistors, just use 2x \$1.1k\Omega\$ resistors, which will give \$2.2k\Omega\$ combined resistance for about \$9.5mA\$ instead, and that will be \$(0.0095A \times 21V) <S> \div 2 <S> = 99.8mW\$ <S> apiece. <S> Since they're all in series (both resistors and the LED) you can get creative with placement. <S> Put both resistors before the LED, or one before and one after, or both after! <A> One option you may have is to take a look at your circuit and where the supply current is used. <S> It may be possible to simply place the LED in series with some other circuit that: Does not mind having a voltage drop equivalent to the forward voltage drop of the LED. <S> Limits the current in the series circuit to a value that is compatible with the current ratings of the LED. <S> If you can find this in your circuit you would basically be moving that wasted 200mW of power from the resistor to another part of the circuit where it may be put to better use. <A> The voltage divider drives the 24V down into the gate/base of a transistor, then your LED draws power from the lower voltage rail. <S> Something like this: simulate this circuit – Schematic created using CircuitLab <A> I looked for a high efficiency, high voltage step-down DC/DC switching converter and found the LTC3632, but you need the chip, two capacitors, two resistors and an inductor. <S> May be used for input voltages up to 50 V. Efficiency better than 70 % for a current of 0.1 mA. Two resistors to set output voltage, one condensator at input and output and one inductor. <S> Of course one more resistor to set LED current. <S> Less components would be difficult. <S> May be the condensator at input is not necessary when placed closed to the condensator of the power supply. <S> Did not look for the price of the chip. <S> There may be other DC/DC switching converters from other manufacturers.
If you have any lower voltage rails available, you can use a single transistor and a voltage divider. Use multiple resistors in series!
Circuit to get a short at 0 volts and open at 3.3/5 volts using transistors simulate this circuit – Schematic created using CircuitLab This is the situation I am trying to solve. I am considering using a transistor, but am not 100% sure. When I get a 0 volt input, the output needs to be a short circuit. When I get a high voltage input (i.e. 3.3 or 5 volts) the output should be an open circuit. I can do this using an inverter and voltage controlled switch, but how can I do this with transistors? The csv voltage source is a pulse signal. Normally at 0 V, but will turn on momentarily. <Q> It takes a mA or two to turn the output transistors off, so a 1K series resistor on the control input will be suitable for limiting the current (for either 3.3 or 5V). <S> This particular one can handle 100 or 150mA continuous, but there are others that can handle more current. <A> You said open and short output, implying isolated outputs, which would be best implemented with a Normally Closed relay. <S> However, if you mean the output is at nearly 0v (technically up to Vce(sat) depending on the collector current) with 0v input, and the output is high impedance (open) when the input signal is high, this can be accomplished with a pair of NPN BJT transistors. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> The answer is: P-channel JFET, at 0 V between gate and drain channel is fully conductive, increasing positive voltage at gate also increase channel resistance (so called off-state). <S> More on this topic here . <S> Example (and cheap) part is 2N3820.
The easiest way to do this is to use an opto-MOS SSR, such as this one (CPC1117N):
Single AA cell depletion on series battery I have a small embedded system that read some sensors every 10 minutes and uploads the data to a server every hour using a 3G module. I'm using 4 Energizer Lithium L91 AA cells in series to power the entire system. The 3G module is connected to a buck converter that reduces the voltage from the 4 AA cells to 4V. The module runs 60 seconds every 1 hour and draws around 500mA during that time. The sensors and the MCU that controls everything only use the lower 2 cells and run every 10 minutes for about 3 seconds and they draw around 50mA. The rest of the time the system is put to sleep to preserve battery. I'm facing a problem with the batteries where one of them gets really discharged when all the others are almost new. I will explain this a little more. This is my setup: +----------+ +------------+ +-------------+ +-------------+ +---------+ 1 +----------+ 2 +----+----+ 3 +--------+ 4 +--------+ +----------+ +------------+ | +-------------+ +-------------+3G Module | GND | + MCU and Sensors I put 4 brand new Energizer Lithium cells the first time and everything works as expected. After around 7 days the system stops working because cell 1 is almost dead (around 0.8V or lower) but the other cells have around 1.4-1.5V. I proceed to replace the dead cell with a new one. The next day, cell 2 is dead, the same history, I replace it and the system starts working again. After around 5 days cell number 4 dies, it has 0V and when loaded it goes to around -2V which is explained here . I didn't try to buy more cells to try again (they are not very common where I leave so I'm still waiting for the shipping to get some more). The only explanation I can find is that I just got bad cells? I expect they don't discharge exactly the same because of manufacturing tolerances but this difference is huge!. This question is similar. We are in winter now so the worst case temperature at night is 0 degrees Celcius, humidity is around 60-80% and I don't have any component that may be heating one battery more than the others, everything is pretty low power. Also, the L91 batteries should be able to supply the current I demand with no problems at all. Energizer is a reputable brand so this makes me wonder about the quality of the cells. Each cell says 12-2036 which I guess is the expiry date so they are far from being depleted due to self-discharge too. I also thought about putting the 4 batteries in parallel and use a boost converter to get the desired current but in this case, if one cell dies it's even worse because the other cells will start charging the bad cell! Am I missing something? Is this something common? This is planned to be a commercial product at some point but if I can't even get reliable batteries that's a big problem! EDIT: I just got another device that is basically the same but without the 3G connection, it just saves the sensors data in memory to be retrieved later. This one uses 2 Energizer Lithium L91 cells in series directly connected to the MCU and the sensors and the same happened, one of the cells is completely dead while the other is still fine. In this case, the power consumption is around 50mA every 10 minutes for about 3 seconds so I'm really starting to think I got a bad batch of batteries because even Alkaline batteries should be able to work with this currents. <Q> Yes the Pulse discharge is killing the battery due to undersized requirements. <S> If you notice the pulse response after 500mA, the datasheet voltage drops the 1.5V battery from 1.8V new to 1.56 but does loses 10% going back towards 1.8V each time. <S> This is the double electric capacitor effect that takes time to restore the voltage but loses energy in the process. <S> THe high density doubles the capacity gives it memory effect <S> but if overloaded you don't achieve it. <S> All batteries have memory inspite of what marketting has you believe. <S> It is just the stress level and ratio of memory and long term effects that differs between chemistries. <S> The 3500mA rating is only for 100mA. <S> While 500mA pulses plus 50?mA kills the batteries unevenly. <S> Series batteries must always be loaded evenly otherwise the weakest cell accelerates aging the fastest. <S> 0'C also kills the capacity 10% (ideally) but in your case with pulse load maybe 20%. <S> To explain this requires modelling of the double layer effect in supercaps and batteries with unbalanced currents at low temp. <S> For a cutout voltage of 0.8V the rated service hours for 1.5V/cell*500mA = 750mW is 5 hours or 4 hours at 0'C and with your duty cycle of 1/60 it should have lasted 15 days. <S> Except your Buck regulator of 4V probably becomes less efficient when the the battery approaches 1V per cell <S> then drops from ~80% to 70% or so. <S> So you definitely need to rethink your battery load requirements for 4V pulsed and 3V lower <S> pulsed with a different dual regulator solution that can withstand cold temps for same or less cost than these rare pricey batteries. <S> Plan on a capacity of 2 watts with a capacity of 2 months at 1/60 duty cycle or 24 <S> Wh and expect 50% efficiency with your present regulators, temperature and pulse loading. <S> There are better ways , but we don't know the scope of this project. <S> Or figure out how to compress your power budget. <A> This is really interesting. <S> I have never seen any datasheet info on the distribution of capacity between cells from the manufacturers, which is interesting in its own right. <S> However taking a wild guess, I would expect 5-10% and never 50%. <S> If all is as you say, it is very unexpected. <S> In the datasheet data.energizer.com/pdfs/l91.pdf#page=2 , the graph "Industry standard tests" + "Personal Grooming" gives a usage pattern/currents very similar (but 750mA not ~400mA), suggesting a 16 day (>400min) life @400mA. <S> I suspect that something is not really as you say it is. <S> The actual life is so far from a (conservative) calculation (7 vs 16 days) that something is wrong. <S> A bad batch is probably unlikely, but only testing a new batch will prove or disprove that. <S> The currents drawn by a GSM module, and the on-times are probably very unpredictable, being dependent on loading of the cell site (how fast it responds), available operating bands, propagation conditions etc. <S> The sensor current may also be higher than you think. <S> It is also very easy for a micro that you think is sleeping, to either come on more often, or for longer, or not go to sleep sometimes, or have higher standing currents (e.g. floating input pins or mid-voltages applied to input pins). <S> Some voltage regulators (both linear and smps) also draw much higher currents when they approach the dropout voltage. <S> For this sort of application, you need to check the idle current of regulators over the full possible voltage range. <S> As Tony said it is no really good practice to have some cells have extra load, but you state that cell #1 failed first which is not consitent with that being an issue. <S> None of that really explains cell-cell differences between #1/2 and #3/4 <S> You should do some controlled experiments on new cells, with a timer and a fixed load mimicking your system load, to eliminate the variables, and prove both the capacity and matching of the cells, independent of your system. <S> Then report back - we will be very interested. <S> BTW, you can get cheap DC power meters off aliexpress for $10, that use true energy meter chips, and will totalise the energy actually used by your system over long periods. <A> As a matter of interest, here is series/parallel switching arrangement to deal with the unbalancing of batteries where there is a long, low current drain at 3V, and an high current drain at 6V. <S> As the ration of idle/sensor energy to transmitter energy increases, at some point this becomes economic. <S> simulate this circuit – <S> Schematic created using CircuitLab D2 is a schottky and does carry Ismps, losing power, but more importantly worsening the dropout voltage. <S> It can be replaced by a pfet active diode (note D,S) simulate this circuit <S> A small dpdt relay is also an option, but you have watch the capacitors carefully. <S> If there is a splat as the relay connects capacitors, the contacts will die quickly. <A> I finally got new Energizer Lithium L91 AA cells to test once more and they now work as expected! <S> They discharge mostly at the same time as expected! <S> The system has been running for 20 days as of now. <S> So <S> yeah, apparently all this problem was due to bad cells. <S> I got the new cells from a different provider just in case. <S> These new cells have the marking 12-2037 instead of 12-2036 <S> so they should be 1 year newer than my previous ones. <S> Thank you, everybody, for your suggestions! <S> I hope this experience will be useful to someone out there.
Your excessive pulse current battery load is killing some batteries with additional pulses on sensors probably taking more than expected. Your current profile seems to be well within the use case for these cells.
What is the point of Geiger counter calibration? I understand that the three ways Geiger counters can be calibrated are electronic calibration and energy calibration, which both use a pulse generator, and radiological calibration which uses a check source. Electronic calibration simply involves sending pulses to the Geiger counter, which registers them as counts. But why is this necessary? I thought every ionization in the Geiger–Müller tube registered as a count anyway, without the need for calibration using electrical pulses beforehand. So what is there to calibrate? One ionization always equals one count. Radiological calibration involves exposing the Geiger counter to a radioactive check source and setting the Geiger counter's measurement of the radioactivity to match the actual known radioactivity of the check source. But instead, why not simply program the Geiger counter to know that x cpm from a particular source = x µSv/h as detected by a particular model of Geiger–Müller tube? I sort of understand the usefulness of energy calibration; I understand that it determines the voltage threshold for each ionization; but I cannot see the point of the other two methods. <Q> First of all, the answer lies in the very principle of a measurement. <S> When you measure something (anything, even weight, length etc.) <S> you actually compare the measured parameter of the object to another object (a standard) with known parameters. <S> The same applies to radioactivity (cps) or any other parameter/measurement for that matter. <S> This also means that it's impossible to take an "absolute" measurement of anything. <S> The other problems you seem to neglect is the problem of noise and aging/change of your measuring instrument. <S> Noise is something that always has to be accounted for, otherwise you'll end up "measuring" values which bear no meaning whatsoever (as they contain random "information" that's the noise itself) or end up with "glitches" in your measurements (and might even draw wrong conclusions from them). <S> To translate this into your question: one count might not always be one count, because of the noise present in the instrument (both in the physical and the electronic part). <S> Aging is something that's particularly of concern with equipment dealing with radioactive radiation. <S> Since such radiation is an "ionizing" one, it means that the very exposure to such source of radiation causes electrons to be kicked out of the instrument's material (which sometimes leads to permanent changes in the material structure). <S> The other cause of aging of these materials is the very environment we live in. <S> Just consider this: ~21% of the atmosphere we live in consists of a very reactive gas called oxygen. <S> The other problem lies in the fact that literally everything is covered in a thin layer of water (a layer so thin that it can't be seen with the naked eye but causes problems in atomic force microscopy). <S> Since most of the elements on Earth are at least somewhat reactive (with the exception of gold and platinum), they enter into chemical reactions with the water, the oxygen or other materials in the air <S> (CO2, the sulfides causing the tarnishing of silver etc.) <S> and thus the materials change as the result of these reactions. <S> This will cause instruments to "go out of tune", their signal-to-noise ratio to decrease and other effects that cause instruments to go out of calibration. <S> Moreover Geiger counters are really precise instruments that are some of the most sensitive devices out there. <S> This means that even really small changes will have a noticeable effect on their calibration. <A> Electronic calibration simply involves sending pulses to the Geiger counter, which registers them as counts. <S> But why is this necessary? <S> I thought every ionization in the Geiger–Müller tube registered as a count anyway, without the need for calibration using electrical pulses beforehand. <S> So what is there to calibrate? <S> One ionization always equals one count. <S> True enough, but the Geiger counter doesn't concern itself with single counts. <S> Instead, it converts count frequency to radiation level. <S> Electronic calibration assumes the tube itself is working correctly, but then provides known pulse frequencies which allow the calibration of rate vs dose to be checked. <S> Radiological calibration involves exposing the Geiger counter to a radioactive check source and setting the Geiger counter's measurement of the radioactivity to match the actual known radioactivity of the check source. <S> But instead, why not simply program the Geiger counter to know that x cpm from a particular source = <S> x <S> µSv/h as detected by a particular model of Geiger–Müller tube? <S> That is essentially what electronic calibration does. <S> But it makes assumptions about the response of the GM tube itself. <S> Exposing the unit to a known source of radiation is (once you deal with the precautions needed) simple, fast, and by its nature comprehensive. <S> Why mess around with simulations when you can check directly against reality? <A> Just a guess, I have no idea how Geiger counters are made. <S> The count by itself has no meaning without time domain. <S> What you actually measuring is "counts per time period". <S> And timing circuitry definitely needs calibration, which is best done with precise pulse generator. <A> At much higher count rates, the dead time of your detector circuitry comes into effect and the result has to be compensated for counts that are missed.
The point of a geiger counter calibration is for confirming the correct detector response and linearity at high and low counts rates.
Size of program counter Can we say anything about the program counter by looking at the size of a memory chip? I think the program counter is part of the microprocessor and memory is external. How can we comment about the program counter by looking at the size of the memory? For example, I had a question in one of my tests: A memory chip of 8kB has a data bus of 4 bits. What will be the size of the program counter? <Q> You can't really make assumptions about the program counter (PC) width from the memory address width. <S> There have been many many different memory architectures historically, and new ones will undoubtedly be dreamed up. <S> At a very basic level for the simplest of machine, the PC contains the memory address during instruction fetches, so is the same width as that address. <S> However, there are many tricks, even in early machines, that make this more complicated. <S> For example, machines with virtual memory can logically address more memory than physically exists. <S> The PC would then be wider than the address bus. <S> On a more modern processor operating in "32 bit" mode, the PC would be 32 bits wide. <S> However, that means the PC can only address 4 GB of memory. <S> Many modern machines can address more physical memory than that. <S> There are a variety of segmentation schemes. <S> The PC is more limited, and some other register holds the upper address bits of the segment the PC is operating in. <S> Jumps within the same segment work normally by loading the PC, but moving between segments is more complicated and requires additional instructions and the like. <S> The actual physical memory could be both larger or smaller than the what the PC can address natively. <S> Then there are Harvard architectures and the like where there isn't just one memory space, or where execution isn't possible from all of memory. <A> The only safe way to answer a question like this is to state your assumptions , and then state what flows from them. <S> For instance - An 8kB memory needs 13 bits to address it bytewise. <S> If the PC addresses bytes, and the entire addressable program memory space is occupied by this 8k memory, then the PC needs to be at least 13 bits wide. <S> However, maybe the addressable space is larger, or maybe it's nybble addressable, or maybe only in 16 bit words? <S> All would affect the size of the PC. <A> The program counter has to be typically large enough to encode all possible code locations, e.g. if you have 8kB of program memory, that's 2¹³ addressable bytes, so if nothing else is specified, I'd expect the program counter be at least 13 bit wide. <S> 16 bit will be typical, although the hardware doesn't actually need to implement the top 3 bits, so you may have a 16-bit program counter register, where writing '1's to the top 3 bits would be a no-op, those writes would be lost. <S> However, in reality the true answer is <S> "it's complicated" . <S> Also note that just because you have 8kB of memory doesn't mean all of it has to be devoted to code. <S> Most of it could be data. <S> You may want to read about von Neumann vs Harvard architectures .
Different architectures have used all sorts of wizardry (8086 segmented memory access comes to mind) and it's hard to give a definite answer.
What is a reasonable way to connect small wires? These wires will carry up to 1.5A at 5V outdoors in clear weather. Would it be reasonable to connect them by simply taping them together with electrical tape? I'm new to electronics outside of embedded programming and simple Arduino prototyping, so I wanted to check that I'm not running into any safety issues. Hope this is on topic and not too basic. <Q> For a good connection that can withstand lots of movement/bending, use: Solder <S> (Image from wikipedia.org ) <S> For a more temporary connection that is quick to add/ <S> remove: <S> Use spring-loaded terminals <S> (Image from dhgate.com ) <S> For a hack that will work in a pinch but destined to eventually fail under light abuse: Twist the wires together and add wire nuts or tape. <S> (Image from cnc-plus.de ) <S> This is all under the preface of "clear weather" as you had stated. <S> Note that while weather can be "clear", hidden moisture in the air can still accelerate corrosion/rust over time, depending on the metals involved. <S> Corrosion can lead to shorts or opens. <A> I would solder them and then use three section of shrink-tube. <S> One around each wire and after that a third one to cover all of them. <S> But then I happen to have a drawer full of shrink tube of various sizes <S> so I don't have to buy some... <A> Yes. <S> However, if they are being pulled apart, you'll need something more. <S> You may very well get away with a western union <S> splice with no solder if the wires are being lightly pulled apart, but this is risky so you should just apply solder anyway. <A> You have a bunch of answers related to functionality, but at least one of your main concerns seems to be safety. <S> Personally I would solder the wires and insulate them (maybe heat shrink with internal adhesive to seal if there was power available- <S> I have a butane soldering iron but not a butane heat gun). <S> A wire nut or a couple layers of tape is okay for temporary use. <S> Offset the connections (make one wire shorter than the other and vice versa for the other end) so that a short is more unlikely. <S> For safety you should make sure that the source is current-limited or fused at a current below the maximum the wires are rated for. <S> If your wires are good for 8A, a 5A or 8A fuse will protect the wires from overheating if a short circuit occurs. <A> You said "clear weather", but, outdoors anyway.... <S> They have silicone in them and the silicone squeezes out over the wires as you tighten the wire nut, thus weather-proofing the connection. <S> You could use those and then electrical tape it afterward (or not). <S> My landscaper used them on my 12V outdoor landscape lighting. <S> Search on "DryConn"... <S> Home Depot site even has a video of their usage. <A> If you have a soldering iron you could connect them with solder like this: You have to tin the wires before, like this: <A> There are many other good answers here, but I'd also suggest using a Chocbox: https://en.wikipedia.org/wiki/Chocbox https://www.screwfix.com/p/chocbox/54936 <S> This provides a handy protective enclosure for the place the wires are joined.
Assuming these wires are not being moved or pulled apart, a rat-tail splice insulated by electrical tape is perfectly acceptable. Crimp terminals (either permanent "butt" connectors, or male and female terminals if you want to connect and disconnect) Screw terminals ("terminal block") (Image from pixabay.com ) There are wire nuts you can buy that are made for outdoor/wet environments.
Why does the relay in this touch circuit not work? Apologies for my lack of knowledge, I am trying to teach myself how to work with electronics and have put together this circuit. Can somebody tell me why the relay is not working? <Q> You haven't provided any specs on the relay, so I'll just make up numbers for sake of example. <S> Let's say the relay needs 30 mA at 9 V to operate. <S> You haven't provided a link to the datasheet of the transistor, so let's say it's guaranteed minimum gain is 50. <S> That means the minimum base current to operate the relay would be (30 mA)/50 = <S> 600 <S> µA. <S> It is quite unlikely that this touch sensor will let 600 µA pass. <S> Let's work backwards to see what the resistance between the touch sensor terminals would need to be. <S> Figure 700 mV for the B-E drop of the transistor. <S> That leaves 8.3 V across the touch sensor. <S> By Ohm's law, (8.3 V)/(600 µA) <S> = <S> 13.8 <S> kΩ. <S> That's low for ordinary skin, but could probably be achieved by wetting the skin with salt water first. <S> However, beware of the current thru the body. <S> If this touch sensor is passing current between different parts of the same finger, then you might only feel a tingle. <S> If this touch sensor connects two fingers on opposite hands, then this would actually be quite dangerous. <S> Nearly a milliamp flowing near the heart is a bad idea. <S> In any case, the solution is more gain. <S> A second transistor could be used. <S> That would also allow a resistor in series with the touch sensor to guarantee the current thru the body would be limited. <S> This is something your circuit is NOT doing now. <A> Another way to build this circuit is with a MOSFET. <S> It can be used in these applications because it requires almost no current to switch on and off. <S> The gate of a MOSFET is like a capacitor; when it charges it allows current to flow. <S> When you place your finger across the contacts, the gate charges and allows current to flow. <S> Select the MOSFET for the current you need. <S> The downside of this circuit is humans have the ability to collect static charge and this is bad for the MOSFET's gate as they are susceptible to ESD. <S> It's a fun circuit to build however. <S> You can change this by adding ESD diodes . <S> Some MOSFETs are so sensitive, you only need to wave your hand next to them; you don't even need to touch the contact. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Tray to use a darlington transistor and you got a good result Because the B (amplification) is the product of the two transistor: B1 X B2 = <S> Bif B1= <S> b2=100 <S> you got B=10000 and tray to use a small relay of 6v (low current consumption)
This doesn't work because the current thru the touch sensor is small and the gain of the transistor isn't large enough to amplify it to what the relay needs.
Need help to find replacement for power mosfet IRF7303 I have to design a voltage regulator circuit using DC-DC controller MAX1655. Required voltage output from the circuit is 3.3V at 2A (circuit is shown at page 10 of datasheet). According to the datasheet for MAX1655 (at page no- 11) i have to use IRF7303 or NDS8936 as mosfet in the circuit. After looking up on the internet i found that NDS8936 is obsolete/not manufactured anymore.But i am unable to confirm whether IRF7303 is locally available at my place. Questions:1)I would like to know if any functionally equivalent mosfet for IRF7303 exists so that i can use in this circuit(for output 3.3V at 2A)? 2)Does the complete circuit using DC-DC controller MAX1655 work as a voltage regulator(Can it handle changes in input voltage)? <Q> Virtually all enhancement mode MOSFETs are functionally equivalent but some will be better choices than others. <S> Try and find a MOSFET with these performance characteristics: - <S> The same or lower on-resistance for a given range of gate voltages likely to be applied in the MAXIM circuit described on page 10 <S> The same or higher maximum drain-source voltage rating <S> The same or higher maximum drain current <S> At least the same package type but double check also <S> that the thermal resistance is at least as good Gate capacitance about the same as the obsolete device. <S> +/- <S> 50% should be OK <S> It may take an hour or two but <S> when you have something you think will do the job, leave a comment with links to the old part's and the new part's data sheets for a quick double check. <A> Digi-Key stocks the IRF7303. <S> You shouldn't have any problem buying them. <A> I don't know if that works for you since you said you want it locally... <S> 1)I would like to know if any functionally equivalent mosfet for IRF7303 exists so that i can use in this circuit(for output 3.3V at 2A)? <S> If you were to use a different MOSFET, page 22 of the datasheet gives you some guidelines you should follow: <S> Based on that, you should be able to find a suitable Mosfet on DigiKey o somewhere else. <S> For example, the SH8K1 (which I found on a really quick search, didn't give too much thought to all the tradeoffs you may want to consider) seems like a good choice. <S> This is it on DigiKey. <S> There tons of options <S> , this is not meant to be a unique solution—just to give it some context. <S> The SH8K1 is comparable to the IRF7303. <S> It has lower gate charge specs than the IRF7303 (the datasheet for your voltage controller recommends < 70nC). <S> Also, the current and voltage specs for the transistors are similar—and they come in a similar package (dual N channel mosfets). <S> 2)Does <S> the complete circuit using DC-DC controller MAX1655 work as a voltage regulator(Can <S> it handle changes in input voltage)? <S> Yes. <S> On page 11 it says that the range for your settings (3.3V @ <S> 2A) <S> is between 4.75V to 28V. <S> The upper limit is depends on the Mosfet you choose (e.g 30V) like the IRF7303 and SH8K1.
The IRF7303 is available here on DigiKey.
Measuring Current Using A Resistor? Sometimes in videos made by the YouTube creator ElectroBOOM the creator says he is using a 1 ohm series resistor to measure current. I looked it up and found some links to forums where people are saying that you can use a resistor rather than a DMM to measure current, but I can't find anything saying how to do this. Are they usimg the voltage drop across the resistor from a voltmeter or are they doing something else? <Q> V/R. <S> That can be useful if you need to measure current outside of the range of your meter. <S> For example, if you need to measure 100A you could use an inexpensive 100A shunt and a multimeter on voltage setting. <S> The meter might read 75mV for 100A (assuming a 75mV shunt), so on the 199.9mV range you can read with a resolution of 130mA up to <S> +/-100A. <S> In the case of shunts, the resistance (0.75m ohm) is not usually given, rather the voltage at the measuring terminals at full rated current is given. <S> In most cases you can assume the meter impedance does not affect the measurement (shunt) resistor, but not always. <S> For example if you need to measure 1nA <S> and you just have an inexpensive handheld multimeter with 10M ohm input impedance on the +/-199.9mV <S> range <S> you can just use the meter on voltage range as a current meter. <S> It will read 10.0mV for 1.00nA, giving you a resolution of 10pA. <A> I = <S> V/R. <S> If you know the value of R you can calculate the current by measuring the voltage. <S> This is the method used in a lot of automated current monitoring solutions, though the resistors are usually smaller (1 - 100 mOhms), and the voltage is amplified before being sampled by an ADC. <A> Many DMMs cannot measure current directly. <S> They all measure voltage, though. <S> The idea is you measure the voltage across the resistor and use Ohm's law to calculate the current (I=V/R). <A> Yes. <S> The method is very effective in many cases, I use it all the time to get higher frequency current measurements with an oscilloscope rather than a meter. <S> All you do is probe the potential across a known resistance and calculate the current with Ohms Law <S> (V = I <S> * R, or in this case I = V / R) <S> You will still need a volt meter of some sort, and you will need to know the resistance between the two points you are probing. <S> If you are probing a PCB for instance, you will need to be sure that if there are any resistances in parallel you take R for the equivalent resistance of that network. <S> If you are just inserting a resistor as a current shunt after the fact you are fine! <A> If you have only one DMM, and you want to measure several different things, then it's very inconvenient to measure current with it. <S> The method is to switch off the circuit, break the connection, insert the meter, switch it to amps, power up the circuit, and reverse all that again to get the meter out, ready to measure voltage elsewhere. <S> Oh, did you remember to switch it back to volts before measuring the power supply voltage? <S> Ooops! <S> Just blown the fuse. <S> The alternative is to have a current shunt permanently wired into each conductor that you want to measure current. <S> Leave the DMM on volts, and measure the voltage across the shunt resistor. <S> Sure, there are some sums to do, which is why people tend to use 'easy' shunt values like 1ohm, or 100mohm. <S> And the meter is still ready to measure volts elsewhere in the circuit.
Yes, you can use a resistor and voltage range on a multimeter (to measure the voltage across the resistor) and calculate I =
Capacitor not reaching supply voltage with LED in series Totally new to electronics here. Without the red LED "charging indicator", the capacitor charges fully to 10V, but with the diode the capacitor maxes out at about 8.42V. I don't understand why the LED causes the capacitor to not fully charge. Running two LEDs in series drops the voltage across the capacitor down to 6.7V or so. simulate this circuit – Schematic created using CircuitLab Thanks <Q> A LED is a device with very non-linear internal impedance as a function of applied voltage. <S> When the forward voltage is under 1-1.5 V, LEDs have very high impedance, few u-Amps at 1 V, which amounts to 300- 500 kOhm of effective impedance. <S> The LED current in this area is so low that it is not even characterized in many datasheets. <S> On the other hand, electrolytic capacitors have substantial leakage, as shown in this model picture: <S> Per this article , the leakage can be in 5 to 20 uA per 1 uF of capacitance. <S> Therefore, a 100 uF capacitor is expected to conduct maybe 500 uA of DC current. <S> At 500 uA your LED has forward voltage of about 1.6V, this is what your experiment reveals. <S> ADDITION: Here is the typical I-V curve for a LED in area of interest, at low forward voltages, all on SE EE site . <A> Kirchhoff's voltage Law States that for a closed loop series path the algebraic sum of all the voltages around any closed loop in a circuit is equal to zero. <S> This is because a circuit loop is a closed conducting path so no energy is lost. <S> Photo credits go to this site: Electronics Tutorials <S> That means " in the same closed loop when adding more elements to the circuit, the total consumed voltage is equal to the total applied voltage " Vs = Vr1 + Vr2 " <S> Typically, the forward voltage of an LED is between 1.8 and 3.3 volts. <S> It varies by the color of the LED. <S> A red LED typically drops 1.8 volts, but voltage drop normally rises as the light frequency increases, so a blue LED may drop from 3 to 3.3 volts. <A> The V-F curve of a HE (High Efficiency) <S> red LED looks like this (will vary with LED type and color, for example super-bright will be different): <S> As the current drops the voltage drop will decrease but even at very low current it will still be more than 1.5V. <S> There will be a bit of current always because of your meter and because of the leakage of your 100uF capacitor. <S> If you want it to charge all the way up in a reasonable length of time you can put a resistor in parallel with the LED, but the LED will go out before it is fully charged.
So what you see is a voltage divider between the low-voltage impedance of LED and the parasitic leakage impedance of electrolytic capacitor.
Can I connect three wires using a screw terminal? I often use screw terminals like the below for semi-temporary setups (e.g. in the lab) However, I often need to connect three wires together, so what I've been ending up doing is squashing two wires into one side of the connector and one into the otherside. But this doesn't seem like the best way to do it - what should I be doing here? <Q> Putting multiple wires into one side of a connector is what everybody does. <S> It does mean that it can be a bit tricky to get all the wires pushed in at the same time to the right depth. <S> With stranded wires, there are rarely any problems. <S> Twisting them together before pushing them in can help with alignment. <S> With solid wires, there can be configurations of 'a few' wires that leave one of the wires not properly clamped, if the others form a stable arrangement and take the screw clamping force like an arch. <S> Be aware of that as a failure mechanism to look out for. <S> If you really want a one-wire-per-screw arrangement, then you could permanently wire a link along the 'backs' of several connectors, and use one wire each to the front. <A> I suppose the question is subjective to what the best is, but imho the accepted previously accepted answer is ridiculously expensive. <S> The latest accepted answer, screwing terminals, screwing wires under screw heads I've always found tedious to use. <S> And don't see much of a difference between those screw terminals and the screw terminals in the OP question <S> (I know my opinion belongs in a comment <S> but I don't have the points) <S> The simplest <S> thus I consider best answer is simple twist on Wire Nuts . <S> They come in all different sizes and are the cheapest and arguably the quickest solution for a "temporary setup" <A> But this doesn't seem like the best way to do it <S> - what should I be doing here? <S> The correct way is to terminal blocks. <S> These can often be linked with jumpers. <S> For example, these push-in variants from phoenix (no screws). <S> If these fancy terminal blocks are too expensive, which they often are, then normal screw ones can be used as well. <S> With twin ferrules for example. <S> Three in one clamp is generally avoided. <S> But for temporary setups it can work just fine. <S> For quick setups I can recommend these units (Wago 222), they support solid and stranded wire, and are easy to connect/disconnect. <S> Readily available at your local hardware shop, and not expensive. <A> You can get Terminal Blocks - Barrier Blocks that have screw terminals that allow 3 wires on one side, and then use a jumper to connect the 3 on the other side to connect to 1 wire <S> https://www.digikey.com/products/en/connectors-interconnects/terminal-blocks-barrier-blocks/368?k=terminal%20block <S> This one has 4 screws, shorted across the barrier, for example. <S> https://www.digikey.com/product-detail/en/molex/0387700104/WM5761-ND/362488 <S> You can also get jumpers to connect screws together. <S> https://www.digikey.com/products/en/connectors-interconnects/terminal-blocks-accessories-jumpers/385?k=barrier%20block%20jumper <S> Here's one example <A> If you want to do it properly: use ferrules. <S> You can twist the two wires together and put a twin wire ferrules over it, then place it in the screw terminal. <S> Do the same with the single wire and a regular ferrule on the other side of the screw terminal. <A> With the type of connector from the picture, you can usualy put two (more if the wires are small gauge and the connector is large enough) solid wires into the same hole. <S> You must twist them together. <S> Ferules are useful only on multi strand wires. <S> It's good put some solder on wires twisted together. <S> Waggo types are good only if all the wires have the same gauge. <S> Otherwise there is a risk the smallest one won't hold.
You can probably get by with just twisting the wires together and stuffing it in the screw terminal. It isn't the best way. Do not use them on solid monolithic wires.
Filtering brushed dc motor PWM noise from current sensor I'm trying to measure the current through some brushed DC motors ( midwest motion S22-346F-24V GP52-079 ) using a small custom USB current sensor based around the INA226 and FT-232H . The device works reliably during testing with a bench supply and it works reading motor current while low side sensing, but when the motors switch direction the device becomes a high-side sensor and the resulting 24 V PWM into IN+ and IN- creates 20 V noise spikes on the USB5V line, so the USB devices reset/shutdown. I've measured the PWM signal amplitude (24 V), frequency (~15 kHz), rise (94 ns) and fall (150 ns) times and I don't understand why noise spikes are being coupled into the DC bus. From what I understand this kind of coupling should occur if: the traces/wires are carrying high current trace length is long enough to act as an antenna Case #1 shouldn't happen because the INA226 is a high impedance voltage sensor, case #2 shouldn't happen because the sense resistor wire is only ~15cm, and the trace length on the pcb is only another few cm, which is much to short for the 15 kHz PWM, or even MHz range noise from the 94-150 ns rise and fall times. I'm looking for advice on: Any incorrect assumptions or mistakes in analysis How the noise is coupling into the DC power bus. Filters I can use to reduce the voltage spikes ( I've been considering a differential ferrite choke from Rs, or implementing something like this TI app note ) Attached are the schematics and block diagrams. I also created an imgur album with some 'scope readings <Q> I believe INA226 is not suitable for this kind of application. <S> See 6.1 in datasheet: "IN+ and IN– may have a differential voltage between –40 V and 40 V. <S> However, the voltage at these pins must not exceed the range –0.3 V to 40 V." <S> You have IN- connected to VBUS (also with –0.3 V to 40 V allowed range), which means you can have full negative voltage on VBUS. <S> I suggest replacing it with hall-effect sensor like TLI4970-D025T5 (rated to 18kHz) <S> UPDATE: <S> The motor inductance can produce high voltage spikes in both directions, far over the maximum rated voltage. <S> The ESD protection in the chip will try to bleed these to power lines, causing voltage spikes there. <S> See 7.4.2 in datasheet. <S> Introducing filters and zener TVS as datasheet suggests might help you, but using hall-effect sensor will completely isolate power line voltages from your circuit, which will coincidentally expand the range of suitable applications. <A> "the device becomes a high side sensor" then the sensor is in the wrong place. <S> On the power supply side of the bridge it will sense motor current equally well, and remain a low side sensor regardless of direction. <A> However, I found that by creating a filter inspired by "Nophead's inteference suppressor" from this question , the noise spikes on the DC bus lines are reduced enough that the INA226 was usable. <S> The filter uses 2 100uH <S> B82144F2104J000 inductors and an 1uF RDER72A105K2M1H03A capacitor. <S> The noise spikes were reduced from 20 Vpp lasting <S> ~2 uS to 2 Vpp lasting ~0.3 uS on the 5 V Vcc, and spikes of ~7 Vpp lasting ~20uS to 6Vpp lasting ~0.3 uS on the 3.3 V Vcc. <S> This is not ideal, but is still functional.
If anyone reads this before they start manufacturing a current sensor for an electric motor, definitely go with Maple's answer of using a hall effect sensor.
A question about inductive kick and the current voltage equation In the book The Art of Electronics the author writes the following when trying to explain the inductive kick: And then he mentions when the switch is opened abruptly, the inductor triesto keep current flowing and damages the switch if no flyback diode is used. And that differential equation formula shows that large peak in voltage. So far I understand his point. But the same logic applies when the switch is closed because dI/dt again can be large. It seems like something is missing here to differ between what happens to dI/dt in case of switch being closed comparing to the switch being opened. How can we have a more clear insight about this? Why theres is no large voltage in case of the switch is being closed? How can the difference between opening and closing be mathematically demonstrated? <Q> An open switch is an open circuit. <S> It enforces a rule: I = 0. <S> A closed switch is a short circuit between its terminals. <S> It enforces a rule: V = 0 (between the terminals). <S> You can see that these situations are fundamentally different. <S> One has a rule about current and the other has a rule about voltage. <S> (Of course nothing in life is ideal, neither the switch nor the inductor, so when you really open a switch in series with an inductor if you want to know the actual behavior, you must consider a more complex model than ideal devices. <S> Include the inter-winding capacitance of the inductor, and the arcing behavior of the switch in your model if you want to find out the actual voltage developed by the switch opening) <A> There is no difference. <S> For the exact same reasons (can't have infinite dI/dt ), you can't instantly change from no current to some current when you close the switch. <A> How can the difference between opening and closing be mathematically demonstrated? <S> For simplicity, assume that we have the following ideal series connected circuit elements: a constant voltage source with voltage \$V_S\$, a switch, and an inductor with inductance \$L\$. <S> If we assume the switch is open for time \$t \lt 0\$ and that the switch is closed at time \$t = 0\$, the voltage across the inductor is just (by KVL) $$v_L(t) = <S> V_S\,u(t)$$ <S> where \$u(t)\$ is the unit step function . <S> The current is then $$i_L(t <S> ) = \frac{1}{L}\int_0^td\tau\,V_S = <S> \frac{V_S}{L}t\,u(t)$$ which is a ramp function . <S> Now, instead, stipulate that the switch has been closed for some time before time \$t = 0\$ and that the initial inductor current is \$i_L(0-) = <S> I_0\$ when the switch opens at <S> time \$t = 0\$. <S> It follows that the inductor current is given by $$i_L(t <S> ) = \left(I_0 + <S> \frac{V_S}{L}t\right)\left(1 - u(t)\right)$$ <S> and so $$v_L(t <S> ) = L\frac{di_L}{dt} = <S> V_S\left(1 <S> - u(t)\right <S> ) - LI_0\delta(t)$$ <S> That is, the voltage across the inductor is \$V_S\$ for \$t\lt 0\$, zero for \$t\gt 0\$, and an impulse (infinitely large for infinitesimal time) at the time the switch opens.
When you close the switch it doesn't do anything to force an instant change in current in the wires that connect it, while when you open the switch it does force an instant change in current.
Automated test for pushing a pcb mounted mini push button We have a test that checks whether or a push button works or not, and as of now the test is done manually by hand. My question is how to do this automatically? We have considered using a solenoid to push the button but have some hesitations on whether this might damage the somewhat delicate button or the PCB itself. The button is similar to this but mounted perpendicular to the PCB. Some solutions I thought of: Using a small solenoid with a damper so it doesn't accelerate quite as aggressive Adding a spring between the button and the solenoid Using a small linear actuator Using a servmotor to actuate the button I would prefer if the "buttonpusher" would revert back when the power is removed so I am somewhat biased against using a linear actuator or the servomotor. <Q> Instead of using the actuator to push the button, arrange something with a limited force to push it, like a weight or a sprung lever. <S> Then use your solenoid to pull it back. <S> This allows you to use any solenoid that's powerful enough, but limit the force to your delicate device under test. <A> <A> You can also use an eccentric attachment (a crank) on a shaft of a regular rotational motor. <S> You'll have to ensure that it stops its rotation in a specific sector, but that is trivial to implement <A> If you only need to quickly press the button and then release you can use a voice-coil actuator that will return to rest with power off. <S> The easiest voice coil actuator to find is a BIG speaker and just glue a pin with a guide to the dome and make sure you do not leave DC current (series capacitor perhaps) running for long enough to overheat the voice-coil. <S> This will not be a compact (or very cheap) solution but it should be robust and reliable with near infinite operation capability. <A> Use a solenoid with a damper attached. <S> I'm not a mechanical engineer <S> but I think you can figure something using a door damper like the one in this video and a lever to scale the force needed.
Use a solenoid with a dashpot to slow it and a rubber tip to contact the button.
Method to determine angle of a rotating stage I am currently working on a project that requires the rotation of polarizers to very specific angles. It is necessary that we are able to determine what angle the polariser is currently at so that we can make the motor stop when it reaches the required angle. The motor is currently run by an arduino reading commands from matlab. I have been looking into optical encoders (with code wheel) and magnetic encoders, but I'm not sure of how to go about implementing them into my setup. I would also like to note that light has to pass through the object we are rotating so mounting an optical encoder disk without a hole in the center would not work. Would you have any suggestions for where to source optical encoder disks and encoders that might work for my setup? <Q> There are standard optical rotation stages that work as you suggest. <S> You can use them open-loop (relative motion via counting stepper motor steps once you have zero'd them) or attach an encoder to get closed-loop positioning. <S> An incremental encoder (the more common/less expensive type) must also be zero'd to find the absolute position, but may have better resolution than a stepper. <S> Absolute encoders tell you the actual angle, some of them can work down to nanometer resolutions on the scale. <S> Many incremental encoders include an index output that allows you to zero the stage without additional hardware. <S> But I suspect you only require a stepper motor and home switch. <S> The below one is from Thor Labs and includes a 2-phase stepper motor. <A> Look up something called a shaft encoder . <S> These things put out pulses as the shaft is turned. <S> The output is two signals in quadrature. <S> This makes it possible to determine direction. <S> A microcontroller can easily decode the quadrature signals to keep track of the current position. <S> Once you have position information, the rest is a control system to try to go to and maintain a particular position. <A> You would use some kind of index mark or mechanical end-stop to tell your controller when the polariser is at a certain point and use an incremental encoder to tell it how far it has moved from the indexed point. <S> Alternately you could use an absolute encoder if you have a simple 1:1 or 1:2 (maybe 2:1) ratio that will lock the polariser orientation to the motor if it is connected with gearing. <S> The index may be on the polarising filter that is rotated about the centre of the filter from the outer edge or it could even be an annular filter wheel or crescent that is rotated like shutter blade and the beam passes through it off centre. <S> If you have a direct drive you need a hollow motor or the annular filter. <S> EDIT: You could mount a polarizer into a ND filter rotator from Thor Labs for centre drive od encoder mounting. <S> Of if you want to rotate it from the outer edge you could replace the two circular polarisers in this unit from CineFade (very expensive) with your linear polariser a larger version of the unit in Spehro Pefhany's answer. <A> Interestingly enough, a linear polariser is itself a way of making an absolute encoder. <S> You can have two polarised opto sensors at 90 degrees into an ADC. <S> It will have an 180deg ambiguity to resolve, but that is (I think) irrelevant to polariser use. <S> I suggest looking at magnetic sensors by Renishaw - there are many kinds, and some fantastic resolution (622592 counts!). <S> This is an off-axis sensor. <S> It is a linear sensor, with a ring stripe magnet. <S> AMS makes sensor chips for this. <S> There are many kinds of incremental encoders like those, or alternatively you might be using a microstepper to rotate your polariser. <S> Incremental encoding requires a reference/index mark to set zero. <S> This could be very well done by polarisation. <S> Have two opto sensors with very slightly rotated polariser film in front of them going into a comparator. <S> At extinction, the slope is very high, and you will get an accurate index of the actual polarisation extinction angle . <S> So it would let you drop different polarisers in, and be calibrated with no mechanical referencing - purely off the extinction angle. <S> This technique has been used as an ultra fast (MHz), micro-radian, non contact, long distance angular measurement system, for measuring tiny tilts.
If you use an encoder you can use a hollow bore encoder or use some gearing to connect the encoder to your filter element, like the drive.
How can I tell if a complex relay is intermittently failing? I have some starting issues with my car which sometimes starts fitfully. It could be the fuel pump relay which looks like this: Or, it could be the fuel pump itself. For the purpose of this question I would like to know how to eliminate the relay as the source of the problem. Unfortunately, as I understand it, the inside of the relay is full of complex solder joints which age over time and it can be hard to tell whether the joints are good or not. What is the right strategy here to determine if the relay is sound? Can I put it in some kind of test harness, or is it feasible to just take apart the relay piece by piece and manually check each solder joint? <Q> Measure the actual resistance across contacts with a meter, when energised or not. <S> You should see either < 1 ohm (basically the same as you read with the meter leads shorted) or infinity. <S> If you see readings fluctuating in the low ohms, the contacts are damaged and it's time to change it. <S> If you power it from a bench supply, you can also check that the relay energises reliably from the specified voltage, if you can find the information. <A> The issue with the relay is most likely the switching contacts themselves. <S> If memory serves DC relays contacts have a shorter lifespan due to arcing when making and breaking contact. <S> I believe it is caused by DC is at a constant voltage. <S> AC on the other hand alternates between a maximum positive and a minimum negative with a point during the transition where the voltage is at zero occurring 60 times a second. <S> This zero crossing point stops the arcing. <A> Those terminal numbers are explained somewhat on wikipedia DIN_72552 15 goes to a switched positive supply <S> 31 to ground, 31b <S> through a switch to ground 87A <S> and 87B <S> are the outputs and should operate alternately (show +12V) according to the commands by the switch on 31b
You could make a a test rig using using switches and lamps, that should be sufficient to determine if the contacts are working, testing for correct behaviour could be harder unless you know what that is.
Wire wrapping - how to attach a breakout board without soldering headers? I intend to use wire wrapping for a project involving an Arduino, and a Time of Flight sensor ( https://learn.adafruit.com/adafruit-vl6180x-time-of-flight-micro-lidar-distance-sensor-breakout/overview ). The sensor comes on a separate, headerless board, and the recommended approach is to solder a header to the board. I would like to avoid soldering a header, if possible. My current thought would be to use a long pinned wire wrapping header, from underneath the breakout board, and wire wrap to it, but I am unsure if this approach will work correctly (I do not have the supplies to test it currently). Is there recommended, non-soldering approach to attaching a headerless breakout board, using wire wrapping? <Q> As I understand your question you are not opposed to using some kind of header pins, you just don't want to solder them to the breakout board. <S> It's difficult to get a good connection between the pin and the board without soldering, but a press fit pin might work for you. <S> The pin shown below is from Vero Technologies . <S> You can wrap on both the top and bottom of the pin. <S> The pin must very tightly in a plated-through hole, and I used to have a spring-loaded tool that would insert them. <A> Is there recommended, non-soldering approach to attaching a headerless breakout board, using wire wrapping? <S> For a board that doesn't move wire-wrapping is great, but for a board that does, it creates problems if you don't wirewrap properly. <S> You need to make sure wrap the wire properly or it will break from lack of strain relief: <S> The wires need at least 1 turn of insulation, preferably 2 or 3, why? <S> Because when you cut the insulation, you nick the wire (even with the tools) this creates a weak point and if it is moved it breaks at that point. <S> If the wire insulation is wrapped, this creates strain relief (essential to all cables) at that point. <S> Then you wire wrap the other end of the wire to another header to put in your board <S> , I've done this a few times. <S> Another way to do this would be to use 0.1" headers with a male and female end such as these which are available at every place that sells cheap Chinese stuff and electronic hobbyist suppliers: <A> I think this is the product you need: <S> You can find them here or here or search google for solderless headers.
If you don't want to use solder you can either wirewrap it, which has its drawbacks, or use a 0.1" header.
Adapter label and electricity consumption My surveilance cam label states 5==1A. I am not an electrician, but is it right to say that based on tha label, to compute for Power (watts) consumed by the device: 1A x 120 volts = 120 watts For electricity consumption: 120 watts x 24 hours = 2,880 watt-hrs per day 2,880 watt-hrs per day / 1000 = 2.88 kwh per day 2.88 kwh per day x 31 days = 89.28 kwh per month 89.28 kwh per month x $.10 per kwh = $8.928 per month Does that mean that I am spending $8.92 per month for a small camera? Thanks <Q> with a double equals sign. <S> Your monthly cost is pocket change. <A> If your device (or adapter) states "5V=1A", then the device likely consumes 5 W of power, no more. <S> These devices usually are supplied with AC-DC wall adapters. <S> These adapters are NOT linear voltage dividers, they convert input power into output power, almost like an old magnetic-based transformer, just do it a bit differently. <S> And they do this transformation with about 80% efficiency. <S> Therefore if your load (webcam) uses 5 W, the AC-DC adapter will use 5/0.8 = <S> 6.25 W at input. <S> If the "primary AC-side" is 120 V, the whole setup will consume about 50-55 mA of current (6.25W/120V), not 1A as you suspect. <S> Therefore you will be paying about 1/20 of your calculated $9/month, or just 45c per month. <A> Extremely unlikely. <S> Is it possible that it actually says "5V 1A" or similar? <S> That would mean that the cam requires a supply of 5V that can supply 1A (but probably the cam uses nothing like that on average). <S> in other words - it would be a spec for what the supply should be capable of, rather than of the actual usage (which is often not stated). <S> 120W would be a crazy amount of power for a web cam. <S> If you really want to know, you can buy fairly inexpensive ($20 or so) power meters that will measure actual power for you.
Your camera must be supplied with 5V dc at a maximum current of 1A, so it consumes a maximum of 5W. I think you are confusing the symbol for dc current (from electrical-symbols.com ):
How many times can an IC be desoldered and resoldered? For a long time now, I had a fear, that when you solder a SMD IC to a PCB, that you won't be able to desolder and resolder it again without destroying it. Recently, I did just that, but it didnt damage the chip, so I feel a bit better. I used a hot air gun at my college. I did it because not all pins were soldered proper before. Q: What is the rule of thumb, how many times can I desolder and again solder the chip, to save the cost on testing? Can it be infinite or will it start producing magic smoke after a while? <Q> The rule of thumb is 'assume a chip you've desoldered from a board is damaged, until you've proved otherwise'. <S> In other words, don't solder an SMD IC down to test it. <S> There's a significant difference between automated SMD soldering, in a temperature controlled oven with a calibrated warm-up and cool-down profile, and eye-balling the melting of solder with a hot-air gun. <S> With the latter, it's so easy to get it a few 10s of degrees too hot, or dwell there for a few seconds too long. <S> The junctions made in an IC, often by thermal diffusion, can also be unmade by over-diffusion. <S> The damage an IC gets from over-temperature is cummulative. <S> The amount of damage an IC gets is also exponentially related to the temperature. <S> Whether it 'works' is a poor indicator of how much damage you've done after one solder/desolder cycle. <S> If you instead measure the input leakage current, power supply quiescent current, noise level, gains before and after the thermal abuse, then you'll have an idea of how much shift in parameters that cycle caused, and how many more cycles it can tolerate before the parameter shifts amount to 'not working'. <A> This is about a socketed part instead of soldered, but here is one data point from the datasheet of the famous Signetics 25120 Write Only Memory: <A> I think this is an interesting question. <S> Let us assume that you do not physically damage the chip in the process during the desoldering process. <S> Let us also assume that this is not a device that has BGA balls mounted on it that would be lost when you desolder it, and be hard to replace. <S> The only thing I can imagine resulting in damage and limiting the amount of times you can solder <S> /desolder a part is the impact of the heat on the junctions. <S> The junctions within your chip are built with dopants that form P and N doped areas (and within those areas we still have different gradients). <S> There are also metal-semiconductor junctions with barrier layers in between. <S> These dopants slowly move do to diffusion - even at room temperature. <S> But the rate at which they move increases exponential, making it hotter makes them move faster. <S> The only thing I can imagine limiting the amount of resoldering is the constant heating impacting this diffusion. <S> Especially in the front-end (which is what IC manufacturers use to refer to all the interconnect structures) this might be an issue, if e.g. copper from interconnects can start breaking through barriers again and again and cause issues. <S> However, I think the time it will take before this becomes an issue will be quite large, especially if you are using hot-air soldering, and thus you could say that you can indeed re-solder an infinite amount of times. <S> Note that if you want to do this to reuse a chip during prototyping or such, there are special sockets for pretty much all packages that allow you to connect a chip without soldering (ZIF sockets). <S> They are generally not cheap at all, but they will be a lot cheaper than say ruining a very expensive chip, or even cheaper than the time it might take to try and safely desolder the chip and put it on another board. <S> I have seen them used for verifying silicon prototypes where you can't go out and buy more chips because they 20 dies are all that exist. <A> If you read a good datasheet carefully, you will detect something like temperature mission profile . <S> It list the estimated life-time until a failure occurs. <S> E.g. 50 <S> ° <S> C ... 10^7 hours 100 <S> °C ... 10^4 hours ... <S> etc. <S> That means, the supplier guarantees a life-time when the device operates max. <S> 10^7 hours with temperature lower than 50°C, 10^4 hours < 100°C. <S> .. <S> Also a soldering profile should be given, which looks like this one: <S> The underlying physics is the reaction kinematics of Arrhenius (believe it or believe it not): $$k = <S> A <S> \cdot \mathrm{e}^{-\frac{E_\mathrm{A}}{R \cdot T}}\, .$$ <S> The more often you heat up your device, the more you strain the device, until it fails. <S> What happens, for instance: <S> probability that atoms displace is higher for increased temperature! - <S> > results in a change of doping profiles, change in threshold voltage of mos transistors, etc.. electromigration , damage of metal layer <S> A temperature mission profile strongly dependens on the semiconductor process (design rules, type of circuit, how it is layouted, ...). <S> In order to answer your question, how often you can solder/desolder a device depends therefore on the time and heat during the soldering, and on the device itself.
It's impossible to give you a figure for how many times you can heat it to above its (often recommended) 150C limit, without being very precise about the temperature.
What kind of capacitor blew up in my old IBM monitor? I pulled this out of an old IBM 5154 EGA monitor from the 80's. Clearly both are bad (though the monitor itself works anyway...). I know they're capacitors, but what kind? What would a replacement for these be? I'm also curious about why the monitor would work despite two out of two of these things being in such terrible shape. Edit : here is a picture of the top <Q> What you have there are metallized impregnated paper capacitors made by KEMET. <S> Here is a datasheet of the parts . <S> The most important thing you have to look for is the capacity rating which should be on the top of the capacitors, which we can't see in your picture (see page 9 of the datasheet). <S> With the added information, I'd say this is your replacement part: PME271MD6100MR30 <S> This is a X1 rated capacitor, but X1 > X2 in terms of safety, so it should be fine. <S> Actually - scrap <S> that, Mouser links to the wrong datasheet. <S> Make sure to measure the distance between the legs, this one has 22.5mm which seemed to be the spacing on the old ones based on the information of the datasheet, but better measure that. <S> For a spacing of 20.3 mm, the PME271M610MR30 sounds right. <A> It's a line filter capacitor, an X2. <S> That series has a reputation for failure after a number of years and you can find other pictures like yours on the internet. <S> The dielectric is paper soaked with epoxy and the failure is probably due to the epoxy ageing and cracking. <S> Because they always fail open (I think) <S> the monitor will still work. <S> I think that part is still being made. <S> If not, there are lots of equivalent replacements. <S> Look for 0.1 uF, type X2 with the same lead spacing. <S> Better yet <S> , replace it with an X1 if one will fit. <A> They are bidirection line noise suppression caps are designated as X caps across line and Y caps to ground. <S> It must attenuate (filter) lightning transients from outside and SMPS noise going out. <S> These are the typical values you can copy but must be X caps line rated on left (C1, C2) or Y cap rated on right (C3, C4). <S> Look under Plastic Film Caps. <S> Most likely 470nF <S> >= <S> 3kV rated X caps Blimey, you must have had a lightning surge greater than the rating. <S> Dont leave it plugged in during a storm and replace with better quality caps. <S> Are you near Florida? <A> It is important that they be replaced with one of the same or better safety and voltage rating. <S> The monitor would indeed still work, but its rejection of mains-born transients and noise would be compromised. <A> KEMET <S> The PME271M is constructed of multilayer metallized paper encapsulated and impregnated in self-extinguishing material meeting the requirements of UL 94 V–0. <S> Here’s the datasheet <A> RIFA PME271m 40/085/56Looks <S> like it's availabe on ebay and mouser , however, do note that there are no markings visible indicating the capacity, you need to figure that out somehow. <S> Id's suggest taking a look at the board <S> it came out of, if you can determine how it is marked on the board, you should be able to find out exactly what model it is. <A> I searched up "PME271M"(which was a marking on the capacitors shown in the photo) in google and found that it is a "metallized paper capacitor". <S> Here is the datasheet. <S> You can buy replacements here . <S> As for your second question, you can conclude that the functioning of these components is non-crucial to the functioning of the monitor. <S> Most likely it is for filtering some signal in the monitor, though I am not completely sure.
They look like mains filter capacitors, and if that is the case there is probably a designation on them somewhere like "X3", which is a safety rating. PME271M, Metallized Impregnated Paper
Running 12V PC Fan with 9V Battery i got an old PC fan which according to its label runs at 12V drawing 0.14Amps. I would like to run this with a 9V Battery so that it doesnt go too fast.Does this make sense? How long would the fan run approximately with a typical 9V PP3 sized battery? edit: another question is, how much amp will the fan draw when powered with 9V ? <Q> Yes, you can do it, but the battery won't last very long. <S> It will probably run at about 3/4 the speed and draw about 3/4 the current (rough estimate) so around 100mA. <S> Looking at a typical datasheet for an alkaline 9V battery, we can see the capacity will be perhaps 350mAh (down to 4.8V) <S> so it might work for 3-5 hours, as the current will drop as the battery discharges. <A> Unless the fan stalls due to Hall Effect position error in start position but starts with slight nudge, the fan current always decreases when V+ reduces to 3/4 voltage since less work is done and internal fan drivers are fairly efficient. <S> Since 9V Alkaline 6LR61 cell has 5Wh capacity at 20h and 3~4Wh in 5h - and <S> 12V 0.15A fan draws 1.8W with a fresh cell, power consumption will be less than 1.8 but more than 50%. <S> I estimate 60% or 1.1W (from past fan DVT design validation tests.). <S> Therefore nominal run time will be expected to exceed 3~4Wh/1.1=~3~4 hours with declining RPM extending time at lower mA draw in exponential decay down to 4V <S> then rapidly cutout and stop RPM declines with Vbat and stall Voltage <S> has hysteresis around 25% depending on bearing stiction from wear out. <S> If not using “top Brand quality” Alkaline, your results will be worse. <A> The answer is that it will probably run, but ypu won't know until you try it. <S> It is unlikely to cause it damage if it doesn't.
If you were to step up the battery voltage so it was 9V continously, the operating time would probably be less than 3 hours.
Get 1,5U voltage on the transformer I have a transformer with a midpoint that gives a voltage of 1U at the ends of its secondary winding. Can I, using only capacitors and diodes get a DC voltage of about 1.5U (but less than 2U)? If so, then how? <Q> The peak voltage from a voltage source \$U\$ is given by \$ <S> \sqrt 2 U \$ <S> = 1.414U (which is close to your 1.5U requirement). <S> To keep the voltage up full-wave rectification and a large capacitor value will be required. <A> I think you might have a chance of making a voltage doubler circuit work. <S> At such a low voltage it might be necessary to use Schottky diodes rather than regular silicon diodes <S> so you don't lose half of your voltage across the diode. <A> Transistor is entierly right, if we interpret your question literally. <S> Now, I'll assume your question is a bit loosely formulated and you actually meant "Get a DC voltage that would approximately be the same as the result of a full-wave rectification from a transormer with 1.5U voltage output." <S> So, in essence, you want to get about 1.5U <S> * 1.414. <S> I'm assuming this because otherwise, the question seems suspiciously simple, and because the resulting circuit is interesting: <S> Basically, it is a mix between a regular rectifier and some kind of Cockcroft-Walton voltage multipler. <S> The ground is taken between D2 and D4, like you would for a regular rectification. <S> Then, we use the transformer center tap to feed two capacitors (C2 and C3) through two diodes (D5 and D6). <S> The center tap is at about 0.5U voltage. <S> When a transformer rail (e.g. the top one) goes to 0V, the capacitor (C2) charges to 0.5U through D5, then the xfmr rail goes to 1U voltage <S> (so that gives a 1.5U voltage at the other end of the cap). <S> This 1.5U voltage goes to the output through D1. <S> Same for the other rail, but out-of-phase, so you get full wave rectification. <S> Pick <S> whatever diodes you'd typically choose for a diode bridge (check the ratings), and dimension the three capacitors with the value you would put for a regular AC rectifer smoothing cap (considering the current you'll need and the ripple you can accept). <S> Here is the result with a 24V transformer and a 1kOhm load. <S> Total input voltage is green, output is blue:
There are several possible voltage doubler circuits that use only diodes and capacitors, and the one you want might be determined by the amount of current you need and how much ripple you can tolerate.
Keeping SMD parts in place while soldering with paste and heat I was very happy to learn that I could solder SMD parts in place, by dabbing dots of solder paste on all the pads, placing my parts, and heating. I've done it using a modified toaster oven, or alternately hot air (from a re-work station). I learned about doing things this way from answers to a similar question I posted years back , when I was still soldering parts one by one with an iron. But I still must be doing something wrong because much too often, parts sized 805 or lower tend to lift upright on one pad, skew themselves to some unacceptable angle, or in some cases literally jump completely off their place. Sadly, when I wrote to the manufacturer of my paste, all they suggested was that I use a stencil to apply my paste more evenly. In other words, they blew off my question. (By the way, I've been using Chip Quick syringes, SMD291AX.) <Q> they suggested was that I use a stencil to apply my paste more evenly. <S> In other words, they blew off my question. <S> No, they didn't. <S> They gave you correct advice. <S> If you have a lot of solder on one pad and little on another, then the surface tension of the large blob can lever up the part. <S> It is very unusual for this to happen with parts as large as 0805. <S> It's a common and well-known problem for 0204. <S> The phenomenon is called tombstoning . <S> Use that as a search term, and you'll find lots of information. <S> Larger blobs exert more tombstoning force due to surface tension. <S> A stencil is useful for this. <S> Evenly heat the board. <S> If everything melts at the same time, all the forces balance out. <S> In particular, don't put more copper under the device than required by error tolerance, and don't make the pads wider than necessary. <S> Since you are seeing this problem on parts as large as 0805, you probably need to fix all the above issues. <S> Added in response to comments <S> I don't see how a stencil guarantees I'm not mounding up to[o] <S> much paste. <S> Then you need to read up on what stencils are and how they work. <S> The stencil has holes where paste should be applied. <S> The paste is applied over the whole stencil, then excess paste scraped off the top of the stencil. <S> That mean the paste on each pad is limited by the thickness of the stencil. <S> The thickness of the stencil defines the thickness of the paste layer that is left after the stencil is removed. <S> It doesn't take much paste for a good solder joint. <S> After all, there should only be a thin layer of solder between the pin of a part and the pad that pin sits on. <S> When looking at a good solder joint with a jeweler's loupe or microscope, you should see a small meniscus at the edges of the pins. <S> That is evidence that everything was wetted properly and that the solder flowed properly. <S> More solder than <S> that does nothing useful. <S> Hand applications of paste tend to result in way more solder than necessary. <A> Chances are you're using way too much paste or your pad dimensions are way off the optimal or IPC standard dimensions. <S> I've seen tombstoning on 0402s <S> but if you're seeing it on 0805s you're doing something very, very wrong, either in the pad shape and dimensions. <S> If you have a photo of the parts before and after soldering, a more specific answer might be possible. <A> I wouldn't know how to determine, nor easily modify the thermal mass of my contacts. <S> Other then specifying the copper thickness when I have a board made <S> That is not the only part. <S> An important factor is the 'connecting' copper. <S> Especially for wide power tracks the heat distribution can be different if one pad has a thick copper trace going to it and the other does not. <S> Below are some examples I made: A is correct. <S> R7 has two tracks both of the same thickness. <S> R6 has two much thicker tracks but they are again the same on both sides. <S> B is not incorrect. <S> R7 has two tracks on the right hand side but one on the left hand side. <S> I found you often can get away with that <S> but R7 in A is obviously better. <S> R6 is wrong. <S> A wide track on one side and a narrow track on the other side. <S> C is definitely incorrect. <S> R7 has totally unbalanced copper and tombstoning is likely. <S> I am still not sure about the amount heat path of a via going to a plane. <S> There are two examples below with the connections as I would like to have them, but I have no idea how (un)balanced the heat paths are. <A> A stencil (plus hot air) does not guarantee no tombstoneing but it helps a lot. <S> You still have to examine the board with a low-powered binocular microscope...unless the board has a low parts count. <S> Even then you should at least use a loupe or something similar. <S> If you are hand soldering the parts one at a time I suggest you give up on the paste and use low-diameter wire solder. <S> Put a small dab on one side, put the part down with a tweezers and hold it while you melt the solder. <S> Then solder the other side. <S> Use no more solder than you have to. <S> Too much solder makes ceramic caps vulnerable to cracking due to board flexing. <S> The cracks are difficult to impossible to see. <S> Probably not an issue for smallish boards. <S> Use some sort of fine tip iron. <S> I have put down a lot of parts this way. <S> Hope this helps.
The things you need to do to avoid tombstoning are: Use just enough paste to result in a good solder connection, but no more. Design the pads properly.
Startup problem in boost converter The figure below is a diagram of a voltage-mode controlled boost converter. I am wondering how experts solve the start-up problem for this converter. Problem: Assume the output voltage is zero at the beginning. Then from the control loop the output of the comparator will be high. This means the inductor is charged. However, there is no energy transferred to the output so the output will remain at zero forever and the inductor is charged forever. So how do you solve this problem? <Q> You can see there's a "Vramp" in there. <S> This creates a timing element. <S> If the Vramp is above the first op-amp's signal, the transistor will be off. <S> So if you know, for example, that your error amplifier (the first op-amp) can never output a voltage higher than 3V, you can make the Vramp such that it goes between 0V and 4V, which guarantees that whenever it's above 3V the transistor is always off. <S> In this case that would be a minimum off-time of 25%. <A> In addition to the other suggestion, use soft start. <S> The reference voltage must slowly ramp up to its final value. <S> This way you kind of avoid the start conditions, because you follow the reference rather than jump from somewhere to it. <A> By the way, you have a control circuit, and they usually require tuning. <S> So you need variable gain for the error amplifier, but also you may want to use integrator to have PI controller. <S> Disclaimer: i didn't check whether the gains are all positive or negative.
You may need to invert things.
Replace Potentiometer With Arduino Controlled Circuit Background: I recently bought a Scr Voltage Regulator (10000w Ac110v 220v 75a) to act as a motor controller for a hobby project ( Figure 1 ). After taking it apart, I found the Voltage Regulator is controlled by a 220k Ohm 2W Potentiometer ( Figure 2 ). Figure 1: SCR Voltage Regulator Figure 2: 220 K ohm 2W Potentiometer Question: I'd like to replace the mechanical Potentiometer with a component I can control with a microcontroller. I found the ADN2850 However, this seems like it can only support 1 W. Is there another type of chip on the market I should be looking at? OR How would I build a circuit that allows me to use a smaller control current to regulate the speed regulator? <Q> You can't do this easily and should not attempt it . <S> You could easily hurt yourself or damage your computer. <S> You need a power controller with a DC voltage input that is isolated from the mains. <S> It's far easier to design something like that from scratch than to try to retrofit to a non-isolated phase control. <S> That pot, for example, will be subject to hundreds of volts in operation, far beyond what any digital pot can withstand. <S> If you connect your Arduino directly to a non-isolated circuit there's a good chance it will be sitting at 120VAC relative to ground and could electrocute you or blow your PC's motherboard to smithereens via the USB programming port. <A> Not possible <S> Totally incompatible interface <S> VI ranges for a digital low voltage DC pot to a high voltage and power pot for AC biasing 240Vrms SCR phase trigger. <S> (not even close) <S> How would I build a circuit that allows me to use a smaller control current to regulate the speed regulator <S> Buy a proper pot or PWM controlled full bridge FET driver and supply rated for >5x max load current to handle <S> start/stop controlled acceleration surge current $$$ or cheaper maybe to reduce input voltage with a transformer to reduce speed. <S> 10kW and 10hp motor has high energy storage than must be regulated efficiently. <S> The most effective means is to buy a VCD motor driver. <S> With constant V/f speed control with high torque current. <S> However what might be possible with design experience is to use a high current phase controlled current pulse and Pulse Transformer from a driver that can generate such a high current (<1A?) <S> pulse and be immune to interference. <S> But this becomes like a PWM current control to the motor which weakens torque at low RPM from low duty cycles. <S> This is very sub-optimal for many applications. <S> But unless the entire energy, torque, line f , RPM and reaction times are stated in a design, there will be many issues. <A> The easy way would be to replace the potentiometer with a motorized pot , and then control the pot with the arduino, being careful to separate the power of the arduino and your SCR. <S> The real easy way would be to buy the controller you need. <A> Replacing the pot in your existing unit (assuming it does what you want when used manually, is full of hazards. <S> The likelihood is that the pot is at a mains voltage (deadly), so interfacing this to a low voltage MCU as a remote activation provider would be difficult. <S> You might consider using something like this servoblock which would be easy to fit to your existing pot shaft: <S> Most RC servos have an output radial capability of 180deg, which would give most of the coverage of the pot (likely 270deg). <S> It would then be simple to drive the RC servo from an MCU giving you remote control of the unit.
If this is hobby related and not a professional unit, then I'd suggest you could build your own motorized input to the existing pot very cheaply.