source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
USB Charge and Data Transfer I would like to design a PCB in order to charge a smartphone (1.5 Amps) and in parallel pass through data to a smartphone from an external PCB. This is applied to CDP specifications. I think that the best way it's to provide the appropriate power in the USB port through the Vbus and the smartphone will take the power that it needs. Do I have to use the data buses also or can I charge the phone only through the Vbus in order not to interrupt the pass through mode? <Q> CDP requires active switching on the data pins. <S> First you initiate high current charging with the right signal on the data pins, then you switch the data pins to the usb transceiver that's handling the data. <S> You cannot initiate it simply by providing the right voltage and current on Vusb. <S> See Maxim's explanation of the usb charging standards and their single IC solution for switching of CDP standards https://www.maximintegrated.com/en/app-notes/index.mvp/id/5801 <A> A direct answer to this question is yes, you must use data lines" upon first connect to the port. <S> A "a smartphone" won't "take the power that it needs" unless it sees a " port charging signature " that it can (is designed to) recognize. <S> Since we have no idea which signatures your phone does recognize, no practical answer can be given; some signatures are incompatible with USB signaling protocol. <S> If no recognizable signature is detected by the phone, it will take only 500mA, or 900 mA if both ports are USB 3.0 capable. <S> For more details, see references in the answer by Passerby . <S> As a side note, the concept of "CDP" is/was a part of so-called USB Battery Charging specifications, now BC1.2. <S> These specifications were a flop, and only few manufacturer's made it to the market. <S> Although the backward compatibility can be still traced across USB 3.0, 3.1, and USB Type-C specifications, you will be hard pressed to find a BC1.2 compliant device or host, maybe some DELL docking stations. <S> Current mainstream is USB Power Delivery, and Type-C basic identification protocol, but most chargers have a simple "Chinese" signature with D+ and D- shorted. <S> ADDITION: If you want to convert a SDP (standard port on an ordinary PC) to CDP (charging data port), you can look at Maxim offerings (as well as Cypress, Microchip, Texas Instruments, NXP, etc), and add the necessary electronics to the port, and put all this stuff into an adapter. <S> However, proper functionality might not be achievable without interaction of the host software with new charging electronics over some GPIO/I2C channel. <S> ADDITION2: <S> negotiations. <S> The USB 3.0 signals should be left alone. <A> You are assuming that a USB Host will pull current beyond the USB specified 500mA limit with out negotiating for it over the data lines. <S> This is not supposed to occur. <S> That said, there are various schemes used by major companies which allow for high current charging. <S> These schemes usually assume the data lines are not being used and place a "weakly driven" voltage on the D+ and D- lines. <S> However, in your project, you are using the data lines for communications by a 3rd device. <S> So neither of the above two ways to draw more than 500mA from the USB Host should work.
No, USB 3.0 Rx and Tx pairs are not a part of any signature or BC1.2/QuickCharge/etc.
12V input on microcontroller pin I'm trying to count pulses/sec. on a microcontroller pin in the ~5 to 100Hz range. The µC can operate at 5V input, so I have to get the voltage level down safely. A simple resistor comes to mind, yet that leaves any surges open directly to the µC pin - meh . I've come across this answer, but the question remains if that circuit is capable of "fast" 100Hz changes. Is there a proven, reliable way (by means of an IC maybe?) of contacting 5V or 3.3V pins to "dirty" 12V inputs?I have the 12V and 5V available to drive any "ready made" IC. <Q> I would try a resistor divider solution like shown below. <S> Select the resistor ratio so that the divided voltage is at the proper level for the MCU when the input is at its nominal voltage. <S> The zener diode voltage is selected to clamp the MCU input when the input goes above the max input. <S> The zener will also protect the MCU if the input happens to go negative. <S> This solution will work great for the relatively low frequency range that you have specified. <A> Use a circuit like this: simulate this circuit – Schematic created using CircuitLab R1 and R2 determine the voltage range, and perform the initial division. <S> These resistors must be capable of some power. <S> Typical is MELF 0.4W. <S> All other can be chip resistors/capacitor. <S> R3 prevents any surges to cause harm to the schmitt trigger. <S> R4 an R5 are optional to prevent any floating signals. <S> However, the combination R3/R4 can also be used to adjust the threshold, if necessary. <S> C1 and C2 determine the maximum speed. <S> Combination R3/C2 can filter slow. <S> C1 filters transients. <S> A separate schmitt trigger is used since you can get them really small and cheap. <S> And it prevents routing a weak signal over long traces. <S> Whilst also being a sacrificial part on major surges. <S> I've designed this circuit based on what I have seen inside PLC's. <S> Above circuit is for 24V. Adjust resistors to match 12V according to IEC61131-2. <S> The concept of the standard is to ensure the input has to sink a minimum amount of current before considering it a '1'. <S> The three types specify how much, and are applied based on environmental noise. <S> This prevents glitches from touching it or nearby relays. <S> The drawback is that R1/2 have to be of decent power rating and low resistance. <A> I would use a resistor divider and then protect the uC with a 5.1v Zener <S> If you put the zener between the pin and ground in parallel with, say, a 10k pull down resistor, then feed your voltage divided signal in then... <S> zener is more than fast enough, and cheap / easy. <S> I often do this and divide the signal before the zener bit with a pot. <S> Other option is as linked, if your really worried an opto could be used, if its not a safety issue I would go with the above or have the pin normally high from 5V Vcc and pull it low with a fet (off top of my head 2N7000 should work) - but its less simple than the zener option. <A> If the signal levels are GND and 12V (or >5V), the most simple and 100% safe way is this: simulate this circuit – <S> Schematic created using CircuitLab <S> If it really serves your purpose depends on the actual impedance of the 12V signal (should be way below R1) and <S> what you mean by "dirty". <S> Also, as @MichaelKaras correctly points out, the low level on the µC's input may be shifted up to the low level of the 12V signal plus Vf of the diode (up to about 0.7V). <S> You should check if this is a problem in your case or not. <S> If it is, you can still try and use a Schottky diode with a Vf of about 0.35V. <A> I'd use an opto-isolator, 100Hz is easily within the range of any decent one. <S> 4n25 springs to mind as a common part number, <S> and I know that's capable of much better than 100Hz. <A> The method selected partially depends on what the input signal does, how it behaves and how that might effect the input circuit and the code that reads it? <S> e.g. Is it always 12V? <S> Does it have spikes or noise? <S> How much current can it drive? <S> Can current be driven into it? <S> Will taking current from it affect anything else? <S> Is it safety critical?.... <S> Because of this there can never be a universal answer to this question as the 'correct' solution depends on what the rest of the system does. <S> The chosen solution that meets the requirements will have differing cost and complexity. <S> That said, as nobody else has yet suggested it, I'll go for a FET input. <S> A JFET or MOSFET can be used and either could be common source or common drain modes. <S> For example, common drain: simulate this circuit – Schematic created using CircuitLab <S> The advantage of the common drain mode is that it allows the input to be connected to both an analogue (e.g. ADC) or a digital pin. <S> Advantages <S> Very high input impedance <S> Partially isolated input (can withstand +/- <S> 30V, depending on FET selection) <S> Analogue possible <S> Minimal effect on external signal <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Opto-isolated interface. <S> Use internal pull-up on GPIO. <S> An opto-isolator solves several problems. <S> Complete electrical isolation between the 12 V circuit and the 5 V logic. <S> Handles dirty 12 V signal without risk. <S> Simplicity. <A> simulate this circuit – Schematic created using CircuitLab R1, R2 and C1 forms a voltage divider with a 1kHz low pass filter. <S> Any unwanted high frequency signal travelling on the 12V can be filter away. <S> The calculation for the filter frequency is 1/(2 pi R2 C1). <S> Note: The Base requires at least 0.7V to function properly, take care when adjusting the resistor. <S> BJT is being use because it's very common compare to mosfet. <S> For uC programming, use a high to low trigger to count your pulse. <S> As this circuit will reverse the pulse.
If the signal is truly digital I would enable the schmitt trigger on the CPU input (if it has one), or add an external schmitt buffer to the CPU's input pin. In the event the 12V is still active but the 5V for your uC is down, the BJT will not pass current into the pin and cause damage.
How to reduce sensitivity of a Hall Effect Sensor? In a mechanism with strong magnets, I want to use a Hall Effect Sensor to get the position of the magnets. The sensor move between two magnets in inverse polarity, so the field is minimum in on side, Zero in the middle and maximum in the other side. Hall Effect Sensor Searching on internet, Hall Effect Sensors goes from around -0.07 to + 0.07T, but that is too sensitive and the sensor is saturated most of the time (0V or 5V). (I made tests with the Honeywell SS495A.) How could I reduce the sensitivity of the Hall Effect Sensor to record stronger magnetic fields? Note: Because of the design of the device, it is not easy to move the sensor further away of the magnets. <Q> How could I reduce the sensitivity of the Hall Effect Sensor to record stronger magnetic fields? <S> Use a small piece of iron to bridge <S> betweeen the magnet poles - this will reduce the flux density seen by the Hall sensor. <S> It can be placed close to the magnets or close to the sensor. <S> A little bit of experimentation will be required. <A> As an alternative idea to shunting the flux, you can try to turn the sensor 90 degrees in the YZ plane, thus vertical to the flux on the middle. <S> This way the sensation pattern will be inverted, the more sparsed middle flux will be the maximum. <S> One glitch is that it will be unipolar, on a memoryless system you can't determine you on which magnet's side are. <S> So, either you will use only half of the distance or if you use MCU, you will computationally track on which side the sensor is. <A> pre saturation which actually changes the magnetic field the sensor encounters. <S> So for example you can use a small neodymium magnet on the backside of your hall sensor. <S> Depending on which way you flip the magnet it will either reduce or increase the hall sensor sensitivity. <S> The distance to the hall sensor will determine the strength of this effect. <S> Below you can see how the hall senor on the right is now sandwiched between both magnets. <S> The sensor on the left is not done yet. <S> I used a 3d printer to print a custom standoff and it allows me to precisely time my hall sensor sensitivity in a bldc motor.
Hall sensors "sensitivity" can be adjusted by with a flux concentrator /
Best practices for running ICs with 12V vs 5V rails I'm working on a circuit that needs 12V to trigger high-power LEDs (via a Power FET). However, to accomplish this, I also need a variety of ICs; right now I have a TC4427 for driving the FET's gate, a 556 for one-shot pulse generation, and a ATtiny84 to trigger the 556. The FET Driver and 556 can both run off a VCC as high as 12V; only the microcontroller requires a voltage as low as 5V. Right now my plan is to power the driver and pulse generator with a 12 volt VCC (with 0.1uF film + 4.7uF electrolytic bypass caps), and use a small 200-300 mA switching regulator like an ADP1111 to provide a small 5V rail for the microcontroller. Is this good practice? I only expect the FET / LED to be powered on ~1% of the time, 5% maximum; I presume this means that the 556 and TC4427 should have very low power draw most of the time. My other options: Use a linear regulator like a 7805. I'm concerned the FET Driver will need enough current at 5V that the regulator will get quite hot. Use a beefier buck converter than the ADP1111 to provide a 5V / 1-2A rail. I'm trying to avoid SMD parts at the moment, but this is an acceptable solution. I'm a bit new to figuring out good power management, and would appreciate any advice as to how to best practices for dealing with ICs that can accept a variety of supply voltages. <Q> To save troubles with things like high-current loops, inductors etc, I would recommend "linear replacements" like RECOM or Murata modules . <S> These modules are not cheap, but will save you a lot of efforts. <S> eBay can also help if the budget is really tight. <A> No offense intended, but your proposed circuit sounds very convoluted <S> so I don't think I would ascribe 'best practice' to it. <S> That is all that is required. <A> simulate this circuit – Schematic created using CircuitLab <S> The ATtiny84 needs only about 2mA at several MHz, and it works with any supply voltage from 1.8V to 5V. <S> You can even use a simple two-resistor voltage divider to power that thing from 12V. <S> If your FET driver is designed correctly, it will draw no power at all from the 5V rail, just sink it. <S> Uh, and why do you have a NE556 impulse former? <S> Don't you trust your programming skills?
The best practice to deal with mixed power rails like this project is to leave the high-voltage (12V) for LEDs, and feed every IC from 3.3 or 5V using switching DC-DC converter. If you are going to use an ATtiny84, use one of the four built in PWM channels to drive a logic level FET to control the LEDs.
Can someone explain the protection resistor in this current limiter? I am looking at this current limiting circuit on Wikipedia , which says that The optional component R2 protects Q2 in the event of a short-circuited load. Can someone explain why Q2 needs protection in this condition? My understanding is that when Rload is shorted, the base of Q2 will see a voltage of Vcc, minus Vce of Q1 (because Q1 is in saturation, due to R1). Assuming that's above Vbe (of Q2), current will flow, but immediately cause Q2 to sink current from the base of Q1 - cutting it off. Is the purpose of R2 to protect against this initial surge then? Does R2 not affect the operation of the circuit? (As it forms a voltage divider with the base of Q2 - where the voltage is sensed) Or is it assumed that Q2 Ib is so small, that the voltage drop is negligible? <Q> Both of your thoughts are correct. <S> "Is the purpose of R2 to protect against this initial surge then?" <S> Yes. <S> The base-emitter junction is essentially a diode, so without a current limiting resistor extremely large currents can flow (until failure.) <S> It would basically short the Vcc supply to ground through the transistor. <S> This is very likely to destroy Q2 before Q1 is choked off depending on the available current. <S> At the least(or <S> worst depending on how you look at it), it would be really bad for Q2 degrading its life leading to its failure later. <S> "Does R2 not affect the operation of the circuit?" <S> Yes. <S> This is not a bad thing. <S> If you are clever you can design the Rsense and R2 voltage divider to turn on when ever you want! <S> Why would you do this? <S> Well if Rload is variable it may be necessary to reduce the current to the load to keep Q1 within it's Safe Operating Area. <S> This is a whole topic itself but basically, if you determine the max current allowed through Q1 you can design the voltage divider to begin choking Q1s base current at that point. <S> This is called foldback protection and is very handy. <A> It's not that it's transitory, it is that it might exceed the rating of Q2, and that would result in Q2 failing, therefore never pulling down the base of Q1 to shut off the current. <S> Consider that if you sized Q1 to carry a very large current (much more than the power supply could deliver) you could short R_load, and Q1 would be fine, but that might apply a relatively high voltage to the base of Q2. <S> If Q2 is chosen such that the base voltage can range up to Vcc (and not overdo the current limits of Q2), then you don't need the resistor. <S> Otherwise R2 should be calculated to limit the current to the base of Q2 to a value that allows it to operate, but not exceeding the current limit for the base, or the resulting current limit through the emitter. <A> R2 * Ib2 lowers Vbe2 and thus raises current threshold a bit as a result. <S> I do not see any practical use for surge limiting, even if load is short circuited. <S> Ib2= <S> Iload/(Hfe1 <S> * Hfe2) <S> max = peanuts... <S> i.e. the current limiting protects itself. <S> You need to compute Pd in each part. <S> mainly Q1,R1,Re,load and size with 30% ~50% margin depending on ambient and max Tj=85'C for a good design.(opinion) <S> Drop <S> R2.. <S> as in 0 Ohms ..... <S> Consider current of Q2 rated for 10% of Q1, and <S> hFE=100, then Ib2 is 0.01% max of load current. <S> Normally, open loop gain of hFE1 * hFE2 = G = <S> ( with hFE= 100 and G= 10k )I would choose a closed loop gain= R1/Re = √G and up depending on Vcc to limit Pd in R1. <S> (tradeoff with regulation error) <S> Since R1 affects bias to Vbe2 it also affects current limit, reducing R1 current , reduces Ibe2 and thus raises threshold to load current limit. <S> With a 300:1 ratio regulation sensitivity with ΔIc/ΔVcc limit to about 1%. <S> If this is results in excess Pd in R1 then compromise to 1000(R1):1(Re) ratio. <S> You can also complement everything and use PNP's with Load to gnd. <A> Yes it is to limit the current that goes into Q2 since in short circuit condition the voltage across R-Sense, and thus the current to Q2 could indeed rise too far on initial surge. <S> If R2 was too high <S> you are also correct it would inhibit the operation, and thus it is chosen so <S> as not to inhibit operation of the circuit, basically I agree with your conclusions. <A> Can someone explain why Q2 needs protection in this condition? <S> If the current through rsense is too high, AND q2 isn't diveting enough current away from q1 base <S> , the voltage drop over q2 b-e junction will be too excessive. <S> It is a general ideal to put a base resistor there. <S> But its value is limited.
I think that the purpose of R2 is to limit the current to the base of Q2, so that if the voltage developed across R_sense is significant that Q2 isn't damaged.
Circuit changing the color of an led with a button? I'm trying to make a circuit WITHOUT the use of any IC's or micro controllers. I'm basing it so far off of the circuit in the picture. Im planning on adding a flip flop circuit to it to make it the light stay on when you touch it. The issue I'm having though is that this circuit would only light the led in one color. I have a 4 pin led and my end goal is to have the circuit able to switch between each color every time you touch the "button". Ive been stumped on this for days. There has to be a way to wire this up manually so I don't have to use an IC or a micro controller right? <Q> If you create the following circuit: (Which came from here page 39) ...and then try to use your touch switch circuit so that it pauses the chaser, you can achieve what you want. <S> Of course this means if you touch the button long enough, you can cycle multiple colours, but view it as a feature! <S> ;) <A> Stepping through the three LEDs in sequence requires a ring counter, a form of circular shift register. <S> There are many ways to grow one from scratch, but none are as simple as a CD4017. <A> You say you don't want to add any ICs <S> but then you say you are planning on adding a flip-flop, so I am not sure what you really mean by IC. <S> But since you are willing to consider a flip flop <S> I have a suggestion. <S> They are cheap chips so you can buy lots of them for as many of these things as you are inclined to build. <S> It also has all the useful functions that you will need: flip-flops, counters, and all the other useful operators. <S> The other good thing about 4000B series is that it can take +15V (or more) power rails. <S> Designing from CMOS logic will give you a more robust and reliable circuit than trying to use only transistors and passives, (I promise.) <S> You will probably want to use the 4000B series CMOS to drive bjt's that switch the led because the output current drive of the logic isn't great. <S> This isn't a problem. <S> I think your control logic may get a little complicated at first pass, but it is a fun problem (at least I think so.) <S> It will give you an opportunity to get clever and get a working circuit! <S> Check out: <S> CMOS Cookbook; Author ‑ DON LANCASTER for a good reference. <S> Good luck.
If I were you I would consider designing a logic circuit from 4000B series CMOS logic.
Questions about differential probes (Q1) Can an active differential probe such as this Agilent N2752A be used in a single-ended way, i.e., with one of its inputs at the GND of a circuit? Understanding of course, that we have (a) 1/10th the usual input impedance of single-ended probes and (b) that we are limited in our voltage swing to 10Vp-p? Any other 'gotchas' about doing this? The reasons why will be explained in the next question ... (Q2) I've acquired a scope with a 6GHz bandwidth, and the inputs on the front of this scope have warnings: "All Inputs 50 Ohm, +/- 5V Max Cat I" I am wondering if I can use this scope as general purpose instrument. So in addition to the above-mentioned single-ended measurement, I'd like to extend the voltage range to 50V. Would this mean a 10:1 differential probe is required ( 50V --> 5V for compliance with the warnings on scope )? Would a 50-ohm active differential probe with a 10:1 attenuation translate my single-ended measurement of 50V --> 5V and match this scopes 50 Ohm input impedance? <Q> Here's what our probe experts had to say: <S> Yes! <S> There are two ways you can make single ended measurement with the N2752A. Connect <S> the – input of the probe to signal ground and + input to the signal, and select the probe input mode to single-eneded. <S> The N2752A offers what we call "InfiniiMode" <S> – it can do all three: differential, single-ended and common mode. <S> Use either a solder-in tip or a socketed tip to use InfiniiMode. <S> Connect the ground input to the signal ground, and either +,- or both signal inputs to two input nodes of differential signals. <S> Select the InfiniiMode input on scope to ‘Single ended A’ or ‘Single ended B’. <S> You then can look at either + side or – side of the differential signal. <S> For question 2: <S> You are right. <S> With a 10:1 attenuation ratio probe, 50 V input to the probe is attenuated down to 5V and is fed into the input of the scope. <S> With 5V max input on the scope, you may want to choose a probe with higher than 10:1 attenuation ratio such as 20:1 or 50:1 to ensure the voltage input to the scope stays within the max input range of the scope. <S> But the problem is that a 50 ohm terminated active probe with >10:1 attenuation ratio is hardly found in the market. <S> Most of the high voltage probe is 1 Mohm terminated. <S> Does your scope have only 50 ohm input? <S> If so, one way to get around is to use a high impedance adapter to the input of the scope, turning input impedance of the scope to 1 Mohm from 50 ohm. <S> Then you may choose a variety of high voltage probe terminated into 1 Mohm. <A> I am personally not aware of any specific reason why not to use a differential probe as single-ended. <S> I have, from times to times, also done something similar. <S> But you definitely have to consider the restrictions of a differential probe. <S> Meaning respect the usually more restricted DC offset in comparison with a single ended probe and the dynamic range. <S> Regarding the second question: Be careful that in the webpage you linked us, it is stated that in 10:1 configuration your range can be only up to 10Vpp! <S> I would be very careful in keeping these specifications and wouldn't use it to measure a 50V signal, or you could end up crying over a dead probe! <A> A differential probe doesn't care what the inputs connect to within reason. <S> If one connection is to ground then you are making a differential measurement between ground and your signal. <S> Regarding the 50 ohm input and extending your probe range up to 50 volts, I would take advice from oscilloscope supplier in preference to anything else.
You can use the N2752A differential probe for single-ended measurement.
Antiresonance of multiple parallel decoupling capacitors: use same value or multiple values? My quesiton: Is it better practice to put same-valued capacitors in parallel of capacitors of different values to decouple the high-frequency noise caused by digital ICs? Background Digital IC need a decoupling capacitor close to their supply pins to ensure a stable voltage during power transients and to deal with noise (mostly to prevent noise generated by the IC to affect neighboring circuitry). It seems sensible to place a bulk capacitor (say 10-100uF), to act as an energy reservoir, and several smaller capacitors to deal with higher frequencies. The reason to place several small capacitors instead of just one is to deal with their Equivalent Series Inductance (ESL), which in practice, causes them to behave like an LC circuit. The effect of anti-resonance Yet, here is where best design practices and electronic myth seem to get mixed up and confusing to me. Most electronic engineers I have met like placing several decoupling capacitors of different values in parallel (with the smaller capacitors closer to the IC). The logic behind it is that the each capacitor takes care of a different noise frequency as depicted in Figure 1. Figure 1: Impedance over frequency of three different value capacitors in parallel (cyan) vs their individual contribution (brown, blue, red). Image taken from All About Circuits . Note the small anti-resonance peak. It seams no major trouble , and the overall behavior of the three different capacitors in parallel is vastly superior to their individual decoupling capabilities. However, I have read in Electromagnetic Compatibility Engineering by [Henry W. Ott] that placing capacitors of different values may cause a much greater antiresonance-peak which can be very harmful for our designs (see Figure 2). In fact, it amplifies any noise that falls into the anti-resoance frequency range, which is corroborated by this paper . Figure 2: from Electromagnetic Compatibility Engineering, by Henry W. Ott, section 11.4.4. The 15nH inductance makes reference to the capacitors ESL. <Q> I have a bunch of observations that I decided to make into an answer and please note that I'm quite happy to spend 30 minutes doing a simulation of this if someone can precisely state what the test circuit was that produced the large anti-resonant peaks. <S> Firstly, I'm not sure that I follow the precise circuit of what was described by Ott. <S> Are the 15 nH inductors in series with each capacitor as is stated? <S> If they are then that is clearly wrong because the smaller capacitors will have smaller ESLs. <S> Is there any mention of the resistive loading effect of the circuit the capacitors are "smoothing"? <S> What are the inductances of the traces that feed the capacitors or, were the capacitors connected using earth and power planes? <S> In short, I'm not happy with the Ott claim based on the lack of clear circuit that can be reproduced in a sim. <S> If a clear circuit can be made available then I'm interested! <A> Summary: the individual capacitors need dampening; for 100uF caps, the solder and PCB foil may suffice (10milliOhm, if L = 10nH); for 1uF, use 0.1 ohm; for 10nF, use 1 ohm, etc. <S> Here with 4 capacitors, 100U/1U/10n/100p and 10nH ESL, the peaking depends on the losses in each cap {I consider sqrt(L/C) a good start; thus 10nH and 10pF needs 3.1 ohms, which I have not used here; however, 10nH and 100uF need 10 milliohm, which is illustrated in the 3rd screenshot.} <S> Lets examine this response, with 1 microOhm ESR in each cap. <S> Notice <S> the lowest dip is to -120dB. Zsource is only 50 Ohms. <S> Now this response, with 1 milliohm ESR in each cap. <S> Zsource is 50 Ohms. <S> And now 10 milliohm ESR for each cap, Zsource is 50 Ohms. <S> And with 10milliOhm in each cap, with the Zsource now 1uH + 50 ohms Here is (requested) <S> SCE sim [available at robustcircuitdesign.com for free] <S> with 4 identical 1UF caps, each with 10nH ESL and 10milliOhms. <S> There are NO PEAKS, because the 10milliOhm dampens those peaks. <S> [or is the Zsource, of 50 ohms and 1uH, what dampens??] <S> In prior sim, there was no peaking. <S> So I insert 3 inductors between the 4 caps. <S> Now a sim of those 4 caps + 3 inductors (PCB foil, 10nH each). <S> Notice the peaking returns (the ESR is only 1 ONE milliohm, to show peaking), at -20dB. <A> You're doing pretty good on getting to the parallel resonance already. <S> It depends on your application. <S> The "perfect" solution is to use low-ESL type ceramics which are usually characterized by having the pads on the long ends. <S> These tend to have impedance over the spectrum that's as low or lower than regular MLCC chips have in their dips. <S> They're also less vulnerable to the impedance peaks because there's so little inductance involved. <S> Here's a good write-up of what's going on here, a major source of these resonances are component pads, power planes and vias, not so much the capacitor itself: http://ntuemc.tw/upload/file/20120419205619a4fcf.pdf <S> That looks like it'll go stale any time <S> so I've mirrored it here: <S> https://drive.google.com/file/d/0B7odw4GViWr4VVR6aVYyTkstZUk/view?usp=sharing <S> Some people think you shouldn't aim to get your dips on the fundamental switching frequencies anyways because it allows the chip to do faster edges <S> but I'm not sure I buy that. <S> The impedance dip would be on the fundamental frequency, not on the higher harmonics that makes that sharp edge. <A> To complement others' answers: Same value caps can also resonate together if you consider they are connected together with non-zero inductance traces or planes. <S> You most likely won't get a large resonance peak in the impedance, but you will get a bit of circulating current in the power/ground as the caps ring together.
If you're trying to suppress/bypass for example ethernet peaks, you should use parallel caps which have impedance dips in the fundamental frequency and some of the harmonics.
using inductor in series with a psc motor I'm trying to reduce a PSC electro-motor rpm to about 80% to 90% of it's nominal speed. It is attached directly to a centrifugal fan and a mechanical approach is not possible. The ratings are: 450 W, 2.2 A , 220 VAC, 50 Hz, 700 rpm, winding insulation class B. I tried placing a series 15 Ω 150 W resistance on the current path. And it worked fine but the resistance got too hot, adding a heat sink helped but didn't completely solved the problem. I also tried using a dimmer circuit, and it caused a 15 degree Celsius temperature rise from the normal temperature (I think because of the added harmonics), which is 60 degrees in 23 degree environment (all skin temperature). Since the working environment of this fan is 45 degree Celsius and the insulation class is B, I think dimmer solution would fail. I'm now thinking about placing a series inductance on the current path. But I haven't seen a single page about this approach on the internet and I don't know if this would work. Inductor in this size is not readily available and making it is a lot of work. I would like to know why this approach may not work. I would also appreciate any other solution or idea which cost less than 10 to 20$. <Q> A motor with class B insulation should be able to withstand 80C rise by resistance in a 40C ambient. <S> That would be 75C in a 45C ambient. <S> It is difficult to estimate what the rise in skin temperature would need to be would need to be. <S> A series inductor should work similarly to a series resistor except that the phase angle of the voltage drop will be nearly 90 degrees with respect to the supply voltage. <S> As a result, 150 ohms inductive impedance will not provide the same motor voltage as was provided using the resistor. <S> If you measure the voltages across the 150 ohm resistor and across the motor, you should be able to calculate the inductance needed for an equivalent result. <S> Reducing the speed of the motor by reducing the voltage will increase the motor slip. <S> That will increase the rotor losses, but the reduction in load gained by reducing the fan speed compensates for that. <S> However if the motor is overloaded when running the fan at the rated motor speed, the motor could still overheat at the reduced speed. <S> The value will need to be determined by trial and error. <A> They exist, although few and far between, and they are expensive; generally more expensive than just replacing the motor. <S> Single phase VFDs (for running SINGLE phase motors) can ONLY work on PSC (or Shaded Pole) motors, but since that is what you have, that is an option in your case. <S> The most widely known version is made by a UK company called Invertek, sold as the OptiDrive E2 Single Phase. <S> That exact same product is sold under 5 or 6 other brand label agreements in various countries, but Invertek is the actual mfr. <S> I'm not recommending it, I happen to think it's too expensive of an option, but you should at least know it's an option. <A> Adding heat from an inefficient motor may not seem like a good approach but it depends how much ambient heat there is and the humidity. <S> THis is an example of how ceiling fans work with line rated plastic caps. <A> For low cost: Buy a 500VA transformer with taps on the primary for 240 and 208 V. <S> You can find a used one with 24 VAC output for low voltage stuff for less than $20. <S> Tie your power to the 240 VAC taps, and put your motor on the 208 taps (one tap will be shared - this should be ground or neutral). <S> Leave the secondary unconnected.
The only alternative that would not increase the heat in the motor is a single phase VFD. Another alternative that you might consider is to reduce the capacitance of the auxiliary winding capacitor.
Connecting DIODE in relay circuit Am a very beginner with electronic circuits and its components.. Im trying to turn on my water pump using Arudino nano. Ive got 25A solid state relay for that purpose. So according to little info I collected from google, I found we have to connect a diode to relay coil to avoid return current from the coil which will spoils the circuitary. but my questions are how can we decide the diode to connect in this case. I mean anyspecific values? Also does the diode to connect to the positive terminal of the coilin series with the out from Arduino? Or is it parallel? This is the specification of the relay If its not solid state relay what could be the solution <Q> The purpose of adding a reverse biased diode to a mechanical relay is to prevent a reverse voltage potential appearing at the driver circuit when the magnetic field around the coil collapses, which happens when the relay coil is suddenly disconnected. <S> A solid state relay does not use magnetic fields. <S> Instead it uses light: <S> So there is no collapsing magnetic field to generate a reverse voltage potential. <S> It follows no reverse biased diode (or flyback diode) <S> is necessary. <A> You do not need a diode to protect a circuit and components if you choose SSR. <S> It would help you, if you understood a difference between mechanical and solid state relay. <S> Electro- <S> Mechanical relay: <S> Electro- <S> Mechanical relays are being used with fly back diode protection. <S> This is because, when these relays are powered by power supply they create magnetic field around the coil which makes NO contact to NC. <S> The magnetic field is created by electrons flowing through the coil which puts their energy into the coil to create a magnetic field. <S> When the power supply is stopped, magnetic field will be changed into emf which is called back emf that will pass through the circuit which causes magnetic field to collapse. <S> This voltage will be high enough to damage the circuit. <S> This process happens based on law of conservation of energy. <S> To prevent damage diode is connected in parallel with the relay which by pass the path of back emf. <S> For in depth detail: <S> http://www.douglaskrantz.com/ElecFlybackDiode.html <S> Solid State Relay : <S> Solid state relays are different than Electro mechanical relays. <S> Opto coupling is the principle behind sold state relays. <S> Solid state relays can be separated as input circuitry and output circuitry. <S> In input circuit, IR LEDs or other light emitting diodes are present in series with the current limiting resistor and a photo sensitive diode or phototransistors. <S> There will be a small gap between the LED and Photo sensitive diodes. <S> Small input signal is needed to energize a LED which illuminate light that will be focused on photo diode across the gap which in turn turn ON output circuit. <S> Output circuit consists of Triac, SCR or Transistor depends on the output type AC or DC. <S> When Output circuit turns on, then power to the load will continuously pass on. <S> In this SSR, isolation is provided upto great extent and there is no possibility of inductance problem etc. <S> So, technically diode is not needed for SSR. <A> If its not solid state relay <S> what could be the solution <S> The difference between a solid state and mechanical relay is the inductive coil. <S> For a DC mechanical relay: how can we decide the diode to connect in this case. <S> I mean any specific values? <S> The diode D1 must have a reverse voltage rating greater than the power supply V1. <S> Example: if V1 is +15V than I would choose a diode with a reverse voltage rating of 30V or so. <S> When the SW1 goes from closed to open the current through the coil of RLY will continue to flow as the magnetic field collapses (this is what will generate large voltage transients.) <S> D1 provides a path for the current to "flyback" which clamps the voltage transient. <S> The power dissipated in the diode is the forward voltage drop*coil current, but for an extremely short period of time. <S> Because it is such a short period of time <S> it is not something that is typically a problem. <S> I mention it because it is possible to pick a diode which is so small it can't handle the current, or if you have a high switching rate the diode should be pick a bit more carefully. <S> Also does the diode to connect to the positive terminal of the coil in series with the out from Arduino? <S> Or is it parallel? <S> The diode connects directly across the relay coil as shown. <S> Note: If you are trying to control a mechanical relay directly from an Arduino you will have some trouble. <S> Arduino's do not have the required power output for most mechanical relays. <S> You won't find a 25A relay with a 5V/20mA coil. <S> I would use an external bjt and power supply to switch the coil.
Diodes are used as fly back diode in mechanical relay circuits. The other thing to keep in mind (but is usually not a problem) is the power dissipation of the diode.
Does Soldering and Attaching/Using Molex Connectors reduce power draw? I was looking to attach a Molex connector to the end of a USB by cutting a male Molex connector with a cable, and soldering the black and red USB wires to the black and red of the Molex cable with the attached male connector. I was wondering if this would reduce the power draw to my device, for instance: I wanted to attach a peltier device to a USB cable for power, and I know that the peltier device has a red and black wire as does the USB. However, I am trying to avoid soldering the wires of the Peltier and the USB together as I would like to be able to de-attach them. So I wanted to take a molex connector, something like this , cut it in half and solder the male side to peltier wire and the female side to the cut usb wires. But will I lose power? <Q> It's not clear without a diagram what you are actually asking, but most likely, no, it doesn't work that way. <S> Think about it. <S> If a connector in series would reduce power consumption, then why do appliances draw any power when plugged into the wall as apposed to wired directly? <S> What about using extension cords? <S> Shouldn't those allow for free power? <S> Regardless of any electronics knowledge, basic high school physics says you don't get free power. <S> Running a fan while the power source isn't putting out power violates this very basic rule of physics. <S> Even worse , since no connector is perfect, there will be some power dissipation in the connector. <S> That means the ultimate load gets less power, or the power source ends up putting out more to compensate. <S> Again, there is no free power. <A> I have a bit of trouble understanding this. <S> I think it's a vocabulary issue. <S> Let's talk about resistance. <S> As you know (ask that Ohm guy) <S> U= <S> R*I therefore if you got 5V on the power supply and a total resistance of 1 ohm in all your cables and connectors, and you draw I=2.4A <S> then you'll get a voltage drop of RI=2.4V and you'll only have 2.6V out of your 5V at the other end. <S> In this case you're most likely in trouble. <S> Now, Molex makes a few different connectors <S> so I'm afraid you'll have to be more specific about which one you got. <S> As for the USB connector, many connectors specify 10mohm when new, and 30mohm through their lifetime, although 50mohm is acceptable for micro connectors. <S> So if you want to know if your connector exchange will be useful, compare USB connector contact resistance to the Molex contact resistance. <S> Remember you have two contacts, one for power and one for ground... <S> Now, add the resistance of your wire. <S> For 2.4 amps, which is like 5x higher than the USB spec of 500mA, you might want to use a USB cable with some copper in it, something not too flimsy. <S> Cheap cables are notorious for having the thinnest, cheapest power wires available... <S> Sometimes you get a nice thick cable, but it's all plastic, because plastic is cheaper than copper, and the wires inside are tiny. <A> With fixed voltage supply this will reduce the power delivered to your load, theoretically. <S> The actual power loss depends on construction of connector, and typically the connectors are rated by their max current. <S> The contact rating is a tricky part, and is defined as maximum current which causes connector to overheat by 10 deg. <S> C. <S> Which obviously depends on housing blocking heat transfer, and wire gauge. <S> The standard 4-pin Molex 0.062 <S> " connector has the rating of 5 A, so it is pretty good for the purpose, and losses in a long USB cable could be higher. <S> In sum, yes, soldered joints are are always better than any electro-mechanical connector. <S> SIDE NOTE: <S> the USB max output is not 2.4A. USB standard defines MINIMUM output as 500/900mA, and maximum is not limited . <S> And, of course, each individual USB port has it's own connector rating, which is usually 1.5 A only.
Using a connector in a power-hungry circuit introduces extra resistor (contact resistance) into the wire, and therefore causes some power dissipation. Try to look up a datasheet and find its contact resistance rating (all connectors datasheets mention this). On a typical PC, the absolute maximum of total USB output is limited by the system PSU, by its +5VSB standby power rail, which can be anything between 1A (older PCs) and up to PSU manufacturer limit (2.5 A recommended, and up).
Anything wrong with this Mosfet H-bridge? I am very knew to electronics and was planning to build my first robot. I search around google for H-bridge designs and drew the following schematic( OLD ) NEW I know that testing a circuit on a simulation and in real life are to very different things, on the simulation the circuit works good.The two inputs are coming from a RF module with a PT2262 decoder, that's why I chose two logic level n-channel mosfets(IRL520) at the low side.The motors are both(same circuit twice) 12V and 2,19A of stall current each. Each optocoupler is a 4n35.My power source is a 12V 5A lead acid battery. The problem:(When testing on a breadboard)When one input is high, the mosfets that are not being used get really hot and the motor turn very slow or not at all. I was thinking maybe the way that I wired it to my breadboard is off? This problem has been bugging me for a little while. I am hoping one of you experts are able to tell me what might be happening here? I decided to build my own motor driver for educational purposes and cannot get any other components for now *EDIT: I've uploaded a new schematic with the changes and switched the p-channel mosfets(my bad) *EDIT 2: Motors are 12VDC brushed gearmotors. EDIT 4 : Sorry for the delay, here are some measurements that might aid in answering; <Q> Try adding 1 kohm resistors to ground between gate and source on the low side mosfets. <S> Without this addition, you cannot rely on the photodiode circuit for dragging down the gate to 0 volt and this will leave the lower mosfets partially on. <S> I'm not ruling out that there are other problems of course. <A> Q1 and Q2 are wired in reverse. <S> They're PMOS. <S> The optos are useless, simple NPN transistors would work. <S> Also, your optocouplers will introduce a delay which will cause both FETs to conduct at the same time on every transition, shorting the power supply. <S> They will heat a lot (or burn). <S> What is wrong with buying a cheap, ready-made H-bridge module from the net? <A> Looking at the "NEW" schematic... <S> Your P-types have \$10k\Omega\$ gate termination resistors. <S> This is hte only source of gate charge discharge & this will produce a longer turn-off time (relative to the N-TYPE) <S> The N-Types have \$1k\Omega\$, equally their gates are directly connected to the A & B terminals and these may provide a low-impedance LOW - <S> > <S> Fast turn off & equally a possible fast turn-on. <S> A slow Turn-off and a fast turn-on in a leg will result in a soft shoot-through at each complimentary switching transient & this will increase the losses & temperature of the switches. <S> This could result in premature ageing or thermal damage
When input switches go open circuit, there is nothing significant pulling charge from the mosfet gates on the low side.
Audio Noise with 5532 Opamp I am using an NE5532 as a voltage follower/buffer in an audio circuit and am having some noise issues. I’ve simplified the circuit to isolate the issue. The audio input signal comes in through an audio transformer to the +IN on the amp. The amp output is currently going directly into a commercial mixer for testing. With the mixer gain and volume turned up and no sound signal, rather than quiet white noise/background static I’m getting a relatively loud/fast ticking/flapping sound … sounds something like shuffling cards, but more of a ticking. With an input signal, it’s loud enough to interfere with the music. There are also some blips of loud static every second or so. For testing I replaced the op amp with an LM411 FET amp, the noise was mostly gone, except for the ticking being very very faint at full volume. I have tried all different combinations of grounding, and transformer isolating outputs, nothing helps, it seems to be an op amp issue and the noise is in the signal itself. I’ve tried scoping the output, and can’t distinguish the ticking noise and blips from noise measuring from only the original source. Any idea what is causing this and how to fix it? Another thing: This amp is used as a buffer prior to output with line level signals up to 2Vrms. According to the datasheet, excessive current is drawn at a differential input of 0.6V due to the input transistors. Should I be modifying my circuit with input resistors or something, or should this amp only be used with small input signals? A few things: The final circuit is much more complex, this is basically what I've simplified it to just for isolating the noise issue. The final circuit is single-ended +12VDC, with opamp biased to +6V, and power supply is +15VDC switcher with heavy filtering and +12V linear regulator. Regardless of how I power the circuit, whether +15V switcher with filtering or a linear 12V bench supply, I get exactly the same noise as described. Input to mixer is balanced. Update: Here are the additional tests I've completed trying to isolate this noise problem. All have been unsuccessful so far:1) I was able to measure from 3-12mVAC between completely unused traces even with no power on the breadboard and discovered that this was causing some hum, so I deadbugged the circuit. Same result. 2) I've tried adding an LC filter w/ 500kHz cutoff after the opamp to eliminate RF interference, same result.3) I've tried a different brand mixer after discovering the jack shields on the first were not chassis grounded. The original used a linear supply, this one a switchmode supply. No change either way. 4) After measuring 45VAC to ground on the new mixer chassis, I've tried variations of earth grounding the mixer chassis through the bench supply. This eliminated the massive hum I'd get without doing it, but the opamp noise is still there.5) I've tried both unbalanced and balanced inputs, no change.6) I've tried multiple variations of different cables, plugs and adapters, headphones and shielding the cables. No change. The only thing I can think of left is that it's something with the opamp itself. As originally mentioned, an LM411 reduced the noise significantly, although it was still there. I'm attaching an overview of the system setup, I apologize for the poor quality. The drawing is mainly to isolate any potential ground loops, so the internals of the devices may not be entirely accurate, I only verified where GND and COM were connected. Is there a way to attach an audio file to this post? Maybe someone will recognize the noise. Not experienced with the phenomenon, but I think it may be motorboating. Thanks so far for the troubleshooting input, any other comments are greatly appreciated. <Q> So, I was finally able to solve the motorboat problem by placing an LRC filter with a 50kHz cutoff frequency directly at the output of the transformer. <S> The transformer has a self-resonance frequency at around 280kHz but amplitude starts growing around 90kHz, not sure if this is the cause specifically but killing that resonance and whatever else was making its way into the opamp seems to have eliminated the noise. <S> Thanks everyone for their input. <A> You say in a comment that no noise is exhibited if the transformer is connected directly to the mixer's balanced input. <S> However, I suspect that the intended role of this transformer is as a "balun": converting unbalanced to balanced. <S> The mixer, being balanced, is a three-terminal input. <S> If the transformer's secondary is connected so that the centre tap goes to the mixer's GND, and the other two ends of the coil to the + and - inputs, then that is a very different topology from the single-ended scheme you have going with the op-amp. <S> In the configuration shown, the transformer's coil is a single ended input source. <S> I would expect its windings to pick up EMI which gets amplified. <S> The mixer's balanced input is not being used as a balanced input. <S> In the balun configuration, noise from the transformer is suppressed because it is split into two coils of identical number of windings, whose noise cancels out by the opposite polarity inputs of same impedance. <S> One way to proceed is to ditch the transformer and implement the unbalanced-to-balanced conversion with op-amps, perhaps with a circuit like this one . <S> Implied in the circuit is an end-to-end ground connection. <S> If you want the isolation of the transformer (no end-to-end galvanic connection), you can work it into a different two-op-amp circuit. <S> In a nutshell: extend the + and - inputs of the mixer with a pair of identical pre-amplifiers, each implemented by an op-amp. <S> (This preserves the property of the balanced inputs being identical in impedance.) <S> So now you effectively have a new mixer input which is still balanced but whose balanced inputs have more favorable impedance characteristics and level for your laptop's line out thanks to the two active buffering stages. <S> In front of these stages, you engage the balun transformer in the usual way. <A> In the absence of a schematic, I would speculate that you are getting noise coupled into the circuit from your power supply. <S> Try operating it from a battery to see if the problem goes away. <S> Failing that, short the input of the transformer and move the circuit away from all other electronics. <S> If that eliminates the noise, undo the changes one step at a time to discover the source of the noise. <S> Edit after OP posted schematic: <S> Your transformer secondary is 600 ohms. <S> You should have a 600 ohm resistor across it to properly terminate it since the op amp input impedance is very high. <S> Remove the 47k resistor. <S> Make sure you have phantom power turned off on that mixer input. <A> Make sure the opamp isn't oscillating. <S> Lower the input impedance. <S> 47k is the max I would go. <S> Clean the power supply.
I would include a decoupling capacitor in series with the output of the op amp to ensure no DC offset is passed to the mixer.
Why use three-phase power distribution? My question is about phasing? Why phasing is needed in power line? Can't we just use one conductor instead of two or more conductors? I already searched for it, but couldn't get any relevant answer. <Q> Why at least 2 conductors? <S> Because the power company must deliver the power into your loads (motors, clothes dryers, etc). <S> The power company does not get paid for heating up the earth (the return path). <A> Sometimes the earth is used as one of the conductors ( <S> Google single wire earth return) but that creates problems so it's rare outside of relatively low power rural systems. <S> However in practice it is common to use a three phase system, this uses more wires but it offers several significant advantages. <S> Currents in the neutral conductor generally cancel out, so the neutral conductors can be significantly smaller than in a comparable single ended single phase system and somewhat smaller than in a comparable split single phase system. <S> In some cases the neutral conductor may be omitted altogether and loads connected between phase conductors. <S> It delivers power continuously, unlike a single phase system where the power rises and falls through the waveform cycle. <S> This makes motors and generators run smoother. <S> It can easily create rotating magnetic fields. <S> This avoids the need to use tricks that reduce motor performance. <A> Minimum two conductors are required as Neutral is required to close the current path <S> So if you don't connect neutral circuit will not work as no current will flow from it <S> For heavier load more than two conductors are required. <S> What if your load is 500 HP motor. <S> So your Power consumption of that motor will be 372kW. <S> Now for that much power if you connect single conductor your current from that conductor will be (V = 240 volts for Indian systems) <S> I = <S> P/V = 372000/240 = <S> 155 <S> Amp <S> and this will generate plenty amount of heat which means more power loss in the conductor because of heat and also it is difficult to handle such a high currents. <S> If you use three phase system your current will be divided into 3 phases and it will be 51.66 Amp. <S> Also power is constant throughout the cycle and that direction is given by the phase sequencing. <S> I think now it will be pretty much clear <S> let me know if there is still something unclear <S> Thanks
Hence for industries or heavy loads three phase is used and for home appliances single phase is good enough Firstly current flows in loops, so there always need to be at least two conductors.
Is 5V too much for a device that uses 3.5V? I have a handheld GPS that uses 2 x1.5V batteries or a cigarette litghter plug that outputs 3.5V. I do not have a 12v source readily available but do have several USB ports that output 5V. Can I make a patch cord or do I need to reduce voltage first? <Q> The datasheet didn't say much. <S> I know it's the wrong model (AirMap 500), <S> but still, no internal images. <S> And the input power just said 3V. <S> Well, if I were you, I would either A , open the GPS and look inside and look for a Linear Voltage Regulator. <S> If you find it then it's pretty safe to hook it up to a 5V input. <S> Or B , connect the cigarette lighter plug to a 5V supply and see if it still outputs 3.5V, if it does <S> then I'd see if the GPS works with it as well. <S> Or C , get a Linear Voltage Regulator that converts 5V to 3.3V and burn off the excessive voltage×current in the form of heat. <S> Or D , get a step-down converter from 5V to 3.3V. Or lastly, E , take my bets and connect it up to 5V and hope for the best. <A> From this answer : <S> Or C , get a Linear Voltage Regulator that converts 5V to 3.3V and burn off the excessive voltage×current in the form of heat. <S> C.1 - Determine the current required, and put 2 power rectifier diodes (rated for at least 2x the current) in series with the 5 V. <S> The resulting voltage drop should get you close to 3.3-3.5 V. <S> Probably best to test it on the ground first... <A> To add to what Harry said, here are a couple of ICs that are regularly used for 5V to 3.3V regulation ( LM3940 and LM1117 ). <S> You may be able to estimate the current, given that the manual claims approx. <S> 12 hours of run-time on AA batteries. <S> If a AA battery is estimated to provide roughly 2000 mAh, that would suggest approx 166 mA. <S> This is probably conservative, but since older USB ports are only specified to 100 mA, you should be sure to use a USB 3.0 SS port (see wikipedia: <S> USB power for details) <A> You get about 0.65V drop across each diode, so 5V USB will be dropped to about 3.05V. <S> Most battery operated product that take 2 x 1.5V cells are generally designed to handle input voltage from 2V to at least 3.5V and thus work fine with poor regulation, so this simple 3 series diode scheme should work well. <S> Use fairly hefty diodes such as 2 Amp or 3 Amp diodes and use a 1 Amp USB charger. <S> This way, if the output is accidentally shorted the USB charger will limit the current and the diodes will not be damaged. <S> Also note that while PC ports put out close to 5V, many USB chargers run their output more like 5.1V to 5.25V because the USB spec allows up to 5.25V <S> so your device might see 3.3V with these diodes. <S> Fresh alkaline batteries can be close to 1.6V <S> so 3.3V isn't a big deal. <S> For low power applications, I've built these diodes in the power cable and just put heatshrink over them.
If you want a super simple solution, just use 3 rectifier diodes in series of the 5V power. Having said that, since the manual doesn't seem to specify how much current the receiver sinks, we don't know for sure that your USB port will supply the required power.
Power supply design for CPU: Define maximum current needed This is something that is troubling me in many of my projects and I would like to know if there is any standard approach to it. The question is how should I correctly design / dimension my power supplies to be sure that enough current will be available for my CPU. I am using various packet processors from Marvell and at every one of them they provide, like CPUs from other vendors, two different set of current/power specification. One set is the TPD (thermal power dissipation), where they say that this numbers should be used for the thermal design. The numbers are measured under nominal voltage and some selected use case. The second set is the maximum continuous current that can be drawn from the power supply and is given to support the power supply design and selection of power module. These numbers are given using maximum recommended voltage specification for the power rails, at max recommended operation temperature and some extreme use cases. One could say that the answer to my question is obvious: use the second set of data for correctly selecting the power supply, since this is why they are given for. But the thing is, these numbers are at maximum recommended voltage (usually +5% of the nominal voltage) and at maximum operation temperature. Both of these conditions are not met at my designs. Is there any standard approach to this? Should I just use this maximum continuous current specifications when defining the maximum current of my power supplies or should I somehow (how?) at least scale them down to the typical voltage supply? My concern is not to over-design the power supply, since the numbers between the two sets differ -usually- a lot. <Q> Design for worst case and add some derating to keep on the safe side depending how hot the ambient can get etc. <S> Never ever design something with the mindset "hey, we're using 5A current <S> so I'll use 5A parts, m'kay"! <S> Douglas Alexander's website has a derating table but these are NOT IPC standard <S> , it's just something he's come up with experience. <S> I don't obviously endorse them for any commercial use but it gives you an idea what a proper design margin would look like. <S> http://www.componentsengineering.com/procedures-guidelines-2/component-derating-guidelines/ http://www.ebnonline.com/author.asp?section_id=1541&doc_id=235329 <A> Otherwise you risk to spend your time hunting down rare transient glitches resulting from brown-outs. <S> As a real-life example, check out the Raspberry Pi, which requires a 2.5A PSU but actually boots with <S> as little as 500 mA. Problem is, it's not reliable with such supplies: there are countless questions on raspi. <S> SE (and everywhere else on the net) which end up being a PSU problem <S> ( example from 2 days ago). <S> IMO you'll do yourself a big favor if you over-design the PSU, at least in the prototype phase. <S> Once you have working prototypes, you can run benchmarks to determine what current is requited in production to meet your reliability goals. <A> The supply has ouput transistors for regulation, so these transistors should always be inside their safe operating area (SOA). <S> This is de-rated by current and temperature. <S> Find proper transistors by examining the data sheet <S> The current capability should be exactly the maximum the whole system can draw, or slightly more. <S> Because switching converters are usually the most efficient in this area of operation, close to maximum output current. <S> If the cpu gets too little current while operating, the voltage drops and it will detect a "brown-out", automatically shutting down. <S> This is why the power supply should be capable to handle the maximum continuous current. <S> If not the system will glitch under heavy load.
There's IPC-9592B standard which is squarely aimed at codifying how much derating you actually need to be "safe" or at least it gives you something to refer to when the house burns down and investigators come calling. Yes, the numbers differ by quite a bit, and yes, your PSU should be able to provide the max continuous current to guarantee a reliable operation.
Eagle's PCB ratsnest command reports 3 airwires, but they are not visible I am working on preamp input selector PCB in Eagle and I've run RATSNEST command for displaying airwires: There are no airwires left as can be seen from screenshot, however, particular command reports to me in status bar: Ratsnest: 3 airwires Why and if so, where are they so I connect them? <Q> There is a very useful eagle ULP called "zoom-unrouted" which if you haven't already got it, you can download here . <S> Save it in the ULP folder and then run it ( run zoom-unrouted ). <S> Eagle will then zoom in to the first airwire. <S> I can see from your screenshot there is one airwire between pins 7 and 10 of IC2. <S> On an unrelated point, make sure the "Isolate" value on your polygons is non-zero <S> (it looks to be set to 0 to me) otherwise you will get Gerber files which are solid copper over the entire board (everything shorted out). <S> Also run the DRC with settings relevant to your PCB house as there appears to be quite a few places where there may be either shorts or clearance errors. <S> There's also an awful lot of redundant routing on the OUTPUT_LEFT and OUTPUT_RIGHT traces - unless you are going for star connected, you might want to revisit the routing of those traces. <A> Deselect all layers except the 'Unrouted' Layer. <S> You shall see which connections are open. <A> This happens to me quite often and it is usually caused by a mismatch in grid sizes between components. <S> You think you run a track to a component pad but unless it ends at just the right point, it's still considered disconnected. <S> What I do in this case, since I can rarely add a track that short to jump the gap or recreate the old grid, is use the autorouter. <S> This is the ONLY time I use the autorouter. <S> Just do a quick run and have it fill in whatever is left (don't have it redo the entire board) <S> and it should make the missing connections. <A> Run the DRC. <S> DRC lists unconnected airwires as errors. <S> Then you can click on the error to zoom unrouted net. <A> Another quick way that I use to find unconnected airwires is to zoom out from the board design until it is just barely visible, select the route option (as you normally do to perform routing) and just click over the board design. <S> What will happen is that the routing tool will start routing from a missing airwire (just like you normally would). <S> You can then zoom back in to where exactly the unconnected airwire is and continue routing as you would normally do.
Check for vertical (single pixel) airwires caused by ground plane islands, and for tiny gaps at the end of traces.
Can this copper pour be an EMI problem? I am looking at the following PCB (single layer). The checked red/blue is GND. Can this polygon give EMI problems in the sense that it acts as an antenna because it does not form a closed loop ? Should polygons be closed loop ? On a signal layer board, is there any reason to have ground/vcc pours on unused copper areas ? <Q> Can this polygon give EMI problems in the sense that it acts as an antenna because it does not form a closed loop ? <S> Yes, at high enough frequencies, that long "peninsula" of copper can act as an antenna, causing radiation, or capturing interference from external signals. <S> Should polygons be closed loop ? <S> Loops isn't really what you're aiming for, but it would be better to put some vias through the polygon to tie it tightly to the ground plane on an inner layer beneath it. <S> On a signal layer board, is there any reason to have ground/vcc pours on unused copper areas ? <S> In manufacturing, large "glass" areas (areas without copper) slightly increase costs, because they deplete the etchant more quickly. <S> If your traces are controlled impedance and intended to be microstrip, you probably need to increase the gap between the trace and the ground pour to maintain the correct characteristic impedance. <S> A gap of 3 - 5x the trace width is preferred. <S> If your traces are controlled impedance coplanar waveguide, then of course you need the copper pours to form the return path for currents on those traces. <S> But you also need to be sure the pour is fully connected to the end of the trace, and you need a pour on both sides of each trace. <A> Can this polygon give EMI problems in the sense that it acts as an antenna because it does not form a closed loop ? <S> Islands are bad because they add another element of unpredictability, they are hard to analyze. <S> There exists capacitance between the traces around them and the ground plane below. <S> The capacitance between the island and the trace depends on the length of the trace running next it. <S> It is less time consuming to remove the island or ground it than it is to model it with a basic model or 3d EM FEM to find out if it is a problem. <S> Should polygons be closed loop ? <S> They should be grounded <S> so you know what the potential is. <S> Multiple vias can lower inductance to ground and also help as vias have high frequency impedance <S> On a signal layer board, is there any reason to have ground/vcc pours on unused copper areas? <S> Maybe, remember two conductors with an electric field running between them form a capacitor. <S> PCB's can create many opportunities for parasitic capacitance, although small and usually negligible, any two conductors can have capacitance between them. <S> There are PCB calculators to get an idea for what these values are, or equations. <S> This capacitance can create problem, or solve them. <S> If it makes sense to ground or attach a small capacitor (<1pf usually, but some plane to plane capacitance can be much more) to your trace then ground the copper underneath it. <S> Here is an example of how to look at traces and capacitance between them (in your case there would also be a plane next to the trace with another capacitor drawn to the plane and and additional capacitor from the plane to ground) <S> Source <S> Bert Simonovich's Design Notes <S> There is also mutual inductance between traces, but that mostly applies to traces that are run together for a given distance and is a story for another day. <A> You went through the trouble of separating your signal traces, presumably to reduce crosstalk. <S> Then you add a copper pour between them, which will increase crosstalk through capacitive coupling...
As far as performance benefits, if your traces are not controlled impedance and you have an unbroken ground plane on an inner layer, I don't see much benefit to these copper pours.
Is there such thing as a 9V NiMH battery with 600 mAh? I want to buy some NiMH batteries for a meter, the stocked NiMH that comes with the meter is 9V 300 mAh NiMH. Looking on eBay I found several NiMH batteries which appear to be 600 mAh, here is a link of the batteries : 9V Battery Or this link (in case the other is broken): 9V Battery However, reading on Wikipedia and other sources I found that NiMH batteries have a maximum capacity of around 300 mAh, so my question is : Is a 9v NiMH battery with 600 mAh possible?, or are they just a Chinese gimmick that claims 600 mAh without actually delivering such capacity? P.S. I cant use Li batteries on my meter. <Q> I just bought a set of Lithium ion rechargable batteries. <S> Here is the straight dope. <S> Lithium Ion has a much greater energy density than NiMh. <S> In addition, a 9v battery is made up of many cells. <S> Since a NiMh chemestry is 1.2v, usually they have 7 little cells in there to make 8.4v. <S> Since these cells are tiny, they do not hold that much energy. <S> A Lithium Ion cell produces 3.7v and so they put 2 of these in a 9v battery package. <S> It runs at 7.4v <S> but that's ok for most things <S> however it may always indicate that your battery is low. <S> But since the 2 cells are much bigger, they can hold more total energy. <S> The ones I have actually have a micro usb port in the bottom to charge <S> so its sacrificing some power for convienence while still having more capacity than the NiMh. <S> Its probably a good thing however because charging a Lithium Ion battery in a NiMh or NiCd charger will probably cause damage or explode. <A> An AAA NiMH delivers a max of 800 mAH <S> (irrespective of what it says on the label). <S> So 600 mAH would be 3/4 times as big. <S> 7 of those would be close to 9V. 3/4 of 7 is 5.25. <S> So, is it possible to fit 5.25 AAA cells in a 9V space? <S> I doubt it, especially considering that the 9V battery has an additional layer of packaging. <S> I'd say, at most 500 mAH may be the absolute max possible, if one tries really hard. <S> 300 mAH - 400 mAH is more realistic, especially if you want the low self discharge type. <S> As per comments below, an AAAA cell could potentially be 480 mAH max. <S> 6 such alkaline cells typically make up an alkaline 9V. <S> So for an NiMH 9V, if you have more than 6 cells in the same space, the mAH will almost definitely be less than 480 mAH. <S> edit <S> AAAA NiMH exist, and are 400 mAH. <S> However, you need 7 of them for 8.4V (nominal). <S> Or, you can make a 7.2V 400mA battery with 6x AAAA, that looks like a 9V battery (PP3 battery). <S> 6x NiMH will typically be at 8V for most of it's life, at <100mA current draw. <S> I use this often (6x AA NiMH). <S> This is not as bad as it sounds. <S> Remember that most manufacturers rate the alkaline cell mAH down to 0.9V. <S> That means 5.3V for an alkaline PP3. <S> 8V is way better than that. <S> Also, somewhat unrelated, but... <S> Rechargeable cells are best charged singly. <S> In a battery, if any cell is more damaged than the other, there exists a chance of polarity reversal during charging, which will destroy the pack. <S> The chance of this happening, increases with every additional cell in the pack. <A> My solar garden lights came with Chinese 300mAh and 600mAh AAA Ni-MH cells. <S> They both measure about 120mAh.
Energizer 9V Ni-MH batteries are 175mAh but the Duracell website is not secure and is impossible to navigate.
Securing a PCB board to a plastic casing - can I just glue the bottom? I have an inertial measurement unit PCB that picks up changes in acceleration. I want to secure it inside a plastic box/casing. The products (and pictures) I want to use are below: https://www.sparkfun.com/products/13303 https://www.aliexpress.com/item/1-piece-plastic-standard-box-76-35-20mm-2-99-1-38-0-79-inch-box/1439035089.html (The PCB fits inside easily, it measures about 2.5cm x 2.3cm) Now it's incredibly important that the PCB - which has the sensor - is very rigid to the plastic box/casing. I want to measure motion of the box as precisely as possible. I'm not sure if using the 2 corner holes with screws/nuts is sufficient as it's only on one side and therefore provides some leeway for the other side to flex slightly. So I was thinking why not just glue the damn thing? Glue doesn't conduct electrical signals (as far as I know) so that's not an issue. And the part being glued, the PCB, is extremely light, so the holding force need not be too high. Will this work? If so, what glue/adhesive product should I use? Are there better solutions? This is a hacked-together project, so professionalism isn't the highest priority. Just the requirement that the PCB is very rigidly attached to the bottom half of the plastic case. Thanks for any help! <Q> As such you just can't beat good old screws, spacers, and nuts for solid mechanical connection. <S> In your case, since you want a direct transferral of motion information to the board from the box, I might be inclined to augment the screws with an epoxy filler that fills the bottom of the box and covers the PCB. <S> As a bonus, the PCB will then also be protected from ay sources of moisture, contaminants etc. <S> The deeper part of the box would then be the cover. <A> The problems with glue are: Depending on formulation, it may eventually degrade into a more conductive substance, absorb water, etc. <S> It can interfere with testing/servicing the board compared to screws which are easily removable. <S> In this case, neither should be a problem since you are using a standard board you won't need to debug itself and the overall system is a prototype. <S> I would suggest using a hot-glue gun and standard high-temperature glue sticks. <S> Hot glue is not all that strong on smooth surfaces, as glues go (good in case you want to undo it <S> — I have also heard that isopropyl alcohol can help remove it) and can fill gaps and is fairly rigid compared to, say, double-sided foam tape (good for transmitting vibration). <S> Avoid getting the glue on or near the board's wire holes so you can replace the wire to the board as needed, but do let it squeeze into the mounting holes for a stronger joint than just being between two flat surfaces. <A> Personally I would use bolts and standoffs. <S> If you just want a temporary fix, I would use VHB tape rather than glue.
Finding a glue that reliably adheres to plastics can be difficult. BTW: If this is a motion sensor you will want the board attached to what looks like the lid in your picture (The bit on the right) since that has the mounting lugs, assuming you plan on using those.
Multiple MOSFET based AC switching circuits on the same supply I am trying to build a MOSFET based AC switching circuit, with multiple switching circuits running on the same DC power supply. Each switching circuit is basically an expanded solid state relay. The MOSFETs are switching 240V 50Hz AC (UK Mains) at ~300mA (though the design should take up to 4A in theory). Each switching circuit on it's own works exactly as intended but when placed together on the same +5/GND bus each circuit interacts with & partially activates the others. My current theory is that some transient voltage is making it back through the circuit somewhere to the gates of MOSFETs that are meant to be off. The best I can describe the symptom is that when switching circuit A is 'on' and switching circuit 'B' is off, the load connected to the switched live on circuit 'B' buzzes at 50Hz, I assume getting a half wave of AC power. One of the MOSFETs in circuit B also gets extremely hot implying flow either backwards through the diode or through the gate. I've included the circuit diagram I'm working with, the opto isolators are controlled by an IC but I've simplified that side of the circuit to a connector as I've powered the optos with other means and still had the same problem. Is there an obvious solution I'm missing? I feel like I'm doing something stupid. Any ideas how I could better isolate the gates from each other? Some clarification of the circuit if you need: AC Live is attached to pin 1 of both P1 and P2 Each switched live is attached to pin 2 of P1 and P2 seperately The dashed line is simply to clarify where the low voltage control circuit is isolated from the high voltage switching circuits. U1 is a 5V DC-DC isolator (ROE-0505S) The diodes D1 and D2 are my attempt to stop 240V mains making it from one circuit to another through the shared ground connection, removing them or replacing them with a large resistor makes no difference to the symptoms. <Q> When the circuit is off, q3 and q4 are off. <S> When you turn on P1, the sources of q3 and q4 are riding on the 220V power line, and the gate is (power line + 5) volts. <S> This means that GND_ISO and +5V_ISO must also follow the power line, taking Q5 and Q6 with them. <S> Whatever your load is remains referenced to neutral, so Q5 will have high gate-drain voltage in the wrong direction or just act like a rectifier through Q5 body diode if D2 is not present. <S> You will need separate isolated supplies. <A> John Birckhead has answered your question correctly, I think. <S> You may be able to solve the problem, eliminate the isolated power supplies and simplify your circuit using a photovoltaic MOSFET driver. <S> Figure 1. <S> Extract from VOM1271 datasheet . <S> I haven't studied this and would be interested in comments on performance of these devices. <A> 5V supply for the gate is low - your MOSFET has 3.5V gate threshold, and the optocoupler will drop some. <S> Working near the threshold, when you want switching is not a good idea. <S> Better choose 12V DC-DCs. <S> A better gate driver would be useful, even made with discrete components. <S> simulate this circuit – <S> Schematic created using CircuitLab
You need separate DC-DC converter for each AC switch.
S8050 BJT is rated for 700 mA but gets extremely hot when powering a 12 volt 700 mA PC fan I'm working on a project that requires a DC motor, so I salvaged a PC fan from an old computer. The model is AVC DS08025R12U. It needs 12 volts for maximum speed and is rated to draw 700 milliamps. I'm planning to power the motor with a 12 volt 3 amp power brick, which will also help power an Arduino microcontroller and a breadboard power supply module. I'm planning on changing the speed of the motor with a PWM signal from the Arduino, but just to test, I set up the simple circuit that can be found on the sparkFun website. Instead of making a simple code, I am just plugging a wire into ground or 5V manually. I also have the Arduino removed from the circuit. Here's a schematic - simulate this circuit – Schematic created using CircuitLab Instead of powering the breadboard with the Arduino, I used an Elegoo breadboard power supply module. I have a wire going straight from the DC jack (12 volts, 3 amps) to the Collector of an S8050 NPN Bipolar Junction Transistor, which, from the datasheet, is able to handle 12 volts and 700 milliamps. Although the power brick does supply 3 amps, the fan is only rated to draw 700 milliamps, which is the maximum amount of amps the BJT can take, after checking with a multimeter, it only draws a little over 500 milliamps, which should be nowhere near too much for that transistor. The datasheet for the S8050 NPN BJT is right here - http://electronics.se-ed.com/magic/s8050.pdf Is the potential problem in the physical circuit? Am I incorrectly reading the datasheet? Is this normal? Also, for some reason, when I use 5 volts to turn the transistor on and off, the fan doesn't spin very fast. Only when I plug the jumper cable connected to the base of the BJT to 12 volts does it reach maximum speed, in which case the BJT gets much hotter much faster. Thanks so much! <Q> From your description it sounds like you're doing "high-side switching", like this: simulate this circuit – Schematic created using CircuitLab <S> THIS IS NOT WHAT YOU WANT! <S> Because, as you've discovered "the fan doesn't spin very fast", this configuration will never deliver the full 12V to your fan. <S> It doesn't matter if the Arduino is there or if you're just pulling that pin manually up to 5V. <S> In this configuration your fan will never get more than about 4.3V (5V - 0.7V V be ), with the remaining 7.7V dropped across your transistor (just causing it to heat up - as you've also discovered). <S> The voltage at your NPN transistor's emitter can never get higher than the voltage you put on its base (minus the typical 0.7V be ). <S> Rearranging your circuit to do "low-side switching" instead will improve things dramatically: simulate this circuit <S> In this configuration with the emitter tied to ground, applying 5V to the base resistor (not directly to the base) causes the transistor to switch on 'hard', pulling its collector down to about 1V, which means that your fan now gets 11V - much better than before. <S> While this is a significant improvement, its still a bit less than ideal. <S> The low-ish current gain (probably around 40) means that your poor Arduino will have to source around 15-20mA to drive the transistor (and you would need to reduce the value of the resistor to 220R or less). <S> You can do away with the resistor and connect the N-FET's gate directly to your Arduino while not worrying about the Arduino having to source any current, because the N-FET doesn't really require any. <S> * simplification <S> IF you choose the right N-FET you'll also get closer to delivering the full 12V from your supply yo your fan. <A> S8050 BJT is rated for 700 mA but gets extremely hot when powering a 12 volt 700 mA PC fan <S> transistors don't get hot just because of the current. <S> they get hot because of power dissipation. <S> calculate the power dissipated in your case and check the device datasheet for thermal resistance and you will see how much temperature rise there is -> how hot the device will get. <S> edit: in your particular case, you are using the transistor as a current amplifier (aka linear device) -> <S> it will dissipate lots of heat and may not deliver enough power to the load - <S> the output voltage is the logic high voltage - 0.7v. <S> reconfigure it as a switch instead. <A> simulate this circuit – Schematic created using CircuitLab <S> I would design my fan controller this way. <S> TO-92 <S> BJT are normally use for low current application, they are not prefer to drive motor applications. <A> With your original circuit, the fan only sees 5-Vbe(~0.7V) Volts. <S> That's why it's not spinning very fast. <S> Also use another transistor. <S> The ones in a TO92 are not capable to run heavy loads.
Replacing your S8050 NPN BJT with a small N-Channel logic-level MOSFET (also in the low-side configuration) should give an even further improvement.
How to drop 0.2 V dc? I have used a voltage adaptor as power supply. The output is 5.17 V but I need exactly 5v for my circuit. I can't use voltage regulator (7805) because The minimum input voltage is 7 V. And my circuit needs 1 A current. The only reason I insist on it is that if the voltage has less telorance, The ADC would be more accurate. What's your suggestion? Thanks <Q> But, you'd have to be exquisitely careful not to drop another few 10s of mV in connectors or wiring and blow that headroom budget. <S> A buck-boost converter will convert up or down to give you the voltage you want. <S> It would probably be best to take a step back and realise that 'exactly 5v' is not possible, even in theory. <S> There is always a tolerance. <S> Does your 5v load <S> really require a tighter tolerance than 5.2v? <S> Most loads will specify +/- <S> 10% tolerance, +/- <S> 5% if they're really picky, which is +/- <S> 0.25v. <S> Before you design a way to drop your 5.17v, you need to make sure you can provide the accuracy your load demands. <S> From your question, it appears you're not too picky about the difference between 170mV and 200mV. <S> Another direction is to look at your supply. <S> Is it adjustable? <S> Can you use a supply with the correct output voltage. <S> Can you use a supply with slightly higher output voltage that will allow you to regulate down with more headroom? <A> The only reason I insist on it is that if the voltage has less telorance, The ADC would be more accurate. <S> If you use the power supply as a voltage reference for your ADC, you can't expect any kind of precision. <S> Since you mention 1A current draw, the 5V supply will vary a little bit as the current varies. <S> Every time the load current changes, the voltage will jump a bit as the regulator settles. <S> Your microcontroller or ADC most likely has a pin for this. <S> Since it draws very little current from the reference, the voltage will be much more stable. <S> You can use a 4.096V reference, for example. <S> Here's a link . <A> You could use a schottky diode like 20l15t . <S> it has a forward voltage of <S> 0.25V <S> maybe you will find something even lower. <A> The best way to get accurate 5Vdc is to use 9V or 12V adapter and step down to 5V. <S> Buy a DC-DC module that have a potentiometer on it <S> and you can set accurately 5V. <S> If you're going to use it with ADC that requires low noise, choose LM317 option instead. <S> LM317 have better noise performance than 7805. <S> Not to mention you can adjust 5V accurately using pot.
If you want accurate ADC readings, you must use a dedicated voltage reference for your ADC. So, you need a reference that can be supplied from 5V. You could also try a Buck-converter like the LT1375 You can get LDOs (Low DropOut regulators) that have 100mV or even less required headroom.
Spring PCB terminal block for stranded wire I am planning to use this spring terminal block : Voltage and current requirements: 220 VAC 5 amps max Wire type : Multi strand wire - 1 sq mm to 1.5 sq mm like this: Datasheet says that I can use 0.2 sq mm to 2.5 sq mm: I have never earlier used spring terminal blocks. Online reading suggested use of ferrules for multi strand wires in some articles but other articles and youtube videos were fine with directly stripping and inserting the stranded wires. What is the preferred way to use such connectors with multi strand wires? <Q> Of course ferrules like these --> <S> Ferrules are always good for such terminal blocks but they are not mandatory. <S> If you have them, use them but as I said they are not mandatory <A> In my case I prefer using a terminal on the wire when I used it with a spring terminal block. <S> This way it holds the wire better and the wire doesn't get loose so easily. <S> A normal terminal like this one is ok: <S> enter link description here <A> I'm a really big fan of screw terminal blocks for similar reasons to what have already been written. <S> But regarding this spring terminal block, I'd only ever use ferrules with it. <S> Issue is you could go over the 2.5 sq mm, however leaving them all frayed like that <S> is really not in your best interest. <S> It introduces safety issues and random shorts can happen. <S> If you really don't want to use ferrules <S> I'd recommend twisting the wires to keep them neat and organized (see picture). <S> It's a little safer than just pressing them in frayed like that but still not ideal. <A> If you don't use ferrules by the second or third time you use a wire in one of these even a twisted end has frayed and is prone to shorting to the adjacent terminal. <S> The core issue is not that it is a spring clip but that your wire spacing is small. <S> Just always use crimps or ferrules or solder. <S> etc. <S> when you have closely spaced stranded wire.
Depending on the thickness of the used wires, it can become very hard and ugly to place them in the terminals. For these I always use ferrules, because the spacing is close and these bend the wire if you don't.
Battery connectors inside a UPS, F1 for F2 subsituted, consequences? I have a 10-year old APC UPS. Naturally the 12V SLAs were dead, so I bought 8 new ones of similar specs. After swapping out the batteries the unit starts and charges fine, but when I try and run a load on it then pull the line input power, the UPS shuts down and lights up the red X "battery failed" light while pip-pip-pipping. The load goes down hard at this point. On inspection, the original batteries used the F2 connector (pictured on the right), and my replacements use the smaller F1 connector (on the left) Question Is it likely that using the wrong connector with the original F2 wiring is limiting the current that can be drawn? The battery back reads about 52 volts (its 48v nominal with 12V x4 x2 so a total of eight 5Ah batteries) or is my UPS simply broken ? I don't have the resources to buy 8 more batteries on the off-chance this is the root cause. Should I recreate the battery pack internal cabling with F1 spade connectors - would that help? Or do something else to improve connectivity? UPS is an APC 2RU rackmount job rated at 2.2kVA, and has a network management card, so its not a cheap and nasty home-grade device. I've changed batteries in over a dozen different UPSs in the last couple decades, so while not an every day thing I haven't made any significat mistakes. Size range from 275VA up to a 6kVA emerson monster. Data sheet for the batteries I used <Q> Those batteries are not really suitable <S> The datasheet for the batteries does not give a maximum discarge rate or current draw, but does indicate that the capacity is cut in half at 8 amps. <S> At 12A, the voltage drops to 10V after only 8 minutes. <S> At full load, a 2.2kVA UPS will draw 45A from a 48V battery bank. <S> Since you have two parallel sets of four batteries in series, that is 23A per battery. <S> Drawing that much current will cause the battery voltage to drop a lot. <S> The UPS then detects the voltage drop, and decides the batteries must have failed. <S> All is not lost though - if you keep the current draw low, then the voltage will probably stay up, and the UPS is more likely to work. <S> What load you can manage will depend on details of the UPS which we don't have, so you'll just have to go by trial and error. <A> As per our comments i thought i would leave a more comprehensive answer: <S> The connectors themselves should not cause the issue - but if enough current was requested they could overheat. <S> Since the batteries have smaller connectors, it is likely they have lower maximum and continuous discharge ratings, which in your own case it seems indicative that you are exceeding this with your UPS. <S> Rebuilding the packs with larger connectors is very unlikely to aid any benefit as the discharge rating will be most certainly set by the internal resistance of the cells themselves. <S> If the UPS works with a light load but dies on application of a heavy load it is likely the voltage of the bank is sagging under load, which you should be able to observe on a multimeter when you activate the UPS. <S> If this is the case the UPS is not lost, but until you can upgrade the cells, or add another bank in parallel to increase current capacity, you may have to attach the UPS to a more suitable load (i.e. Attach less too it) <S> I know its not what you wanted to hear <S> but I would say its about all you can do in this scenario. <S> But otherwise you should be fine. <S> Update : You have added the datasheets, <S> yeah <S> - they are unsuitable. <S> Try a light load or you may need to change / add another bank in parallel later on. <A> Putting a 0.250" Faston on a 0.187" tab is not automatically a problem. <S> BUT, there also are two different thickness of the tabs. <S> The 0.250" tab almost certainly is 0.031 <S> " thick, while the 0.187" tab might be thinner. <S> This could lead to very light contact causing the localized heating already mentioned, or even intermittent contact that confuses the control system.
If you decide to run with a load that doesn't drop the UPS like a stone, i would run it for a while and see if the connectors or batteries are getting hot, just in case.
Three different development boards for STM32F103C8T6 I ordered one of these which has a single row of pins Single-row While there are also these which have double row of pins: Double-row I wonder what I miss ... of course a lot of pins difference, but I'm not sure what those pins are, are those pins I cannot use at all, and are some of those pins I will miss having special functions like UART/SPI etc I cannot use? For me it's a but unclear what pins mean what (used to the Arduino where every pin has it's own meaning). Minimal This one does not have the JTAG (I also ordered a USB TTL converter and JLINK 'stick'. Do I have the same functionality as like 1 or 2 above in this case? <Q> There is no real difference. <S> All have all pins available, and you can use SWD or JTAG probes. <S> Actually on the micros with the very limited pin number SWD is more practical as it only takes two pins. <A> Comparing STM32 boards with arduino in my experience will confuse you. <S> STM32 boards have ports which in turn have pins. <S> If you want to use PC05, you need to enable clock on Port C (known as GPIOC) and initialize GPIO_Pin_5, you now have control over that pin you can set it as open drain, <S> AF etc; you can also set the speed. <S> You also have a lot of more freedom in that if you want to use I2C it doesn't have to be on any specific pin, you can use whichever on you want (although some pins on some ports can't be used for specific peripherals, I highly advice reading the ref manual for your baord and the specific peripherals you want to use). <S> If your board has more physical pins then you can connect more devices, you dont lose things such as UART, I2C, SPI etc; you just have less pins to use them on. <S> I'm assuming you are new to STM32, just to let you know that you need to get an stlink (version 2 for that board) in order to program the board (you can't cheap out on this). <S> It also helps you debug your program. <S> It's also hard to find an IDE, so you can use http://www2.keil.com/mdk5/uvision/ <S> (the only I used and would highly advise to use it)or simply just use the Arduino one (I highly advise against this if you want to learn more about embedded). <A> The first two boards can be programmed via J-Link (JTAG + SWD + SWO) or ST-LINK <S> (SWD only). <S> The last one is SWD only, unless you break out the JTAG pins. <S> You may have to ask the vendor(s) for schematic to know the differences exactly. <S> I have the second type and found it to be quite easier to play with than the bare bones ones. <S> This one does not have the JTAG <S> (I also ordered a USB TTL converter and J-Link 'stick'. <S> Do I have the same functionality as like 1 or 2 above in this case? <S> They are functionally the same as STM32F103C8T6, but you will have to get the datasheet to play with it. <S> As for IDE, if money is of no issue, I prefer older (v4 and ealier) Keil or IAR. <S> They are simple and dependable. <S> For personal projects, I use CoIDE by CooCox (pre-v2.0) and GCC. <S> It gets the job done quickly - it actually compiles faster than Keil / IAR and can program the chip with one click.
The chip is the same - unless you get one with the STM32FEBKC6T6 - I have seen some of them.
Phase Shift Oscillator not Oscillating May I please ask why my phase shift oscillator as shown is not oscillating?My R1=R2=R3, and C1=C2=C3.I am trying to get around 1kHz of oscillation, so using the simple equation of fr=1/(2*pi R C*sqrt(6)), I get all the values as shown in the pictures. But why is it not oscillating?I tried at both Multisim and LTSpice, but it just doesn't simulate.I am using ideal opamp at both simulators (gain is very high, 200x let say).I put Rf(feedback resistor of opamp) to be 220k to have Rf>29*R, which will make the loop gain >1 (to fulfill the Berkhausen criteria), but it is still not oscillating. I thought the circuit fulfills both of the criterion for oscillating to happen? I tried changing Rf to even higher value, and even play with the RC values. I also tried to use LM741 op amp and rise the supply voltage slowly, but I never get oscillation.May someone please give me enlightenment on what is wrong/lacking?Thank you very much. <Q> In this case, the kick-start is done by initializing node n005 to 0.01V (anything other than zero volts). <S> Node 5 is at the right-hand end of C3: <S> This oscillator uses a virtual op-amp with open-loop gain of 100K. Since it has no power supply and is perfectly linear, oscillations grow exponentially...forever. <S> XU1 N001 0 <S> N002 opamp Aol=100 <S> K GBW=10MegR1 <S> N002 <S> N001 180kR2 <S> 0 <S> N003 560R3 0 <S> N004 560R4 0 <S> N005 <S> 560C1 <S> N003 N002 .1µC2 <S> N004 N003 .1µC3 <S> N005 N004 .1µR5 <S> N001 N005 5.6k. <S> IC V(n005)=.01.tran 0 .1 0 <S> .00001.lib <S> opamp.sub.backanno.end <S> Your oscillator also hasn't quite enough phase shift. <A> I have simulated your circuit using Intusoft IsSpice as you can see below. <S> The feedback resistance is calculated to compensate the attenuation where the phase lag is 180°. <S> I derived the oscillation frequency here for the two phase-shifted oscillators (\$RC\$ and \$CR\$) here Deriving the formula of oscillation frequency for the Phase Shift Oscillator . <S> In a circuit like this, with perfect elements, there is no noise as correctly pointed out by glen_geek. <S> You can crank the circuit with an external source but the easiest way is by using a .IC statement as I did on \$C_3\$: <S> When you run the simulation, it nicely oscillates as shown below at a frequency of 1.16 kHz. <S> Please note that my feedback resistance (your \$R_4\$) is 162 k\$\Omega\$ and not 220 k\$\Omega\$ as in your circuit. <S> Oscillations are nicely maintained without clipping so perfect compensation of the attenuation. <S> Please make sure to check the UIC box (use initial conditions) before starting the simulation. <S> Please note that \$R_f\$ must exactly compensate the attenuation where the phase lag is 180°. <S> The condition for oscillation is a 360° total phase lag (-180° of the \$CR\$ network plus -180 <S> ° of the inverting op amp) and a gain of 1. <S> If the gain is less than one then the poles have a real part and oscillations will cease quickly. <S> If the gain is greater than 1, the the poles jump into the right-half plane and oscillations diverge until a real op amp rails up or down. <S> So \$R_f\$ must be 29 times 5600 in your example to match this criteria: 162 k\$\Omega\$ not more, not less. <S> See the two examples below with more than 162 k\$\Omega\$ and less than 162 k\$\Omega\$: <A> Change Vin(+) to Vcc/2 with 2 R's like 470K. <S> You are violating Vin CM range. <S> Then increase gain to make stable oscillation, let R4= 1M if you have enough GBW at fo. <S> Overall is a poor design at best, and worse when you dont consider GBW and attenuation and CM in range.
For some oscillators, it helps to "kick-start" to get them going in a simulation that doesn't model the noise that gets a real oscillator going.
DC Output Voltage of BJT Differential Amplifier with Active Load I want to compute the value of VO. simulate this circuit – Schematic created using CircuitLab I would have guessed that VO = VCC - VEB. Asuming VCC = 5V and VEB = 0.6 V, that would render VO = 4.4 V, as in the left branch of the circuit. But doing the simulation I found that VO is actually much lower: VO = -459.9 mV So, how should I do to compute VO properly? <Q> The DC output voltage of a differential pair isn't a particularly useful figure. <S> As with any input offset voltage from mismatch the output will rail one way or the other. <S> The simple answer is that all your PNPs are matched and your NPNs are matched. <S> So, in the left-hand branch you have an extra \$2I_b\$ from your current mirror. <S> The left NPN has a \$V_{be}\$ which is based on this extra \$2I_b\$. <S> The right NPN has the same Vbe but see's 2Ib less collector current than the other branch. <S> So the right NPN saturates trying to pull the same current as the left NPN. <A> You're correct that, in theory, those voltages are equal. <S> In real life offsets between the two devices will result in that not being true. <S> However, simple simulations such as the one you're using don't model offsets. <S> So one would expect the voltages to indeed be equal. <S> What your software does, however, model is finite beta of the transistors. <S> Here is a simulation I did, where I swept the Beta of each device from 100 to 1e6 ("infinite"). <S> You can see how Vout approaches Vref as beta -> infinity. <S> You can get an intuitive "feel" for the fact that finite beta affects this circuit by noting that Q3 pulls two base currents in addition to the current "programmed" to the collector of Q1. <A> This will not be the case using real transistors though, so this calculation is useless. <S> Q1 and Q2 form a long tail pair differential amplifier. <S> They take as input the voltage difference between their bases, and output a difference in collector currents. <S> It is important to notice that the output is a current, not a voltage. <S> Here, both bases are at the same potential. <S> Using the unrealistic hypothesis that both transistors are identical, their collector currents are thus equal, and their value is I1/2 minus the base current, which we will neglect. <S> Now, Q3 and Q4 form a current mirror. <S> Q1's collector current is mirrored and output by Q3. <S> Q3's collector current is thus I1/2 also. <S> Q3 and Q1's collector currents thus cancel perfectly <S> and... we forgot Q3's base current. <S> We can't neglect it this time. <S> Thus, after the I1/2 parts in Q1 and Q3 collector currents cancel, the current which attempts to flow into node "Vo" is the base current of Q3, which is negative. <S> With I1=1mA and Q3 having a hFe of 200, this current is 1mA/2/200 = <S> 2.5µA <S> However, we neglected Early effect (and self heating) in all transistors, which we really shouldn't be doing. <S> So this value will be wrong. <S> Anyway. <S> You want voltage. <S> This means we have to compute the impedance at node Vo, to convert current into voltage. <S> Bad news is this impedance is difficult to compute, since two collectors are facing each other. <S> It will depend on individual transistor characteristics, ie their parapeter ro (due to Early effect). <S> What you are seeing is that the collector impedance of your transistors is high enough so that output voltage clips against one of the transistors. <S> This circuit should be used with a low input impedance stage after it, which takes a current as an input, and imposes a voltage to point Vo. <A> I will try to explain how the circuit works intuitively. <S> Q3 and Q4 form a current mirror. <S> This means that their collector currents will be very nearly equal over a wide range of collector voltages. <S> Or you could say that the current will try to be equal, unless it is just not possible. <S> Next thing to notice is that the total collector current is fixed because of the current source. <S> Let's call that Itot. <S> So Icq1 = Icq2 = Itot/2. <S> Now let's look at Q1 and Q2. <S> These are the input pair of this differenatial amplifier. <S> Basically, if the base of Q2 is higher than the base of Q1, then Q2 will try to conduct more current than Q1. <S> But the current mirror will try to keep the collector currents equal. <S> The net result of this is that when Q2's base goes high, Q2's collector goes low, and Q1's collector goes high. <S> The reverse is also true. <S> Without any feedback or anything, this acts like a comparator, shooting from rail-to-rail depending on which base, Q1 or Q2 has a higher voltage. <S> If you add gain stages and some feedback, you will have some kind of rudimentary op-amp. <S> Hope that helps.
You can calculate Vo by making the unrealistic hypothesis that all transistors are perfectly identical.
How to decrease used LUTs in FPGA Design? I am working with Spartan 2 XC2S50 FPGA Chip on Xilinx board There is a problem on my design that increases number of used LUTs and this is the Utility Library : library IEEE;use IEEE.STD_LOGIC_1164.all;package Utility is Type Char_Array is array(natural range <>) of std_logic_vector(7 DownTo 0); Constant CharArray : Char_Array(0 to 38) := ( "00110000", -- 0 "00110001", -- 1 "00110010", -- 2 "00110011", -- 3 "00110100", -- 4 "00110101", -- 5 "00110110", -- 6 "00110111", -- 7 "00111000", -- 8 "00111001", -- 9 "01000001", -- 10 : A "01000010", -- 11 : B "01000011", -- 12 : C "01000100", -- 13 : D "01000101", -- 14 : E "01000110", -- 15 : F "01000111", -- 16 : G "01001000", -- 17 : H "01001001", -- 18 : I "01001010", -- 19 : J "01001011", -- 20 : K "01001100", -- 21 : L "01001101", -- 22 : M "01001110", -- 23 : N "01001111", -- 24 : O "01010000", -- 25 : P "01010001", -- 26 : Q "01010010", -- 27 : R "01010011", -- 28 : S "01010100", -- 29 : T "01010101", -- 30 : U "01010110", -- 31 : V "01010111", -- 32 : W "01011000", -- 33 : X "01011001", -- 34 : Y "01011010", -- 35 : Z "00111010", -- 36 : ":" "00100000", -- 37 : Space "10110000"); -- 38 : - -- Type LCD_Text is Array(natural range <>) of std_logic_vector(7 Downto 0);-- SubType LCD_Line is LCD_Text(1 to 16); function reverse_vector(a : IN std_logic_vector) return std_logic_vector; function StdCharNum(I : std_logic) return std_logic_vector;end Utility;package body Utility isfunction reverse_vector(a : IN std_logic_vector) return std_logic_vector is variable result: std_logic_vector(a'RANGE); alias aa: std_logic_vector(a'REVERSE_RANGE) is a;begin for i in aa'RANGE loop result(i) := aa(i); end loop; return result;end;function StdCharNum(I : std_logic) return std_logic_vector isbegin Case I IS when '0' => return CharArray(0); when '1' => return CharArray(1); when others => return CharArray(37); end case; end;end Utility; I think the output of Multiplexer increases the used LUTs, How can I change Multiplexer to decrease used LUTs ? I have tried many ways, but no chance to decrease enough LUTs. changing std_logic_vector to bit_vector for port types may be helpful or not ?! Edit : I changed design to this : library ieee ;...Entity Main IS PORT(CLOCK : IN STD_LOGIC; Kb_RK : IN STD_LOGIC_VECTOR(3 DOWNTO 1); LCDSelector : IN STD_LOGIC_VECTOR(3 Downto 0); MemAddr : IN STD_LOGIC_VECTOR(11 Downto 0); DE : OUT STD_LOGIC_VECTOR(3 DOWNTO 1); Seg_Out : OUT STD_LOGIC_VECTOR(7 Downto 0); LED_Row : OUT STD_LOGIC_VECTOR(7 Downto 0); LED_Col : OUT STD_LOGIC_VECTOR(7 Downto 0); Buz_Out : OUT STD_LOGIC; LCD_RW, LCD_RS, LCD_EN : OUT STD_LOGIC; LCD_Data : OUT STD_LOGIC_VECTOR(7 Downto 0));END Main;Architecture Structure OF Main IS Component Base_Com is Port(CLK : IN std_logic; Reset_In : IN std_logic; INPR_In : IN std_logic_vector(7 Downto 0); Instruction : IN std_logic_vector(15 Downto 0); RunMode : IN std_logic; -- 0 = Normal 1 = Debug; RunDelay : IN std_logic_vector(2 Downto 0); MemDispAddr : IN std_logic_vector(11 Downto 0); Start, Step : IN std_logic := '0'; State : OUT std_logic_vector(2 Downto 0); AC_Out, DR_Out, IR_Out, TR_Out : OUT std_logic_vector(15 Downto 0); AR_Out, PC_Out : OUT std_logic_vector(11 Downto 0); INPR_Out, OUTR_Out : OUT std_logic_vector(7 Downto 0); Mem_Out : OUT std_logic_vector(15 Downto 0); Flag_I, Flag_S, Flag_E, Flag_R, Flag_IEN, Flag_FGI, Flag_FGO : OUT std_logic); End Component; Component Keyboard IS PORT(Clock : IN STD_LOGIC; Reset : IN STD_LOGIC; BCState : IN STD_LOGIC_VECTOR(2 Downto 0); RK : IN STD_LOGIC_VECTOR(3 DOWNTO 1); DE : OUT STD_LOGIC_VECTOR(3 DOWNTO 1); Invalid_Key : OUT STD_LOGIC; IC : OUT STD_LOGIC_VECTOR(7 Downto 0); PC : OUT STD_LOGIC_VECTOR(7 Downto 0); ProgState : OUT STD_LOGIC_VECTOR(1 Downto 0); Key : OUT STD_LOGIC_VECTOR(16 Downto 1); Ins : OUT STD_LOGIC_VECTOR(15 Downto 0); BCRunMode : OUT STD_LOGIC; BCRunDelay : OUT STD_LOGIC_VECTOR(2 Downto 0); BCStart, BCStep, BCReset : OUT STD_LOGIC); End Component; Component Buzzer Is ... End Component; Component LEDMatrix is ... end Component; Component LCD_Controller is Port(Clk : IN STD_LOGIC; --system clock Reset_n : IN STD_LOGIC; --active low reinitializes lcd LCD_Enable : IN STD_LOGIC; --latches data into lcd controller LCD_Bus : IN STD_LOGIC_VECTOR(9 DOWNTO 0); --data and control signals Busy : OUT STD_LOGIC := '1'; --lcd controller busy/idle feedback RW, RS, E : OUT STD_LOGIC; --read/write, setup/data, and enable for lcd LCD_Data : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)); --data signals for lcd end Component; Signal Key : STD_LOGIC_VECTOR(16 Downto 1); Signal KBState : STD_LOGIC_VECTOR(1 Downto 0); Signal InvalidKey : STD_LOGIC := '0'; Signal LEDRow1, LEDRow2 : STD_LOGIC_VECTOR(7 Downto 0) := "00000000"; Signal LEDRow : STD_LOGIC_VECTOR(7 Downto 0) := "00000001"; Signal BuzOut : STD_LOGIC := '0'; Signal ICBinary : STD_LOGIC_VECTOR(7 Downto 0) := "00000000"; Signal PCBinary : STD_LOGIC_VECTOR(7 Downto 0) := "00000000"; Signal ICTens, ICOnes, PCTens, PCOnes : STD_LOGIC_VECTOR(3 Downto 0) := "0010"; Signal ICSeg1, ICSeg2, PCSeg1, PCSeg2 : STD_LOGIC_VECTOR(7 Downto 0) := "00000000"; Signal Kb_DE : STD_LOGIC_VECTOR(3 Downto 1) := "000"; Signal LCD_Enable : STD_LOGIC; Signal LCD_Busy : STD_LOGIC; Signal LCD_Bus : STD_LOGIC_VECTOR(9 Downto 0); Signal CurrentLCDLine : STD_LOGIC := '0'; ------ Signal BCReset, BCRunMode, BCStart, BCStep : std_logic := '0'; Signal BCRunDelay : std_logic_vector(2 Downto 0); Signal BCState : std_logic_vector(2 Downto 0); Signal INPR_In : std_logic_vector(7 Downto 0); Signal Ins : std_logic_vector(15 Downto 0); Signal AC, DR, IR, TR, Mem : std_logic_vector(15 Downto 0); Signal AR, PC : std_logic_vector(11 Downto 0); Signal INPR, OUTR : std_logic_vector(7 Downto 0); Signal I, S, E, R, IEN, FGI, FGO : std_logic; ------ Signal LCDCounter : Integer range 0 to 32 := 0; Signal LCDWrite : std_logic := '0';-- Type LCD_Memory is Array(1 to 208) of std_logic_vector(7 Downto 0);-- Constant LCDMemory : LCD_Memory :=-- -- ("01010000", "01010010", "01001111", "01000111", "01010010", "01000001", "01001101", "00100000", -- Line_PK - 1-- "10110000", "00100000", "01001011", "01000101", "01011001", "00100000", "00111010", "00100000",-- -- "01000101", "01001110", "01010100", "01000101", "01010010", "00100000", "01010010", "01010101", -- Line_GM - 17-- "01001110", "00100000", "01001101", "01001111", "01000100", "01000101", "00100000", "00111010",-- -- "01000101", "01001110", "01010100", "01000101", "01010010", "00100000", "01010010", "01010101", -- Line_GD - 33-- "01001110", "00100000", "01000100", "01000101", "01001100", "01000001", "01011001", "00111010",---- "01010010", "01010101", "01001110", "10110000", "01000100", "00100000", "00100000", "00100000", -- Line_RD - 49 -- -- "01010010", "01010101", "01001110", "10110000", "01001110", "00100000", "00100000", "00100000", -- Line_RN - 57---- "01000100", "01001111", "01001110", "01000101", "00100000", "00100000", "00100000", "00100000", -- Line_DN - 65---- "01001101", "01000101", "01001101", "01001111", "01010010", "01011001", "00100000", "00111010", -- Line_Mem - 73-- "01000001", "01000011", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", -- Line_AC - 81-- "01000100", "01010010", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", -- Line_DR - 89-- "01001001", "01010010", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", -- Line_IR - 97-- "01010100", "01010010", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", -- Line_TR - 105-- "01000001", "01010010", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", -- Line_AR - 113-- "01001001", "01001110", "01010000", "01010010", "00100000", "00111010", "00100000", "00100000", -- Line_INPR - 121-- "01001111", "01010101", "01010100", "01010010", "00100000", "00111010", "00100000", "00100000", -- Line_OUTR - 129-- -- "01001001", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", "00100000", -- Line_I - 137-- "01010011", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", "00100000", -- Line_S - 145-- "01000101", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", "00100000", -- Line_E - 153-- "01010010", "00100000", "00111010", "00100000", "00100000", "00100000", "00100000", "00100000", -- Line_R - 161-- "01001001", "01000101", "01001110", "00100000", "00111010", "00100000", "00100000", "00100000", -- Line_IEN - 169-- "01000110", "01000111", "01001001", "00100000", "00111010", "00100000", "00100000", "00100000", -- Line_FGI - 177-- "01000110", "01000111", "01001111", "00100000", "00111010", "00100000", "00100000", "00100000", -- Line_FGO - 185-- "00100000", "00100000", "00100000", "00100000", "00100000", "00100000", "00100000", "00100000", -- Null_1 - 193-- "00100000", "00100000", "00100000", "00100000", "00100000", "00100000", "00100000", "00100000"); -- Null_2 - 201Begin BC : Base_Com Port Map(Clock, BCReset, INPR_In, Ins, BCRunMode, BCRunDelay, MemAddr, BCStart, BCStep, BCState, AC, DR, IR, TR, AR, PC, INPR, OUTR, Mem, I, S, E, R, IEN, FGI, FGO); LEDRow1 <= Key(16 Downto 9); LEDRow2 <= Key(8 Downto 1); KB : Keyboard Port Map(Clock, '0', BCState, Kb_RK, Kb_DE, InvalidKey, ICBinary, PCBinary, KBState, Key, Ins, BCRunMode, BCRunDelay, BCStart, BCStep, BCReset); ICTens <= ICBinary(7 Downto 4); ICOnes <= ICBinary(3 Downto 0); PCTens <= PCBinary(7 Downto 4); PCOnes <= PCBinary(3 Downto 0); LM : LEDMatrix Port Map(Clock, LEDRow1, LEDRow2, LED_Row, LED_Col); BZ : Buzzer Generic Map(15465) Port Map(Clock, BuzOut); LCD : LCD_Controller Port Map(Clock, '1', LCD_Enable, LCD_Bus, LCD_Busy, LCD_RW, LCD_RS, LCD_EN, LCD_Data);-- MLCD : MUX_LCD Port Map(Clock, LCDSelector, BCState, KBState, BCRunMode, BCRunDelay, Key, Mem, AC, DR, IR, TR,-- AR, INPR, OUTR, I, S, E, R, IEN, FGI, FGO, LCDText1); with ICTens Select ICSeg1 <= "00000110" when "0001", "00111111" when others; with ICOnes Select ICSeg2 <= "00000110" when "0001", "01011011" when "0010", "01001111" when "0011", "01100110" when "0100", "01101101" when "0101", "01111101" when "0110", "00100111" when "0111", "01111111" when "1000", "01101111" when "1001", "00111111" when others; with PCTens Select PCSeg1 <= "00000110" when "0001", "01011011" when "0010", "01001111" when "0011", "01100110" when "0100", "01101101" when "0101", "01111101" when "0110", "00100111" when "0111", "01111111" when "1000", "01101111" when "1001", "00111111" when others; with PCOnes Select PCSeg2 <= "00000110" when "0001", "01011011" when "0010", "01001111" when "0011", "01100110" when "0100", "01101101" when "0101", "01111101" when "0110", "00100111" when "0111", "01111111" when "1000", "01101111" when "1001", "00111111" when others; DE <= Kb_DE; with Kb_DE Select Seg_Out <= ICSeg1 when "000", ICSeg2 when "001", PCSeg1 when "100", PCSeg2 when "101", (others => '0') when others; Process(InvalidKey, BuzOut) begin if (InvalidKey = '1') then Buz_Out <= BuzOut; else Buz_Out <= '0'; end if; end Process;-- Process(BCState, BCRunMode, BCRunDelay, KBState, Key, MemAddr, Mem, AC, DR, IR, TR, AR, INPR, OUTR, I, S, E, R, IEN, FGI, FGO)-- begin-- LCDWrite <= '1';-- end Process; Process(Clock) begin if (Clock'Event and Clock = '1') then -- if LCDWrite = '1' then if (LCD_Busy = '0' and LCD_Enable = '0') then LCD_Enable <= '1'; LCDCounter <= LCDCounter + 1; if (LCDCounter = 17) and (CurrentLCDLine = '0') then LCD_Bus <= "0011000000"; LCDCounter <= 16; CurrentLCDLine <= '1'; else case KBState is when "00" => -- Program case LCDCounter is when 1 => LCD_Bus <= "10" & CharArray(25); when 2 => LCD_Bus <= "10" & CharArray(27); when 3 => LCD_Bus <= "10" & CharArray(24); when 4 => LCD_Bus <= "10" & CharArray(16); when 5 => LCD_Bus <= "10" & CharArray(27); when 6 => LCD_Bus <= "10" & CharArray(10); when 7 => LCD_Bus <= "10" & CharArray(22); when 8 => LCD_Bus <= "10" & CharArray(37); when 9 => LCD_Bus <= "10" & CharArray(38); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(20); when 12 => LCD_Bus <= "10" & CharArray(14); when 13 => LCD_Bus <= "10" & CharArray(34); when 14 => LCD_Bus <= "10" & CharArray(37); when 15 => LCD_Bus <= "10" & CharArray(36); when 16 => LCD_Bus <= "10" & CharArray(37); when others => LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & Key(LCDCounter - 16)))); end case; -- counter case when "01" => -- GetMode case LCDCounter is when 1 => LCD_Bus <= "10" & CharArray(14); when 2 => LCD_Bus <= "10" & CharArray(13); when 3 => LCD_Bus <= "10" & CharArray(29); when 4 => LCD_Bus <= "10" & CharArray(14); when 5 => LCD_Bus <= "10" & CharArray(27); when 6 => LCD_Bus <= "10" & CharArray(37); when 7 => LCD_Bus <= "10" & CharArray(27); when 8 => LCD_Bus <= "10" & CharArray(30); when 9 => LCD_Bus <= "10" & CharArray(23); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(22); when 12 => LCD_Bus <= "10" & CharArray(24); when 13 => LCD_Bus <= "10" & CharArray(13); when 14 => LCD_Bus <= "10" & CharArray(14); when 15 => LCD_Bus <= "10" & CharArray(37); when 16 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & BCRunMode))); else LCD_Bus <= "10" & CharArray(37); end if; end case; -- counter case when "10" => -- GetDelay case LCDCounter is when 1 => LCD_Bus <= "10" & CharArray(14); when 2 => LCD_Bus <= "10" & CharArray(13); when 3 => LCD_Bus <= "10" & CharArray(29); when 4 => LCD_Bus <= "10" & CharArray(14); when 5 => LCD_Bus <= "10" & CharArray(27); when 6 => LCD_Bus <= "10" & CharArray(37); when 7 => LCD_Bus <= "10" & CharArray(27); when 8 => LCD_Bus <= "10" & CharArray(30); when 9 => LCD_Bus <= "10" & CharArray(23); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(22); when 12 => LCD_Bus <= "10" & CharArray(24); when 13 => LCD_Bus <= "10" & CharArray(13); when 14 => LCD_Bus <= "10" & CharArray(14); when 15 => LCD_Bus <= "10" & CharArray(37); when 16 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned(BCRunDelay))); else LCD_Bus <= "10" & CharArray(37); end if; end case; -- counter case when others => case LCDCounter is when 1 => if BCState = "110" then LCD_Bus <= "10" & CharArray(13); else LCD_Bus <= "10" & CharArray(27); end if; when 2 => if BCState = "110" then LCD_Bus <= "10" & CharArray(24); else LCD_Bus <= "10" & CharArray(30); end if; when 3 => LCD_Bus <= "10" & CharArray(23); when 4 => if BCState = "110" then LCD_Bus <= "10" & CharArray(14); else LCD_Bus <= "10" & CharArray(38); end if; when 5 => if BCState = "110" then LCD_Bus <= "10" & CharArray(37); else if BCRunMode = '1' then LCD_Bus <= "10" & CharArray(13); else LCD_Bus <= "10" & CharArray(23); end if; end if; when 6|7|8 => LCD_Bus <= "10" & CharArray(37); when others => case LCDSelector is when "0000" => -- Memory case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(22); when 10 => LCD_Bus <= "10" & CharArray(14); when 11 => LCD_Bus <= "10" & CharArray(22); when 12 => LCD_Bus <= "10" & CharArray(24); when 13 => LCD_Bus <= "10" & CharArray(27); when 14 => LCD_Bus <= "10" & CharArray(34); when 15 => LCD_Bus <= "10" & CharArray(37); when 16 => LCD_Bus <= "10" & CharArray(36); when others => LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & Mem(32 - LCDCounter)))); end case; when "0001" => -- AC case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(10); when 10 => LCD_Bus <= "10" & CharArray(12); when 11 => LCD_Bus <= "10" & CharArray(37); when 12 => LCD_Bus <= "10" & CharArray(36); when 13|14|15|16 => LCD_Bus <= "10" & CharArray(37); when others => LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & AC(32 - LCDCounter)))); end case; when "0010" => -- DR case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(13); when 10 => LCD_Bus <= "10" & CharArray(27); when 11 => LCD_Bus <= "10" & CharArray(37); when 12 => LCD_Bus <= "10" & CharArray(36); when 13|14|15|16 => LCD_Bus <= "10" & CharArray(37); when others => LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & DR(32 - LCDCounter)))); end case; when "0011" => -- IR case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(18); when 10 => LCD_Bus <= "10" & CharArray(27); when 11 => LCD_Bus <= "10" & CharArray(37); when 12 => LCD_Bus <= "10" & CharArray(36); when 13|14|15|16 => LCD_Bus <= "10" & CharArray(37); when others => LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & IR(32 - LCDCounter)))); end case; when "0100" => -- TR case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(29); when 10 => LCD_Bus <= "10" & CharArray(27); when 11 => LCD_Bus <= "10" & CharArray(37); when 12 => LCD_Bus <= "10" & CharArray(36); when 13|14|15|16 => LCD_Bus <= "10" & CharArray(37); when others => LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & TR(32 - LCDCounter)))); end case; when "0101" => -- AR case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(10); when 10 => LCD_Bus <= "10" & CharArray(27); when 11 => LCD_Bus <= "10" & CharArray(37); when 12 => LCD_Bus <= "10" & CharArray(36); when 13|14|15|16 => LCD_Bus <= "10" & CharArray(37); when others => if LCDCounter < 29 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & AR(32 - LCDCounter - 4)))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "0110" => -- INPR case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(18); when 10 => LCD_Bus <= "10" & CharArray(23); when 11 => LCD_Bus <= "10" & CharArray(25); when 12 => LCD_Bus <= "10" & CharArray(27); when 13 => LCD_Bus <= "10" & CharArray(37); when 14 => LCD_Bus <= "10" & CharArray(36); when 15|16 => LCD_Bus <= "10" & CharArray(37); when others => if LCDCounter < 25 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & INPR(32 - LCDCounter - 8)))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "0111" => -- OUTR case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(24); when 10 => LCD_Bus <= "10" & CharArray(30); when 11 => LCD_Bus <= "10" & CharArray(29); when 12 => LCD_Bus <= "10" & CharArray(27); when 13 => LCD_Bus <= "10" & CharArray(37); when 14 => LCD_Bus <= "10" & CharArray(36); when 15|16 => LCD_Bus <= "10" & CharArray(37); when others => if LCDCounter < 25 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & OUTR(32 - LCDCounter - 8)))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1000" => -- I case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(18); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & I))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1001" => -- S case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(28); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & S))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1010" => -- E case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(14); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & E))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1011" => -- R case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(27); when 10 => LCD_Bus <= "10" & CharArray(37); when 11 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & R))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1100" => -- IEN case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(18); when 10 => LCD_Bus <= "10" & CharArray(14); when 11 => LCD_Bus <= "10" & CharArray(23); when 12 => LCD_Bus <= "10" & CharArray(37); when 13 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & IEN))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1101" => -- FGI case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(15); when 10 => LCD_Bus <= "10" & CharArray(16); when 11 => LCD_Bus <= "10" & CharArray(18); when 12 => LCD_Bus <= "10" & CharArray(37); when 13 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & FGI))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when "1110" => -- FGO case LCDCounter is when 9 => LCD_Bus <= "10" & CharArray(15); when 10 => LCD_Bus <= "10" & CharArray(16); when 11 => LCD_Bus <= "10" & CharArray(24); when 12 => LCD_Bus <= "10" & CharArray(37); when 13 => LCD_Bus <= "10" & CharArray(36); when others => if LCDCounter = 17 then LCD_Bus <= "10" & CharArray(to_integer(unsigned'("" & FGO))); else LCD_Bus <= "10" & CharArray(37); end if; end case; when others => null; end case; end case; end case; if LCDCounter = 32 then LCDCounter <= 0; CurrentLCDLine <= '0'; end if; else LCD_Enable <= '0'; end if;-- else-- LCD_Enable <= '0';-- end if; end if; end Process;End Structure; I declared an array as Memory for LCD characters, but it increased LUTs !, then I changed Process to make LCD character changing sequential but no chance to decrease used LUTs. How I can declare an array that uses BlockRam instead of LUTs ? <Q> Put your character data into BlockRAM instead of using LUTs as distributed RAM. <A> Block rams and state machines (So you output one character per clock rather then some sort of honking great parallel bus) are the way to go here (wide muxes are logic hogs). <S> I could not find the architecture overview for that obsolete part, so could not check what is available but even in that thing there should be some ram available, and there should be a template for instantiating a rom. <A> I don't really know how it is synthesised now, but it would be far better if you could output characters sequentially (or assemble the strings over several clock cycles) <S> Variable text can be tagged with special characters, then selected with a multiplexer. <S> You may also try to use something as : ascii_code<=to_unsigned(character'pos(char),8)); for converting from VHDL characters to logic levels. <S> Making your design more sequential could dramatically reduce its size.
You should put all your strings into a pre-initialized RAM block (which can be simply defined as a VHDL array with constants, without using any special Xilinx blocks).
What's the difference between USB and non USB oscilloscope? I am planning to buy an oscilloscope. I always used oscilloscopes which come with an LCD display. But I found there are USB oscilloscopes as well which can be connected to PC and get data from the PC. Since I already have a laptop I felt like that's a better choice. But is there any disadvantage in terms of accuracy/efficiency for USB type? <Q> Although this is a very opinion-based matter, there are two things to keep in mind. <S> I presume here, with "USB scope" you refer to an oscilloscope that has no display or controls, and requires a computer to operate. <S> I presume you do not mean an oscilloscope that can be connected to a computer, since any modern scope is capable of doing this. <S> USB scopes are often made to a price - they are aimed at entry-level buyers, who consider 500 USD/EUR/Whatever too much. <S> Hence, they will, in my experience, be of lower quality. <S> Exceptions to this exist - I've heard many good things about the picoscope, and of course there are devices such as the NI virtualbench that are excellent products <S> (however I think this is not the price range you had in mind when asking this question). <S> The main difference is in the interface. <S> In the end, most oscilloscopes are the same (to the untrained eye): <S> Apart from a bandwidth difference between models, digital scopes are just fancy analog-to-digital converters with trigger systems and a screen. <S> But this latter is key: The triggering system, its capabilities, and the software to control the entire thing is what makes-or-breaks an oscilloscope - esp. <S> to someone who is at the knowledge level to ask this question. <S> For every day, hobby use, I much prefer the physical nature of oscilloscope control knobs. <S> Fiddling about with mouse sliders and such just never seems to work fast for quick-and-dirty measurements. <S> And finally as a sidenote: Consider the lifespan of a product and its dependence on a second system. <S> If you purchase a USB oscilloscope, there is a good chance you won't be able to use it in 10-15 years. <S> No more driver updates, computers (in whatever form they are then) no longer have USB interfaces, the software doesn't support your device, etc.. <S> A "classic" oscilloscope is fully integrated and stand-alone. <S> As long as the thing powers on, you know it will be able to take measurements. <S> You need not rely on the support of the device on a second system. <A> But it will tie up your laptop if at the same time as testing electronics you wish to look at schematics. <S> Also be aware that the typical modern standlone LCD screen scope that is in the typical hobbiest or single engineer budget price range is going to have more features that the software than goes with the USB type scopes. <S> One reason for this is that the standalone scope manufacturer is able to protect his software investment whereas if a USB scope manufacturer makes very nice PC based scope software there will be rip-off manufacturers that make clones of their hardware and pirate and distribute the software. <S> (Case in point a constant problem being suffered by the folks that make the Saleae brand if USB logic analyzers). <A> If you're travelling around a lot, some people prefer a USB oscilloscope. <S> But, if you're spending the majority of your time in the same place, engineers almost universally prefer a stand-alone benchtop scope. <S> Pros of USB oscilloscopes: <S> Smaller & more portable <S> Sometimes cheaper <S> Sometimes more integrated capabilities Pros of Benchtop oscilloscopes: Dedicated controls (knobs, buttons, ect.) <S> + streamlined GUIs vastly improve usability <S> Often better specs - bandwidth, waveform update rate, max input voltage <S> This talked about in more detail in the "5 Common Mistakes <S> People Make When Buying a Low-Cost Oscilloscope" here: https://www.keysight.com/main/editorial.jspx?cc=US&lc=eng&ckey=2830640
A USB scope can be useful as a lower cost alternative to a non-USB scope.
Vcc decoupling, how to do exactly? I understand what decoupling is needed, but I did not understand how it is applied. For example, in this scheme that I found, there are many capacitors at the output. (Is a DC-DC converter). Some cap are unpolarized, and other polarized. The total capacity seems to be 680uF. However, I did not understand if decoupling occurs only if the capacitors are installed in the way the producer done the scheme, or that is only the minimum capacity, and a greater capacity is always better. <Q> High-capacity capacitors typically are polarized (electrolyte) caps. <S> Those have the advantage of being cheap and small per capacity, but at the cost of having a high effective resistance for high-frequency currents. <S> Thus, although there's potentially a lot of stored energy available in a electrolytic cap, the moment that a device suddenly needs more current, it can't be drawn from the cap. <S> Thus, a smaller, but lower-ESR, and hence "faster", capacitor is usually used in conjunction with a large polarized one. <S> Whether or not that is necessary or not of course depends on your device's dynamic properties, on the stability of your power supply, on trace layout and robustness to voltage drops. <S> So, there's no general rule of thumb other than " <S> if you need as much capacity that you'd use a polarized cap, it's usually necessary to also have a ceramic bypass cap". <S> The actual demand must be calculated, or, more realistically, just done by experience or reference schematic. <A> Don't confuse power supply output capacitor with decoupling. <S> Although both are on same nets in your schematic design, they are there for different reasons, so they are placed differently and their value is different. <S> PS output capacitors are there so the power supply can have sane bandwidth, and it will not have to react to fast changes of either input voltage or output current. <S> This is why the capacity here is defined (mostly) by the power supply control performance and the load. <S> Decoupling capacitors are placed right near your silicon IC. <S> If an IC requires a pulse of current (for example, 30% of flip flops are triggered on clock), this pulse will come from the capacitor, preventing high AC currents in plane or traces of the PCB. <S> Usually those capacitors are relatively small (0.1uF is most used, but not only). <S> They are small so they also have low ESL/ESR, otherwise there would be no effect. <S> Another case to think about- <S> analog amplifier receives something on input that causes high output current. <S> If you forget the decoupling capacitor, due to PCB trace inductance the voltage will dip, so suddenly the amplifier will not do what it has to. <S> Additionally they usually put another big capacitor (maybe 10uF) in parallel with the small ones, so it stores enough energy for longer current pulses. <A> When placing decoupling caps, there are two main roles they play: <S> Providing stored charge via capacitance Low/High frequency filtering <S> The bulk capacitance is largely provided by polarized electrolytic capacitors (usually the large 'can' capacitors with a high value near a regulator or power supply). <S> These perform the function of providing current to the system when it requires a lot in a short space of time (when switching relays etc.). <S> They also filter some of the low frequency noise from the system by providing it a low impedance return path. <S> The high frequency bypass caps (low value tantalum/ceramic), when placed as close as possible to an IC power input pin to limit trace inductance, provide a low impedance return path for high frequency noise to leave the system (gets rid of some of the ripple seen on a supply input). <S> They also provide a small amount of current that can be supplied quickly (quicker than an electrolytic) when a transient pulse occurs. <S> These effects are only apparent when the decoupling capacitors are connected to a low impedance return path (e.g. directly connected to a copper fill ground plane). <S> I use this app note for reference: <S> http://www.analog.com/media/en/training-seminars/tutorials/MT-101.pdf <S> And I found this answer for a related question very informative: https://electronics.stackexchange.com/a/15143/141400
So those decoupling caps are usually put on each VCC pin of an IC.
Is it possible to use ST Link USB for UART Communication? I am using STM32L1 Series Discovery board and want to do uART communication via same UART port that is Used for Embedded ST Link V2 . Embedded ST Link uses USART1 of STM32L100CT6 and Mini USB is connected to my PC. Refer following fig. PA9 Pin as USART1_Tx of STM31L100CT6PA10 Pin as USART1_Rx of STM31L100CT6 I also connected JP1 that is provided on the board so now main problem with this is that I didn't find COM port !!! Is it possible to use ST Link USB for UART Communication ? <Q> If what you really need is a "serial terminal" you can convert the ST link to J-Link and use Segger RTT. <S> It works like a serial terminal, but over JTAG. <A> It needs stllinl 2.1 to work. <S> And it needs the user tx rx pins being routed out. <S> More details here. <S> https://dannyelectronics.wordpress.com/2016/05/01/uart-debugging-over-st-link-v2-1/ <A> PA9 and PA10 are connected to the LCD display and the side headers, but not connected in any way to the onboard ST-Link. <S> You can however do that with a Nucleo board, where PA2 and PA3 (USART2) of the target controller are connected to the onboard USB controller, but of course it doesn't have that nice LCD display.
No, it isn't possible (without a hardware modification, and custom ST-Link firmware).
Determine whether chassis is a suitable heatsink? I picked up a sweet little aluminium box for a small USB powered DAC project... ...and while putting it together I noticed the side panels of the box were very cool to the touch, and made of thick aluminium with a promising looking design: I've got a couple of potential ICs that might need cooling, depending on where the design/schematic takes me, and I was wondering how it might be determined whether or not the panels would be at all useful as heatsinks? I don't expect them to function nearly as well as an actual heatsink, but for smaller ICs (voltage regulators and the like) it would be handy to know the option is there. Is there a way to mathematically calculate the thermal resistance of a panel like this , or is the best way to just run some temperature tests? <Q> Using the casing as a heat-sink is a common method however a few things must be understood. <S> As Laptop2d mentions it is hard to model the thermal characteristics of the case, and an experimental measurement may be prudent. <S> Heat-sinks rely on air-flow to work. <S> Since those plates are flat, there is a good chance that someone will install the box butted up against something thermally insulated... <S> for example, pushed back against drywall. <S> If this is for something of your own, and you can control the airflow, it may be fine. <S> Otherwise you may need to add features to the plate to prevent the occurrence and design it work under those worst case circumstances, or things may fail or even catch fire. <S> How hot will the plate get. <S> Though the heat-sink may be sufficient to keep your electronics working, the plate itself may be very hot to the touch, even hot enough to cause skin burns. <S> It is important that any exterior surface be kept at reasonable temperatures. <S> Physics dictates that the plate will expand under temperature. <S> This can result in unfortunate mechanical side-effects in some cases. <S> (pardon the pun...) <A> Your side panels are classical examples of the simplest form of radiator - the flat plate. <S> Simple equation for calculating its thermal resistance (in W/K) is:$$R_{th} = <S> \frac{3.3}{\sqrt{\lambda <S> \cdot <S> d}}C+\frac{650}{S}C$$where: <S> \$d\$ - plate thickness in mm, \$\lambda\$ - thermal conductivity (237 W/mK for aluminium), \$S\$ - area of plate, in cm\$^2\$ - in Your case You should assume that only one side of plate dissipates heat, \$C\$ - coefficient which depends on plate surface and positioning: 1.0 for horizontal raw plate, 0.85 for vertical raw, 0.50 for horizontal blackened, 0.43 for vertical blackened. <S> Of course, as always as we're talking about heat transfer there is no one simple answer, because most of equations in this field are empirical. <S> For (probably) more accurate solution look for example on this article: http://www.heatsinkcalculator.com/blog/how-to-design-a-flat-plate-heat-sink/ <A> The problem is you will need to model the whole box and the air to come up with a reasonable figure for how much heat the chassis can bleed off. <S> You could just model it like an infinite thermal sink (at room temperature) and then use the thermal junction coefficient of the package and the thermal resistance of the thermal paste or pad you are going to sink to the box. <S> Aluminum is 205.0 W/(m K) but the problem is the air is surrounding the whole box so to really model this <S> you'd need to sum up all of the thermal resistance at many different points because the air has a thermal conductivity of 0.024 W/(m K) <S> From experience it would probably be just be easier to attach a resistor to the side and measure it.
Or if the plan calls for dissipating a lot of heat the box could be modeled as a thermal resistance.
PIC12F675 Timer0 stops after a short while Okay so I'm using MPLAB X and basically I'm trying to achieve a Software UART for this little PIC running at 4 MHZ. At first I tried with delays because it's been said that even at 4 MHZ, you could achieve 9600 bps (which is what I need, no less) but for some reason I couldn't even achieve 1200 bps. I've read that Timers are a lot more accurate so I started googling around and came out with this sample code to blink a LED: #define _XTAL_FREQ 4000000// Configuration Bits#pragma config FOSC = INTRCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN)#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)#pragma config PWRTE = OFF // Power-Up Timer Enable bit (PWRT disabled)#pragma config MCLRE = OFF // GP3/MCLR pin function select (GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD)#pragma config BOREN = ON // Brown-out Detect Enable bit (BOD enabled)#pragma config CP = OFF // Code Protection bit (Program Memory code protection is disabled)#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)#define LED GP2#include <xc.h>unsigned int count = 0;void interrupt ISR() { count++; // Interrupt causes count to be incremented by 1 if(count == 18) { LED = ~LED; // Toggle LED every sec count = 0; } TMR0 = 192; // TMR0 returns to its initial value INTCONbits.T0IF = 0; // Bit T0IF is cleared so that the interrupt could reoccur}void main(void) { ANSEL = 0; ADCON0 = 0; CMCON = 0x07; VRCON = 0; TRISIO = 0b111011; GPIO = 0b000100; OPTION_REG = 0x07; // Prescaler (1:256) is assigned to the timer TMR0 TMR0 = 192; // Timer T0 counts from 192 to 255 INTCON = 0xA0; // Enable interrupt TMR0 and Global Interrupts while (1) { // No code here } return;} I set TMR0 to 192 because that's 3/4 of 255, so the LED would blink every fourth of a second. When programmed and tested, I could see the LED blink a few times and then just stay on. Sometimes it would blink 10 times, some just 3 and then just stay on. Weird thing that it stays on cause it could also stay off. Maybe it has something to do with the problem. If you could point me anywhere on this I'd really appreciate it. EDIT: Here's a photo of the PIC setup. I left that 10k resistor from GP4 to ground because I was using it for another code now that I remember. There was also a wire coming from that pin that was floating around. Maybe that resistor could've brought problems. <Q> It ended up being a hardware problem. <S> By placing the LED directly in between the output pin and GND, the current would be approx 16.5 mA, which would take the MCU to the limit, atleast this small one in particular. <S> Apparently, the PIC stalls because of some security mechanism or just an error inside the PIC. <S> I'm not sure because when I uploaded a blink code with delays instead of Timer0, it worked fine. <S> The thing is that a series resistor should be placed in series with the LED, although it should be taken into account that even 10mA is almost as much as the whole MCU can provide amongst it's pins. <S> Here's a photo of it working WITHOUT the decoupling capacitor, as a demonstration that the problem was the excess current drawing, but it should be used always anyways since it reduces noise and will save you future headaches when debugging the PIC. <A> To get a reliable periodic interrupt using timer 0, you need to add into it each interrupt, not reload it. <S> This way the interrupt latency and possible jitter is cancelled out. <S> The processor is running at 4 MHz, so the instruction clock rate is 1 MHz. <S> That means there are 104 instruction cycles per bit slot at 9600 baud. <S> That is plenty to implement a firmware UART, although with unknown compiler overhead in the way, you don't really know what's happening. <S> I would definitely code the interrupt routine in assembler. <S> Do the UART stuff as immediately after the interrupt as you can, to reduce jitter. <S> Add into timer 0 after that, since that is jitter-independent. <S> Since the details of what to add to timer 0 are a little tricky, I use a macro for that. <S> This is from my STD.INS.ASPIC file available as part of my free PIC development environment : ; <S> ********************;; Macro TIMER0_PER cy;; Update timer 0 so that it next wraps CY cycles from the previous wrap. <S> This <S> ; can be useful in a timer 0 interrupt routine to set the exact number of; <S> cycles until the next timer 0 interrupt. <S> Timer 0 is assumed to be running; from the instruction clock. <S> The appropriate value is added into timer 0,; <S> so this macro does not need to be invoked a fixed delay after the last; timer 0 wrap. <S> CY must be a constant.;; The timer sets its interrupt flag when counting from 255, which wraps back; to 0. <S> If left alone, the timer therefore has a period of 256 instruction; <S> cycles. <S> When adding a value into the timer, the increment is lost during; the add instruction, and the timer is not incremented for two additional; cycles when the TMR0 register is written to. <S> This effectively adds 3 more; cycles to the timer 0 wrap period. <S> These additional cycles are taken; into account in computing the value to add to TMR0.;timer0_per macro <S> cy dbankif <S> tmr0 movlw <S> 256 + 3 - (cy) addwf tmr0 endm Of course, there are obvious easier ways to solve this overall problem: <S> Use a PIC with a UART. <S> Use timer 2, since it has a built-in period register. <A> the PIC stalls because of some security mechanism <S> You turned out bor. <S> I have used similar setup successfully but no bor. <S> To maintain long time accuracy, try not to load up the offset repeatedly. <S> Edit: when you load to the timer counter, you have destroyed the value it may have accumulated since rollover, either in the timer counter or the prescaler. <S> So the best way to get long term accuracy in a timer like timer0 is to never reload it again once it starts. <S> Like this TMR0 <S> = -TMR_PR; //LOAD <S> UP TMRPR LSB. <S> .... <S> Get timer 0 going. <S> In the ist <S> If (TMR_PR) <S> TMR_PR <S> -= 0X100; //update <S> tmrpr , assuming 8 bit tmr0. <S> else TMR_PR has expired. <S> What it does is that regardless of how long the desired time period is, the counter is only reloaded once, at the very beginning. <S> But your problem is unlikely the timer issue here. <S> So rather than thinking it is you think it is, <S> post your soft Hart routines and let other people help you.
Your timer code can be improved as well.
Write to multiple I2C devices at the same time I have two OV5640 images sensors that I need to configure using I2C. Both have the same I2C address and are on the same I2C bus and both will be configured identically. As the configuration profiles for these cameras are quite large, I was wondering if it would be possible to write the configuration from the MCU to both cameras at the same time? I do not need to read from the cameras via I2C. The OV cameras use the SCCB interface, which is similar to I2C but with some slight differences (I think the main one being the lack of the ACK signal). I am almost certain the answer is "no" but I would like to understand why. <Q> All devices share the same SD SC bus with Rpullup and C load on cables. <S> Choose R pullup for 3 mA <S> then R*C load affects slew rate and noise rejection. <S> Since driver has internal RdsOn <100 ohm this raises Vol slightly when smaller R pullups are used . <S> Optimum R pullup is when you have balanced noise margin outside logic input threshold of 30% Vdd and 70% Vdd thresholds for Vol, Voh. <S> details <S> e.g. if driver is 100R ESR or Rdson Low and Rpullup to 1.8V is 500 Ohms then <S> 3.0mA for Iol (1.8V/(100R+500R)=3.0mA) <S> So you may adjust R pullup from this starting point. <S> THen probe correctly with short 10:1 probe pins to avoid >10MHz ringing) or use diff. <S> probes or two 10:1 calibrated probes A-B with flatline on A-B to same signal then if OK, move one probe pin to gnd pin beside SD , SC test pins. <S> ALways include test pins + gnd pin < 1cm apart. <S> Choice of cable capacitance and length determines C load. <S> usually 60pF/m for ribbon or twisted pair and higher if shielded. <S> If rise time at 400kHz is too slow then switched R Pullup method may be used. <A> The SCCB is a proprietary interface from OMNIvision. <S> The main mode is to control a single-address device, but it can control several devices by disabling unnecessary devices using suspend (PWDN) signal, in so called "three-wire-mode". <S> Here is a very useful application note 101 from Omnivision. <S> You also need to make sure that your I2C controller ignores the lack of I2C ACK. <S> Some people did modifications (or bit-banging) to communicate with Omnivision cameras. <A> If they have the same I2C address and you don't need to read data back from them, then yes, you can write the configuration to both at the same time. <S> However, configuring both at the same time runs the risk of masking a non-functional sensor. <S> Each byte written over I2C is followed by an ACK, sent by the slave. <S> If one sensor is not responding, the I2C master will not be able to detect that. <S> The other (functional) sensor will still be ACKing away.
THere is no apparent reason why each device cannot use the same address and data and decode at same time as long as all timing and V specs are maintained if there is no ACK on SCCB.
How can I calculate how much my desktop PC costs to run for an hour? I was torn on whether to post this to here or Math.SE, so feel free to move it as appropriate. I recently got hold of a power usage monitor in order to calculate how much my PC costs to run a given task for an hour, but before I do so, I want to find out how to do the calculation "on paper", and use the power usage monitor to determine just how accurate it is. That being said, this question essentially has two parts to it. Firstly, the PSU on my PC has a max output of 550W, but I've been advised that it's likely to use much less than that even when running. To that end, is CPU usage in the Windows Task Manager a reliable enough metric to use for this purpose? In other words, if my CPU is consistently showing 25% (or 100%) of usage consistently for carrying out a specific task, can I assume that 25% (or 100%) of 550W is a good starting point for the sake of calculating cost? Secondly, what is the calculation to determine the cost of running a PC for a single hour? I have somewhere to start in that I know that the formula: Power usage (in watts) * hours of usage / 1000 * cost per kWh ...can be used to determine the cost of running a PC for the given amount of hours. Knowing that, is finding out the cost for a single hour as simple as omitting the hours of usage from the formula, like so: Power usage (in watts) / 1000 * cost per kWh ...or is it more complicated than that? These might seem stupid questions, but my maths skills especially are really lacking, and I've been frustrating myself over the last few days trying to work it out, so I'd appreciate the help. Thanks. <Q> No, your Windows Task Manager will give a really really bad estimate of how much power your computer currently consumes. <S> Because, it will show you how "busy" a processor is. <S> Moving memory around takes different amount of power than to calculate things. <S> There's different ways to make a processor busy, or look busy. <S> And they all take different amount of power. <S> The greatest power hog in your computer is probably the GPU, which as far as I know you can't really see in the Windows Task manager. <S> And your equations are correct. <A> Yes, to your second question. <S> The cost for one hour just removes the "hours" term from the formula. <S> Regarding the first part, there's no easy way to calculate it from stats like CPU usage. <S> Even if you had an accurate enough log of that and integrate it over time to get your mean value, there's far more energy being consumed and radiated as heat. <S> Remember, what you want is the energy consumed. <S> Everything is less than 100% efficient, radiating the unused energy as heat. <S> If your PSU for instance is 95% efficient, then at 100W consumed, 95W is going to the rest of the PC and 5W is going as heat. <S> Everything is doing that. <S> The CPU, the chipset, the graphics card (major user there), the fans, the drives, the go-faster LEDs, even the cables are dropping some volts and radiating it as heat. <S> The only way to be sure about this is a good quality power monitor at the input. <S> Any attempt at a paper calculation will have so many unknowns as to be effectively useless. <A> Your formulas are correct but your initial assumption is not. <S> It is highly unlikely that the total power consumption of your PC can be correlated with the CPU usage as reported by Windows. <S> First, as you seem to be already aware, the power output capability of the PSU will always be more than the PC is actually using. <S> Also, even if it was, you neglected the efficiency of the PSU. <S> If it is generating 550 watts, it will be drawing significantly more from the AC line since it is not 100% efficient. <S> Also the fan is always drawing power that is not part of the 550 watts. <S> You are better off relying on your power usage monitor to get a good value for the PC power consumption. <S> The monitor will also be able to integrate the power usage over time much more accurately than you ever could using the CPU usage value. <A> The fundamental mistake in the formulation of this question is in your assumption that 550W PSU has something to do with actual power consumption. <S> It is not. <S> The actual power consumption is defined by "thermal envelope" of your CPU, plus whatever the similar envelope of your videocard is. <S> If the thermal envelope of your CPU is, say, 90W, the system won't let it go above , by various automated throttling mechanisms. <S> The power delivery system will have certain losses, safe to assume 80% efficiency, so the CPU block will consume about 112W maximum. <S> I can't speak of crazy gaming machines, but all my desktop PCs (and I have nearly a dozen of them) rarely consume more than 180W, even an old i7-920 machine with 130W envelop and GeForce GTX 950. <S> Some ITX boxes with i3 processors take 30-40W from AC, some bigger ones take <S> 90 - 130 W. Monitors take 30 - 90 watts. <S> As you said, the easiest way is to get a power meter (even the cheapest one, "Kill-A-Watt" ), and measure the actual consumption over time and use pattern. <S> It can even calculate the overall cost (assuming 10c/kWh). <S> Mathematics has very little to do with the actual results. <A> Along with the CPU, a good deal of the total power consumption will be based on GPU activity in your graphics adapter. <S> Try loading a game and watch your power monitor. <S> Disk <S> I/ <S> O will affect power too, depending on your disk technology. <S> And fan controls of the chassis fans, GPU, and CPU fans can't be calculated solely on the processing usage reported by Windows. <S> If you include your monitor in the calculation, you'll find power usage change depending on the colors and brightness of the screen!
For the first part: No, you can't make a function based on CPU usage with any kind of accuracy.
With LED brightness and different resistors, do I talk about the current or the voltage? I'm building a parallel circuit that uses a red LED and a green LED and a 3v power supply. I know that I use a higher Ohm resistor (using 130 Ohm) on the red LED because it has a lower forward voltage than the green LED (using 75 Ohm on that one). I also know that if I used the same 75 Ohm resistor on both, the red LED will glow brighter than the green LED. How do I talk about what the resistor is doing? Do I say that the red LED needs less current than the green LED to glow as brightly, so it has a stronger resistor to reduce the current? Or do I say that the red LED needs less voltage than the green LED to glow as brightly, and the resistor soaks up voltage because of V=IR? It seems like resistors are always talked about with current, but LEDs are always talked about with voltage. Not sure if there's even really a difference between these two ways of phrasing. <Q> How do I talk about what the resistor is doing? <S> In this case you call the resistor a current limiting resistor, because it's function is limiting current to the diode. <S> Do I say that the red LED needs less current than the green LED to glow as brightly, so it has a stronger resistor to reduce the current? <S> There is no way to compare a red led with a green led, there are several factors at work when you look at an LED including: 1) <S> Human eyes assign diff <S> the brightness of different frequencies differently, here is the response of a human eye, we see green really good. <S> Source: <S> NPL 2) <S> The LED's have different efficiency curves and have different voltage drops and have different intensities. <S> Source: <S> LED magazine <S> Or do I say that the red LED needs less voltage than the green LED to glow as brightly, and the resistor soaks up voltage because of V=IR? <S> You could say, the red led needs less voltage for the same amount of current because its voltage drop is lower than a green led. <S> But voltage drop and current have little to do with how bright an led is. <S> Source: LEDnique <A> I would say that the resistors used in series with LEDs control the current through the LEDs, not the voltage across the LED. <S> The voltage across an LED is determined primarily by the LED chemistry and colour, and varys only slightly with currenet. <A> You stay stuff like "The Red LED D1 has a forward voltage drop of 2.2 Volts and resistor R1 limits the LED current to 10 mA" <S> LED series resistors serve the purpose of limiting current. <S> LEDs have a "forward voltage" specification at some bias current. <S> Take a look at the table here: <S> http://dangerousprototypes.com/docs/File:LED_FWV.jpg <S> It comes from this page: <S> http://dangerousprototypes.com/docs/Basic_Light_Emitting_Diode_guide <S> It says the "typical" red LED has Vf = 2.2 Volts at 20 mA. <S> So if you have say a 5 Volt supply, and 2.2V is across the LED, this means the resistor would have 5V - 2.2V = <S> 2.8 Volts across it. <S> So let's say we want 10 mA <S> instead of 20 mA. <S> We can assume that with reduced current the voltage across the LED is still close to 2.2V (because that's how diodes work). <S> So you can figure out the resistor value you need using Ohms Law: 2.8 Volts / 10 <S> mA = <S> 280 Ohms to limit the LED current to 10 mA current. <A> LED's are just like Zener diodes and the current can be easily be controlled by a CC limiter or a CV source with the voltage difference limited by the series R. If= ( <S> Vdd-Vf)/Rs <S> , <S> If = forward current rated <S> The light output is determined chip size , Pd rating , Lumen Rating, colour, efficacy , lens magnification or beam width. <S> Many modern 5mm LEDs are .>1000x <S> brighter in the last 15 years from efficacy growth and chip size. <S> 10000-30000 mcd 30 deg parts make old 350 mcd look pretty dim <S> But when blue , green , white are used 3.3V is better than 3.0V since Vi @If ranges around 3.1V <S> so Rs is small depending of batch and specs eg <S> 100 ohms for Rs may not be 0.2V drop which is 20 mA
This means when some specified amount of current is flowing through the LED (usually called If or forward current), you will read some specified voltage if you put your meter across the LED (usually called "forward voltage"). Red is more luminous than green, but to the eye green has an easier time showing up.
Convert 12VDC fan controller output to TTL signal of laser? I'm adding a laser cutter to my 3D printer. I want to repurpose the cooling fan output to control the laser. My laser has a power supply which accepts a 5V TTL signal to turn the beam on/off. The fan output is as follows:Fan OFF - both red and black wires are held at 12VDC.Fan ON - Red wire 12VDC, Black wire pulled to GND.(also supports PWM output at various levels, black wire is used for PWM signal while red wire is held at 12VDC.) I had wrongly assumed the black wire would be held at GND while the 12VDC wire would be used to control the fan. So I assumed I had a GND reference available, so I built this level shifting circuit (which, of course, doesn't work due to black wire being pulled to 12VDC when off). Its purpose was to simply ground the TTL+ pin to the TTL- pin when 12VDC was present on the input, effectively inputting a logic 0 to the laser controller, or allow TTL+ pin to float high when 0VDC was present from the fan controller, inputting a logic 1 to the laser. I realize this inverts the fan output (fan off = laser on) but that's not a problem. And it did work when testing with a 12VDC power supply. simulate this circuit – Schematic created using CircuitLab However, since the outputs of the fan controller both go to 12VDC when the fan is off, this doesn't work. How can this circuit be re-designed in the simplest way possible (hopefully without requiring outside power) to shift this strange 12VDC signal to 0/5VDC TTL signal, or effectively short/open the connection between TTL+ and TTL- pins? I guess a relay would work for simple ON/OFF controls, but that would preclude using PWM to control the laser... Thanks for any insight. <Q> Why don't just solder two wires straight to the Gate and Source pins of the fan MOSFET on RAMPS board? <S> So you will get 5V PWM signal straight from ATMega controller. <S> That is what I did - soldered two-wire JST-connector to the pins to make it unplugable. <S> Works like a charm. <A> I solved this with a very simple circuit, which avoided the need to run extra ground or +5/12V lines. <S> I used a simple optocoupler and resistor. <S> Again this is an inverted control: when the fan is ON, the laser will be OFF. <S> Anything less than 100% output on the fan will result in the laser pulsing at the fan PWM frequency. <S> I have a Monoprice Maker Select 3D printer which uses RepRap compatible g-code. <S> To turn the laser ON, issue M106 S0, and to turn the laser OFF, issue M106 S255 gcode commands. <S> I am using <S> the J Tech Photonics Inkscape plugin to generate laser g-code, and it doesn't support this type of inverted output. <S> So it's necessary to do a search/replace in the gcode file to swap the M106 S255 and M106 S0 commands. <S> YMMV - hopefully helpful to someone! <S> simulate this circuit – <S> Schematic created using CircuitLab <A>
If you are certain that the black wire gets pulled to 12VDC and the red wire sticks to 12VDC the entire time, you can just use a inverter to drive the whole thing - an inverting buffer like something in the 74xx series parts could work fine as a level translator.
How does Windows know it's on battery power? Laptop DC-DC regulator boards are somehow able to communicate with Windows to see how much battery power is left, but my research finds nothing. Is there a data connection from the proprietary motherboards found in laptops which communicates this? If so, what kind of data connection is it and where does it actually connect? Is it just a PCI-E port with a ribbon cable? <Q> This chip sits at the interconnect with the battery, charger and the system voltage regulator. <S> It handles detection of the charger and then manages the charging rate via an incorporated DC-DC controller. <S> It also controls various transistors to disable or enable power from or to the battery, or from AC to the system. <S> These chips have various means to communicate with the rest of the system. <S> It has IRQs (interrupt requests), analog outputs, a power good signal and SMbus. <S> If the battery is replaceable, it will also contain some intelligence to measure battery status, and protect it. <S> This uses SMbus or something proprietary. <S> An example is a Coulomb Counter that measures the charge going in and out of the battery <S> (eg: LTC2943 ) <S> SMbus is built on I2C ; it's the "System Management Bus". <S> All important stuff connects to this. <S> For example it's also available on the PCI connectors. <S> It's loaded with small devices like fan controllers, temperature and ambient light sensors or simple switches and LEDs, like wi-fi on-off or lid closed. <S> Then it is up to the operating system drivers to know the layout of this bus, and how the devices work. <S> Some of it is somewhat standardized in ACPI . <A> Check out the APM ( Advanced Power Management ) API and its successor ACPI ( Advanced Configuration and Power Interface ). <S> Before APM these functions were handled by the BIOS. <S> For Windows 8 and later, Microsoft has these recommendations. <S> Hardware-wise it may be as simple as an I <S> 2 C (two-wire) interface to a subsystem. <A> Aside from things like simple voltage sensors, it's absolutely not uncommon that you get integrating power meters that monitor the net power flowing out of a battery. <S> The question how these sensors talk to the OS is a different one, and will differ from model to model. <S> However, usually, the firmware in your laptop will talk to your sensors, process these values, and present them over a proprietary or standard interface (e.g. ACPI) to your OS. <S> PCIe is almost certainly not involved as main link – that's way too expensive to get a few bits every minute across. <A> In addition to the sensor type connections stated in other comments and answers standard computer chipsets include two signals that come from the mother board and report up through the chipset to the BIOS and/or operating system drivers. <S> The two signals are called: AC_PRES - <S> This indicates the AC present. <S> In the case of a laptop this will be active when the external brick power supply is plugged in. <S> For a desktop this will be active when the main AC powered supply is active. <S> BATT_LOW - This indicates a battery low condition. <S> Applicable to a laptop or tablet configuration only; this will indicate when the battery has discharged to a level beyond which there is only a short operational time remaining. <S> (Note that this is not at all concerned with the real time clock battery). <S> It is common that the registers that are in the chipset that contain the status of these signals have been established as a legacy assignment and tend to stay the same across many generations of computer hardware.
Electrically, expect I²C, variants like SMBUS, plain SPI, 3.3V UARTs, possibly USB, and all other kind of things with which you could connect a platform controller (which really is just a MCU) with sensors. The laptop contains a battery management chip with SMBus, such as a BQ24721C .
How to create a 100ms delay between button pressed and line grounded? I have a line pulled to +5V. When a button is pressed, it should ground the line after a 100ms delay. How would I implement such a delay? <Q> Here is the circuit: <S> The rest is firmware. <S> The passive pullup on the GP3 pin is enabled. <S> The pin therefore goes low when the button is pressed and high when not. <S> The firmware debounces this and puts the result on the OUT pin. <S> Since debouncing includes a delay, you simply make this delay your desired 100 ms. <S> Normally I use 50 ms debouncing delay, because that's about the maximum where humans still feel the action is immediate. <S> If you want a deliberate delay, make the debouncing delay as long as you need. <S> Look at the button every iteration of a timed loop. <S> If the instantaneous state of the button is the same as the debounced state, reset the debounce counter to maximum. <S> Decrement the debounce counter each loop. <S> If it reaches 0, then then the last state of the input line becomes the new debounced state. <S> Reset the counter to maximum. <S> Adjust the debounce counter maximum value to however many loop iterations you do in your desired 100 ms delay time. <S> For example, lets say you run the loop every overflow of the free-running timer 0. <S> That's every 256 instruction cycles, which is every 256 µs. <S> It would take 391 iterations to get to 100 ms. Since it would be easier to use a 8 bit counter, you could divide the timer 0 <S> overflows by 2 <S> (run the loop every second time). <S> Now it takes 195 iterations for 100 ms, which fits nicely into a 8-bit variable. <A> Since no background information was given we seem to be limited to a button, a ground line, a 5 V supply and an unspecified pull-up resistor. <S> Assuming that the circuit will be used on Earth we can use gravity and distance to provide an accurate timer. <S> From \$ h = \frac {1}{2} gt^2 \$ where h is height, g is the acceleration due to gravity and t is time, and <S> \$ v = gt \$, where v is final velocity <S> we can calculate that a body in free fall will travel 0.04903325m in 100 <S> ms. simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Gravity timer. <S> On push the OUT line will be pulled low after 100 ms. <S> The circuit requires a manual reset. <A> simulate this circuit – Schematic created using CircuitLab OA1 is an open drain comparator who's output is your line that's pulled up to 5V. <S> The value of R1 will determine the length of the delay with larger values resulting in larger delays. <S> The delay can be calculated as t = -ln(.5)*R1*C1. <S> If there are debounching issues, use a comparator with hysteresis (schmitt trigger). <S> This could be done with a DAC for digital control of the timing. <A> You can use monostable circuit. <S> For example, a 555 timer can be configured into a monostable circuit. <S> Once trigger is activated the output will be high for given period of time (say 100ms). <S> This can be used to develop a circuit for your requirements. <S> Other than 555 timer, same operation can be realized using a micro-controllers or two transistors or logic gates etc. <S> More ideas can be given, depending upon your interest. <A> How would I implement such a delay? <S> Depending on your comfort level. <S> A timer would do it all day long, for example. <S> That kind of timer can be done with a 555 or its modern equivalent, an opamp, a logic gate, or even a transistor..... <S> The other route is a digital solution. <S> Like a mcu. <S> Again, all depends on what's available to you.
Another, maybe better, way to change the timing is to change the voltage on the non-inverting input.
What are the drawbacks of transmitting RF frequencies through an antenna that is designed for different frequency? I've heard of a magic "resonant frequency" that antennas are designed for, what happens if you transmit a frequency through an antenna that does not have the same resonant frequency? <Q> Part of your output power will be ultimately wasted as heat in the antenna,feedline, matching elements, transmitter etc. <S> ( less range ) <S> Energy will "bounce back" from the antenna to your transceiver. <S> May potentially damage it . <S> Energy "bounced" from the antenna may cause intermodulation distortion in your transmitter. <S> The transmitter will become a poor mixer ( the device may not be compliant/legal, may transmit undesired frequencies) . <S> When receiving (if the same antenna is used for RX/TX) you will "hear" other frequencies better than the one you are using for communication ( worse sensitivity, higher noise level ). <A> What happens if you send a broadband signal through a high pass filter? <S> It gets attenuated. <S> Same thing for an antenna more or less. <S> Here is a plot of what the impedance of a resonant antenna looks like. <S> If you transmit signals in the capacative or inductive region, the current going into the antenna will 'see' more impedance and the signal will either reflect back to the receiver or get attenuated. <S> So that may be a good thing if you want that signal on that particular frequency to not get transmitted. <S> Or a bad thing if you have a signal that needs to be transmitted with an antenna with the wrong impedance. <S> Source: radio electronics <A> Ideally, your antenna system (consisting of the feed line, the antenna, other components in line) will all present the same impedance at a given frequency; resonance is one way to potentially achieve this, but NOT a requirement. <S> The typical impedance values are 52 or 75 ohms in an unbalanced system (using coaxial feed line to the antenna) but with a balanced system may be 300-400 ohms... <S> I've seen others. <S> In a perfect world, you'd want the TX output design impedance to match the characteristic impedance of the feed-line which would also match the feedpoint impedance at the antenna. <S> System losses stay low under these conditions. <S> In general, a properly designed antenna will present this feedpoint impedance (say 52 or 75 ohms) at or near resonance and depending on the type will vary as you move to either side of resonance. <S> As you move from resonance, inductive and capacitive reactance will exist and change the feedpoint impedance. <S> (for example, a 1/2 wave dipole antenna presents about 73 ohms, Real, at resonance. <S> This is handy. <S> If you shorten it, it looks capacitive, if you lengthen it, it appears inductive.) <S> Depending on the degree of the mismatch and the type of feed-line, this condition will result in increased system loss -- meaning increased heat dissipated by the antenna system components (like the feedline), thus taking away from electromagnetic energy actually radiated. <S> Does this mean that an antenna resonant on one frequency can't be used on another? <S> Nope. <S> It just means that in order to maintain, good efficiency the complex impedance that differs from the nominal feedline Z needs to be transformed via an antenna tuner or a matching network to the feedline Z to ultimately present the transmitter with a load it is designed to work with. <S> This is commonly done in order to use a non-resonant antenna efficiently and effectively. <S> Resonance is handy, but not necessary if you employ proper matching at the right place in the system. <A> Having fitted CB radios back in the day : if you did not tune or match the antenna to the radio then it would destroy the transmitter part... <S> Many were taken for repair due to that error... <S> Still have the RF meter somewhere...
So if you use antenna designed for a given frequency on another frequency, and don't change anything in the feedline or other components , you'll likely end up with an impedance mismatch between the feedpoint of the antenna and the feedline, which will also result in a mismatch between the transmitter and the feedline (transformed according to the length of the feedline).
Will a battery short out when the terminals are directly connected together or will internal resistance save it? I intended to make a simple electromagnet, then I saw this video where the user is connecting wires together with no resistance at all. I was wondering why it doesn't short out and make the battery dead. Does this 9v Hi-Watt battery have internal resistance that will prevent shorting out? If so what will be the current flowing through the battery and how long the battery can last powering the electromagnet, since capacity (like 1000mAh) is not mentioned on it? <Q> WARNING: DON'T USE LITHIUM BATTERIES, or any type of laptop battery or phone battery. <S> When connected to a small coil of wire, they may catch fire or explode. <S> Even an alkaline battery will heat up dangerously after one or two minutes . <S> Yes, you can briefly short out a small alkaline battery or carbon-zinc battery without destroying it or causing a fire. <S> But the battery runs down very fast, and heats up quickly. <S> Hint: use a push-button rather than a toggle switch. <S> That way the battery is turned off when you're not holding down the button. <S> In his video, he really should be using an AA-cell or perhaps a C-cell. <S> He'd still get about the same current, and perhaps a bit longer lifetime for each battery. <S> It's much cheaper to run down a bunch of C-cells, instead of using expensive 9V batteries. <S> The coil in his video is a short circuit. <S> A few meters of thin wire will have a resistance of less than an ohm. <S> One ohm of #30 gauge wire gives three meters, one ohm of #26 gauge wire gives 7.5 meters (His wire appears to be thicker than #30 gauge.) <S> The Amazon.com link, those batteries would work fine. <S> Also try AA cell or C cell, plus a plastic battery-holder for those size. <S> Also see: small coils projects, motor and generator <S> This one: high speed generator , powered by bow-drill <A> Here is a simple way to look at it. <S> Batteries have internal resistance. <S> When you short circuit a battery externally, the current will be limited by the internal resistance. <S> If the internal resistance is high, the short circuit current will not be too large. <S> The carbon-zinc battery you linked to will probably have high internal resistance. <S> Even small lead, NiMH and lithium ion/polymer batteries have very low internal resistance. <S> If you short one out you may get a giant spark and have lots of heat. <S> So don't short any of these types of batteries! <S> One other thing. <S> The wire of the electromagnet does have some resistance. <S> So the short circuit current will be somewhat limited. <A> This very much depends on battery type and rating. <S> Also, keep in mind that a coil of wire still has resistance, and is not a real short-circuit. <S> Could very well be some batteries are able to deliver that much current. <S> Every battery has internal resistance - how much that resistance is depends on a lot of things (type of battery, age of battery, construction, how much charge is still in the battery, temperature, etc). <S> This internal resistance can be more than sufficient to protect smaller batteries like (certain) coincells and certain AA-style cells from damage when shorted. <S> However, other types of batteries like Lithium-based ones (especially the rechargable types) can have internal resistances in the few milli-ohm range - shorting them out <S> can (and usually will) damage or even destroy the battery. <S> You can try and calculate the resistance of the coil you will use (or measure it, though that is not straigh forward given the usually quite low impedances involved) and see if your battery is rated to deliver that much current. <A> how long the battery can last powering the electromagnet? <S> First, you need to determine the current. <S> If you know the internal resistance, the current will be I=Vbatt/(Rint+Rcoil) , otherwise you can just measure it. <S> Knowing the battery capacity, you can get an estimation of the time it will last as t= <S> Q/I , where Q is the capacity of the battery. <S> Understand that this will be just a rough estimation, because (a) capacity depends on discharge current in most chemistries and (b) the current will not be constant as the battery discharges. <S> If you don't know the capacity, the only way to know is to measure the time. <A> "No resistance at all" ??? <S> As far as I know, that only happens when everything is chilled in liquid helium, and batteries might not work at such low temperatures. <S> So you have to start the current at room temperature and chill only the electromagnet. <S> If the core of the electromagnet is the right stuff, you don't care if the battery goes dead; the magnetism will remain as long as the liquid helium bath does. <S> As for the battery going dead, I am sure that it will eventually go dead. <S> If it does not, please contact me and I will buy that battery from you.
Older, non-rechargeable batteries tend to have high internal resistance.
Is the ability of reading NFC-tags in smartphones specified? Is the NFC-reading-module in smart phones in a way specified (e.g. in ISO 18092) as that every smart phone has the same 'power' of reading NFC-tags. I am not an electrical engineer. What I am trying to ask is, if the reading process in respect to the distance between the smartphone and the NFC-Tag is the same at every smart phone because every NFC-reading-module is the same, or if there are differences between smartphones as that one smartphone can read tags where the difference is like 5cm and another one can read tags with distance to the phone about 10cm? I hope my question is clear. It is a little bit hard for me to phrase. <Q> From experience I know that NFC performance varies very much among different smartphone models. <S> And there is no reason to assume that they use only one type of NFC chip; <S> and even if they did there are other very important factors that can make a diference: <S> RF PA (if not included in NFC chip) antenna design (and RF relevant design of the whole device) matching network <S> Also the max. <S> distance for NFC not only depends on the terminal side (i.e. smartphone that provides power via RF) but also on the type of tag or NFC card that consumes the power. <S> A NFC smart card that perform cryptographic operation needs much more power than a dumb NFC tag that just answers a few fixed bytes. <A> The answer is no, the reading distance can be up to 10cm but depending on surrounding electronics/ <S> metal/"How is the device held" and so on can influence on the distance. <S> From : https://nfc-forum.org/what-is-nfc/about-the-technology/ ISO/IEC 14443 and FeliCa, which allow communications at distances up to 10 cm. <S> NFC complements many popular consumer level wireless technologies, by utilizing the key elements in existing standards for contactless card technology (ISO/IEC 14443 A&B and JIS-X 6319-4). <A> Not all smartphones have the same NFC chips built in, and it's not just the NFC chip that defines how far a tag can be away and still be able to be read. <S> On my Xperia XZ for example I can't hold an NTAG213 tag further than 2cm.
The only thing you can be pretty sure about is that any smartphone with NFC will be able to read it 1cm far away, any wider just can't be said in general.
Can ANY DC brushless motor be used as a generator? Question is pretty much in the title. I know it's definitely possible to use certain DC brushless motor as a generator, but is it always the case? Thanks a lot in advance. <Q> Permanent magnet BLDC motors can be used as generators. <S> There is a type of brushless motor called a Reluctance Motor, which has soft-iron core, so will generate nominally zero voltage when spun. <A> It would be extremely unusual to find any other type of motor described as a brushless DC motor. <S> All such motors can be used as generators, but some designs are easier to use as generators than others. <S> A major example of a difficult motor is a BLDC fan motor found in a computer. <S> Those have electronic circuitry built into them that must be removed or disconnected in order to use the motor as a generator. <S> You might find some other design described as a BLDC motor that would be difficult to use as a generator, but most of them only require the shaft to be turned to produce AC at the terminals and a rectifier added if you want DC. <A> Two examples where it is desirable for a motor to function as a generator are: Regenerative braking in a vehicle so at least some of the energy is recovered rather than being totally wasted in a mechanical friction brake. <S> Using the generator function to hold the motor in a stopped condition by switching a resistor or a short across its terminals.
Brushless DC motors are usually motors that have permanent magnet rotors.
What is the silver strip behind crystal in the PCB? Consider: I came across a PCB, and I found a silver strip behind the crystal. What is that strip? Has anyone used it? <Q> Here's a picture to help you understand better. <S> The crystal's case can be soldered onto boards to secure them. <A> I wish I could find an image of this, but that is a ground pad. <S> When mounting larger crystals, like the one shown in Peter's answer, it is normal to bend the leads so the can is laid flat on the board to limit the height of the board envelope. <S> (Note it does little with the crystal shown in your image.) <S> Unfortunately, when mounted flat in that position the thing is rather easy to move and will catch on things and bend up, eventually breaking the leads in extreme circumstances. <S> The thing will also vibrate in a mechanically noisy environment. <S> As such it needs to be tied down. <S> Note the two holes on either sides of the pad. <S> It is common to see a strap, made of an offcut of an axial component lead, bent to fit over the crystal and soldered into those holes with a further dab of solder where the strap touches the case on top to form a good ground for the case. <S> Other times you may see a single hole at the top of the crystal for a single wire post or hook instead. <S> The reason for the big pad itself is a little less obvious than it first appears. <S> The can on crystals is normally isolated from the pins, and as such it is prudent to solder the case down to a ground pad. <S> (Why they don't have three pins to make it easy to ground the case <S> has always eluded me...) <S> However, why the pad needs to be as large as the can is not so clear. <S> Crystals don't get hot <S> so it is not for heat-sink reasons, and since the crystal is already enclosed in its own little Faraday cage, when grounded, E.M. radiation reasons don't make much sense either. <S> Personally, I think the large pad is more to prevent you from running other signals under the crystal. <S> Doing so with a poorly grounded can could interfere with the crystal oscillations. <A> It's a solder pad for a full-size (HC-49/U) crystal, for mechanical purposes. <S> Clearly it has no use when a small (HC-49/US) crystal such as the one in the photograph is used. <A> It'd be used to horizontally mount a larger crystal such as the following HC-49. <S> The two through-hole pads either side are often used along with some wire to secure them in place, plus you may also find those connected to ground to provide some additional shielding. <A> The white silver pad is for bending the crystal to side and soldering the same so that it also gets grounded. <S> Now there are multiple reasons that I have come across, some of which are: <S> The metal can enclosing the crystal acts as a Leyden jar and an effective RF shield. <S> There is little or no reason it needs to be grounded. <S> The main reason the case is sometimes soldered is for mechanical stability. <S> Precaution to prevent oscillations at the wrong frequency. <S> We're using 24 MHz crystals in one application and if you get your finger within 1/4 inch ( <S> 6 mm) of the can the crystal speed will change. <S> So we ground them to keep them stable. <S> Once in production, no one will be touching it, so no grounding after we get done with the design/programming cycle. <S> You can get more information on these links: <S> Grounds for Grounding: <S> A Circuit to System Handbook <S> EEVblog post Grounding Crystal cases?
If you're going to be touching the crystal case a lot, then you may want to ground it, so that the clock is solid even though you touch it.
How to check if the pin headers are soldered well? I don't have much soldering experience. I soldered 5 level converters, they seem to work and look about the same as this STM32 as I soldered. However, after a closer look I see not all pens 'shine' and some don't have a good form. Probably used too much soldering, because it was quite hard to determine (using too less cause nothing but heating pins which I also wanted to prevent more than needed). How can I best test if all soldering connections are ok? I don't have any STM32 experience, so I don't know if there is a general way to do this except for writing programs/testing for each pin? Or is it visible directly from the pictures that this will not work (I hope not). (btw it's hard to make pics, they are all from the same STM32, the first pic shows soldering connections which are much darker than the second, the second looks more like the real thing). Edit: I think I know what I did wrong ... since I didn't have much space the solder tip and solder tin sometimes might have touched directly, also during that the pin itself might not have been heated enough. Next time I really should make sure the tin and tip are on opposite sides of the pin. Update: Used aceton/alcohol I used a mixture of 50% 96% alcohol and aceton and got the following results: It seems to leave some white residue ... wondering if that is a problem. <Q> I don't see any obviously bad solder joints on those pictures. <S> However, these pictures aren't great for inspecting the solder joints. <S> To get pictures of small things, you need to use a macro lens, good lighting, and proper exposure. <S> The main thing to look for is that the solder flowed. <S> That is best seen in the top picture. <S> Too much solder makes it hard to tell the difference between a blob that wetted and flowed over the pad, and one that is just sitting on top of the pad with a layer of flux or oxidized solder in between. <S> The proper procedure for hand soldering such pins is to put the iron in contact with both the pin and the pad. <S> The feed a small amount of solder into a crack between the iron and the pin. <S> The purpose of this little bit of solder is not to make the connection, but to provide good thermal conductivity between the soldering iron and what it's trying to solder. <S> After a second or two, the pin and pad should be hot enough to melt solder on their own. <S> Feed a bit more solder. <S> This should now melt easily and flow all over the pin and the pad. <S> Remove the iron as soon as the solder has flowed. <S> While the joint is cooling, make sure nothing is wiggling the two parts of the joint relative to each other. <S> Added <S> On closer look at the third and fourth pictures, the solder joint for C15 is suspect. <S> At the least, the solder doesn't seem to have flowed over the whole pad. <A> If you use leaded tin then none of them should look matte. <S> (ROHS tin is another story, such joints tend to look rather bleak even when properly soldered.) <S> This wouldn't pass a professional examination, but might work (for a while) for indoors hobbyist purposes. <S> Overall looks like you use far too much tin and too little heat, several joints look fishy and "cold". <S> Often the problem is that the pad didn't get enough heat. <S> The iron needs to be placed so that it touches both the pad and the pin. <S> You can let the tin quickly nudge the iron first, only to trigger the wetting. <S> Then apply the tin for the actual joint without touching the iron. <S> There should be roughly enough tin to cover the hole. <S> For professional use in tough environments, it is good if a bit of tin floats out on each side of the hole (assuming it is through-hole plated which should be the case here), to prevent corrosion over time. <S> You should strive for something that looks like B3. <A> You did a fine job there. <S> Those cheap header pins are likely non copper. <S> As such it is best to dial up the temperature a little and out some solder flux on the pins plus the holes before soldering them. <S> But your soldering is fine. <A> Whereas the above answers are useful, I don't think they answer the actual question: <S> How can I best test if all soldering connections are ok? <S> Even poor solder connections might conduct fine for a while, or even indefinitely if not disturbed. <S> The problem is that you want to have some reassurance that the connections remain good even over changing conditions of thermal expansion/contraction and vibration. <S> Do the same procedure but rather than temperature variation, run a small motor acoustically coupled to the board, ideally trying multiple different axes of motion. <S> Edit: if you're trying the acoustically coupled motor, you would also want to test a range of frequencies (rotational speeds) of the motor, because the mechanical properties of the board and the solder connections will vary over this range - from "very low" ~1Hz to the high hundreds of Hz.
It seems the solder wetted and flowed on both the pads and the pins, although too much solder is clearly evident on many of the joints. However, you don't need to "drown" the whole pin in tin as in those pictures - this might hide poor soldering underneath. Put the board through a few cycles of heating/cooling through its rated temperature range, all the while applying a low-voltage square wave to each of the pins in question. If you see any interruption or distortion in the output, one of the connections has likely failed.
What will happen if I go higher than common mode range I am planning to use MAX9611 as a high-side current sense solution for my circuit. One thing that I do not understand is the common mode range which in the datasheet it says 0 to 60V : Nowhere in the datasheet has been pointed out what will happen if a voltage higher than 60V be applied to the circuit. I am planning to use two different voltages for my LOAD, first 20V@1A and 120V@2A (I have a variable load). In the second mode (120V) I am not interested in sensing the current but I do not want to make a switch to bypass the MAX9611. So does passing 120V in the circuit above damages the chip? <Q> Nowhere in the datasheet has been pointed out what will happen if a voltage higher than 60V be applied to the circuit <S> The absolute maximum voltage on the RS pins are 65 volts as per what the data sheet says: - <A> In this particular case, these high voltage pins will have a junction to substrate, that can breakdown like a diode, and they will have resistors down to the input of the sensing amplifier which is driven off the 5v VCC, which could have excessive dissipation. <S> How many more likely ways do you want of blowing the thing up? <S> If they could have advertised a part capable to 70v, or 120v, you can rest assured that they would have done. <A> Common mode voltage is the highest Vin that the highest voltage input can be at and the IC will still be guaranteed to still perform as per spec sheet. <S> See below for why. <S> Absolute Maximum / ABS MAX values are those below which the IC is "guaranteed" not to be damaged. <S> At these values it is NOT guaranteed to operate correctly or at all. <S> It may - if so you are in luck. <S> It may APPEAR to - in which case you may (unwisely) <S> THINK that you are in luck. <S> Electrical Characteristics data relates to guaranteed normal operation. <S> The maximum value in Electrical Characteristics ratings are the highest values at which guaranteed operation can be expected. <S> Above that magic smoke may happen. <S> At 120V magic smoke or Lot's-wife-pillar-of-salt-imitations can be almost guaranteed.(Or both). <S> Common mode voltage is defined in the data sheet as (Page 13) "The input common-mode voltage is defined as the average of the voltage at RS+ and RS-. <S> VCM max = <S> 60V. <S> This is specified under conditions given in the fine print at the top of table at the bottom of page 2. <S> viz <S> "Conditions: VSENSE = <S> (VRS+ - VRS-) = 0V. Same table: "input common mode range = <S> 0 <S> -60V." Together these specs say that if VRS+=VRS- then they may both be at 60V as average = <S> 60V. <S> BUT if current flows in Rsense you COULD argue that VRS+ could be eg 61V <S> IF <S> VRS- = <S> 59V so the average = <S> 60V. <S> Trying to argue this would be unwise. <S> You could not then reduce VRsense with VRS+ <S> > <S> 60V. <S> ie they are saying VRS+ may be at 60V <S> IF VRS <= <S> 60V. <S> (In the datasheet VVMR of 65V is mentioned in discussion but it does not appear in the spec table except as an abs max survival value.)
You should assume that smoke will come out if you exceed the Absolute Maximum ratings, especially if the data sheet says nothing more about it.
How to interpret BGA package for creating footprint I want to create a footprint for a BGA-292 package. I might be wrong but there are 2 different views of the package in the datasheet. The first outline shows: In the photo above, the right side should be the flipped view of the top-view on right side. This makes sense, but, there is a top-view view of the pins as well: If you look carefully, this does not match the first picture. Rows and columns are swapped while the A1 pin is still on the bottom-right corner of both pictures. Which one should I trust? What does the TOP-VIEW mean? is it looking through the top of the package into pins? then why numerical and alphabetical columns and rows are swapped? <Q> Draftspeople at 90° angles <S> The draftsperson who drew the pin map drawing drew it rotated 90° from the draftsperson who drew the package drawing. <S> Rotating it 90 <S> ° clockwise makes the index pin (A1) match up with the location of the index mark on the top view in the package drawing, as seen below: <S> The top view part, by the way, means exactly what you think it does -- you're looking through the top of the package into the pins with a metaphorical X-ray camera. <S> This means that it matches how you'd map the pins to your PCB footprint. <A> You will find that both diagrams actually have exactly the same pin mapping, though it is slightly obfuscated. <S> The first thing we have to do is identify which side is which in the diagrams. <S> In the top diagram we have: <S> On the left we have the top view, which indicates looking down on the top of the chip. <S> On the right we have the bottom view, looking up at the bottom (pin side) of the chip. <S> From this we see that the diagram with labelling of the pins is from bottom view. <S> In your second diagram you have the pin-out for the chip laid out as a Top-View image (as labelled) <S> and so matches how the pins would appear on the PCB. <S> As such in order to directly compare the two diagrams, we must flip one or other of them in order to get them to be viewed from the same side. <S> Lets make both Top-View by flipping the package drawing: <S> You can see now that pin-out in the package diagram does match the pin map diagram, with only a rotation as noted in the other answers. <A> Rotate it by 90 degrees, then it will match up.
That means that it is the mirror image of how the pins would appear on the footprint/PCB pins.
Do you need to enable all of the IC's chip select lines to select an IC? If there is an IC with multiple CS (chip select) lines, like the (old) MOS 6540 (for example): Source: cbmhardware.de Warning: This pinout may not be 100% correct, please take a look at this website: dasarodesigns.com Is it correct that you need to enable all of the available CS lines to enable the chip (with enable I mean high for high-active CS and low for low-active _CS inputs)? Not meant to be a 6540-specific question! <Q> Typically, yes. <S> Sometimes the chip selects have different polarity, one is negated and the other is not. <S> This usually simplifies the chip select logic, and does no harm because if you only need one, you can tie the others to whatever level necessary. <A> Sometimes the answer is yes. <S> But this is a chip design specific thing and requires that you look at each part's data sheet. <S> There is NO general answer for this. <A> I can't find a datasheet for the 6540 online anywhere, but I did come across a design for an adaptor that allows you to replace it with a different ROM such as a 2716: <S> http://www.dasarodesigns.com/product/6540-rom-adapter-rev-1/ <S> In the accompanying text it states: 2) <S> The 6540 has five chip select lines. <S> CS3, CS4, and CS5 are active low meaning that they must be held low (+0v) for the chip to be on (its data lines to be low impedance). <S> CS1 and CS2 are active high, meaning that they are must be high (+5v) for the chip to be on. <S> As this information appears to have been used to produce a working design it's likely to be correct. <S> As others have stated, it's important to check the datasheet for the exact answer but certainly in my experience it's usual to have to activate all the chip select lines in order to enable a device.
A chip is not selected unless all its chip select lines are activated.
Spikes on LT1301 DC-DC converter I'm having some problems with an a LT1301 step up DC/DC converter. I'm using the circuit that appears on the datasheet to convert 5V to 12V, but I'm getting periodic spikes on the output when loading with a LED. The spikes are high, +- 5 Volts around the 12 V signal. I don't understand why it doesn't behave like the datasheet says, if this is the same circuit. Thanks in advance. EDIT1:I haven't enough reputation to post more than 2 links, but the spike duration is around 60 ns <Q> The "spikes" are the ringing in the inductor (self-resonance) associated with the switch-off transient of the regulator's switching transistor, coupled through the capacitance of the rectifier diode. <S> There is actually very little energy associated with them, and they can be reduced to negligible levels by good circuit layout and some judicious bypassing of the output with a ceramic capacitor. <S> This keeps the ringing from affecting other circuits via either conduction or radiation. <S> In extreme cases, a "snubber" (resistor and capacitor in series) connected between the switch node and ground is required to suppress the ringing. <A> Like Dave Tweed mentioned, these spikes are likely very low energy. <S> Zoom into them (in the time scale) and check the duration. <S> I would just like to know how much load you are drawing from this converter. <S> You mentioned you connected an LED <S> but you didn't mention the series resistor, or if there is more than one LED. <A> There are two likely explanations: The spikes aren't really there (mostly). <S> They are scope artifacts, possibly make worse by poor grounding of the scope probe. <S> Connect the ground clip of the scope probe directly to the negative side of C2, and the tip directly to the positive side. <S> The high ESR of the output cap (C2) is contributing to the spike size. <S> It's OK to have a electrolytic on the output for bulk storage, but there should also be something there with low impedance at high frequency. <S> At only 33 µF, C2 could have been ceramic. <S> Leave what you have there, but add at least 10 µF of ceramic across it.
The component values required in the snubber depend on the specific characteristics of the inductor. I would be more concerned with the sawtooth-like shape you have after the ringing; generally, the converter shouldn't have that jump in the output voltage. If they are in the order of a few nanoseconds, you can easily solve it following Dave Tweed suggestions e.g. adding a snubber.
Is ESP8266 an AVR? AVR is just an integrated circuit microchip, made by Atmel. It looks something like this: (source: https://stackoverflow.com/questions/1447502/whats-the-difference-relationship-between-avr-and-arduino ) However, ESP8266 doesn't seem to share the same architecture, or does it? Is ESP8266 an AVR? If not, how come we can use it as one through libs such as this one ? <Q> ESP family isn't a AVR! <S> The Library you refere to is a Arduino IDE (Integrated Development Environment) library. <S> The Arduino IDE has a hardware layer that gives it the ability to utilize several MCU arhitectures that isn't AVR, but they share the programming environment. <A> However, ESP8266 doesn't seem to share the same architecture, or does it? <S> Is ESP8266 an AVR? <S> Is ESP8266 an AVR? <S> If not, how come we can use it as one through libs such as this one ? <S> Generally the idea behind the Arduino project is to define a standard core API that will be the same/similar for any platform. <S> The architecture-specific code is hidden behind this API. <S> The "ESP8266 core for Arduino" that includes the library you mentioned contains this architecture specific code as well as the necessary toolchain. <S> However, I think you're confused about the purpose of the ESP8266AVRISP library. <S> It is used to turn the ESP8266 into an ISP programmer for AVRs. <S> This does not require the programmer microcontroller to be an AVR but indeed the target microcontroller must be an AVR. <A> No, not even close. <S> The ESP8266 uses a 32-bit Xtensa RISC core licensed from Tensilica and is made by Shanghai-based Espressif Systems. <S> The AVR is a much older 8-bit RISC architecture and is made by US-based Microchip Technology (since they bought Atmel). <S> The Arduino environment can be used to program <S> ESP8266 controllers (as well as others such as some ARM MCUs), but <S> the ESP8266 is not related at all to the AVR.
A separate hardware package is used for AVR, most commonly "Arduino AVR Boards", which is bundled with the Arduino IDE. No, the ESP8266 is not AVR architecture.
Varying frequency by percentage, rather than with linear resistance? I'm using a 555 timer to generate musical tones, and employing resistors to get various pitches. Instead of resistance by linear amounts (ie. 1KOhm) , is there a way to apply resistance by percentage? For example, is there a type of resistor or other component which will reduce the flow to 50% ? I ask this, because I would like to press one button to output half the frequency (an octave lower, musically) of the present frequency. Alternatively, can this be done with capacitors? Thoughts? <Q> It will be halved regardless of what resistor values you use (at least to a first approximation, there might be some difference for very large or very small resistance values). <A> This is a partial complete circuit of a 555 timer. <S> When SW1 is open, the frequency will be:$$\left( \frac{1.44}{(R1+2R2)C1} \right)$$ <S> When the SW1 is close, the capacitance in effect will be C1 + C2 = <S> 2uF. <S> Doing so will reduce the frequency by half.$$\left( \frac{1.44}{(R1+2R2)(C1+C2)} \right)$$ If doubling the frequency is needed, open SW2 to reduce the capacitance by half. <S> The calculation for capacitance is:$$\left( \frac{1}{\frac{1}{C1}+\frac{1}{C3}} \right)$$ simulate this circuit – <S> Schematic created using CircuitLab <A> Easiest way to regulate a 555 timer is using PWM duty cycle to switch the series R with a CMOS switch. <S> Here shown using rail to rail CMOS <S> OP Amp as the Schmitt trigger with 5% hysteresis ( you can use more for lower f up to 30% or so. ) <S> The Clock is 5V 25% duty cycle and is linear to f out here at 2.43kHz. <S> So cutting duty cycle by 50% reduces f by 50% exactly. <S> (Within tolerances)
If you shunt the capacitor in the 555 astable circuit with another of equal value you will halve the frequency.
Health risks of exposed contact to a capacitive sensor I want to make a wearable metal trinket with the ATtiny85 chip acting as a capacitive sensor (with the same technique that this Arduino library uses), so it can detect when it's being worn. Are there any health risks to touching what is effectively a low-voltage live wire for an arbitrarily long amount of time? Here's the schematic from that link: Be patient please, I'm a beginner :) <Q> Yes, there may be a risk for long term wear. <S> Metal ions may cause a chemical burn. <S> I have an 8 year old scar to illustrate this. <S> For a few days, I was experimenting with an EKG circuit and I used makeshift copper electrodes. <S> The burns (two more: on another arm and on a foot) took a month to heal. <A> Capacitive sensors don't require direct contact, they work via capacitive coupling: <S> Check out the picture you've posted <S> : the guy doesn't touch anything, he just keeps his hand close to the foil, creating a capacitor. <S> Just keep your electrodes insulated (e.g. covered by a thin plastic film or coating), and you'll avoid chemical burns and corrosion issues completely. <A> Stainless Steel watch bands give the best skin results or leather if you prefer. <S> but there will be some galvanic DC voltage with any chemical reaction. <S> But my finger tip is somewhat calibrated in xxx pF <S> depending on surface area and contact force so for data transfer , this is all you need. <S> Waving your hand nearby is about 1pF so <S> f must be high to lower coupling impedance. <S> Adding a small metal contact does not improve much since it is in series with the air capacitance; but obviously depends on size relative to fingertip. <S> Noted <S> I took this as an XY problem with a Z answer but other XY answer by Nick is valid, yet ignores the purpose Z.
If your electrodes have an ohmic contact with the patient, and they have a DC bias, and they are made of a reactive metal like copper, then you may be generating metal ions on the patient's skin.
Altium pads and holes print PDF I'm trying to print a PDF to put my PCB design on copper, and I get the PDF document and everything seems to be alright but when I print my design the pads are filled in black. PDF Output And this is the result: So then, how can I get the holes in the printed PDF? <Q> This is because the white in the round pads are drill holes - not part of the copper structure. <S> I don't know why some of the square pads have them though. <A> If I have understood correctly, you have the issue only when you print to paper, while the PDF is correct. <S> That should force Adobe Reader to handle the masking of the holes, rather than the printer. <A> I think your big component pads is not proper on footprint. <S> You need to edit footprint of this component. <S> These holes is not drill holes on footprint. <S> Dont waste your time with print settings.
Not sure if you can print these, but maybe try opening the CAM-files including NC drill-file and do it from there, instead of just exporting the board file to PDF. The likely solution is that when you print from Adobe reader, you select the Advanced button in the print page, and tick the box where it says Print As Image . You can cut out on pcb or you can fix on footprint.
Is it possible to find any information about a proprietary IC with no manufacturer name on it? I used a Kenmore/Frigidaire microwave oven controller board to teach a class on VFD driving/multiplexing and few other topics. It was well received, but many students wondered if they could find more information specifically about the micro-controller chip used. Unfortunately no information whatsoever comes up on Google when searching any of the numbers from the chip. Apparently it is proprietary with no publicly available information about it. This is not the first proprietary chip I came across, but the first one I am really looking forward to find info on. Are there any other sources of information I could tap into to get a datasheet? <Q> No. <S> Applications support is costly, especially for microcontrollers. <S> With a house numbered device, most likely this support is provided directly to the OEM (Original Equipment Manufacturer, Kenmore) by a specific account manager contact at the chip vendor (let's say Hitachi for example). <S> Likely it's based on some publicly visible microcontroller like maybe Renesas H8 ( wild guess, I could be way off ), possibly customized for that large OEM customer. <S> Since the NRE costs (Non-Recurring Engineering) are paid by the OEM, that design belongs to the OEM. <S> Bear in mind that Kenmore has competitors. <S> If OEM 1 specs a custom chip that gives them an advantage like lower cost or more features, they won't make it easy for competing OEM 2 to benefit from their design. <S> Legions of corporate lawyers protect this kind of proprietary intellectual property information, which is worth millions of dollars of NRE and untold opportunity costs. <S> ( Disclaimer: I'm an applications engineer at Maxim Integrated, and apparently several of our display driver chips are near or at the top of this google search. ) <S> You may find either display driver chips that require a user-provided microcontroller, or possibly a microcontroller with integrated VFD drivers. <A> A proprietary chip isn't just used to provide the benefit of reduced cost or added features - it can be an effective way to slow down competitors who might otherwise simply clone a design and benefit from not investing as much time in NRE. <S> At a minimum the pinout may differ from a standard part with published specs (sometimes this will have been done to reduce PCB cost if routing can be simplified). <S> Even if this is the only change, the specs are unlikely to be public since manufacturers generally prefer to keep as much control of their product design as possible. <A> Yes, you can. <S> You can go find a lab with a nice microscope and burn off the epoxy with nitric acid (major safety hazard). <S> Then that's kind of the end of the road, because even if you did know the fab, the design will probably be off limits. <S> You might be able to burn off some other microcontrollers that you think are similar and see if you get a match. <S> Odds are its an ASIC that doesn't have code on it. <A> The die might have some identifying marks. <S> You could try decapping the chip or if you have access to it, x-ray inspection. <S> Thats not going to help much if it is custom part or not sold on the open market. <S> If it is is an off-the-shelf part with a custom marking or custom package, you might be able to figure that out. <S> I wouldn't count on it, though.
Your best bet is to search on "vacuum fluorescent display controller" and select something publicly supported. After the silicon is exposed you can see if it has any fab markings on it.
How to calculate temperature through NTC thermistor without its datasheet? Thermistor has "103" written on it, that means its suppose to be 10kΩ at 25°C. That is all I know. I don't know the B-constant. I don't know the manufacturer to find the datasheet. I connected my multimeter probes directly to the leads of thermistor. Resistance varies between 11.8 kΩ to 12 kΩ at 26-27°C. Is my thermistor faulty? My required temperature range is 10°C-35°C. Also, I found different equations on this site, which one should I be using? <Q> I've often used a stirred ice bath as an approximate and cheap way to set up something very near \$0\:^\circ\textrm{C}\$. <S> It's quite good and doesn't depend much on ambient air pressure. <S> Boiling water is not so good a reference, as altitude (actually something called 'density altitude' or 'pressure') matters. <S> So you will need to measure the air pressure, as well, to create a boiling point for calibration (and use water that meets the Vienna standard.) <S> A problem using just two points is about what is happening in between them with your sensor. <S> (Not to mention if your sensor can tolerate them.) <S> You'll also experience time drift and probably a lot of other kinds of drift, as well. <S> It's hard to know what you have in between your calibration points. <S> A platinum RTD is a fairly standard reference that might be used without regular calibration. <S> (If cared for.) <S> One nice thing about it is that you can get lots of measurement points as the bath cools down, with some reasonable accuracy expectations. <S> You could also consider using gases at a very low pressure, as they begin to behave ideally, then, and you can use pressure times volume as the variable that relates directly to temperature. <S> (I've not done this, but I've heard of it being used.) <S> I have several I use here. <S> One of them is calibrated over a range from about \$-200\:^\circ\textrm{C}\$ to \$450\:^\circ\textrm{C}\$ (where the probe tip dies), once a year. <S> Accuracy is \$\pm50\:\textrm{mK}\$ over the range, with precision about a tenth of that, at a rate of 10 measurements per second. <S> Your equations are all the same thing. <S> You really need to work on your algebraic skills. <S> $$\begin{align*}R <S> &= R_0\:e^{B <S> \left(\frac{1}{T}-\frac{1}{T_0}\right)}\\\\\frac{R}{R_0}&=e^{B \left(\frac{1}{T}-\frac{1}{T_0}\right)}\\\\\operatorname{ln}\frac{R}{R_0}&=\frac{B}{T}-\frac{B}{T_0}\\\\\operatorname{ln}\frac{R}{R_0}+\frac{B}{T_0}&=\frac{B}{T}\\\\T&=\frac{B}{\operatorname{ln}\frac{R}{R_0}+\frac{B}{T_0}}\\\\T&=\frac{T_0\:B}{T_0\:\operatorname{ln}\frac{R}{R_0}+B},\textrm{ or} & T&=\frac{B}{\operatorname{ln}\frac{R}{R_0}+\operatorname{ln} e^\frac{B}{T_0}}\\\\&\textrm{ } & T&=\frac{B}{\operatorname{ln}\left(\frac{R}{R_0}\:e^\frac{B}{T_0}\right)}\\\\&\textrm{ } & T&=\frac{B}{\operatorname{ln}\left(\frac{R}{R_0\:e^\frac{-B}{T_0}}\right)}\end{align*}$$ <S> Use whatever. <A> Here's what worked for me: After experimenting with different B values, I found 3900 gave me the right temperature. <S> I used a mercury thermometer for reference. <S> There are still fluctuations in the reading, but not too much. <S> Used voltage divider formula to find thermistor resistance (Rt), since my micro-controller can read voltage (vo) out of the voltage divider circuit. <S> These are the readings. <S> vo is the voltage divider output. <S> Rt is calculated using voltage divider formula and Temp is calculated from the formulas in my original post. <S> See the difference in the first 5 readings? <S> That's the fluctuation I was talking about. <S> Or is it because of pressure? <S> The next five readings are near a heat source, similar readings were on the thermometer. <S> Thanks guys. <A> You can use lookuptable such the ones used in marlin with 4.7k and 10k thermistor: const short <S> temptable_4[][2] <S> PROGMEM = { { OV( 1), 430 }, { OV( 54), 137 }, { OV( 107), 107 }, { OV( 160), 91 }, { OV( 213), 80 }, { OV( 266), 71 }, { OV( 319), 64 }, { OV( 372), 57 }, { OV( 425), 51 }, { OV( 478), 46 }, { OV( 531), 41 }, { OV( 584), 35 }, { OV( 637), 30 }, { OV( 690), 25 }, { OV( 743), 20 }, { OV( 796), 14 }, { OV( 849), 7 }, { OV( 902), 0 }, { OV( 955), -11 }, { OV(1008) <S> , -35 }}; source <A> When converting ADC output to voltage you need to assume an ADC reference, e.g. 5V. <S> That is not entirely accurate. <S> If you supply the NTC circuit from the same supply as the ADC reference, you end up with ratiometric output. <S> Avoid some conversions and calculation by calculating directly R/R0 from the ADC reading.
A NIST calibrated sensor might be another good approach.
Why does a timing light connect to 12 V? I'm curious why an ignition timing light needs to connect to the battery to work. I may not be fully understanding how they work, but I'm guessing there's an inductive pick up and that illuminates the bulb. So couldn't just that inductive kick be enough to light the bulb? <Q> It's for power. <S> The power from the magnetic pickup is very small. <S> It's basically a signal, not something you can run a light from directly. <S> The 12 V and ground connections provide the power. <S> This small signal from the magnetic pickup triggers the strobe to fire, but the strobe is power by the 12 V battery. <A> Back in the olden days, ignition timing lights were neon lamps powered off the ignition pulse. <S> They were so dim as to be almost useless (unless you were into performing engine maintenance at night, with the lights off). <S> Modern ones simply use the ignition pulse to trigger a bright flash from a lamp that is powered by the 12V vehicle battery. <A> You still need bias. <S> The magnetic pickup can't extract power and shouldn't from the ignition wire.
The 12 V and ground lead extracts power from your 12 V system to light up the strobe bulb, triggered by the magnetic pickup signal.
How to handle multiple GND, and +5v vs VCC I'm starting my hobby electronics journey. I know how to read all the symbols and know how to solder. But I'm a bit confused with reading schematics that have multiple GND and the difference between VCC vs +5v. Please take a look at this schematic . Where do the ground points physical connect to? Do they symbolize the negative terminal on power source and therefore all GND points should connect to each other some how? There are VCC points and +5v points. Are they the same? If not, where do the wires connect to? Which power adapter can I use to power this station? THe schematics have +5v. If I got a laptop charger that was 19v 60watts 4amps, how would I use it to power the +5volts which is less than 19v of the charger? Also from one power adapter how would it get 15v ac and 9v ac power from? I'm trying to replicate this soldering station. here . <Q> When you see ground or VCC connections they symbolize a common net. <S> That is, it's a shorthand way to show all the pins that need to be connected to those rails without actually having to draw a ground or power wire on the schematic. <S> As you surmise, all the grounds, and +5Vs and Vccs, are indeed connected to their respective "together". <S> In this case Vcc is actually mislabelled, and badly so in my opinion. <S> Your Vcc shown on the schematic should actually be labeled as "RAW". <S> It's simply the rectified and smoothed 9V AC voltage. <S> The +5V signal is generated by the Arduido, and should more rightly be labelled Vcc. <S> Whether the arduino can actually supply enough current for all the things attached to that pin in unknown. <S> As for where to get 15V and 9V AC, you would need suitable transformers. <S> If you want to use a laptop charger to get your RAW voltage, you would need to down regulate it to within range of the ARDUINO RAW input voltage range. <A> Where do the ground points physical connect to? <S> Do they symbolize the negative terminal on power source and therefore all GND points should connect to each other some how? <S> There are VCC points and +5v points. <S> Are they the same? <S> If not, where do the wires connect to? <S> In this case VCC and +5V are not the same. <S> Power enters the circuit from the 9V AC connector. <S> D1 provides reverse polarity protection. <S> After passing through D1, the unregulated, reverse-protected +9V voltage is called VCC. <S> VCC enters the RAW pin of the Arduino Pro Mini, where an on-board regulator converts it to +5V. <S> That +5V then supplies the rest of the low-voltage components. <S> It's misleading that the schematic refers to the unregulated +9V net as VCC. <S> It should be called RAW, V_IN, or +9V <S> Which power adapter can I use to power this station? <S> Can I use a 19V charger? <S> The on-board regulator on the Pro Mini steps the +9V input down <S> to +5V. <S> You need to check the Pro Mini to see what it'll accept. <S> Take a look at this page: https://www.sparkfun.com/products/11113 <S> Also from one power adapter <S> how would it get 15v ac and 9v ac power from? <S> You'll need a multitap transformer. <S> It doesn't matter for the 9V input, but the 15V AC input needs to be AC for the triac (double triangle symbol) to operate, and it needs to supply enough current to run the soldering iron. <S> I'd suggest using a single tap transformer for the 15V input, and use any old 12V AC->DC power converter for the 9V input <A> Treat every power and ground as an inductor and resistor with units of nH and mOhms and use XL(f) for switch transients and ground shift noise along with Ohms Law on load to Source. <S> Since a square area conductor has the same inductance for any size, a ground and power plane is obviously better than a track but <S> sometimes a 100:1 L: <S> d ratio is adequate. <S> Example when it is not adequate is like on 10: 1 probes with 100mm ground clips that resonate at 20MHz. <S> You fat tracks for power and ground. <S> Keep in mind impedance ratio of source inductance and load capacitance and ESR of same for noise and avoid ground and power loops which act as antenna and also conductive noise. <S> Use star or plane distributed grounds from power source and return for high currents. <S> Nothing too high here, but the OLED display needs low analog noise for video signal to source. <S> Add 0.01~0.1uF caps for insurance on each logic chip. <S> I used an RLC Nomograph to avoid the mind numbing calculations of impedance to each component to understand frequency effects of parts and traces. <S> Later for RF one uses stripline or microstrip calculators for f> 20MHz. <S> There are obvious basic suggestions, which you can read anywhere for Power ground , I just added some finer points, which may take you a while to grasp. <S> For example we often use Analog ground symbols separate than logic ground and Earth ground as each is simple a designated 0V reference for the signals using that. <S> The same applies to 5V and Vcc. <S> Each may be common or physically decoupled by understanding the charge and discharge current paths of high current logic pulses <S> e.g. 10mA/10ns = <S> 1A/us and large E-caps often have a limitation of 1~100us ESR*C time constant.
Yes, all the ground points should be connected together
Motor for precise low speed motion but also capable of high speeds I'm trying to design a system that should rotate at up to 4000 rpm when needed but also be capable of precise (hopefully sub degree) positioning at under 100 rpm or less. I have an absolute position encoder for closed loop control. The load on the motor is very small (a thin piece of plastic). What I've tried so far: A hobby BLDC motor with an ESC. This works perfectly for high speeds but I haven't been able to get the ESC to go slower than ~1000rpm. A stepper motor works perfectly at low speeds and micro-stepping + the encoder give great resolution. However I haven't been able to get a standard NEMA 17 stepper to go faster than 200rpm at 12V even when accelerating slowly. These are an order of magnitude off from what I want in terms of speed range. Some possibilities I've thought of: Gearing down the BLDC. The downside is that the maximum speed will also drop proportionately and we are back to needing a motor with a high speed range. Gearing up the stepper motor. This would reduce the effective resolution unacceptably while increasing speed. Controlling the BLDC manually without the ESC. I'm not sure if I can get an average hobby motor to run slow and smooth even if I found an appropriate controller. What is the best way to solve this problem where I can have precise control at low speeds but also the possibility of high speeds when needed? Is there some other type of motor or way to control these motors that can give me what I want? <Q> Most hobby ESC operate its motor sensorless. <S> So the RPM is unstable to detect at cetain level. <S> It means correct speed control isn' easy at low speed because the sensoless control would work some level of speed. <S> Stepper motor is good at position application. <S> If you want use stepper motor as speed control, you should apply vector control instead of open loop. <S> Then you will get more than 600 RPM. <A> Use a variable reluctance stepper for fine positioning and an induction motor for high speeds, couple both shafts together. <S> Both types of motor produce no torque when unpowered, and generate no voltage when rotated so the stepper won't try to output kilovolts when spun at high speeds and the the induction motor won't interfere with fine positioning. <A> You need a rotary encoder on a stepper motor where the encoder gives you the same number of pulses as steps of the motor. <S> You can then use the encoder to know when to commutate the stepper motor. <S> With the appropriate driver you ought to be able to get well over the 4000RPM <S> you desire when needed.
Some mechanical adjustment of the encoder disk to shaft angle will be required to obtain the optimum acceleration torque.
Is a valid USB VID/PID necessary for strictly embedded use of the Bus? So the system of USB VID/PIDs as far as I understand it is to avoid conflicts between devices and the USB-IF is handling the distribution of these IDs and wants a fee if you need a VID and a corresponding PID block. Now how is the situation looking if you have an enclosed device where systems within that device talk via USB but the device itself does not expose a USB port or advertise USB compliance or the use of USB in any way, it is just used for internal communication like you would use SPI or I2C. Do I still need a VID/PID from the USB-IF?If yes is it allowed to then just use the prototype VID 6666? The USB Host device in this system is running Linux. So a driver is in use, the end user just can't plug in any more USB devices to this host. I have the ability to chose the VID for every device connected to avoid any conflict. <Q> It will work, if that's what you're asking. <S> - you only get in trouble if you use the name and logo without permission. <S> At some point one of your customers will take the product apart and, if they see a USB port inside, plug it into a computer. <S> They shouldn't have any drivers for that VID, but they might. <S> You'll want to make sure that can't damage anything, or just stick a "warranty void if opened" sticker on it. <S> The same is true if the user can plug random hardware into the USB host within the device. <S> They shouldn't have any hardware with that VID, but they might. <S> And you don't want the host to brick that hardware by accident. <S> If there are no external USB ports, then the warranty void sticker works here too. <S> Some dodgy USB sticks and other cheap clone devices use VID=6666 and PID=8888, and maybe others. <S> It's probably worth checking and avoiding those PIDs. <S> You can buy single PIDs from MCS electronics for about $15. <S> The USB-IF do not approve, but legally it seems they cannot stop it. <S> Some manufacturers of USB hardware also give out PIDs from their VID. <S> That said, I'd probably just do what you propose, and use VID=6666 with some random (i.e. not 1111 or BEEF etc) PID which doesn't have any google hits. <A> No, you don't need a unique VID/PID. <S> These parameters are used by the OS to load the correct driver for the device. <S> If you don't need a driver, you don't need these parameters. <A> If any of the following are true: <S> your internal use of the USB bus needs to be certified compliant with the USB specification <S> you need to use the logo and/or other trademarks associated with the USB standard <S> you want your device/host to work with 3rd party USB devices <S> Then yes, you will need to comply with the VID/PID requirements as well. <S> If all three are false then you can use whatever VID/PID you want that will meet your project requirements.
And there is no law saying you must buy a VID from the USB-IF in order to use USB Some things to consider: If you do want to insert a computer, to do debugging or something, life will be easier if you have a unique VID/PID combo and can write drivers accordingly.
Pulse withstanding capability of standard resistors How much pulse power does a standard (i. e. not further specified) resistor withstand? Consider for example a MOSFET and a 33R resistor that is connected to its gate. If the switching voltage would be 10 V, the resistor sees up to 3 W every time the MOSFET gets switched - but only for a very short time, until the gate (in my case, about 15 nC) is charged. Do I really need to specify a pulse withstanding resistor? Or is there any way to tell whether a 0402, 0603 or 0805 standard resistor (without further specification) will suffice? <Q> Any half-decent reputable resistor supplier will have pulse power dissipation limits such as this one from Vishay: - It tells you how much power can be delivered in a pulse to a resistor. <S> For a milli second the power can be no more than 1 watt. <S> Or is there any way to tell whether a 0402, 0603 or 0805 standard resistor (without further specification) will suffice? <S> If you want to do the job properly read the data sheets. <S> The data sheet will also tell you how much copper you may need to use around the resistor to achieve this specification so <S> , you can't really guess with any accuracy. <A> While I agree with Andy Aka's answer , if you cannot get a decent data sheet, I'd estimate based on the following: The enemy of reliability is the heat load on the resistor, (temperature perhaps). <S> Based on that, you know how much energy is being transferred to the caps via <S> $$E=\frac{CV^2}{2}$$ <S> Hopefully you can find a mech-eng for back of the envelope air cooling based vs $$I^2R$$ and your energy per pulse. <S> You could also do IR inspection on a prototype- <S> but if you have access to IR equipment - why not source a resistor with a decent data sheet? <A> The resistor needs to withstand the maximum average power dissipated. <S> That can be a complicated equation, but basically it means the more often you will be switching the MOSFET, either continuously or in bursts, the higher the wattage of resistor you need. <S> If it's a simple switch to turn on a relay or lamp it won't matter. <S> If however, you are pulse width modulating some coil current at hundreds of hertz or kilohertz, the charging currents become more sustained and the power dissipated by the resistor matters. <S> Note I also mentioned sustained bursts. <S> If you periodically fire a few thousand pulses for a significant duration, you need to use those values as your worst case scenario. <A> For the pulse, a short pulse, the only place the heat can be stored in within the ceramic core of the resistor. <S> That core needs to remain cooler than? <S> 100 degree Centigrade? <S> The specific heat of silicon is 1.6 picoJoules/micron^3 * degree Centigrade. <S> Assume <S> the resistor has volume of 4mm by 5mm by 5mm, or 100 mm cubed. <S> The # cubic microns is 4,000U * 5,000U <S> * 4000U, or 100,000,000,000 cubic microns. <S> The specific heat of that resistor is 1.6pF <S> * 0.1 <S> TeraMicrons = <S> 0.16 Joules. <S> How fast can the resistor dump heat? <S> The thermal timeconstant of silicon (we'll assume the resistor core is clay/silicon) is 9,000 seconds for 1meter cube, 90 seconds for 0.1meter cube,0.9 seconds for 1cm, and 0.009 seconds for 1mm. <S> Our exit paths are 1/2 (both ends can dump heat to the PCB trace) <S> * 4mm, or 2mm. <S> The Tau for 2mm is 4X that of 1mm, thus 36 milliSeconds. <S> Can we use these numbers?
For instance, an 0603 resistor can take pulses of power up to about 20 watts if the duration is only a micro second.
Can an electronic device continuously sweep the voltage? Modern power supplies can sweep the potential in a given range with a specific rate. I am curious if the electronic devices can continuously sweep the voltage (in a perfect sense) or it is just step-based changes, which seem like sweeping? For example, consider sweeping with from 0 to 10V in 10,000s . Does the sweep has a resolution of say 1mV , and the data looks like time/s voltage/V1 0.0012 0.0023 0.003 Or it is absolutely continuous, as the voltage is 0.0025 at 2.5s , 0.002513 at 2.513s ? Note that my question is not about the voltage resolution, but if the change from 2 and 3s is a step from 0.002 to 0.003V or it is still a gradual change. <Q> This occurs internally in many analog to digital converters. <S> The input is compared with an internal binary-generated staircase waveform and when the input level is reached the binary count is read and stored. <S> Figure 1. <S> Counter type ADC. <S> Source: <S> Daenotes . <S> An analog triangle-wave or sawtooth generator would give a continuous sweep. <A> It really depends. <S> If the sweep is generated digitally by a micro then no. <S> If it's generated using a saw-tooth curve based on charging some cap then much more so. <S> However, nothing is truly linear, and arguably if it is a switching power supply there are a few more variables you need to worry about. <A> It depends really much on the PSU. <S> If a R2/R ladder is used, then it will move in steps, but right at the step-transition it will be charging/discharging some parasitic capacitance so it won't be a true discontinued step. <S> It will still be connected. <S> But you can put as many stages as you want in your R2/R ladder network to improve on your resolution, but the more stages you add the more sensitive it will be to noise, because you're making the bits mean less and less and less the longer the ladder gets. <S> If however the sweep is made by using a Constant Current Source together with a capacitor, then you will see the voltage as a straight line. <S> But at what resolution though? <S> If we look at the picosecond scale then we will see the steps yet again as electrons move around. <S> Same thing with the R2/R ladder, though it's much easier to notice. <S> A MOSFET can be utilized to make a Voltage Controlled Current Source, and it can be controlled in a digital manner to set the \$\frac{dV}{dT}\$. <S> You can set the voltage of the gate with an R2/R ladder, then the straight line (Voltage across the Capacitor over Time) will have different finite angles. <S> Or you could use an op-amp together with an R2/R ladder and make use of control theory to make the op-amp come up with the voltage for the gate that will make the capacitor charge at some specific \$\frac{dV}{dT}\$ so it takes 10 seconds for it to reach X volt. <S> It's still digital , though the op-amp does all the magic. <S> Or just put a motor on a potentiometer. <S> An answer is ever as good as the question, a broad question gives an uncertain and broad answer. <A> If the Power Supply has 4 output pins: force and sense for each polarity, you can inject a voltage between Force and Sense for either polarity, using a function generator of the Older Style with linear triangle waves. <S> Place 1Ohm resistor between Force and Sense, and run a 100_Ohm to output of the function generator.
If using a digital system, then yes, you would expect a "staircase" of 1 mV steps. Again, it depends on the PSU you're talking about.
The NUCLEO F411RE Works with float point? I need a MCU to works with Wifi and Floating point for PID application. In the later I acquire a Wifi expansion board, but I wants know if the STM32 NUCLEO FR11RE works with a Floating Point. I don't find this information in web. http://www.st.com/en/evaluation-tools/nucleo-f411re.html <Q> In the NUCLEO-F411RE datasheet table 2 states that this particular model has STM32F411RET6. <S> Datasheet of STM32F411RET6 clearly says: The STM32F411XC/XE devices are based on the high-performance ARM® Cortex® <S> -M4 <S> 32- bit RISC core operating at a frequency of up to 100 MHz. <S> The Cortex®-M4 core features a Floating point unit (FPU) single precision which supports all ARM single-precision dataprocessing instructions and data types. <S> It is a common Cortex-M4F. <S> It supports only single precision floats (ie. <S> float in C, not double ). <S> Some tips. <A> I looked through the awful PDF's to see if there was some floating point arithmetic instructions, but then I realized that it doesn't really matter. <S> Because... is speed that important to you? <S> It's being done on every Arduino board. <S> On microcontrollers that doesn't even have floating point arithmetic hardware. <S> But... if speed is important to you, then you wouldn't use floating points, you would use fixed point arithmetic. <S> This is what you would call an XY-problem . <A> All STM32F3, F4 & F7 micros have FPU. <S> F3 & F4 single precision, F7 double precision. <S> So you can choose which one you need. <S> It is a bit tricky to configure compiler & linker to force use FPU instructions instead of math functions. <S> Always check what has been generated by the compiler :)
There are libraries that implement the floating point data type and handles the floating point arithmetic through software.
Would a triangle wave have finite or infinite sinusoidal components? A discontinuity causes a signal to have infinite sinusoidal components, but a triangle wave is continuous, I was taking a class in which an instructor said that since the triangle wave is continuous it can be represented by a finite number of sine components and also showed a finite addition of multiple frequencies of sinusoids which did give the shape of a pure triangle wave. The only problem I have in mind is that the derivative of a triangle wave is not continuous as it is a square wave and hence would need infinite sum of sinusoids so if one derivates the both sides of the formula of the Fourier series of a triangle wave, we would get a square wave being shown as a sum of finite number of sinusoids. Would that not be incorrect? <Q> a triangle wave is continuous <S> Quote from here <S> : - The triangle wave has no discontinuous jumps, but the slope changes discontinuously twice per cycle <S> Having the slope change discontinuously also means an infinite range of sinusoidal components. <S> For instance, if you time integrated a square wave you produce a triangle wave <S> but, all the hamonics of the original square wave are still present after the time integration: - <A> instructor said that since the triangle wave is continuous it can be represented by a finite number of sine <S> You either didn't get this right or the instructor misspoke. <S> It's not sufficient for the signal itself to be continuous, but all derivatives must be continuous too. <S> If there is any discontinuity in any derivative, then the repeating signal will have a infinite series of harmonics. <S> A triangle is continuous, but its first derivative is a square wave, which is not continuous. <S> A triangle wave therefore has a infinite series of harmonics. <A> Math proof: Take a function made up of the weighted sum of a finite series of sine/cosine components. <S> Its derivative is also a weighted sum of a finite series of sine/cosine components. <S> Same if you derivate any number of times. <S> Since sine and cosine are continuous, the function and all its derivatives are continuous. <S> Thus, a function having a discontinuity in any of its derivatives can't be built with a finite series of sine/cosine components. <A> Good answers abound here, but it really depends on your interpretation of "can be represented by" . <S> Mathematically speaking, in order to get a pure triangle wave you would need an infinite number of harmonic sine-waves, but to get a representation of a triangle wave most of those components are too small to matter, get lost in the background noise of the system, or are of such high frequency to no longer be transmittable. <S> As such, in practice, you only require a finite number to get a usable representation. <S> How good you want that representation dictates how many harmonics you need to use. <A> Another approach. <S> Let's call x(t) <S> the triangle wave and y(t) <S> it's derivative, which is a square wave, hence discontinuous. <S> If x(t) were a finite sum of sinusoidal signals, its derivative, by the linearity of that operation, would be a finite sum of derivatives of sinusoidal signals, i.e. again a finite sum of sinusoidal signals. <S> But this latter signal cannot be the square wave y(t), because a finite sum of sinusoidal signals is continuous. <S> Hence we have a contradiction. <S> Therefore x(t) <S> must have infinite Fourier components. <A> I propose a much simpler test to be used in practice. <S> If the wave has any sharp corners it requires infinite sinusiodal components to build. <S> Why? <S> Because a finite series of sinusiods cannot make a sharp corner. <S> This is proven from induction on the decomposition rule of sums (that is, Σ (a + b) = <S> Σ a + Σ b for all finite summations and all unconditionally convergent infinite summations). <A> The set of functions that are expressible by a finite Fourier series are: $$F:=\{f(x)=a_0+\sum_{n}^{n \in N}(a_n\cos{nx}+b_n\sin{nx})\}$$ <S> For all finite sets of indices N . <S> Term-by-term differentiation shows that the derivative is (1) continuous and (2) also in F . <S> Since the derivative of the triangle wave is not continuous, the function of the triangle wave is not in F . <S> This proof is based off of discontinuity, but most continuous functions also do not belong to F . <S> Since no polynomial or exponential function can be expressed as a finite sum of sines and cosines, the only members of F are those written out explicitly in the form above.
One has to understand that a triangle wave is a theoretical mathematical construct that can not actually exist in reality.
Is cross talking caused by cables acting as antennas? Why does cross talking happen between different cables? Is it because any electrical cable has the capability to act as an antenna? And most important, why do twisted pair of cables have less cross talk between them? <Q> why do twisted pair of cables have less cross talk between them <S> If two wires are not twisted, the wire closest to the interfering source has induced into it a greater voltage than the wire further away. <S> So, if the wires are repeatedly crossed, the net induction into each wire is the same and, that interference generates a "common mode" signal that is much more easily dealt with than a differential interference signal. <S> Also, twisted pairs, in turn, produce less magnetic interference to other wires because the net field at some distance tends to zero due to the twists. <S> The other mechanism is electric field interference and twists do help but the better solution is a cable shield that is grounded. <A> Cross talk is caused by capacitive and inductive coupling between lines which run close together... <S> The schematic shown below is typical for a two wire cable. <S> As you can see, any AC signal or transient on one wire will be coupled into the other. <S> How much depends on the geometry of the wires, the insulation type and the signal frequency. <S> This is called cross talk for the obvious reason the signal crosses from one wire to the other. <S> simulate this circuit – <S> Schematic created using CircuitLab Twisted pair cables actually have MORE crosstalk not less since the coupling effect is greater. <S> However, I have a feeling you are talking about noise pickup, not cross talk. <S> Twisted pair cables are used to pass a differential signals. <S> Whether that be a driven plus / minus signal or a single ended signal with a reference ground makes little difference. <S> The benefit to using twisted pair here is that any noise or crosstalk source in the vicinity of the twisted pair tends to be picked up equally by both wires and as such becomes what we call common mode noise which cancels itself out at the differential receiving end. <A> Yes, all cables can act like antennas, both to transmit and receive. <S> If two cables are poorly insulated/shielded and sufficiently close to each other, especially if they're within near-field distance, the electromagnetic field from one will affect the current in the other, and vice versa. <S> Twisted-pair cable is done for a few reasons - a large one is that if the pair is used for the transmission of a differential signal, noise immunity will be improved, and the antenna effect will be reduced. <S> Conceptually this is caused by each twist acting to cancel the antenna effect of the twist opposite to it. <S> But as @Trevor mentioned, crosstalk between the two conductors of a twisted pair is actually worse, not better.
The dominant reason for twisting wires is to cancel out interfering magnetic field induction.
LEDs in parallel WITHOUT Resistor and Constant Current Before I go on, I should stress that I have read many many other forums and scoured all stackexchange recommended 'questions that may already have your answer' things, and none of them answer my question. Let's say I decide to put 3x 20mA 3v LEDs in parallel. That equates to a power consumption of 60mA @ 3v = 180mW But not all LEDs are created equal, and alas, one of the LEDs want 40mA. That should then increase the power consumption to 40+20+20=80mA @ 3v = 240mW and it burns itself out. Let's assume the other 2 LEDs are properly manufactured and draw 20mA Shouldn't the other 2 LEDs still draw 40mA @ 3v?. It's not like I have a constant current device that forces 60mA. Here is the scenario everybody talks about: The power supply is 3v at 60mA (CC/CV) One of the LEDs is faulty and draws 40mA. The other 2 draw 10mA each (Since there is 20mA left over. Let's assume they split the current evenly) The faulty LED burns itself out. That leaves 60mA for 2 LEDs. So each of the proper LEDs use 30mA. But oh no!, one of them overheats and dies! The sole last LED is forced to use all 60mA of the current, and it soon overheats and dies. My scenario: 3v power supply directly from a battery. There is no current limiting, current control, or anything at all. No resistor. Again, the faulty LED draws 40mA and dies. Shouldn't the other two LEDs still draw 20mA each? This means that overall total consumption of the circuit is only 40mA @ 3v. Boohoo, one LED breaks. That should be all. Why not? My questions are: Why would the two LEDs have to use 30mA if one dies? Why would the two LEDs draw the current meant for 3? My 5 torches I have all have their LEDs arrayed in parallel. THey are high quality torches, most from Arlec. One of the torches have 16 LEDs in parallel. They do not have any resistor or anything. THe LEDs are literally all slapped onto a cheapo PCB, directly connected to the batteries. These torches all run fine, don't have varying levels of brightness, and haven't died on me in years. Why can't I do the same? <Q> The power supply is 3v at 60mAh (CC/CV) <S> A power supply can't force both the current and voltage to specific values at the same time. <S> It can either force a certain voltage and let the load determine the current, or force a certain current and let the load determine the voltage. <S> Remember, the load has its own I-V characteristic that it must obey. <S> For example, a resistive load obeys Ohm's Law \$V <S> = <S> IR\$. <S> What a 3-V 60-mA CC/CV supply does is force 3 V, unless doing so would require more than 60 mA, in which case it just provides 60 mA at whatever voltage (lower than 3 V) it takes to make that happen. <S> Assuming your LEDs' forward voltage is less than 3 V, your supply will operate as a 60-mA current supply, and the scenario will play out much as you have described it. <S> My scenario: 3v power supply directly from a battery. <S> A battery is more like a constant-voltage supply (with a series resistance), so this will indeed act differently than the constant-current scenario above. <S> Shouldn't the other two LEDs still draw 20mAh each? <S> Yes, they will continue to draw whatever it is they draw at 3 V. <S> If they're the same LEDs as in the constant-current supply scenario (where we hypothesized that the forward voltage is lower than 3 V), then they will draw much more than 20 mA because you're driving them well above their rated forward voltage. <S> Also, as they heat or cool, their I-V curves change. <S> So one might be okay running on a 3 V battery when first connected, but then start drawing more current as it warms up and eventually (or very quickly) burn itself out. <S> Boohoo, one LED breaks. <S> That should be all. <S> Why not? <S> With a constant voltage supply, one LED failing wouldn't affect the others. <S> With a real battery, you have to remember the internal resistance of the battery. <S> If one LED fails, then that will tend to increase the actual output voltage of the battery after accounting for internal resistance, and that could cause the other LEDs to fail. <A> When that third LED dies, the total current being drawn from the battery will slightly increase, as the parasitic internal resistance of the battery will drop less voltage (due to a lower current flowing through it). <S> When that happens, the voltage across the battery, and incidentally, the LEDs, will increase accordingly. <S> Depending how much the voltage increases, it could cause the LEDs to draw enough current to become troublesome. <S> Since the two LEDs aren't created equal, it's possible one of them will pull slightly more current than the other. <S> That said, the internal resistance of your battery will also act as a current limiter. <S> However, without individual current limiting through each LED, runaway conditions are possible, but possibly unlikely. <A> Your circuit of three different loads (LEDs) in parallel does not follow the Ohm's law of linear networks because the LEDs are non-linear components, i.e. the R is not linear. <S> If you use different LEDs, the I-V diagram for these diodes are different and their forward bias region starts at different voltages -standard red LED at about 2 V, blue at about 3 V, aso. <S> So, if you connect different LED components in parallel, the LED with the lowest forward bias region will draw the most current and with your 60 mA current limit (if it is a current regulation which I do not believe with simple plug-in power supplies) that LED will thermally destroyed... <S> (most standard LEDS are specified at 20 mA). <S> Apart from the overload of the one LED, the others with higher forward voltages will receive too less voltageto light up brightly or they remain dark at all. <S> So it is a really bad idea to connect LEDs (different type) in parallel. <S> Only if you know the I-V diagram and the specification of your power supply, you may connect these diodes in parallel, you should use a resistor for each LED, and they will shine as desired. <A> In your scenario, there are a few problems. <S> One, you ignore that an LED draws x ma at y forward voltage. <S> So if your supply is 3V, then it draws 40mA, and the other leds only draw 20mA, then even if the first led goes out, the others will not. <S> But your supply isn't perfect. <S> It has an internal equivalent series resistance. <S> As the current drawn goes up, the WAR causes a drop on the output voltage. <S> And parallel elements at the same node will have the same voltage across them. <S> Two identical leds may have one led with 22mA at 3V but the other at 20mA at 3V. <S> But Since the voltage changes based on the load, it's all interplay that makes it more complex than simple ohms law would suggest. <S> But back to your flashlights. <S> One, they likely have a series limiting resistor you can't see. <S> If my 99 cent 9 led flashlight has it, your flashlight likely does too. <S> They ship with heavy duty batteries which have a higher ESR than alkaline batteries. <S> And are considered disposable if the flashlight dies.
It also depends on the ESR of the batteries used.
Interrupt Arduino if voltage is below some level or a switch which will not allow current to pass across if no sufficient voltage I'm a very beginner in electronics. Actually from software field. With some craze started with Arduino. What am trying to implement is a simple interrupt mechanism which will interrupt Arduino if AC voltage if under a predefined level (don't need to measure the voltage). For example if mine is a 220 volt circuit and if it's below 180v it should interrupt on an interupt pin on Arduino. I'm not looking for a complicated system like measuring the voltage and making the decision. Instead of something like a resistor or what ever which will not allow the current to flow if under some range like above. But please remember it's on AC supply. Or is there is any simple component like MOSFETs or bjts which only allow the current flow if base voltage is above a point. I'm a humbly mentioning my knowledge of these electronic components are very very less.. <Q> Given you are trying to detect line voltage, your level of electronics knowledge, and that this will be connected to a arduino, you really need to use isolation of some sort. <S> Here is a example: <S> The diodes full-wave rectify the AC line. <S> At your threshold of 180 VAC, the rectified DC will be 253 V. <S> The DC voltage is divided down by R1 and R2. <S> The voltage drop of the LED and the B-E junction of the transistor are used as the reference voltage. <S> These are rough and temperature-dependent, but it doesn't sound like you need high accuracy. <S> When the divided voltage gets to about 1.8 V, the LED in the opto is turned on. <S> R3 limits the LED current to a safe but sufficient level. <S> When the opto is turned on, it pulls low on OUT. <S> Otherwise, R4 pulls OUT high. <S> OUT being low therefore indicates the presence of AC roughly above the threshold. <S> Make sure the parts can withstand up to 400 V on the DC supply. <S> That leaves some margin above what should happen. <S> The 400 V needs to be considered when choosing the diodes, C1, R1, R3, and Q1. <S> It might be simpler to implement R1 and R3 as several smaller resistors in series. <S> At the threshold, the LED current is about 350 µA. <S> The output of the opto needs to sink 330 µA. <S> That means you need the opto to have a CTR (current transfer ratio) of about 1. <S> The opto shown has a minimum guaranteed CTR of 3, although at higher LED current. <S> Nonetheless, there is sufficient margin that this should work reliably. <S> Remember that everything on the left side of the opto is at dangerous voltages. <S> This section must be well insulated and sealed so nothing can accidentally touch it. <A> There is no "off the shelf" solution for that, you'll need to measure the voltage of your AC line. <S> I recommend a peak hold circuit consisting of a voltage divider (R1,R2), a rectifier (BR1) with a cap (C1) that stores the potential. <S> R4 is inserted to make the cap capable to discharge and follow a voltage drop on your mains line. <S> You'll have to adjust the Time constant for your needs. <S> (Tau = R4*C1). <S> The transformer is there to decouple your circuitry from the mains, because it can become dangerous for you and your circuit to be connected directly if some part of the circuit fails. <S> You can also adjust the values of the voltage divider to better suit your needs, eg. <S> to get a better dynamic range. <S> Also there are other peak detect circuits, but i think this one is alright :D <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Some more thoughts on this: Best use a step down transformer <S> so you don't have a high voltage on your secondary side, but remember that your current will rise <S> , the lower you go with your voltage. <S> To counteract this you need to increase the impedance of your primary coil, which is important, because you don't want to blow any fuses in your home. <A> First of all, be very careful measuring mains AC voltage. <S> In any case the ATMega328P (MCU on an Arduino) has an Analogue Comparator module. <S> There are two pins connected to the analogue comparator - AIN1 and AIN0. <S> The comparator can be configured to trigger an interrupt when the voltage at AIN1 drops below the voltage at AIN0 or rises above it. <S> By using one pin as a reference voltage (you can also use the internal 1.1V bandgap reference if you wish to save a pin), and then connected the other pin to the voltage you wish to measure via a potential divider circuit you can get an interrupt when a voltage drops below some arbitrary value as set by the potential divider. <S> For example if you use the 1.1V bandgap, and you has a potential divider of two 10k resistors (just an example), then the voltage at the comparator input would drop below the bandgap reference if the voltage at the input of the potential divider drops below 2.2V. <S> Theoretically you can do this to measure mains voltage, however you would first have to rectify the voltage to get a DC level to measure, using an RC circuit to filter out ripple and get an average value. <S> I would then drop the voltage using a potential divider to a safe level and feed that through an isolated amplifier for safety purposes. <S> The output of the amplifier can then feed a second potential divider which would drive the analogue comparator input. <S> Alternatively you could isolate and step down using a transformer from the mains to some lower voltage, then rectify and filter, and potential divider to the analogue comparator. <S> That would provide a much simpler isolation. <S> You could steal a toroidal transformer from an old AC-AC power supply.
You ideally should use some isolated circuitry to measure the voltage.
Mosfetdriver or something with similar function for Highside back-to-back Mosfet switch I want to supply a µC with 4x AA alkaline batteries or via USB, with the USB source being dominant. Meaning when USB is on, the batteries should be disconnected.For the USB path, I intend to use a Schottky Diode. For the Battery path, I initially thought about using a "oring" IC or one of those "powerpath" controllers. The problem with most of the ones I've seen so far is, that they only have one integrated FET, so there could be a reverse current flowing into the batterie, when the batteries drop below the usb voltage and the forward voltage of the FET body diode. I want to use two back to back FETs with common source, but I'm not sure what driver would be suitable. One way I thought of would be to use a mosfet driver like MAX1614 and let it drive two Fets. But the Max1614 only goes down to 5V Vin which would be too high. Something like 4V would be better to get the most out of the batteries.Vin is between 4V and at least >7V, if possible >12V. But most of the drivers I find are for Lowside configurations and some barely go above 5.5V. Then there would be ones like the MAX5048 or the MAX15070 that go down to 4V. Or I could use a oring controller with external Fets, something like a LTC4412 or LTC4359 (looks like the 4359 is hard to get in germany) and then use the enable pin to shut them down when the USB voltage is present. I tried to design a discrete circuit with Mosfets and Transistors but that didn't work very well, I lack the experience. Does someone have tips or ideas on a good approach? Or alternative mosfet driver ICs? Edit: This was my general idea for a discrete circuit, but I didn't choose proper parts yet. When I simulate this in LTSpice, I get a huge spike for Vout when it switches from USB to Batt. (from ~4.7V down to 0V and back up to 4V)I think an output capacitor is needed to prevent that spike. simulate this circuit – Schematic created using CircuitLab <Q> The only drawback is that maybe M1 and M2 will turn on just a little bit when VBATT is high, even though VBUS is present. <S> This could lead to the batteries discharging just a bit. <S> They will stop discharging when the voltage drops a little. <S> This can be partially controlled by selecting M1 and M2 with kind of medium range Vgs(th). <S> Another alternative is a more complicated arrangement for switching the gates of M1 and M2. <S> Maybe a buffer powered directly from VBAT, with VBUS as the input. <S> This could insure that the gates get fully turned off when VBUS is present. <S> simulate this circuit – <S> Schematic created using CircuitLab R1 is just there to limit battery charge current in the event M1 or M2 should fail. <S> You don't want to charge alkaline batteries. <S> You could bump it up to 100k if you like. <S> Or even 1M. <A> With quick simulation, this kind of circuit should work. <S> Make sure that the P-FET conducts with 5 V V_GS <A> You might check out the TI tips 22860. <S> It's an integrated, low leakage, high side switch. <S> Tie the input to the USB +5VDC <S> Though a resistor. <S> It's also pretty cheap. <A> I routinely do this with use an isolated power source/regulator powering a low-side gate drive (any low-side gate drive method will work... <S> nothing fancy here) with an optocoupler to float the control signal to the now floating gate driver.
I think this will work. The FETs take a little time to open after the USB voltage goes away, so you need a bulk capacitor to offer current for that time.
What is purpose of an Undervoltage Sensing Circuit? I am wondering what is the purpose of an IC such as the MC34064. Is it just to ensure a reset of microcontrollers upon power up or are there other reasons? I used to make a simple transistor switching circuit (with RC) for resetting microcontrollers in the old days. I am asking because the name of this IC is "undervoltage sensing" and not "reset IC" or something similar. <Q> I guess you are trying to understand why you need an IC to do what a simple transistor could do "in the old days", which is pulling a reset pin low (or high), right? <S> If that's the case, a couple of reasons are: <S> The trigger point can be precisely set, as the IC has its internal bandgap reference voltage. <S> With a simple transistor, it's harder to trigger at a very specific value reliably. <S> You can set a specific time for the reset pin to stay low when it's triggered (which is harder to do with simple transistors). <S> Many ICs have strict requirements with minimum reset assertion time. <S> This type of ICs usually operates down to low voltages (in this case 1V) guaranteeing that it will work reliably for large voltage drops on the power rail. <S> The fact that they label it as UV sense instead of <S> IC reset doesn't really matter as they clearly describe the purpose that this IC has been designed for, which is to reset a microprocessor. <A> From the product page at On Semi website. <S> ."The <S> MC33064/MC34064 is an undervoltage sensing circuit specifically designed for use as a reset controller in microprocessor-based systems." <A> There is a bunch of voltage-sensitive activity inside a MCU, and not all activity has problems at the same (out of spec) VDD. <S> A precise UVD ensures all the activities get the desired VDD, even tho some are still functioning properly. <A> In a normal usage, the user will press the power button to turn a device off. <S> When there's a power outages or maybe the user just switch off the plug. <S> The undervoltage pin should able to sense these disturbance before the MCU run out of power from it's bulk cap. <S> The firmware should quickly set the pointer to the beginning of the program as to prepare for the next power up. <S> So when next time the device is power up, it should work as normal. <S> If you're using for simple IO commands, you may not need it as it's ok to continue running from where the pointer last location. <S> However if you need to initialize a lot of ICs using I2C for example, then initialize pointer to the beginning is important. <A> Undervoltage situations can be bad for microcontrollers and memories. <S> The most common failure mode is corrupted flash memory, due to low voltage making the flash memory write controller malfunction. <S> Another common use for undervoltage sensors is to protect batteries. <S> Many types of battery do not like being discharged to very low voltages, either because they leak or because they cannot be fully recharged afterwards. <S> LiPo and NiMH cells are damaged by over-discharge, for example. <S> It can be hard to get a complex circuit to go into a low current state when voltage gets low, but an undervoltage sensor connected to a FET between the circuit and the battery is quite effective and cheap.
Many microcontrollers have a basic undervoltage protection system built in for this reason. When the MCU sense the button press, it will initiate shut down sequence and the firmware should set the pointer to the beginning of the program.
What actually happens when both 1 input is given in RS flip flop circuit (physical change)? This question is somewhat similar to: Why is S=1, R=1 state forbidden in RS flip flop? But I am asking what actually happens if both 1 input is given forcefully in R and S terminal of flip flop circuit. Will there be any physical change ? Will the flip flop circuit burn or get damaged ? What will happen? In the original question, it is written that: But if you set both R and S to 1 we have that Q = 0 and \$\bar{Q} = 0\$ at the same time. This contradicts the relation \$Q = \bar{Q}\$. In the real world one of the gates will reach the 1 state first and the result will be unpredictable. This is true theoretically. Both the output will be 0 which is not possible as both the output are complement to each other. So, is it correct to write the truth table of flip flop circuit in the following manner( here ): instead of writing \$Q = \bar{Q} = 0\$ when R = S = 1. This can be written as output cannot be determined as this case is not possible. We cannot say which output will give 0 and which will give 1. This is mentioned here (from the same link): R = 1 and S = 1 : This condition violates the fact that both outputs are complements of each other since each of them tries to go to 0, which is not stable configuration. It is impossible to predict which output will go to 1 and which will stay at 0. In normal operation this condition must be avoided by making sure that 1's are not applied to both inputs simultaneously, thus making it one of the main disadvantages of RS flip-flop. It is written that this case must be avoided. What worse would happen if it is not avoided? Will it get damaged or burned? <Q> This is an RS flip flop made from NOR gates simulate this circuit – <S> Schematic created using CircuitLab <S> We note that both gates are symmetrical, so there's no need to figure out what both gates are doing. <S> Each gate is basically an OR function, that generates an output TRUE when either or both inputs are TRUE. <S> If R is '1' or TRUE, then the output will be TRUE. <S> It's an inverted output, so output TRUE is '0'. <S> So there's your answer. <S> With a NOR-based flip-flop, when both R and S are '1', both 'Q' outputs are '0'. <S> Perfectly predictable. <S> No problem, unless you insist that the Qs are complements of each other. <S> They are, for at least one of R and S <S> being '0', the normal or expected mode of operation of the flip-flop. <S> If you make the false assumption that the outputs are always complements of each other, then the R,S='1' state violates that assumption. <S> If you had logic following which basically said if Qa==Qb, then ignite Doomsday Bomb, the consequences could be very serious. <S> But the NOR gates are perfectly happy, doing exactly their logic thang without problems. <S> Where life does get unpredictable is if we take R and S back to '0' <S> simultaneously after they've both been at '1'. <S> They will 'race' back to a '01' output, the winner getting to '1' first, with the other settling for '0'. <S> In the ideal case of equal delays, it will be unpredictable which will win. <S> Given the likelyhood of small differences in delay, either in the gates themselves, of the logic driving the R and S inputs, one will tend to always win. <S> In the unlikely case of very closely balanced delays, the outputs may go metastable, which is both outputs go to a mid-rail voltage, and stay that way for an unpredictably long time, which could exceed their rated propagation delays by a factor of several. <A> As long as R and S are both 1, both Q and Q' will be 0. <S> If one of R or S drops back to 0 before the other, the flip-flop will start acting normally again. <S> But if R and S fall back to 0 simultaneously, both Q and Q' will be 1. <S> But Q and Q' are fed back into the flip-flop as a second R and S causing the process to repeat. <S> The flip-flop may start to oscillate between Q = Q' = 0 and Q = Q' = 1 due to the propagation delay until/ <S> unless there is some drift that will make it finally latch into a valid state. <S> Or it could find an equilibrium where both the NMOS and PMOS transistors are partially conducting, i.e. it will burn. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Instead, they emulate an SR-flip-flop by inferring a D-flip-flops connected to a simple state machine. <S> In this case, its up to you how you implement the next state if S & R are asserted at the same time. <S> Of course the above doesn't apply if you are building a "real" SR-flip-flop out of TTL gates on a bread-board, or directly connecting transistors together to build logic gates.
The simple answer is that nobody really uses real SR flip-flips when coding HDL designs for FPGA's or ASIC's because its an asynchronous loop and will lockup the logic simulator with an infinite recursion loop.
How does a bi-directional electricity meter know import from export? I've searched everywhere for this but can't find the answer... Its possible to have 3 phase electricity meters that measure both imported and exported kwh with each value being recorded in separate registers. How does the meter differentiate between imported and exported energy? Doesn't it just see voltage and current going up and down? <Q> Voltage and current waveforms have an amplitude but they also have a phase relationship: <S> - The left picture shows voltage and current waveforms in phase i.e. they rise and fall together. <S> The right hand picture illustrates a phase lag on the current. <S> The red curves for both is power and even though the amplitudes of voltage and current are the same in both pictures, the average power in the right hand picture (what you are billed on) is lower. <S> Here are more extreme examples: - The left picture shows current lagging voltage by 90 degrees and the average power is zero <S> (there are equal amounts of power taken from the supply as given back to the supply). <S> The right picture shows a negative average power because the current's phase angle has moved to a point where it is generally inverted <S> i.e. it's positive peaks are closer to the inverted voltage waveform's negative peaks. <S> This is an example where power is flowing out from a "user" and back into the power grid. <S> How does the meter differentiate between imported and exported energy? <S> Imported energy is when the current is flowing into the load as typified by the top two diagrams. <S> Average power is positive. <S> Exported power would be a negative value of average power as typified by the lower right hand diagram. <S> For sine waves, reactive power is the average of VI sin(\$\phi\$). <S> True power is the average of VI cos(\$\phi\$). <S> So, as soon as the phase angle (\$\phi\$) is not zero <S> you get some reactive power and this peaks when \$\phi\$ = 90 degrees. <S> Pictures taken from here and here . <S> The above explanation is for a single phase but the same applies to 3 phase systems. <A> Found a perfect illustration from an experiment. <S> This trace shows two voltage sources connected via a resistor - one (call it Va) fixed at 170V the other (Vb) increasing from about 75V up to 250V. <S> Both voltages are in-phase. <S> On the left hand side current is in-phase with voltage <S> (lets call it import), When both voltages are 170V there is no net flow and then as Vb increases the current phase shifts to exactly 180 deg (call that export). <S> Voltage is the green line and current is blue. <A> The main thing you're missing is that the phase of the current relative to the voltage is important. <S> Just the RMS voltage and RMS <S> current alone can't tell you which way power is being transferred, if any at all. <S> The instantaneous power being transferred is the instantaneous voltage times current. <S> Note that both of those are signed quantities. <S> If the voltage and current have the same polarity, then the power is positive. <S> If they differ, it is negative. <S> The accumulated transferred energy is the time-integral of the above. <S> This is what electric meters measure. <S> Old meters did the integration by putting the voltage and current on two separate coils that effectively were the rotor and stator of a motor. <S> The mechanical movement averaged the instantaneous power thru inertia. <S> The total energy was accumulated by keeping track of the total number of revolutions of the motor. <S> This was done with gears so that there were a series of dials that each moved 1/10 the speed of the previous. <S> This allowed for reading out the energy value as decimal digits. <S> Modern meters measure the voltage and current many times per second. <S> These two are multiplied and the result digitally accumulated. <S> Readings are taken 100s to 1000s of times per power line cycle so that the system doesn't get confused by harmonics. <A> Doesn't it just see voltage and current going up and down? <S> It does see voltage and current going up and down, but it doesn't just see voltage and current going up and down? <S> It also see in what polarity they go up and down. <S> When current is in phase with the voltage (as when a battery supplies a load) <S> , then the meter knows the power is being imported.
When current is out of phase with the voltage (as when a battery is being charged from a supply), then the meter knows the power is being exported.
Difference between i2c switch and i2c mux I am working on a project which involves reading from multiple IMU sensors on i2c protocol. They have a fixed i2c address and hence I feel the requirement of some sort of multiplexer. On some research, I found two components which appear to be doing same job. Here are the brief descriptions that these devices carry on TI website: 1) TCA9544A Low Voltage 4-Channel I2C and SMBus Multiplexer With Interrupt Logic The TCA9544A is a quad bidirectional translating switch controlled via the I2C bus. The SCL/SDA upstream pair fans out to four downstream pairs, or channels. Any individual SCn/SDn channel or combination of channels can be selected, determined by the contents of the programmable control register. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided. One interrupt output (INT) acts as an AND of the four interrupt inputs. 2) TCA9546A Low Voltage 4-Channel I2C and SMBus Switch with Reset Function The TCA9546A is a quad bidirectional translating switch controlled via the I2C bus. The SCL/SDA upstream pair fans out to four downstream pairs, or channels. Any individual SCn/SDn channel or combination of channels can be selected, determined by the contents of the programmable control register. To me, both appear to be the same. If anyone can point out the key difference between these two things, it will be really helpful. Also, I want to ask what will be more suited for my purpose - I want to read the sensor data from all sensors at the maximum possible rate and stream it to a host PC or mobile phone using UART/wifi/bluetooth. <Q> The two chips are <S> NOT the same: <S> The TCA9546A is an I2C Switch. <S> An I2C Switch connects one or more of the N downstream ports to the upstream port (1 to many). <S> The control registers also differ. <A> They are the same, and section 3 in both descriptions designates both as "switch". <S> The only difference is an ability of 9544A IC to log interrupts. <S> I even think they are coming from the same wafer/die, just bonded out differently. <S> CORRECTION: David. <S> A is right, 9544 can only multiplex 1<=>4, while 9546 can connect any combination of channels, although I am not sure what would be the purpose for this, since ACKs will collide then. <S> Technically both ICs can be controlled as a MUX, just the control should be different. <A> I want to read the sensor data … at the maximum possible rate … <S> Consider using I²C address translators. <S> At least LT (now part of Analog Devices) have them in their portfolio ( product family overview ). <S> It sits between two bus sections and normally connects them. <S> It watches for Start Conditions and tinkers the connection during the following address byte in a way that the address on the downhill bus section becomes exored by a preset value. <S> The advantage considering your needs ("maximum possible rate") is that no I²C transactions to control the switch/mux are necessary – at the disadvantage that, depending on the number of sensors, you may run out of I²C addresses. <A> You might simply use analog switches and port pins to select them. <S> This is fast, easy and cheap. <S> A single 74HC4051 switching SDA alone would give you 8 I2C buses, or a 74hc4052 switching SDA and SCL gives you 4. <S> You might also consider our product BL233 . <S> This is a serial to I2C convertor, with up to 4 separate channels. <S> It could read 4 sets of these sensors stand alone, connected to an off the shelf bluetooth serial module. <S> No micro is needed. <S> A significant advantage is that this is truly portable across all platforms - it doesn't stop working when your $FRUITNAME$Pi changes chip, or Windows 11,12,13 breaks the drivers. <S> BTW, we used the 9545 bus switch , and stopped using the 9544 bus mux as a switch is more versatile. <S> With a switch you have the option to write to all the chips at once, and read them separately, which can speed some things up. <S> Also they are useful as level shifters, when you don't want to switch the ports at all.
The TCA9544A is an I2C Mux. An I2C Mux multiplexes any one of N downstream ports to the upstream port (1 to 1).
Vias on a high-speed board I'm working on a high speed board design containing transimpedance amplifiers. Right now, my layout seems fine, but I'm concerned about placing vias to connect ground planes. This is a 6-layered board, with all planes designated as ground planes. I was told that you should place ground vias to connect the ground planes together in order to create a stronger connection to ground between all the layers and/or possibly reduce the inductance of the overall board to allow for faster signaling. Does the size of the via really matter, or is it better to just have as many vias as possible wherever you can? Are there some recommended areas where I should place more vias? Is this perhaps overkill with the vias? I'm using a coaxial connector for the output of the signal, so I placed tiny vias around it close to the no fill zones. <Q> Does the size of the via really matter, or is it better to just have as many vias as possible wherever you can? <S> Are there some recommended areas > > <S> > where I should place more vias? <S> The size of the via matters, because it changes the value of inductance and resistance. <S> Go find a PCB trace\via calculator. <S> I get lower values of inductance with a larger radius (probably because the current is spread out). <S> Vias can be 1 to 10nH. <S> They also have a charateristic impedance so you can get reflections and in high frequency designs, they need to be matched. <S> Each piece of copper can be modeled with resistance and inductance. <S> There exists mutual coupling between currents via magnetic fields on a PCB which can be modeled as mutual inductance. <S> Electric fields between conductors can be modeled as capacitance. <S> There are calculators available and papers on how to model these effects. <S> Once you have a value for inductance, resistance and\or capacitance, you can model this in your circuit diagrams and hand calculations or in a spice package. <S> Is this perhaps overkill with the vias? <S> I'm using a coaxial connector for the output of the signal, so I placed tiny vias around it close to the no fill zones. <S> If your intention is to provide a path for return current between planes then probably not. <S> High frequency currents take the path of lowest impedance. <S> Adding more vias is paralleling the inductance which will lower it if that is your objective. <S> Realize that there is also inductance between vias from the copper itself, eventually adding more vias will have diminishing returns as most of the current will take the first few rows of vias. <S> Place vias close to the source to minimize inductance from planes and traces when connecting planes or providing paths for return currents. <A> If the maximum frequency in the circuit is 500 MHz (corresponding to roughly 30 cm wavelength in FR4), then I'd expect that if the stitching vias are spaced no further than 3 cm apart you'll be fine. <S> On your very small board, this probably means that 4 or 8 vias around the board will be fine. <S> Does the size of the via matter? <S> Larger vias have lower resistance. <S> Very small vias may be more costly to produce (because the drills break more frequently). <S> Typically this is not a critical issue for stitching vias in the sub-GHz frequencies. <A> Difficult to give a specific answer to a general question, so use these guidelines: <S> Never insert vias when you have a differential pair <S> If you must insert a via, do the same for both traces <S> If that is not possible, you will need to compensate for added LCR delay Vias can cause reflections Place gnd vias around signal vias to shorten current return path <S> Don't put the vias very close <S> so there would be some ground between them
The density you need to place stitching vias is related to the frequency content of the signals in your circuit.
IMU Roll Angle - Correct when Stopped, Wrong when Moving I have been using an MPU6050 (3 axis gyro, 3 axis accel, built in motion filter called DMP) on a car axle to measure axle angle when driving. On a long banked corner (2 degrees) the sensor reads 0 degrees while moving (~40km/hr), but when stopped it reads correctly (2 degrees). The physical axle angle is the same though in both scenarios. I believe the lateral force from going through the corner is affecting the sensors interpretation of which way gravity is, and is adjusting the roll angles accordingly. See image; Can anyone comment on how this might be solved? For example; Using a sensor with a magnetometer? Using a sensor with a different filter? Is this solveable at all or just an inherent factor of MEMSsensors? Time is a critical factor at the moment in my project. Thanks in advance for your input Edit 1: I've come across this thread where the OP seemed to have the same issue with MPU6050 and went to the BNO055 with some luck but had calibration issues. Then said the problem was solved with MPU9250 and RTIMULib (open source filter) in the last post. I wonder if adding in a magnetometer helped as it gives a fixed 3D reference point which is not affected by acceleration forces. Or perhaps he tweaked the algorithms in RTIMULib to get his desired output. I have yet to delve into the motion-fusion/filter algorithms. To date I have just been letting the MPU6050 do that internally in the DMP.Any thoughts on these potential solutions? <Q> It is certainly solvable. <S> so when it gets a steady state with gravity slightly stronger than expected and a constant rate of turn it assumes that they are offsets and cancels them out. <S> A different filter combined with a calibration process at startup could help with this but you may end up needing better sensors. <S> However getting this sort of thing to work correctly and reliably isn't normally quick or easy. <S> If time is critical I can't think of any quick fix for this that doesn't involve throwing money at the problem and purchasing a far higher quality IMU and positioning engine software. <A> I think you can solve your problem. <S> But you need to use your own sensor fusion algorithm instead of DMP (Digital Motion Processor). <S> Because you can't change every single value of DMP, its more like blackbox. <S> Also, as far as I remember DMP's data rate is 200Hz or less. <S> You can easly use complementary filter on your system. <S> It provides you to change the rate of Accelerometer and Gyroscope effect on your system and much more data rate (depending on your MCU). <S> Considering your limited time, you can probably find complementary filter codes for your MPU6050 on Github. <A> Some further research is giving me more insight into how others solve the problem. <S> Primarily using a method to calculate the centrifugal acceleration, and then compensating for it. <S> These solutions come from William Premerlani in the fixed-wing UAV community. <S> Using GPS; http://diydrones.com/profiles/blogs/acceleration-compensation-flight-testing Using only Accel and Gyro; http://diydrones.com/forum/topics/centrifugal-compensation-with-only-gyros-and-accelerometers
My guess is that the filter doesn't trust the gyroscope readings and absolute values from the accelerometers very much due to the noise and offset issues inherent in MEMS sensors and
How much current does USB webcam draw? I have Microsoft HD3000 lifecam studio webcam.I have some noise, when operating it in low light conditions.I would like to minimize noise as much as possible, detaching infrared filter and using it as a grayscale imaging device. As a software engineer i could go simple way:I could suppress noise to some degree purely with software means. Applying some lowpass filtering between frames to suppress high frequency noise, suming UP R+G+B channels to get grayscale image, or further - decreasing its resolution 2 times (via adding 4 nearest pixels' brightneses, so gaining extra bit depth in exchange for resolution) But that's not point of question. But i think i could achieve some SNR improvements in hardware circuitry itself. I suspect noisy ATX PSU is main reason of such noise (400W of constant load, constant writes to hard drives, so on) So some noise could possibly go to web cam, messing up with exposure process itself. So i would like to try to power my webcam from separate power source. (Dual 18650 li-ion batteries in series) I suppose to connect web camera USB power pins to a li-ion accumulators, via LM7805 1A linear regulator. So now you got the idea, and my questions are as follows: Can be "1A" considered suffient current? Is it safe to operate camera in such way? Is it safe to connect just D+ and D- pins to PC? Could i achieve some noise suppression this way? (If not - why?) <Q> The easiest way to figure out how much current that your webcam draws is to plug it through a device that looks like this: These will work with any USB device that has a Type A male cable which connected to the unit in a pass through manner. <S> You can purchase this and similar devices on Amazon and eBay for approximately 10USD. <A> But i think i could achieve some SNR improvements in hardware circuitry itself. <S> I suspect noisy ATX PSU is main reason of such noise <S> Your suspicion is highly unfounded. <S> The USB VBUS comes from a separate power source (either a dedicated 5V supply or a standby rail +5VSB), which is not loaded at all by memory or drives. <S> This is in accord with Intel guidance . <S> Second, it is bypassed by a 120 uF capacitor at each motherboard connector. <S> Third, the power goes over a long cable, with has significant inductance, and then terminated with another capacitor at the device end, forming another filter. <S> Then this input voltage goes through local power regulator, which usually has substantial ripple suppression. <S> Now, to your questions: 1: I can assure you that the HD3000 doesn't take more than 500 mA, as per USB standard port. <S> So 1A is clearly enough; 2: Is it safe to feed the port from an external power? <S> Why not? <S> Millions and millions USB devices are self-powered. <S> 3: <S> Can you connect only D+ and D-? <S> Yes, as long as you connect the ground wire as well, I hope it was a simple omission in your question. <S> 4: <S> can you acheve noise reduction? <S> Highly unlikely, see above. <S> You might get somewhat lower noise if you chill the sensor with a Peltier cooler, but this would be a challenge. <S> To summarize, image sensing is a pretty intense area of hardware engineering. <S> If a sensor does show certain noise under certain low-light conditions, this is pretty much it. <S> The image sensors are not just frame grabbers, they have intensive DSP mid-processing with embedded MCUs. <S> For HS HD-grade USB webcams the image is transmitted already in compressed (H.264 or else) format, so doing decoding-encoding won't improve much. <S> Please take a look at some introductory articles as Wikipedia before asking more questions. <A> Can be "1A" considered suffient current? <S> Maybe. <S> Look at the label, it may say how much current is used. <S> Or use a usb current meter. <S> Most commercial usb devices will stick to the 500 mA limit. <S> The Microsoft camera should at least. <S> Is it safe to operate camera in such way? <S> Sure. <S> There are many self powered usb devices that do not use the host power. <S> Simply disconnect the 5V line. <S> Is it safe to connect just D+ and D- pins to PC? <S> No. <S> You will need ground as well. <S> Both grounds must be connected. <S> Could i achieve some noise suppression this way? <S> (If not - why?) <S> You could. <S> You will find most of the noise is the cmos sensor being starved for light, but you may see a non - negligible difference. <A> Can be "1A" considered suffient current? <S> is 900 mA, but it is unlikely that your camera uses more than 150 mA continuous. <S> Maybe up to 400 mA peak. <S> Is it safe to operate camera in such way? <S> Yes. <S> Is it safe to connect just D+ and D- pins to PC? <S> You'll need ground too, but with those three connections it won't break anything, except maybe adherence to the USB standard. <S> But since USB is a host-centric protocol (i.e. The host initiates all communications) it will work fine. <S> People will tell you that the USB power pin is necessary even for devices which don't use it for power (the devices will still use it to know when the host bus has shut down or been disabled) but for experiments it will work fine. <S> It's just not exactly in spec anymore.
Yes, the most USB can possibly supply for a single device
Schematic shows two outputs for Vout. Why? How do I interpret the fact that Vout has two output points? My guess is that the two Vout points represent where I would place the probes on a multimeter. Is this correct? See this diagram: The article I'm reading suggests that there is only one signal for Vout, which looks like this: I'm really sorry for if this a basic question, I'm new. <Q> A voltage is relative between two points. <S> A voltage signal therefore always has two connections. <S> However, a circuit that has to deal with multiple signals usually wants them all referenced to the same point. <S> Since this comes up a lot, we call that point "ground". <S> We then often talk as if a signal is on a single line, implying that it's actually reference to ground. <S> But also notice that the bottom Vout point is shown connected to ground. <S> In electrical engineering context, it would therefore be acceptable, and even common, to talk about Vout as if it were only on the top line. <S> When nothing special is said, the default is that ground is the reference for a signal. <A> Voltage is always relative to a defined point. <S> Notice that the bottom line connects to ground. <S> So Vout is just the top line. <A> An output voltage is relative between two points the high point which is the value of the output voltage the reference voltage hear is the ground <S> in many case it is the ground like the car electronic system <S> but in other case it may be a negative point
Your diagram shows Vout between two points, because that's what it really is.
Car battery spot welder. How to reduce battery power? I built a spot welder that is powered by a car battery. The battery is 12V and 100amps. But unfortunately, it is a little bit too powerful, because it burns through the nickel strips and also through the battery really quickly most of the time. So I would like to know what is the easiest way to reduce the power/voltage of the battery just a little bit? Will a voltage divider work in that instance?I added the picture of the spot welder. It is really simple, no buttons nor switches: <Q> 12 volts is WAY TOO HIGH! <S> I once worked for a firm (RADCO in Toledo, Ohio) that built and refurbished resistance welding equipment. <S> The voltage at the tips was less than 2 volts, but the current was very high. <S> I recall one of the transformer's secondary rating was about 1.6 volts and 100,000 amps ! <S> Forget about using a battery, friend. <A> Edit, just noticed how old OP is, sorry. <S> Using a surplus car audio "stiffening" capacitor of 1 farad or even 0.5 F (500,000 uF) and using a known value resistor to slowly charge the capacitor over a few seconds (maybe 10 ohm, 20 W?) <S> Adjust your charging time to vary the charge in the capacitor and thus how many joules are out into the weld. <S> In auto body collision when we weld new panels onto a car we sometimes use pieces of scrap metal from the old damaged pieces to do a destructive test on new welds to make sure the spot welder is set properly. <S> Many other ways to weld batteries, good luck. <A> For the record, No, a resistor divider is not suitable for this kind of high-current application. <S> When 100A flows through any resistor you can buy, it will instantly vaporize into stardust. <S> The power (Watts) = <S> resistance multiplied by current squared; and the temperature rise is closely related to power dissipation. <S> Even with a 0.01Ohm shunt resistor, 100A requires dumping 100W of power out of the resistor. <S> A better strategy is to use either a transformer or a lower voltage source. <A> This is going to be pretty much a link-only answer, and behind a paywall at that, but Digital Machinist magazine had a 2-part article last year on building a spot welder using a car battery as the source. <S> It uses a bunch of parallel semiconductors (MOSFETs or IGBTs, don't remember which) to control the power. <S> Looks like a series inductor to control the current ramp as well.
You can use a voltmeter on the capacitor to monitor charge on the capacitor, when the charge reaches say 6 V, stop charging and try a weld on a piece of sample nickel first.
Does the use of power surge protector makes up for the lack of the ground pin? My office room in my apartment has only sockets with 2 pin (USA). However, my Macbook requires a 3 pin socket so does the external monitor and other electrical equipments. Will the use of power surge protector (using 3pin to 2pin socket converter) help make for the lack of safety due to missing ground pin in the wall socket? Power surge protector that I have is from Belkin . 3pin to 2pin converter is an international adapter. <Q> Does the use of power surge protector makes up for the lack of the ground pin? <S> No it does not. <S> The ground or earth connection is a safety feature. <S> If for whatever reason those metal parts try to become live (connect to mains due to a fault) <S> then it cannot as it is grounded. <S> In a modern installation the RCD would trip and switch off the mains for your safety . <S> It is very likely that your equipment is double isolated and has this logo: <S> In this case even when it has a ground connection, it does not strictly need to be connected. <S> In rooms with carpet or wood floors it can be assumed that even a live voltage on the case will not immediately electrocute the user because of the (electrical) insulating properties of said carpet or wood. <S> So then often the mains sockets have no ground connection. <S> Having said that, in an office environment the ground is really required and not having it is not a very good idea. <S> The surge protector only tries to block voltage spikes on the mains. <S> Most modern equipment also has similar circuitry build-in already so in my opinion, surge protectors are a waste of money. <S> Some people claim surge protectors claim that these protect when lightning strikes. <S> That might be true if the lightning strikes reasonably far away <S> but then the build-in protection can handle that as well. <S> There are examples where even the mains wiring evaporated after a lightning strike. <S> Not much a surge protector can do against that kind of force. <A> The third wire in a NEMA 5-15 type (or similar) <S> receptacle (as opposed to the two blade hot/neutral NEMA 1-15 type in your apartment) is a ground. <S> This ground serves two purposes: 1) personal safety and 2) electrical noise mitigation. <S> 1) Safety: <S> The third connection, ground, is a safety feature which isn't easily replicated by a 3-2 adapter or surge protector. <S> The three wires are hot, neutral and ground. <S> The ground in a simple installation is actually bonded together with the neutral and tied to earth near the service entrance. <S> The low impedance of this path means that in a fault the electrical current will prefer running back through the ground wire rather than running back through another path that might include your body. <S> The GFCI senses if the fault condition of current not all returning through the neutral is happening and disconnects power to keep you safe. <S> 2) <S> Electrical Noise - <S> The filters in your computer power supply that prevent it from radiating and conducting electromagnetic interference depend on the ground wire to function properly. <S> Your laptop will probably work fine if connected to a two wire source with a cheater plug (3-2 adapter) but it may start inducing unwanted electromagnetic interference into nearby devices because the ground is not available as a place to drain off the energy the filters are trying to remove. <S> https://www.thisoldhouse.com/ideas/replacing-two-prong-receptacles http://www.cablinginstall.com/articles/print/volume-4/issue-6/contents/installation/ground-noise-is-a-misunderstood-problem-of-data-networks.html <A> The device that makes up for a missing ground connection is a ground fault current interrupter. <S> In the US this is usually built into sockets usually in the kitchen and bathroom. <S> You can purchase stand-alone devices that also provide this protection. <S> However check the markings on the devices, if they all contain a nested square <S> then they are class II "double insulated" devices and don't need the ground pin.
The ground is primarily there in case the neutral wire is damaged and provides a low impedance path for current to return to earth. When lightning really strikes close by on your mains wires, no surge protectors can protect your equipment agains that. The ground pin connects to the (metal) case of a product and/or any other parts the user (you) could touch. NFPA 70 (national electrical code) allows for the replacement of non-grounding receptacles with three prong GFCI protected receptacles.
Internal clamping circuit at the input pins of an MCU I understand that the internally two diodes exist at the input of a microcontroller and one end of it is connected to Vdd and the other end of the second diode is connected to ground and when the voltage at the input exceeds (vdd+drop across the diode), the upper diode conducts and the voltage at the input becomes (vdd+drop across the diode), but how does this happen exactly? And why is it called clamping? I've read that a basic clamper circuit essentially contains a diode, resistor and capacitor. But in the microcontroller case, there is no capacitor, so why is called a clamping circuit? Is it a clipper circuit maybe? I've just had this confusion for a while, so could anyone please explain this and clear my doubts? <Q> simulate this circuit – Schematic created using CircuitLab <S> When Uin > 5.7V, the upper diode becomes conducting, and current flows from the input into the Vdd rail. <S> Given the input current is supplied through a resistor, that limits Uin to ~5.7V. Same for Uin <S> < <S> -0.7V. The lower diode becomes conducting then and Uin is limited to ~-0.7V. <S> It's called clamping because the diodes makes the input pin cling to the supply rails. <S> The "basic clamping circuit" you describe has nothing to do with this. <S> That one limits an AC input to ±0.7V by using antiparallel diodes. <A> "Clip" normally refers to analog output reaching saturation, which could also be used for and output feeding an input stage when diodes saturate, but normally used for analog output situations not ESD event inputs. <S> AC coupled with clamp diode is a DC restoration method. <S> So called "Active clamp" uses a transistor in some topology. <S> Clamp or voltage limiter protection is preferred terminology for ESD. <S> Note <S> that ESR of high speed , low current (5mA max) diodes affects voltage vs current rise, so for high V , so 2 stages are used to get better clamping. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Clamper vs Clipper: <S> In this application, perhaps both terms might be used. <S> From the microcontroller's point of view, those protection diodes help to limit I/ <S> O input voltage from exceeding the supply voltage by conducting current into the supply. <S> Wiki suggests this for "clamper": A clamping circuit (also known as a clamper) will bind the upper or lower extreme of a waveform to a fixed DC voltage level and: Clamping can be used to adapt an input signal to a device that cannot make use of or may be damaged by the signal range of the original input. <S> This is exactly the case for your microcontroller situation. <S> So it would appear that "clamper" applies here. <S> A capacitor isn't mandatory, but I'd suggest that an input resistance, source resistance, or some kind of current-limiting is required that your example doesn't include. <S> Otherwise those two diodes are at risk due to excess current while they try to "clamp". <S> As for "clipper", wiki suggests: <S> Thus a clipper circuit can remove certain portions of an arbitrary waveform near the positive or negative peaks <S> This definition is somewhat broader, allowing a circuit to either exclude/include the middle portion of a waveform. <S> No capacitor is mentioned. <S> Since your circuit example includes the middle portion, and excludes voltages beyond the 5V supply, this term applies as well.
"Clamp" refers to semiconductor in forward conduction or diode or Vce saturation mode to limit voltage change when references to any supply rail regardless of whether the input is AC coupled or not .
Can you get a Passive ASIC? In super small low power devices, where space is a big premium, complicated passive networks can take up a lot of space. Is it possible to get a passive or mostly passive ASIC fabricated? If it is possible, how much would it cost? Obviously it would never approach the tiny cost of discrete passives, but when you really need that space it might be worth it. In terms of costing for ASIC manufacture, this question was really helpful, but it's talking about more traditional ASIC's where the main thing is the active components. I'm also wondering, maybe ASIC is the wrong word? Is there another word for this kind of thing? <Q> Not an expert answer, but some disconnected relevant facts: <S> One of the reasons that ICs often require external passives is that standard silicon ICs are not a good substrate for making capacitors and inductors of significant value on-chip. <S> Thus, a conventional IC, "AS" or not, is not a space-efficient way to put large passives on a board (other than high-value resistors). <S> It might still work out to be an improvement if it's not the value but the number of parts that is a problem (i.e. packages and interconnects account for most of the area), but this is why, for example, your microcontroller always has external decoupling capacitors. <S> Resistor networks and capacitor networks are an existing common form of passives-in-a-single-package. <S> I haven't heard of any mixed passive types in a single package, though — I expect it would be difficult in the same way as putting passives in a normal silicon IC because they have very different materials and manufacturing techniques. <S> Resistor networks can be used: To save space on the board; they were much more common and relevant in the through-hole days, I believe, where even if you placed the resistors vertically you would need an entire hole for the other pin, and a network would let you have \$N\$ resistors with only \$N+1\$ pins). <S> As a high-precision voltage divider or other configuration of matched resistors (this is often seen in high-end measuring instruments). <S> Multiple resistors made using the same process and on the same substrate can have tighter tolerance, more temperature-stable ratios of resistances than independently manufactured resistors. <S> Hybrid integrated circuits , or hybrid modules, are sort of an intermediate technology between PCBs and single-semiconductor-die ICs, which can include passives either formed on the board itself or soldered on — but they are not noteworthily compact nor cheap. <S> The value is in having a precise, pre-built, sealed module that you can plug/solder into a larger board. <A> ASIC means Application Specific Integrated Circuit. <S> If that integrated circuit would contain only passive components then we could still call it an ASIC. <S> Making a silicon die with only passive components is very well possible <S> but there are severe limitations . <S> On an IC capacitors are only practical <S> up to a few nF. Inductors can only be a few nH. Resistors can be made in almost any value. <S> These passive components (except for the inductors) might have parasitic diodes to the substrate so it is possible that they're not 100% passive. <S> Designing and producing an ASIC is never cheap. <S> Depending on the manufacturing process, making the masks (needed to define the patterns to make the components) can be anywhere between $ 10000 to $1000000 ( <S> yes, on million US dollars). <S> But with a high mask cost you'd need to make many of these chips (and use/sell them) for this to be cost effective. <S> The mask cost is shared between all the ICs you produce so the more the better. <S> I worked at Philips Semiconductors in the past and they had a special process for passives only. <S> The idea was that these ICs would provide the supply decoupling capacitors and RF matching components for a separate, small IC with the active components and made in a more expensive process technology. <S> This smaller IC would then be mounted on top of the die with the passive components. <S> This was a bit complicated to produce so it was only used for some niche products as far as I know. <S> It is certainly not mainstream technology. <A> You don't have to have actives on an ASIC (although I don't know if anyone has ever done this). <S> There are better ways that would still be more costly than a PCB with components but cheaper <S> than an ASIC.Components can be built inside the PCB . <S> Source: <S> EDN <S> Or you can get integrated packages : <S> These last two would probably be cheaper than an integrated circuit where the passives are built into silicon, however embedding components in these new processes will be much more expensive than using a PCB with micro vias and stacking PCB's <A> Yes, definitely. <S> Here at Keysight, for example, we do create some of our own basic strip-line filters for probes and other equipment. <S> Other clarifications. <S> ASIC vs. IC - <S> If you're designing a chip for a specific purpose, then the "AS" is valid. <S> It's a potato/potahto situation. <S> Digital vs. Analog? <S> - Both are common. <S> Digital ASICs generally do processing and computations, analog ASICs generally massage a signal into a more usable form. <S> We talk about this one on the EEs Talk Tech electrical engineering podcast here: https://eestalktech.com/2017/07/13/fast-adc/
Building passive components into chips is standard. There are manufacturers who will do this kind of thing , it is expensive and you need large quantities. The actual cost of producing one IC once you have the masks is lower, it can be a few cents each up to tens of dollars depending on the size (smaller size cheaper).
cutting a power plug This may be a stupid question, but stupid > dead anyday, so I'll go ahead and ask. I have a schuko socket and a non schuko plug similar to the link. The only thing keeping me from sticking the power plug in the schuko plug is the broad sides on the plug, not fitting in the schuko plug. Would it be unsafe to simply cut off the sides of the plug, so it would fit? If yes - why? thanks! <Q> Jakob, the big problem about that master/slave extension cord is not its plug. <S> It's its sockets. <S> They accept the Danish Type K earthed plug which means you can put earthed devices into them. <S> The manufacturer of these devices with earthed plugs use them by purpose. <S> Their equipment has no double insulation and when a fault between live and the metal case happens, they need the earth wire to trip the circuit breaker immediately. <S> So you are safe. <S> But your master-slave socket does not have an earthed plug. <S> It does not have an earthed wire to trip the breaker. <S> That means a fault at a device plugged in will electrocute you. <S> This master/slave socket you have there is inherently unsafe and should have never been produced. <S> I would instead send this insane piece of shit to the local RAPEX official along with information who sold it. <S> So they can seize the whole charge. <S> And hopefully no one gets electrocuted until then. <A> I'm guessing you live in Denmark. <S> You probably had somewhat similar rules as in Sweden pre-1994. <S> The rules then was that a round non schuko should be used in a room where there are no possibilities to ground the connected device. <S> Every outlet in that room should be of the non schuko type. <S> A kitchen as a contrary usually had only grounded schuko outlets. <S> The old design requirements for a device using connectors without protective earth (PE) was not as strict as it is now. <S> The reason being that the room (with no PE outlet) didn't have anything you could touch and be grounded through. <S> I you were to cut the plug, you risk that if something goes wrong with your device and the casing becomes "230VAC live" (the power cord or anything connected to it) <S> you might bridge it with your own body and something in the room that is connected to ground. <S> Dual insulation etc. <S> Hint: <S> Checkout Conrad.se/de for a smiliar device with grounded plug <A> Electric systems are generally designed to stand one fault without giving fatal voltage to your hands. <S> By making the cut and using it in a chuko needing environment you neutralize the effect of protective earth. <S> Have a faulty (= leaking the mains electricity) device that has by hand touchable metal parts, you have the mains voltage also in your hands. <S> If you happen to stay alive you can well get sentenced because you had intentionally offered the same danger for others. <S> Protective earth is the last resort which shorts off the leaked electricity if it is in use.
You can turn it into an electrically safe device by either rewiring it to all-earthed (replacing the cable and most likely also the wiring inside) or stuffing the holes intended for earthed plugs permanently (securing plastic prongs plugged into the earth holes e.g. with 2-component epoxy) so noone could ever plug in devices which need an earth connection in there. Then you may also cut the plastic of the plug so it can be placed into a schuko socket. And you will probably die. Nowadays the devices without PE plugs are usually Euro-type with a higher level of protection against electrical hazard.
Possible cons of excessively long microphone cable (XLR) I'm very new to this page and anything electrical in general. I considered putting this on the music SE page but I thought this site may prove more helpful. I have a small personal "studio" (put very lightly) for recording my own music as a personal hobby. I have a mic hooked up through to a vocoder synth through 2 XLR cables, as my mic uses a phantom power supply. The total distance from the mic to the synth is about 6 feet , but the smallest XLR cables I have are 25 feet and 10 feet , respectively. My question(s) are thus: If I coil up the excess slack in my XLR cable, will I experience unwanted interference (either from the loops or the unneccesary length of the cable)? Does this apply to any audio-carrying cable? Would buying 2 shorter XLR cables give me a cleaner signal than keeping my current ones? <Q> An XLR cable is a "balanced" cable type, which means that it is inherently noise-canceling. <S> For the most-part anyways (nothing is perfect.) <S> It achieves this by not just sending one signal down the cable, but sending two identical signals - except that one is electrically reversed or opposite from the other. <S> This is called a "differential" mode - when one wire goes positive, the other goes negative. <S> This is beneficial because any extraneous noise that is picked up by the cable is picked up evenly by both wires. <S> This "common-mode" noise is easily rejected. <S> So long story short, no, a hundred feet of XLR cable probably will make little difference in noise. <S> The signal strength might be reduced slightly due to singal losses, but it should not be noisier because it is long. <S> That said, XLR cables are great at eliminating the E part of EMI - Electro-Magnetic Interference - or things like radio waves, the "usual" sources of interference. <S> But they are not as good at rejecting the M part - magnetic interference. <S> Luckily, few things produce a magnetic field large enough to be concerned about, so unless you have this cord wrapped around a vacuum cleaner, it shouldn't be a problem. <A> In a sound system I work with, we normally have 25 ft or 25 ft + 12 ft cables on stage, then a 75 ft snake to the audio console. <S> In a tv studio I worked at the mic cables from the studio floor boxes to the console must have been over 100 ft in some cases, and they may have used 50 - 100 ft of cable in the studio. <S> I don't know what the recommended maximum length for XLR mic cable is, but think it must be a few hundred feet. <A> Lets compute some Magnetic Field interference into "balanced" audio cable. <S> Assume the extra cabling is thrown on top of a power-brick, a switching power supply brick, with 1 amp being switched in 100 nanosecond. <S> Thus di/dT is 10^+7 amps per second. <S> We'll need this number in just a few paragraphs. <S> How much of this flux escapes the brick's sheet metal shield? <S> assume 10% (the shield has gaps at the edges). <S> Assume <S> the imbalance in the "balanced" audio cable is 10%; it may be an old cable, often crushed under foot, or just poorly manufactured. <S> Assume the cables, with reference to the RTN path --- the shield, have 3.3mm spacing. <S> This is the "loop height" which we'll need. <S> Assume <S> the cable has length of 30 meters, looped uniformly around the brick. <S> An assumption, I know, but you'll see the uniformity does not matter. <S> Assume "distance" from brick to cable is 0.1 meter. <S> We need Distance, Loop Area, and dI/dT. <S> Formula: $$Vinduce = <S> [ Muo * MUr * Area/(2*pi*Distance)] <S> * dI/dT$$ <S> This becomes 2e-7 * Area/Distance <S> * dI/dT <S> [ we'll include the derating factors after we compute the worstcase Vinduce Vinduce = <S> 2e-7 <S> * [3.3mm <S> * <S> 30meter]/0.1meter <S> * 10^+7 <S> Vinduce = <S> 2e-7 <S> * <S> [3.3e-3 *3e1] <S> * 1e-1 <S> * 10^+7 = 2 <S> * 9.9 <S> *10^[-7 <S> -3 +1 <S> -1 <S> +7] <S> Vinduce = <S> 20e-3 = <S> 20 milliVolts = <S> 0.02 volts, worstcase <S> However we assume the metal shield inside switcher give 10:1 reduction. <S> We also assume the "twin-lead balanced audio cable" gives 10:1 reduction. <S> Total 100;1 <S> Thus the 20 milliVolts becomes 200 microVolts. <A> The type of signal that is transmitted in a "XLR" is a balanced signal. <S> The benefit of balanced signals is that they are quite resilient against interference. <S> The theory is well explained here: http://www.aviom.com/blog/balanced-vs-unbalanced/ <A> There is an assumption thatall the noise is from external signals. <S> That is the way the balanced lines cancel. <S> However, noise also comes from resistance. <S> It is emitted fairly randomly. <S> The noise emittedfrom two lengths of wire due to random unequalimpulses will not cancel. <S> What is the resistance?Enough to cause the above-mentioned 'few dB' of loss. <S> At the same time that the losses move the signal towardsthe receiver noise floor, thermal noise is added. <S> This is commonly known in RF and microwaves. <S> It matters at audio frequencies if the series resistanceis near that of the source/receiver. <S> The 'few dB' ofloss is a sign of the larger problem. <S> A low outputdynamic mic would be that much closer to receiver noiseand that much more susceptible to the thermal noise of100+100 feet of wire (the full circuit). <S> There is a way to deal with this, however:if a preamp is put the cable run, with a lowernoise level, it will push the signal further above the noise. <S> Amplifying afterwards is too late: you amplify noise and signal. <S> Even at low digital rates, "line drivers" are used to addto the acceptable cable length.
Using shorter XLR cables would give you a cleaner floor, but shouldn't have any effect on the signal.
What is the difference between Commercial and Industrial temperature range IC physical parts? If I buy the Industrial and Commercial variants of the same IC, besides the markings what differences are there in the actual parts? Seems like they must use the same die, so is it different formations in the packaging material? Different types of bond-out wires? Or is it a matter of binning where the higher grade parts have been tested and found to work at the wider temperature range? <Q> Parts are tested after production to ensure that they meet the datasheet specifications. <S> Industrial parts are those that meet the datasheet at industrial range but failed at the automotive/military range. <A> If a part is offered in both industrial and commercial grades, it is possible that the commercial parts are dropouts from testing to industrial grade. <S> However, it depends on relative volume of both grades, as dictated by customer demands. <S> Making industrial-grade ICs requires tighter design to accommodate wider process corners and use of more expensive foundry libraries, and fabbing also cost more. <S> It also requires more conservative layout technique, wider interconnect, double vias, etc. <S> To achieve good integration, a foundry usually offers a set of standard cell libraries for every taste, but the cost differs as well. <S> If majority of customers for a particular IC demand industrial grade, the IC will be designed and fabricated as such, and test dropouts would sold as commercial ICs. <S> However, if the volume for commercial grades is high, the die can be taped out with less expensive libraries and manufactured by less expensive variant of the fab process, so save on cost and maximize gross margins. <S> Then the same functional IC will come from different wafers for different grades, and will go through a different set of testings. <A> Design for higher temperatures is more of a pain because of more device param variation away from nominal. <S> FETs transconductance is lower, thus more W/L is needed (more area, higher die cost). <S> Leakage currents will be higher, thus larger sample-hold capacitors are needed in the ADCs or elsewhere. <S> Given certain headrooms, with operating conditions of transistors (bipolars and FETs), some circuit topologies become impossible and other topologies are invented. <S> Then you can examine the down-well rock-logging circuits of Schlumberger, at 400 degree. <A> Sometimes the difference is in where on the wafer the chip was. <S> In the center, where image (of photolithography) is most accurate, it's wider range, better yield, faster switching (for CPU and memory). <S> On contrary, edges are slower and go for commercial range.
Commercial parts are those that meet the datasheet at commercial temperature but failed at the industrial temperature. Getting to industrial grade might also include a change in IC packaging, to use, for example, a metal-ceramic instead of plastic.
Audio voltage dimmer trickery! (Potentiometer not working as expected) I'm a hobbiest with litte resources for parts, so I'm short on things I can use. Therefore I'm trying to rescue an old amplifier's case and use it for a different project. The potentiometer on the front has got me stuck though. It's a slider style, with some weird trickery. It has 6 pins. Four on the left, two on the right. Across the four on the right I get a linear taper but never much change in resistance. Across the far-apart pins (the ones coincidentally or not also in a parallel line geometrically speaking) give me a really weird audio-taper. The issue is: The frequency response is really low (cuts off high frequencies) and the sound isn't dimming how it's supposed to. The pot changes resistance from 192k to 2.2 ish k. It never goes down fully.I'm not sure if I need to replace this with a linear taper (as I like Linear better for sound myself as a personal preference) or if someone can help me get this working correctly. I read about the voltage divider stuff and I'm not sure how to implement that as I do not understand how this potentiometer works. Either way, if I can replace the pot to a nicer newer one (although the old one is of a brand like Porsche is to cars and mitutoyo to measuring instruments) and get it working correctly. THIS has had me STUMBLED for SO long! Edit: Thanks Transistor for your input! here's some of the things you requested. Here you can see the original layout. I may just be seeing something over the head however. Note: Any measurements with probes ACROSS the blue line are NOT connected. The both sides of the blue line are seemingly two different potentiometers. I will measure the resistances in the morning. It's a quarter to five here. Oh and voltage divider: If I ground half the signal isn't that kinda like a small short circuit? PS: If you'd like any more explanation on something specific or any pictures, feel free to let me know. I'm all about that helping. <Q> Figure 1. <S> Dual slider pot. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 2. <S> Standard wiring. <S> You should be able to measure the pot's resistance between 1 and 3. <S> Resistance between 1 and 2 should vary from zero when slider is towards 1 and maximum when slider is at 3. <S> Using linear taper on audio will result in nearly all the significant volume change occurring in the first 10% of travel. <S> It's usually a terrible idea. <A> Maybe you need a "potentiometer primer": A potentiometer in an analog audio amplifier will most certainly be a "stereo" pot, or dual-gang. <S> Two separate wipers controlled by one shaft. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Measuring between AR and BR should give the potentiometer's nominal resistance, and it should be roughly equal to the resistance between AL and BL. <S> The resistance between AL-WL, WL-BL, AR-WR, and WR-BR will change. <S> You need to identify the relevant pins in your potentiometer. <S> If it was used as a volume control in an old amplifier, it may also have an extra segment and corresponding output called a loudness tap or similar. <S> Since you only have 6 pins this should not be relevant, but you may have missed some non-obvious connections. <A> I fixed it myself, somehow. <S> I don't know how I did it, but I connected things back up again and it magically worked! <S> I still have some leakage current though, but that's most likely my fault.. <S> Does anyone have some idea if these will fit on a perfboard? :)
I wonder if you're measuring across the relevant pins.
Soldering wires to a 5V-to-12V converter I have a small project that requires me to solder some wires to a PCB that converts 5 volts to 12 volts. Here is a picture of the PCBs: On the PCB to the left, there is no label of "negative or positive". How can I tell where to solder the red (positive) and black (negative) wires. Furthermore, on the PCB to the right, it says the output is "5-16V", even though when I bought it the description said 5V to 12. I am a bit confused. What is the proper way to solder a red and black wire to the output "holes". For instance: do I put the wire through the top of hole and solder from the bottom of PCB? ... or do I solder from the top? <Q> On the PCB to the left, there is no label of "negative or positive". <S> How can I tell where to solder the red (positive) and black (negative) wires. <S> I would use a voltmeter. <S> Or you can tell by traces on the PCB itself. <S> The input and output sides have a common ground. <S> So the trace that goes from the input (USB connector) straight to the output, that is ground (negative pin). <S> Furthermore, on the PCB to the right, it says the output is "5-16V", even though when I bought it the description said 5v to 12. <S> I am a bit confused. <S> That means that the chip used is capable of supplying 5V to 16V. <S> Usually it requires just a change of resistor value. <S> But you are right, it is confusing. <S> What is the proper way to solder a red and black wire to the output "holes". <S> It doesn't matter as long <S> it is soldered firmly. <S> It just depends on how you need it, which side. <A> I would also use the DVM to measure the output voltage of the modules. <S> Some (many?) <S> switch-mode power supplies require some load in order to regulate correctly. <S> With no load, the output voltage may be higher than normal. <S> I would probably strip 1/4 inch of insulation from the wire, poke it through the hole, and solder on the bottom of the board. <A> Push the wire in and solder from the bottom. <S> It'll stop you from damaging the insulation with your iron, and won't leave an exposed length of wire.
I would use a DVM to determine the polarity on the board which does not have it marked.
Can rechargeable batteries with different mA values be used in the same device with good/normal results? If I use the two AA batteries (shown below) in a digital camera (where two are needed) will I experience any odd behavior due to the difference in mAh, such as: camera not working properly? battery power being dissipated more quickly? Can you think of any other adverse issues that I might experience? Also, is mAh (milliAmpere hours)?What is the h denoting? <Q> The simplest answer is that the camera will perform as if you used 2 1400mAh cells. <S> First, we'll start with the h (hours). <S> The mAh rating suggests the cell can produce that much current for an hour. <S> Being a Marketing number, you can read this as, "Will never perform better than...". <S> In real life, you can get near this performance at lower currents, but at high currents the run time diminishes significantly. <S> If we assume the numbers are accurate, and that the camera consumes 1.4A (it doesn't), then the 1400 cell goes dead in an hour, while the 2300 could have gone (2300/1400)*1hr= 1.6 hours, only, everything stops around the time the first cell goes dead. <S> When the cells go dead, the camera should shut off, but since the second cell is still going strong, it may run for a little extra time. <S> During that time, the smaller cell will continue to be discharged (the larger cell is now doing all the work). <S> That first cell may go all the way to zero volts, and the start charging backwards. <S> This is where your "adverse issues" occur. <S> In Primary cells (the non-rechargeable ones) in particular, the normal chemical reactions eat away at the case, but since you take the cell out before it's completely dead, the integrity is maintained. <S> Discharge it fully, though, and the cell beings to leak, damaging your equipment. <S> If you take it out immediately, you'll be ok, but leave it in there <S> and you risk damage. <S> Here the damage is mostly financial (although rechargeable cells can leak as well). <A> If the two batteries are in series to produce 2.4V, then it could be bad. <S> The cell with a lower capacity will end up discharged first, while the other still has a good charge. <S> The battery that is still charged will then force a current through the flat battery, charging it the wrong way . <S> This can permanently damage the flat battery. <S> If you must do this, turn the camera off at the first sign of a low battery warning, and you may get away with it. <A> The h is for hours as you point out. <S> If the capacity of the new batteries is lower than the original then the run-time will be lower, if larger then the run-time will be increased proportionally.
For rechargeable cells, running them down to nothing (or reversing them) will ruin them, and they may not recharge or run very long after that. Assuming the two cells are operated in series, the current through them must be the same (basic electronic principle).
Purpose of using diode with solar panel I have been working on a design based on solar power. While browsing through some circuits on the Internet I came across these designs below In these designs, why was a diode added between the solar panel and the voltage regulator chip? I understand that a diode will be usually used along with a Solar panel to prevent the reverse flow of current which in turn might damage the panel under dark conditions. But I really don't understand its use in the above designs. Is there a possibility of reverse current flow from these regulator chips to the panel? I can only imagine that happening when the panel is connected directly to a battery. <Q> Almost all voltage regulators do have a path backwards from output back into its input because they are not designed to handle blocking reverse current. <S> So your battery would drain back into the solar panel when there is insufficient light falling on the panel. <S> For example, here's the internal circuit of an LM338 in your first schematic: <S> ( From here ) While there is a path from the output of the regulator back into the input through diodes D2 and D3, it is through high value resistors. <S> Your biggest problem is that you'll be feeding battery voltage back through R22 160 Ohms into the base of Q26 into its collector and out to your solar panel without the blocking diode. <S> And there are other paths like that through other parts of that circuit. <S> So besides reversed panel connections like @analogsystemsrf pointed out, it prevents your battery from discharging back through your regulator back into your solar panel. <S> However, in your second circuit, the diode is redundant because the battery already has a series diode. <A> The Diode is used to prevent backfeed into the cell from the battery. <S> While daytime, the solar cell generates a voltage higher than the battery voltage, therefore current is flowing into the battery. <S> When the cell is covered or it's nighttime, the voltage across the cell is 0V, so the battery, with it's higher voltage, would try to feed current into the cell, therefore draining and possibly damaging the cell. <S> The diode blocks current in this direction, so the battery cannot discharge into the cell. <A> To protect against REVERSED panel connections. <S> And, as other answers state, to allow failed panels (or shaded panels) to automatically "disconnect" from the total current output. <A> The first diode is used to protect against reverse panel connection. <S> The second diode to the right is used for stopping regulator back powering from the battery.
But the diode at the solar panel can serve to prevent damage from reverse connections.
Is it possible to double the resistance of a potentiometer? I'm starting a circuit-bending project using the rhythm PCB from an old Viscount electronic organ. The idea is to make a portable rhythm box by adding some extra controls and processing. What this question is about is my plan to add a half-tempo switch, in addition to the existing exponential fader that controls tempo. My initial thought is to add a switch that will double the resistance when activated. I assume this isn't possible except by placing another variable resistor on a circuit path, as so: simulate this circuit – Schematic created using CircuitLab This would require a design that forces keeping the two potentiometers physically aligned, though. If there's some trick to do this where one potentiometer will automatically 'track' the other one, I'd like to use that. Edit: Per questions, here's a photo of the PCB: And relevant part of the circuit diagram: <Q> With the newly added original schematic, we can see that this is a RC oscillator circuit. <S> To achieve your real goal of adding a half tempo switch, we can divide the tempo in half by adding a second capacitor with the same value as the original one. <S> With the switch the resulting circuit segment would look like this: simulate this circuit – Schematic created using CircuitLab <S> When the switch is closed the capacitance is doubled, which means the frequency is halved. <S> That sounds by far like the easiest option here - much easier than replacing the potentiometer with anything. <A> It is very unlikely that your system is configured as shown in your schematic. <S> With the leftmost active pot wiper fully left you short out the voltage reference. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> (a) <S> A more likely arrangement in your rhythm box. <S> (b) Dividing the output by two. <S> (c) Dividing the input by two. <S> (a) shows the likely arrangement. <S> Note that the load on Vref remains constant no matter where the wiper is set. <S> (This assumes that the load on OUT is fairly high resistance so that it doesn't load Vref significantly.) <S> (b) divides the output voltage by two. <S> Since your downstream circuit will have some loading effect you may find that this does not quite give you half the frequency. <S> R3 and 4 need to be about ten times the pot resistance value to avoid loading it too much or the voltage will droop. <S> (c) is very simple. <S> Use the potentiometer resistance track as half of a potential divider. <S> This should be the simplest to implement too. <S> It may just require cutting the track to the "top" of the pot and adding the series resistor and single-pole, single-throw switch. <S> Your modified schematic still shows series connected variable resistors. <S> You have forgotten to connect the wipers to one end of the pots. <S> At the moment they do nothing as they are open circuit. <S> simulate this circuit Figure 2. <S> Stereo potentiometer arrangements. <S> (a) What the OP intends. <S> (b) <S> This circuit will not work in the OP's application. <S> Figure 2a will only work if the original potentiometer is wired not as a potentiometer but as a variable resistor or "rheostat". <S> This may be the case but is unlikely. <S> Note that you can simplify this further by simply shorting out one of the pots using an SPST switch rather than an SPDT type. <S> Figure 2b will not work as the result would be a square-law. <S> Fully clockwise the output would be 100%. <S> At mid-position the output would be 50% x 50% = 25%. <S> To resolve your problem you need to reverse engineer the circuit to understand how the original potentiometer is being used. <S> Your latest edit shows you had the schematic all along. <S> Oh, man! <S> simulate this circuit Figure 3. <S> The resistor solution based on the original design. <S> We can see from this that it is a heap of trouble. <S> @KevinCathcart's solution is the way to go. <A> If you need two potentiometers to be aligned, you should get a dual pot where two pots are mounted on the same rotary handle. <S> No schematic will keep them aligned if you can turn them independently. <S> Depending on what your actual schematic is, you may be able to divide the voltage V1 by two using a switch, and connect a single pot to it. <S> This may have the same effect as doubling the pot resistance. <S> BTW, your schematic as it is presented is quite dangerous, since turning the pots to the leftmost position will result in a short circuit. <A> IF you are using potentiometers as variable resistors (not as real three-terminal voltage dividers as your schematics show), you can always use a potentiometer that is double the value, and make your switch control a fixed parallel resistor of the same value. <S> PS, not connecting the third terminal at all when using a potentiometer as a variable resistor is usually ill advised: potentiometers tend to develop intermittent contacts, especially when operated. <S> An unconnected third terminal will make the arrangement look like a straight open circuit during such problems, whereas connecting that end to the wiper will make it look like the maximum resistance of the variable resistor - which usually will create less crass noises and keep the impedance in the circuit defined. <A> <A> You want to use a stereo potentiometer. <S> This is basically 2 potentiometers with just one shaft, so they always have the same value. <S> To use it you also need a 2 position switch: simulate this circuit – Schematic created using CircuitLab <S> The switch would either connect stereo pot 1 to the output directly, or to stereo pot 2.
You can use dual potentiometer (usually used in stereo audio applications) which consists of two potentiometers mounted on the same axis.
LM386 amplifier buzz when not connected to signal I've set up a simple LM386 amplifier on a breadboard according to the above schematic. When connected, the amplifier works like a charm driving a spare 8Ω speaker with impressively low (audible) noise. On the input (pin 3) I'm connecting just the left channel of a 3.5mm audio jack. When no source is connected to the jack and the power is switched on I get a significant buzz coming from the amplifier, which is worsened when a 3.5mm audio cable is plugged in. However, as soon as I connect the other end of the cable to a source (phone/MP3 player etc.) the buzz stops completely. I assume this is a grounding issue and that I'm essentially making a big aerial the moment I connect an unterminated cable. This is inconvenient as there might well be times when the amplifier is switched on but a source isn't hooked up. Question: Why does this happen, and how do I prevent noise/buzz when no source is connected to the input? <Q> Use a 10 k pull down resistor at the input rather like as shown in the standard circuit that uses a potentiometer: - Without an impedance to ground (such as a 10 k resistor) you will get pick-up because the input is high impedance and any wire conencted to this will pick-up some signal. <S> The pull-down resistor will reduce hum/noise when the input is not connected to a signal source. <S> Alternatively you can arrange for a jack socket to have a grounding contact the shorts <S> the input to signal ground when nothing is plugged in: - <A> Try experimenting with putting a resistor between the LM386 pin 2 and pin 3 (GND). <S> This will lower the input impedance and remove the AC line frequency pickup from the open connection or cable. <S> Start with something like 10K ohms and lower as necessary to remove the problem. <A> If a long wire is used to connect the source to pin3 on LM386, the wire will essentially act as an antenna, picking up atmospheric static and the interference due to the 50/60 Hz electricity supply ( a.k.a 50/60 Hz hum ). <S> Another possible solution would be to use a shielded cable from source to pin3. <S> If the 50/60 Hz hum persists, a filter could be designed to eliminate this unwanted noise. <S> In addition to this, ensure connections are made as short as possible.
A solution to this would be to add a pull-down resistor as stated before.
What are an amateur's options to put a high-end IC on a board? I'm actually an experimental physicist who does software-development for a living. So my knowledge basically stops at writing micro-controller programs and putting them on a breadboard, and hooking the wires the simple way. Back then in my student days, I also managed to get a PCB with holes, and solder electronic parts on it to create an RCD programmer for a PIC16F84 microcontroller, and it worked (that was like 10 years ago). Now, I would like to make a high-resolution ADC with Arduino, but it has to be reliable and eventually I'd like to put it in a case/box. The ADC chip I have my eye on is ADS1256 . I'm targeting 24-bit with about 10 kHz sample rate, and this chip seems to be perfect. However, I have absolutely zero knowledge on how to get such a relatively small chip on a board, so that I could interface with it. I'm wondering whether there's a simple way to do this myself (e.g., with a PCB with holes, like the one in the picture), or whether there are services that would do this for money without having to make 10k pieces. One challenging part when thinking about this as DIY is that if I screw this up, everything will act like an antenna and I'll have lots of noise in my digitized signals. What are my options? Please advise. PS: If it's relevant, I live in Germany. <Q> What's your budget? <S> You can always breadboard using breakout boards as mentioned in another answer, but you'd maybe get half of those 24 ADC bits as useful information that way. <S> Getting even 16 useful bits out of an ADC requires a PCB with good power and signal integrity practices. <S> You could try your hand at laying out your PCB, but it might quickly get overwhelming. <S> See here: ADS1256 <S> Performance Demonstration Kit <S> From reading the User's Guide on that page, it looks like the kit comes in two parts, which gives you some options. <S> The smaller board is the ADC and its supporting circuitry. <S> I've only skimmed the guide, but it looks like the analog signals are broken out on J1 and the digital signals on J2. <S> Thus, J2 can be breadboarded to your Arduino (it's a 100mil pitch, which matches your typical breadboard, so you might just have to turn the board upside down and plug in), and J1 can potentially be wired directly to whatever you're measuring or preferably broken out on a board to a proper cable connector. <S> The digital control is just I2C so your Arduino will have no trouble. <S> It looks like you used to be able to buy just the smaller board, but it's been obsoleted. <S> You can get both boards together for $200 from TI. <S> The second board is a DSP-powered interface to your computer. <S> You'll have to read up on what that offers, but you might even find that's all you need for your purposes, assuming it offers an SDK and you're not trying to do any remote monitoring. <S> If you're cost-sensitive and just want the smaller board, try contacting TI directly. <S> They are often accommodating with demo kits, especially if you're associated with a big-name institution or company. <S> Lastly, since I work for a TI competitor that rhymes with "shmanalog shmevices" (nowhere near their chip business though), I'll just add that when looking at evaluation boards it's worth checking out as many devices as you can. <S> You might find some eval boards more useable than others for your applications, depending on how the Apps Engineer wanted the demo platform to be used. <A> You can do surface mount soldering yourself without any new equipment if you buy a breakout board for that specific package (form factor) of chip. <S> I didn't read the entire data sheet on the chip you specified, so I'm not 100% sure of the package spec, but this might be what you're looking for. <S> Then you can do the surface mount soldering at home with flux and a regular soldering iron. <S> Eventually, if you're going to make a few of these, you can just draw this type of breakout pattern in the PCB layout software and get it printed. <S> If you don't need them urgently, you can send off the design to some services out of China and get 20 or so boards printed for about $1-2 each in about 2 weeks. <A> I evaluated a 22bit ADC once, running perhaps 50Hertz word rate, on a 2-sided PCB. <S> There were NO digital lines anywhere near the input nor near the ADC, except for the SPI (3 wire) serial interface that was quiescent between ADC conversions. <S> And I had 1 Kohm resistors in the clk-data-enable 3-wires, to "encourage" the remote MCU trash to remain remote. <S> How much magnetic fields can you tolerate? <S> Consider 60Hz, 1amp, 1 meter distance, with surges to 10 amps with 1uS risetimes as the rectifier diodes abruptly turn on. <S> 1uS edges are poorly rejected by the copper foil (just one or 2 dB attenuaton by skin-effect) so we'll assume no magnetic shielding. <S> Assume <S> your vulnerable loop-area is the area enclosed by Vin+ and Vin- of the ADC, modeled as 100milliMeters (4") by 1mm. <S> Here is the math <S> (I don't know the answer; I'll be as surprised as you). <S> $$Vinduce = <S> [MU0 * MUr <S> * Area / (2 * pi * Distance)] / <S> dI/dT$$ <S> Knowing MU0 is 4 * Pi <S> * 10 <S> ^-7 <S> Henry/meter, we rewrite the Vinduce as $$Vinduce = <S> 2e-7 <S> * Area/Distance <S> * dI/dT$$ <S> and we have Vinduce = <S> 2e-7 <S> * (100mm <S> * 1mm) <S> / <S> 1meter <S> * 10amps/1uS <S> Vinduce = <S> 2e-7 <S> H/m <S> * 100e-6 m^2 / <S> 1 <S> m <S> * 10^+7 amp/sec Vinduce = <S> 2e-7 <S> * 100e-6 <S> * 1e+7 = <S> 200 * e-6 = 200 microVolts. <S> Do you feel lucky? <S> (Clint Eastwood) <S> What is the topology of this interferer? <S> A single infinite-length wire carrying 10amps with <S> 1uS Trise (occurring 120 times a second, which we don't need for our computation), the return path located at infinity. <S> In reality, power cords have the hot/rtn leads just a few millimeters apart, so most of the magnetic field is self-cancelling. <S> Most. <S> How lucky do you feel? <S> And the vulnerable loop is the 100mm long input signal to the ADC, with the Vin+ located 1mm from the Vin-; distance over planes does not get modeled. <S> Another error? <S> electric fields from spikes on the 60Hz, and 80,000Hertz from electronically controlled fluorescent lights. <S> simulate this circuit – <S> Schematic created using CircuitLab
Alternatively, TI offers an evaluation kit for the part which will have been designed to squeeze as many bits as their Application Engineers could manage.
Are I/O buffers of ICs design to have 50ohm impedance? Is it true that 50ohm characteristic impedance is a convention followed for signal carrying PCB tracks? Also, are the IC I/O buffers also designed to have a close to 50ohm impedance to match this? <Q> Very few do. <S> If your chip's datasheet does not say it has 50-ohm termination, then it almost certainly does not. <S> Traditional CMOS and TTL logic does not provide matching termination, though a few specialized types (line drivers?) might. <S> Typically drivers are low impedance and receivers are high impedance (with some capacitance). <S> Traditional ECL (emitter-coupled logic) logic does not provide matching termination, though this family is often used at frequencies where (external) termination is desirable. <S> Typically drivers are about 5 ohms, and receivers 2 or 3 kohms. <S> Some newer parts designed for very high frequencies (above 2 Gb/s?) may provide on-chip termination for inputs (which may require an external connection to set a termination voltage). <S> CML is the one logic type that I know of that typically does provide matched sources and receivers. <S> LVDS <S> I don't use enough to know what's typical. <S> For RF chips, consult the datasheet. <S> Some will and others won't provide on-chip termination. <S> One advantage of not having on-chip termination is that this leaves the user free to use an alternative trace impedance like 75 or 85 ohms. <S> It also allows multiple receivers to be connected to a single driver. <A> No, the 50-Ohms is not a convention for PCB tracks to carry signals. <S> In fact, typical (thin) PCB traces have 65 - 80 - 100 Ohm characteristic impedance on a typical stack-up (7 mils or 12 mils of FR4 between ground plane and signal layer). <S> Thin traces are usually needed to maintain reasonable component density on a PCB. <S> However, if a high-quality high-frequency I <S> /O is required to match the 50 Ohms interconnect, a special care needs to be taken, thin substarates and wider traces must be designed, which takes much more board space, and therefore adds cost. <S> The matching of impedance usually needed at frequencies of 100MHz and above, which is not the case for many MCU applications. <S> Therefore there no need to waste money on what is not needed. <S> Simple digital logic (CMOS, TTL) uses simple output buffers, just a complementary pair of properly sized FETs, to provide certain drive current. <S> In a low-power CMOS ICs the typical drive strength is 2 mA - 4 mA. <S> This will give a reasonable match to drive 80-100 Ohm traces nicely. <S> A driver with 6 - 8 mA of drive strength provides reasonable approximation to a 50-Ohm driver. <S> Driver stages that deliver 25 mA or more need a matching network to work with 50-Ohm nets. <S> And still the waveforms will be far from perfect, because the impedance of output transistors is not a constant during signal switch. <S> A true impedance-controlled (and slew rate controlled) <S> output buffer consists of HUNDREDS of transistors, if not more. <S> About a dozen (or two) of them are used as multi-stage ladders, while the rest provides various timings to gradual (sequential) control for the output stages, and an interface logic (registers and means to access them securely) to store user-defined controls. <S> These buffers usually have a common (for a bus or a lane) calibration circuit (using one or a pair of external resistors), which sets some analog circuitry and provides required value for termination. <S> Many designs include complicated circuitry implementing automatic re-calibration of drivers in case of voltage/temperature changes. <S> All this is not cheap and takes silicon real estate, and is the reason why not every MCU has its I/ <S> O impedance-controlled. <A> It's a convention, but we have lots of conventions. <S> You mentioned DDR3, so here's Altera on the subject . <S> The DDR3 SDRAM uses a programmable impedance output buffer. <S> Currently, there are two drive strength settings, 34Ω and 40Ω. .. <S> but their later diagrams show 50Ω traces and on-die termination ("ODT"). <S> USB requires 90Ω differential impedance. <A> Suppose you have 2.5 volt swings at 50_ohm impedance. <S> Suppose you have 16 of those traces. <S> 1volt and 50 ohm requires 20mA; 2.5v requires 50mA. 16 of those signals require 800 milliAmps. <S> Swinging that much current in 1 nanosecond, across 1nanoHenry total inductance (if you can achieve that low), still generates 0.8 volt upset in the onchip rail, whether GND or VDD (MCU driving low or MCU driving high). <S> Thus several dedicated VDD/GND pairs are dedicated to such wide data busses. <S> Costly in pin usage. <S> However, suppose the traces are 50pF each, needing to swing 2.5 volts in 1nanosecond. <S> What is the current? <S> $$I = <S> C <S> * dV/dT$$ or <S> I = 50pF <S> * 2.5v/1nS = 125 milliamp per each of the 16 outputs. <S> Thus 50 Ohms may not be the problem. <S> The trace/ESD capacitances become the challenge.
The 50 Ohms is a standard for coaxial cables and corresponding interconnects - dozens and dozens various SMA/SMB, BNC, type-N, etc. connectors.
I would like to make a low-battery cut-off ciruit with a P-MOSFET. How can I modify this circuit to be good? I would the following: When the LM358 non-inverting pin voltage greater than 1.00V then the batteries are empty and the output go high. I would like to turn the P-MOSFET off, but its not nowrking now, because the LM358 can't go as high as the source of the mosfet. How can I modify it, when the battery voltage drops below 10V, turn the P-MOSFET off? <Q> Change the comparator and voltage reference with a single IC: High voltage comparator with reference, hysteresis . <S> See one example in the picture. <A> You might want to consider the following combined switch and low voltage cutoff simulate this circuit – Schematic created using CircuitLab <S> When 'off', it consumes no power. <S> M1 and IC1 form a self-latching 'thyristor'. <S> The TLV431 is a precision shunt regulator, that can also be used in other ways. <S> Here, it is being used as if it was an NPN transistor with a precise 1.24v base threshold voltage and a very high current gain. <S> When the output voltage falls such the IC1's input is less than 1.24v, the latch trips out. <S> Set R4 to adjust the trip-out voltage, or leave out R4 and calculate R2 and R3 exactly. <S> You can use either the on/off switches, or the on/off toggle, or open collector logic to turn the power on and off. <S> Beware that the TLV431 is an unusual device in that different voltage ranges are available in the same part number. <S> The TI device only goes to 6v. <S> You need the On Semi, Diodes Inc or the Zetec devices for a 16v version. <A> A possible solution is this: simulate this circuit – Schematic created using CircuitLab <S> The PMOS is now switched OFF when Q1 is OFF. <S> Then R2 then shorts the gate-source of the PMOS and it will be OFF. <S> Note that the NPN will be ON when the opamp's output is HIGH and that will also turn ON the PMOS. <S> So for my solution, swap the inputs of the opamp to make the opamp's output go HIGH to enable the PMOS.
If you connect a capacitor across the on switch, you can make the circuit default to powered 'on' when it's first connected. This is different from your solution where the PMOS is supposed to be ON when the opamp's output is LOW.
how does the filter capacitor work in a rectifier circuit? My question concerns the following schematic PICTURE NUMBER 1 If the Capacitor and the LOAD are in parallel, this means that there is more than one path for the current to flow, therefore, the unfiltered direct current from the rectifier will split between the two branches and part of it will reach the LOAD. My question is how is this prevented? Does really the unfiltered current split, or first it builds up the capacitor until it's fully charged, than it further processes towards the LOAD? PICTURE NUMBER 2 Here's what I do understand and what I don't. First, the rectifier's operation process is fairy straightforward, it transforms the INPUT AC into rippled DC at the OUTPUT. PICTURE NUMBER 3 I want to simplify the first schematic on the top.The purpose of the Filter Capacitor is to remove the ripples from the DC as much as possible in a manner that it will appear smooth on the LOAD, but on the schematic is shown that the unfiltered DC passes the LOAD because of the parallel circuit connection. Please explain to me what I got wrong about all this. Thanks in advance. <Q> We commonly call these capacitors "reservoir" capacitors. <S> They act as a reserve of power during periods of no voltage in much the same way that a water reservoir can supply water during dry spells. <S> Continuing with the water analogy, we notice that during the dry spells the water level will fall as water is consumed and this will result in falling pressure on the water mains. <S> Similarly if current is drawn from the capacitor reservoir as in your "With Load" graph you will see the voltage droop between cycles. <S> When the water supply is restored pressure builds up in the line. <S> Since the reservoir needs to be refilled water will flow into it. <S> Meanwhile the load is demanding water and, since water can't flow in and out of the reservoir simultaneously, it should be clear that the mains pressure feeds both the reservoir and the load. <S> Note that during the "With Load" period of your graph that the supply voltage exceeds the reservoir voltage for about 1/3 of the time. <S> That means that it has to supply the average current in 1/3 of the time so <S> the pulsed current will be about three times that of the load current. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> A semiconductor version of the rectifier. <S> Note that R2 and D3 are there to enable visualisation of the un-smoothed full-wave rectified waveform on the simulator. <S> The bottom trace shows current into the capacitor as positive. <S> (1) Note that there is a 10 A current pulse on the first half-cycle to charge the reservoir capacitor. <S> (3) Note that 80% of the time that C is discharging at -0.4 A. <S> (2) Note that subsequent pulses are much shorter - about 20% of the cycle and peaking at almost 2.5 A. Figure 2. <S> Simulator results. <S> (Click to enlarge.) <A> There is no un-filtered current coming from the rectifier - the rectifier is either conducting or it isn't. <S> If it is conducting then the majority of the current it is providing flows into the capacitor to charge or recharge it. <S> If this wasn't the case, then the capacitor is too small and you likely have a poor design that will create too much ripple voltage under normal load conditions. <S> So, if the capacitor has had energy taken from it by the load, its terminal voltage will have reduced a little bit AND the trick is to ensure that the amount the voltage has sagged-to isn't going to cause the load problems <S> i.e. the "droop" isn't too much. <S> Then along comes the next peak in the AC waveform and the diode conducts to refill the capacitor with energy - engineers normally assume that the diode current that flows during this re-charging event is mainly going into the capacitor. <S> As I said earlier, if this is not >75% true then you probably need to increase the value of the capacitor so that it is true. <A> I believe you are new to electronics still trying to grasp with basic concepts and its flow of current. <S> If the Capacitor and the LOAD are in parallel, this means that there is more than one path for the current to flow, therefore, the unfiltered direct current from the rectifier will split between the two branches and part of it will reach the LOAD It all depends on how you want to look at it and understand it. <S> Technically yes there are 2 paths and the unfiltered current flows through capacitor while the constant current reaches to LOAD. <S> My question is how is this prevented? <S> Does really the unfiltered current split, or first, it builds up the capacitor until it's fully charged than it further processes towards the LOAD? <S> So here you are mostly right on the second part. <S> So your capacitor is acting as a temporary bank. <S> So when the rectifier output pulse reaches lower value <S> the capacitor starts providing that excess voltage and at your LOAD you will see constant voltage (approximately constant). <S> It is very much acting like what Transistor has explained in his answer. <A> The unfiltered current splits. <S> How much goes where is determined by the instantaneous voltage coming from the rectifier, the instantaneous voltage on the capacitor, and the current requirement of the load. <S> As shown in the right-side drawing, the output voltage (the voltage on the capacitor) increases whenever it is less than the input waveform. <S> this is the time when the input is both charging up the cap and driving the load. <S> When the input is less than the cap voltage, the rectifier is reverse biased and no current comes from the transformer. <S> During this time the capacitor alone is powering the load, and hence its voltage decreases.
Basically capacitor doesn't allow a sudden change in voltage.
"Sniffing" into a Boiler's LED panel (Central Heating) I've built an esp8266 based web thermostat to control my heating system. Everything seems to be working fine for the moment :) What I want to accomplish is "sniff" or intercept the boiler´s status from the front panel's status LEDs, to see if this heater is actually turned on, on a MQTT Dashboard. A very nasty way would be to connect some wires from the boiler's LEDs to some GPIO pins. But I'm not quite sure about that approach. I believe I would have to use some type of buffer, optoisolator, etc.(I could also place a LDR, o phototransistor in from of the boiler's LED, but I dont want to physically block the visual feedback) How could I accomplish this?Any ideas? Appreciate your help,Cheers!Marc PD: This exact same question has been asked in the Arduino Forum almost a month ago, but haven´t received any replies yet. Sorry for the double post. <Q> If the LED still lights up this setup will likely work. <S> It might be that the total voltage drop is now too much. <S> In that case you could try to put an optocoupler + series resistor in parallel to the indicator LED + its series resistor. <S> Another option could be to replace the LED with the optocoupler, and drive the LED (which is now isolated from the thermostat) from your uC. For some thermostat / boiler combinations <S> is might be possible to sniff the protocol. <S> In my country OpenTherm is used a lot, and a free project exists that describes an interface (using a PIC16F88). <A> You might want to see the answers to a similar post in the Arduino Stackexchange: https://arduino.stackexchange.com/questions/43923/how-to-detect-if-led-is-switched-on-in-external-circuit-using-arduino-nano/43926#43926 <S> The short answer: use an optocoupler in series to the LED. <S> Using an LDR/photodiode/phototransistor would be too much sensitive to the environment light. <A> How about image processing? <S> Install a camera in front of the boiler's status panel, and use some software to extract the LED status, etc
I'd try to put an optocoupler in series with the indicator LED.
Can you put a through-hole part behind an SMT part? I'm wondering if it's possible to place a through-hole connection on the opposite side of an SMT microcontroller. I have a small connector with a solder pin (for the shield) on one side of the board, and I'm hoping to place a microcontroller on the other side of the board. The hole for the connector would be near the center of the MCU package, away from the pins. The board is extremely space constrained and this might be the only way to get the MCU on the board without going to a tiny-pitch WLCSP type package. The position of the connector cannot move. Has anyone done this? What are the challenges and things to keep in mind? <Q> The hole for the connector would be near the center of the MCU package, away from the pins. <S> This is a very bad idea. <S> You could conceivably cut the pin short enough that it doesn't stick through the board, but that's going to be a special operation and add cost. <S> You wouldn't be able to inspect the solder joint with the through-hole pin because it would be all hidden in the hole. <S> It will also mean the chip has to be hand soldered because it has to be attached after the wave solder step is done to solder the through hole part. <S> If you had to rework the through-hole part, you'd have to remove the chip, rework <S> the through-hole, and then re-attach the chip. <A> If it's a connector that you buy, the lead will definitely be longer than the board is thick, and this simply won't work out. <S> Get an surface mount connector, or place either your connector or your microcontroller elsewhere. <A> Is it possible to bend the shield pin and then solder it to the connector-side of the board? <S> This extra step will cost you when you go into production, but not as much as all the custom assembly work that would be required with a thru-hole. <A> I'm wondering if it's possible to place a through-hole connection on the opposite side of an SMT microcontroller. <S> I advise against that. <S> The through hole leads will protrude through the other side of the board and keep the SMT component from seating properly. <S> I have designed circuit boards where SMT components nestle inside the legs of through hole components, but this is the opposite of what you asked. <S> Consider going to an SMT version of the connector, or possibly go with a through hole version of the micro <S> , as through hole components have some margin for height adjustments off the board. <S> Also, consider going to a 4 layer board. <S> Those boards allow you to push your power and ground traces onto internal plane layers, which frees a lot of space for component placement. <S> You are looking at about a 20% increase in PCB cost. <S> As a bonus, having internal plane layers provides (electrical) noise isolation, and you can do things like setup transmission lines for USB connectors.
Usually the pins from through-hole parts stick through the board by at least a millimeter, more than enough to interfere with the ability to place a chip where it would cover the pin. I would recommend against this for the same reasons that @ThePhoton describes. Another option: place the micro elsewhere and place other SMT components around the connector.
Why does a body submerged in a more conductive fluid still conduct current? Let's take for example an electric eel applying an electric shock by creating a potential difference across two points in the water. It would seem, however, that the current would find a "shorter path" across the potential difference by just passing through the water. Why, then, does some of the current go through the "target" which is further away and likely has higher resistance than sea water? <Q> Because the water is not a superconductor. <S> You can model a sea water as a ladder of resistors put in parallel from/to infinity. <S> Now if you apply the voltage difference between two points, the majority of the current will pass at the shortest way, the remaining arround. <S> But exactly how much is a function of the resistance/conductivity of the water. <S> More conductive, then the current cone to the sea bottom would be narrower. <S> Less conductive water, then the current spread would be wider. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Electric eels tend to curl around the prey when hunting (and shock the predators when these make contact), so the shortest path for the discharge may well be though the prey's body rather than surrounding water. <S> Source: phys.org <S> Credit: <S> Kenneth Catania <S> Additionally, electric eels are fresh water animals , so your assumption about water being more conductive doesn't really hold. <S> Blood and lymph are better conductors thanks to the ions (mainly Na\$^+\$ and Cl\$^-\$) present in them. <A> Current takes all available paths simultaneously ... in proportion to their conductivity. <S> (conductivity is 1/resistance, and its basic unit is the Siemens. <S> A 100 ohm resistor has 0.01 Siemens of conductivity. <S> Paralleling resistors now gets a lot more simple, you are now simply adding each of their Siemens and turning that back into Ohms.) <S> If that were not so, your house would never get any power - all of it would go to the steel mill, shopping mall or datacenter across the street. <S> This is how cows get killed by lightning that struck a tree nearby. <S> Several megavolts at the tree radiate into the earth, creating a voltage gradient of say, 600 volts per metre. <S> That puts about 1000 volts between their front hooves and their rear hooves. <S> Some tiny amount of lightning current also travels through the cow, killing them. <A> Having two different resistances in parallel does NOT mean that there is no current going through the bigger resistance. <S> The currents just divide: i1/i2 = R2/R1 (current divider). <S> If one of the resitances is, however, much higher than the other one the current through the higher resistance will beocme very small. <S> Obviously the resistance of victims of electric eels is not high enough compared to that of the surrounding water.
In the end, a significant portion of the current will go through the body, which is enough to stun the prey or scare away predators.
When do you say two clocks are asynchronous? I have a situation where reference clock of PLL_0 is coming from some clock source and giving out a clock (named C0) with freq0 and and C0 is going as reference clock to PLL_1 and giving out clock C1 and C1 is going to PLL_2 and giving out C2. Please see the below figure for better understanding. simulate this circuit – Schematic created using CircuitLab In the above situation can we say that clocks C2, C1 and C0 are synchronous to each other? Note: I would like to add that freq0, freq1 and freq2 are not integer multiple of each other. <Q> can we say that clocks C2, C1 and C0 are synchronous <S> Yes. <S> The whole point of a PLL is to "lock" one frequency to another (phase, actually, but it turns out to fix the frequency too). <S> They could be asynchronous if the PLLs are malfunctioning, in which case the output from the PLL could be a free-running clock (worst case). <S> Two clocks are asynchronous if they do not depend on each other, for example two free-standing oscillators at the exact same frequency will still be asynchronous, since you will always have a small amount of drift and an unknown phase at startup. <A> I would be very cautious in stating that the frequencies are synchronous. <S> With ideal PLLs that had no phase jitter <S> then you may be able to make that claim, but in reality there will be some variation in the clock edge timing. <S> As such, if you were driving logic using multiple clocks there may be asynchronous race conditions dictated by that phase jitter. <S> The clocks may be "in-tune" but synchronous is an over-statement. <S> In reality, a PLL will be in a continual state of going in and out of synchronism. <S> Whether that is "close enough" with a specific design of PLL for your particular requirements is another matter. <A> So in your case I'd say yes, the clocks are synchronous because phases are fixed (=locked < P hase <S> L ocked L oops), although they may have different frequencies and although there may be some small jitter (phase noise). <A> Just judging from a dictionary definition, I would say these are only synchronous for a likely tiny fraction of the time. <S> Synchronous means happening at the same time. <S> These PLL's tick to the same beat once in a blue moon if they're not integer multiples of each other. <S> For 99.99%+ of the time they are asynchronous. <S> There's no logic you could drive from these separate blocks that you could ever call synchronous. <S> Within each of the PLL's domains, you can have synchronous logic, but if you're looking at all of your logic combined with all 3 of the PLL's domains, it becomes asynchronous to each other.
To my understanding meaning of "asynchronous"/"synchronous" may vary depending on the context but in very most cases synchronous means that events happen at a fixed phase relation .
Mosfet as a switch (on/off) and ground isolation my question is simple (I hope) So I have DC in. On both + and ground line I have 2 mosfets (one for each line) (driven externally) When I switch off both Mosfets , can I claim "full galvanic isolation" ? Is there any leakage current or high frequency noise passing through a switched off mosfet ? <Q> Because there's no such thing. <S> Legitimate isolating products claim things like "galvanic isolation to 6000 V" or "galvanic isolation to 10,000 V" and cite a relevant standard such as UL1577 or IEC 60747-5-5 that sets out how that isolation is specified and tested. <S> Even these products might fail to provide isolation if too high a voltage is applied between isolated terminals. <S> Because a MOSFET alone is not going to provide this kind of isolation. <S> A high enough voltage (more on the scale of 100 V than 5000 V) will cause breakdown of the device and make hazardous voltages accessible on the other terminals of FET. <S> Maximum <S> \$V_{ds}\$ and \$V_{gs}\$ <S> values will be specified in your MOSFET's datasheet, and unless you're looking at some exotic device designed for use on the power grid and costing $100's, the limit will be much lower than the isolation values appropriate for galvanic isolation. <S> Is there any leakage current or high frequency noise passing through a switched off mosfet? <S> This is irrelevant to the question of galvanic isolation. <S> But yes, high frequency signals can be coupled between the gate and drain or source, since they're only separated by the gate capacitance. <S> And leakage current will flow from drain to source (or vice versa). <S> This will be specified in your MOSFET's data sheet. <A> MOSFETs, like all semiconductors are non linear resistors. <S> When off, the MOSFETs may present a very high resistance indeed, but it is still just a resistance. <S> As such you can not claim "full galvanic isolation". <S> Leakage current would be very small however noise is a different entity. <A> Also, power MOSFETs have an inherent zener diode between the gate and source. <S> In one direction, the zener voltage is equal to or greater than the device max drain-source voltage spec. <S> In the other direction it looks like a not-very-efficient power rectifier. <S> Here is a typical datasheet with the diode shown on page 1. <S> https://www.infineon.com/dgdl/irf540npbf.pdf?fileId=5546d462533600a4015355e39f0d19a1
You can't claim "full galvanic isolation". Since MOSFETs are capacitive in nature, a considerable amount of AC noise can be transferred through them, even at relatively low frequencies.
Why are 555 timers so prevalent? I've noticed is that 555 ICs seem to be extremely common. Why is the 555 so prevalent, or ubiquitous; what about it so useful? <Q> I'm not a 555 fan and only used them a couple of times over several decades <S> but they do have their uses. <S> Why is the 555 so prevalent, or ubiquitous; <S> what about it <S> so useful? <S> It was probably the first general purpose timer to market. <S> ( Timing is everything! ) <S> It was featured in all the hobby electronics magazines of the 1970s, etc., so it became very well known. <S> "555" was easy to remember. <S> (Don't laugh!) <S> It has a wide working voltage range - 4.5 to 16 V. <S> This beat any of the logic families. <S> It was flexible. <S> Oscillators, monostables, pulse generation, sequential timing, time delay generation, pulse width modulation, pulse position modulation, linear ramp generator, etc., could be formed with only a few components. <S> Due to the 1/3 and 2/3 Vcc switching points the timing was pretty much independent of voltage. <S> This is useful for battery powered circuits in particular. <S> (Only?) <S> 50 ppm temperature drift. <S> 200 mA output source or sink capability. <S> Again, this beats any of the standard logic families and allowed direct drive of LEDs buzzers, speakers, motors, etc. <S> Figure 1. <S> Internals of the 555. <S> Note that all transistors are BJTs. <S> It was tough. <S> The device is built using regular transistors (see Figure 1) which are fairly tolerant to electro-static discharge (but see 11.2 on datasheet below). <S> Price is very low. <S> For all of the above reasons it made a great chip for "my first project" tasks. <S> A capacitor, a few resistors and an LED were all that was required to get someone started on the road to becoming a major EE.SE contributor. <S> Ref: <S> TI 555 . <A> The IC was designed in 1971 by Hans R. Camenzind under contract to Signetics and introduced in 1972. <S> It is now made by many companies in the original bipolar and in low-power CMOS. <S> As of 2003, it was estimated that 1 billion units were manufactured every year. <S> The 555 is the most popular integrated circuit ever manufactured. <S> Wikipedia As you can see the 555 is a really old design that has simply stood the test of time because, for a quick and simple method to perform various functions at lower frequencies and tolerances, it is simply really hard to beat at the cost. <S> That being said, many serious designers may say that using them is "cheating". <S> There are many, many circuits designed around it out there, many of them quite interesting in how people have found novel ways to use them. <S> There are even books dedicated to the old lady. <S> The points @Transistor raises in his answer also sum it up... <S> a classic example of... <S> "When you get it right the first time it will stand the test of time". <A> It depends on what you mean by common. <S> The 555 is very widely used on hobby and home brew projects and in simple example circuits as found on the web. <S> This is because it's flexible, simple to use and works off a huge voltage range making it ideal for use in quick and dirty simple circuits where high precision isn't required. <S> It's also old enough that there are lots of examples around of how to use it since it features in some of the earliest books and tutorials. <S> It's not common in modern professional designs where it is considered too inaccurate for most applications and <S> the required functionality can normally be implemented elsewhere without requiring an additional component. <S> The other part you will see a lot is the 741 op-amp. <S> It's a dinosaur <S> , modern parts out perform it in every possible way but people still want to use it. <A> The 555 was an early champion. <S> I used a lot of them from around 1971 to 1976, as well as some multi-555 chips. <S> I eventually became dissatisfied with such timer/oscillator parts because they could put a lot of noise onto the power and ground buses when charging and discharging the user-supplied timing capacitor. <S> Later all these single-function parts became largely irrelevant. <S> As time went on, most simple operations were being performed by code on microcontrollers which had their own carefully designed clocking arrangements, analog and digital io lines, etc., etc. <S> Those early years of designing with op amps, 555 chips and 7400 digital logic were fun, exciting times. <S> In retrospect that period was just a phase. <S> For better or worse, the world of electronics is completely different now, with the nuts and bolts of electrical engineering not so easily accessible to the student and hobbyist.
The 555 is still in widespread use due to its low price, ease of use, and stability.
Do we need a resistor to discharge capacitor of MOSFETs while connected to MCU? I have an STM32 MCU at home. I was thinking of controlling a load with this MCU and a MOSFET. Let's assume this is my circuit: In this circuit, we use a resistor (R2) to discharge the gate of the MOSFET. Now let's look at the structure of the GPIO inside the STM32. Here is an image: As you can see, there is an NMOS that when we change the output control to 0, the MCU will turn it on to connect the line to the ground. Now the question is: why should I use a resistor to discharge the capacitor of the MOSFET when there is an NMOS that can do it? Do I always need to put this resistor in? <Q> One good reason is to have this resistor to keep the gate low if the MCU pin is in high impedance state (e.g. during reset or after reset until the port is initialized). <S> (Otherwise during high impedance state it could act as an antenna and pick up some voltage that turns it on) <A> During normal operation there is no need for the resistor. <S> However you may want it to put the FET into a known state during power up and reset. <S> Otherwise on power up before the MCU starts to drive the pin the FET could turn on. <S> This could cause glitches on the output or worst case (and this is very unlikely) <S> depending upon what other current surges happen on startup it could cause the power supplies to brown out and crash the MCU. <A> MOSFET works on the principle of charging and discharging of the (effective) capacitance between the gate and source. <S> Now when you charge the MOSFET and then introduce high impedance, the charge is retained (and this often happens in power MOSFETs).When the gate is tied to ground via a resistor, this ensures that the residual charge is grounded and the MOSFET will not conduct.
Sometimes not using the ground resistor may cause erratic results in the system and may also lead to current surges due to shorting.