text
stringlengths
83
79.5k
H: Why is there seemingly no delay in a block ram read I am trying to learn Verilog and was curious why my FPGA's block ram seems to provide the data that I request instantly. I was expecting that there would be some number of clocks that I would need to wait before my results would be available. On a traditional computer's CPU, the only data available immediately is whatever is stored in a register correct? Data stored in caches or in ram would need to be fetched into a register before it can be operated on right? Are these block ram objects just implemented via registers on the chip? Thanks AI: Did you instantiate a primitive, generated IP, or infer it with an array? IP typically has a choice for registered output or not. If a primitive or inferred, you decide whether to register it (clocked process) or not in your RTL. The primitive is typically an asynchronous output, save any vendor-specific attributes that may be associated with it. As @EugeneSh. said, The data sheet will tell you everything you need to know. Data stored in caches or in ram would need to be fetched into a register before it can be operated on right? You do not need to register a signal to operate on it... Depends on the situation. For reading memory, I probably would. Are these block ram objects just implemented via registers on the chip? You can choose to "push" memory into registers during synthesis, but, if you have RAM available, typically you would use the RAM (and the tool would default to implement that way too... especially if you used a primitive). The data sheet will tell you how much RAM you have, and how it is arranged. The synthesis report will tell you how it was implemented. To make life easy, I would just infer RAM with an array.
H: Touch application with PIC16F183x possible? I could'nt find any information about touch applications in the datasheet from the PIC16F183x controller. Ist this controller fine for touch applications? It's in a list with supported devices for the mtouch library. AI: While the part has no dedicated capacitive touch hardware, the ADC inputs can be used for capacitive touch. For more noise-immune and robust capacitive touch applications, Microchip (and other suppliers) make dedicated hardware (recommended). To use the ADC input, see http://ww1.microchip.com/downloads/en/AppNotes/01298A.pdf .
H: Does computer memory record the zero binary state? It's been two years since I started reading about electronics and computer circuits. I fell in love with the homemade computers and the possibility of building one by myself. You will see: When somebody explains computer memory, says "There is, and there isn't" "There's Voltage (1) or there isn't voltage (0)" Is there a way computers record the zero state? (If it's with different voltages, how do they recognize it) For example, if I want to create a serial paper tape I'm going to put a hole where there's a one, and I'm not going to do so when there's a zero. But my computer will not recognize that "lack of hole" as a zero, and when reading: If the original signal is: 1010 Then in the tape it's: 1(Nothing)1(Nothing) Wich turns out on the final data as: 11 (That is, not correct) I know that computers use something like timing or control signals whether must be data or not. Can someone explain me that? Thanks by now. PD: I don't know if it's the best forum. But since my question is about the electronic way computers read and write data, I decided to post here. Don't kill me, please T.T!! AI: If the original signal is 1010 then in the tape it's 1 (Nothing) 1 (Nothing) which turns out on the final data as 11. (That is, not correct.) You have spotted the problem with basic binary serial transmission. There are two common ways around this: Send a separate clock pulse alongside the data. In your paper tape example it would mean punching a second line of holes, one per bit. Now we monitor both lines of holes and the 'clock' holes tell us when to look for a data hole. If we find one we record a '1' and if we don't we record a '0'. This scheme is called synchronous data transmission. Figure 1. Asynchronous serial data transmission. Source: Wikipedia. Agree a data rate (see baud rate). In this scheme we both agree that the '1's and '0's are going to be a certain distance or time apart. On your paper tape that might be a 3 mm pitch. All that is required is to start the machine up, punch one hole for a 'start' bit and then punch or not punch subsequent bits according to the data pattern. A problem with this is that any error in the feed rate will accumulate and the timing will go off. To get around this a start-bit is transmitted every so often. For RS232, for example, the data is broken up into 7 or 8-bit words and each is preceded with a start bit ('1') and terminated with one or two stop bits ('0'). This allows the receiver to retrain. This method is called asynchronous transmission. A further note that may help your understanding: When the start bit is received the receiver will wait one and a half cycles and start sampling in the centre of the subsequent bits. That way if the clocks are slightly fast or slow the sampling should be still within the bit width and allow accurate data recovery.
H: Why do I get a triangle wave in this Schmitt trigger oscillator? I'm trying to design a function generator that can generate square, triangle and sine waves, with frequency varying between 100Hz and 100kHz. The circuit in the blue box is supposed to be a schmitt trigger with thresholds different from those of the NOT gate. the thresholds change when we change the Vb voltage and hence, the frequency changes. (I'm actually using a CD4093B NAND gate with one input in high voltage). This part of the circuit was suggested by my professor, but I have been trying to get it to work in Proteus and instead of a square wave, I'm getting a very neat triangle wave in the output pin of the gate, which doesn't make sense to me, since I thought this pin was supposed to have either a high, or a low voltage and not much in between. This is the simulation result from this part of the circuit. The graph shows the voltage at the output pin of the gate: Can someone please explain why this is happening, and possibly suggest a solution to this problem? I am only allowed to use resistors (not variable), diodes, capacitors and one CD4093B ic. Thank you in advance AI: It is supposed to be a Relaxation Oscillator , so the Square wave output on the Gate is integrated to ~ 1/3Vcc then toggles. If you are seeing x MHz or whatever that is the unity gain bandwidth of the inverting gate in "quasi"- linear negative feedback mode with inadequate phase margin at unity gain. Raise R1, 100k R2 to 330k or so will prevent that.so it doesn't load R4 and has gain>1 The external bias affects both duty cycle and frequency.
H: Precision Rectifier Circuit to detect peaks I have a question about speed at detecting peaks. Essentially, my question is that I have a precision rectifier with a capacitor equipped to the end of it to smooth the incoming full bridge rectified wave, which works 100%. however I am concerned, as the application is to play audio through this and capture the current peak. I am worried that the peaks won't be captured in time as audio changes very quickly worst case 1/20kHz. I understand I need a resistor to discharge the cap so it can change on the next cycle, however when I put a low value resistor (For a faster discharge time) it doesn't reach my peak value anymore oppose to using a big resistor or no resistor which is important as the next stage is a comparator with a fixed Vref to compare to. How do I balance this? I need a resistor value that can discharge the capacitor fast enough for incoming music in order to capture the peaks of that instant moment. Or is that the trade off? simulate this circuit – Schematic created using CircuitLab AI: C2 is too big for this sort of application. The OPA350 is only capable of 80mA of output current and it takes a long time to charge the 680uF cap. You then also need then a very small R3 value to discharge it rapidly between peaks. Set C2 at about 2uF and R3=100k Ohm That will give you reasonable peak capture and a decay time in the 200mS range. If you need to make this voltage available elsewhere you could add another OPA350 as a buffer. simulate this circuit – Schematic created using CircuitLab
H: Old laptop power brick > DIY current regulator > 20w COB LED - will it do what I think it will? I have a salvaged 20W battery-powered work light: the housing and LED inside. Before the electronics and the original 7.4v dead battery got tossed, I hooked up a somewhat discharged 7.4v battery to it and measured 18.5v / 1.2A to the LED itself. (Yeah, I should have kept the electronics but I didn't.) I have an old 21v charger supply from an old laptop. It puts out 2.5A. If I make a current regulator with a LM317 and resisters (or some other fast/easy way) and put that regulator between the power brick and the LED, will this actually do what I think it will? Will it let the LED have only the amps I 'set' with resisters (in my case I will set it at 1A) and vary the voltage as needed from an minimum and the full 21v of the power brick? ^ THE PREVIOUS SENTENCE IS WHAT I THINK WILL HAPPEN. I know this is a silly question to many who already know about these things. I DON'T already know about this and am not clearly understanding the things I am reading about it online - so I am asking here if I am understanding what these basic types of current regulators will do. AI: You've said the LED lamp is \$20\:\text{W}\$ and I'll assume that's because it's written down, somewhere. Your measurements are consistent with the rating, too. So I'm going to accept the numbers you developed for the LED lamp. Your laptop charger system is another issue. Modern ones are sophisticated enough that they may require some kind of communication in order to active their power supply activity. If so, you may have some difficulties getting it to drive your LED lamp. But let's assume that's not a problem, here. Given the voltage rating of your power supply and its compliance current, it would seem to be a decent fit. Probably the easiest thing to do is to buy a few \$10\:\text{W}\$ ceramic resistors, with values from say \$3.3\:\Omega\$ down to \$1.8\:\Omega\$. Start with the highest valued resistor and place it in series with the LED lamp and your power supply (with correct polarity!) Measure the voltage across the \$3.3\:\Omega\$ resistor. Divide the voltage you measured by this resistance to work out the current through the resistor (and therefore through the LED lamp.) If this current is at or below the figure of \$1.2\:\text{A}\$ (or so close it doesn't matter much), then you have worked out a match-up. If the current is too low, then replace that resistor with the next lower value and repeat until you get the right current. You could go to the trouble of adding a pair of BJTs to provide a current limiter. But there probably isn't any point. You still have to dissipate some excess power either way and the main advantage for the BJTs is supporting a wider range of source voltages -- something you don't care to do. So it's probably pointless worrying about anything more than a simple resistor to limit the current with your existing power supply. Just in case you might have gotten some numbers wrong, it might be a good idea to also include at least an \$18\:\Omega\$ and perhaps even a \$33\:\Omega\$ resistor in your package. (\$10\:\text{W}\$ also.) Put one of them in series with your LED lamp first, just to make sure. Switch it on for a few moments and check the voltage across it, quickly. Let the resistor warm up for a few seconds, too. You should be able to verify that the current is fairly low by making the calculation above and also should be able to verify that the dissipation in the resistor is modest -- it doesn't heat up too fast. If for any reason any of the resistors appear to heat up very quickly (which may happen if the LED lamp isn't dropping much voltage), then turn things off immediately and do NOT let the resistor get too hot. In this case, it would appear that your LED lamp needs a much larger voltage drop across a resistor and this will require you reporting more detailed results from these experiments before a better answer can be offered.
H: Current limiting resistor on peltier element I have a 12v/22A DC switching power supply and 9 peltier elements rated for 12v/6A. I would like to limit current to 2A per peltier element. I don't know how to calculate the impedance (in ohms) that I need. Intuitively, by ohm's law, every peltier element's impedance is 12v÷6A=2Ω and the impedance I'm aiming for is 12v÷2A=6Ω. Does this mean I need a 4Ω current limiting resistor in series with the peltier element? Also, what power (watt) rating does my resistor need? AI: If the Peltiers are rated at 12v/6A, then I would try measuring the current taken by 3 in series. If you can tolerate that your resulting current isn't exactly on target, then job done! This is far more efficient than burning excess power in resistors, especially as you're starting from an SMPS. While the Peltier current varies a little with its thermal conditions, they are so inefficient that it's not unreasonable to model them as a resistor which changes a bit. If you can turn the voltage down on your SMPS, this will reduce the current. If not, then a DC-DC buck converter is reasonably inexpensive, if you want finer control of the current than just splitting the voltage across several in series.
H: AGC (Auto Gain Control) Circuit Clipping Problem guys once again back with a problem to my AGC circuit, however this is the last one. The problem is the LM833N is clipping around at less than 1.92Vpp at a 4.586V Vcc, I understand this op-amp isn't rail to rail however it should be well within its voltage swing? I can't explain why I am getting a Vpp of 1.80V. The algorithm: A. Ardunio Reads audio signal to A0: Reads 760mV this is in peak after the Precision Rectifier. B. Ardunio performs equation \$R2 = ((\frac{Vo}{Vin})-1)*R1\$ Using a desire Vo target of 1.92V, this is a variable within the Ardunio IDE. C. \$R2 = 1526.32\Omega\$ D. Ardunio proceeds to find how many steps it takes to get to \$1526.32\Omega\$ \$ Value = 1526.32/36.75\ = 41\$, where 36.75 was found using 9400(Measured on digi pot using 0xFF)/256 (datasheet) E. Seeing the value on the amplifier, \$41*36.75 = 1506.75\Omega\$ This is expected as we are going to lose precision due to a 8 Bit resolution. \$Vo = ((\frac{R2}{R1})+1)*V_{IN}\$ \$Vo = ((\frac{1506.75}{1000})+1)*760mV\$ \$Vo = 1.90513V_{p}\$ I dont understand why is this value showing as a Voltage Peak-Peak It's either the Voltage Swing of the LM833N that's limiting me or I wasn't actually calculating Vp, but Vpp instead. Here are pictures from the circuit and schematic simulate this circuit – Schematic created using CircuitLab Ardunio Code(very Rough): #include <SPI.h> int chipSelect = 10; double voltageDivderOutput = A7; int calibrationTurnOn = 3; double desireAudioSignal = 1.98; double audioSignalInput = A0; double R1 = 1000.0; double resolution = 256.0; double offset = 0.0; double realValue = 9400; double RS = 0.0; double Voltage; double Vcc; double R2 = 0.0; double ADCValue; double R2New = 0.0; double Vout = 1.92; void setup() { pinMode(chipSelect, OUTPUT); pinMode(voltageDivderOutput, INPUT); pinMode(audioSignalInput, INPUT); pinMode(calibrationTurnOn, OUTPUT); Serial.begin(9600); SPI.begin(); SPI.setBitOrder(MSBFIRST); calibration(); } void calibration() { Vcc = readVcc()/1000.0; //Gives the voltage of Vcc RS = 9400.0/resolution; //In datasheet of the Digi pot digitalWrite(chipSelect, LOW); SPI.transfer(0x00); SPI.transfer(0x00); //Makes the gain close as one as possible digitalWrite(chipSelect, HIGH); } long readVcc() { long result; // Read 1.1V reference against AVcc ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); delay(2); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Convert while (bit_is_set(ADCSRA,ADSC)); result = ADCL; result |= ADCH<<8; result = 1100800L / result; // Back-calculate AVcc in mV return result; } void loop() { double R2 = 0.0; double Vin = (analogRead(A0)/1024.0)*Vcc; //Read the value of Vin of the audio signal R2 = ((Vout/Vin)-1.0)*R1; //Transfer Function of the Non-inverting amplifier, re-arrange to find R2 double value = 0.0; value = R2/RS; //Find the int number to insert into register if (value >= 255) { value = 255; digitalWrite(chipSelect, LOW); SPI.transfer(0x00); SPI.transfer((int)value); digitalWrite(chipSelect, HIGH); } else if (value <= 0) { value = 0; digitalWrite(chipSelect, LOW); SPI.transfer(0x00); SPI.transfer((int)value); digitalWrite(chipSelect, HIGH); } else { digitalWrite(chipSelect, LOW); SPI.transfer(0x00); SPI.transfer((int)value); digitalWrite(chipSelect, HIGH); } value = 0.0; } AI: From the comments, it appears to be simply that the LM833 is hitting its output limits. You can determine those limits from the datasheet. Look for the "output voltage swing" in the opamp specifications. For the LM833, that is given as +-13.5V when powered from +-15V. That's 1.5V from each rail. That will hold pretty much true regardless of the operating voltage. You are running your LM833 on 4.8V. So, upper limit is 3.3V (4.8-1.5), lower limit is 1.5V (0+1.5). The difference is 1.8V, which is why you are seeing clipping at 1.8V peak to peak. The LM833 doesn't look like a good match for your task. Your suggested 21314 looks better - at least in terms of the output voltage swing. I didn't look at the rest of the specifications.
H: Altium: make a specific GND pad not to connect to GND pour I have a 2 layer board design and I'm using the top layer for traces and ground plane. Then I have an ADC and the -Vin pin is connected to a connector and both of them to GND but I want the -Vin pin to have one and only connection to GND through the connector pad but Vin- is being connected to the GND plane also. How can this be done? I know that I could use a cutout but I'm asking for alternatives. AI: Im thinking one of the following approaches could do the job: Cutout Simplest solution. Block path for plane place an object with a different net next to the pin to block the ground polygon from reaching the pad Rule under design - rules - plane- polygon connect style: add a rule that excludes this part. Apply the rule to ALL and InComponent('putDesignatorHere') (or: InComponent('') AND InNet('GND'). Then set the connect style to 'no connect'. This ofc would also remove the other ground connection from the plane as mentioned by Tom L. you can also address a specified pad in the rules using HasPad('IC3-3') Different nets Probably the cleanest solution: Give this Ground a different net name (eg VSSA), create a net tie object and then connect GND and VSSA with help of the net tie.
H: Attiny10 with RSTDISBL and USBAsp I have some project what requires all GPIO pins of attiny10 so I have to program RSTDISBL fuse. But only programmer I have is low voltage USBasp (with latest firmware supporting TPI interface). The datasheet offers the way to re-program attiny10 by applying +12V to RST when RSTDISBL are programmed: 15.3.1. Enabling The following sequence enables the Tiny Programming Interface: • Apply 5V between VCC and GND • Depending on the method of reset to be used: – Either: wait tTOUT (see System and Reset Characteristics) and then set the RESET pin low. This will reset the device and enable the TPI physical layer. The RESET pin must then be kept low for the entire programming session – Or: if the RSTDISBL configuration bit has been programmed, apply 12V to the RESET pin. The RESET pin must be kept at 12V for the entire programming session The USBAsp programmer doesn't supports 12V operation but I assume I could use simple inverting (because at normal operation it pulls logic low during programming and I need to pull it up to +12V) level shifter for this? Should a circuit like this work? RST_OUT are RST pin from USBasup while RST_IN are RESET pin of ATtiny10. Another question here is about the common ground. +5V are coming from Vusb via USBasp and +12V are coming from some sort of other PSU. Is it acceptable to combine grounds here? Or is is better to get +12V from PC PSU (same where Vusb comes from)? AI: Given you are using this as an external programming circuit (rather than inline with your existing circuitry), I see no reason why it shouldn't work if you make the following changes: Remove R3 - it is not helping you, and may well result in the MOSFET never turning off - this is because R2/R3 form a potential divider giving >0.5V at the gate when RST_OUT is low, which may not be enough margin to fully switch off a MOSFET of 0.7V Vgs(th). Current limiting is not needed for a tiny MOSFET like this. Ensure the 12V supply GND is common with the programmer GND. Otherwise it won't work properly. There is no danger making a common ground like this (*). Make sure that R1 is rated for 0.25W (or higher). It will dissipate about 0.15W when not programming. (*) Assuming you are using a sensible power supply.
H: Eagle library doesn't show up in search after activation I am having some problems with adding a component in my schematic. I downloaded it from the official Autodesk homepage but I can't find it in the add list. I activated it and i changed the directory of the library? Any fix or solutions? I could not seem to find any. AI: Try to search for si5*. It is now looking for an exact match. A wildcard at the end search for "starting with si5".
H: Analysis of a circuit with transformer, R and C components I am not able to solve the above problem. I don't think my equations are wrong but I am not able to solve them. Please help me with this. The answer given in my workbook is 3.93cost(3t+59.9) Method A Method B This is not a homework problem. I was practicising problems when I came across this one. AI: While I agree with Chu that you can save yourself some pain by using phasors/Fourier transform, it is possible to solve these equations. $$\begin{align} &v_x)\quad &\frac{v_s-v_x}{1} + \frac{v_1-v_x}{2} + \frac{1}{3}\frac{d(v-v_x)}{dt} &= 0 \\ &v_1)\quad &\frac{v_x - v_1}{2} - i_1 &= 0 \\ &v)\quad &\frac{1}{3}\frac{d(v_x-v)}{dt} + i_2 - \frac{v}{5} &= 0\\ &tf)\quad &v &= 4v_1\\ & & i_1 &= 4i_2 \end{align}$$ You can eliminate \$\frac{1}{3}\frac{d(v-v_x)}{dt}\$ using the third equation by substituting it in the first equation. $$\frac{1}{3}\frac{d(v-v_x)}{dt} = i_2 - \frac{v}{5}$$ You can then solve all equations but the third to all unknowns except \$v\$ to find that (I used a CAS like Maxima to solve it) $$\begin{align} i_1 &= \frac{20v_s-9v}{55} \\ i_2 &= \frac{20v_s-9v}{220} \\ v_1 &= \frac{v}{4} \\ v_x &= \frac{160v_s - 17v}{220} \end{align}$$ which allows us to plug \$i_2\$ and \$v_x\$ back in: $$\begin{align} \frac{1}{3}\frac{d(v-v_x)}{dt} &= i_2 - \frac{v}{5} \\ &\Downarrow \\ 79\frac{dv}{dt} + 53v &= 80\cos(3t) - 640\sin(3t) \end{align}$$ The homogeneous solution is not important, as we're only interested in the steady-state solution. The particular solution is given by $$\begin{align} v(t) &= \frac{77960}{29489}\cos(3t) -\frac{7480}{29489}\sin(3t) \\ &= 2.656\cos(3t + 5.48^\circ) \end{align}$$ Now, I'm not sure how you would get the reference answer of your book. When I verified using LTSpice, it seemed to support this answer rather than the one from your book.
H: Buck topology for a 3.3V to 1.1V for a SoC I have been given this circuit in a design guide and it does not make sense for such a complicated circuit to be implemented just to get 1.1V out. It requires 3.3V (input) and will give 1.1V out. The 1.1V is used to run digital functions in the chip; so I can imagine it possibly pulling too much current. Can I not use a simple voltage divider to get the 1.1V? This image was obtained from this document (page 12). EDIT: This is related specifically to a system-on-chip (SoC) application. I am trying to simplify the design without losing its functionality. Is the inductor necessary and all that. AI: Can I not use a simple voltage divider to get the 1.1V? Sure you can. It's not a good idea, but you certainly can do it. From the data sheet, the 1.1 volt bus has a range of 1.05 to 1.2 volts. The 1.1 supply drives a number of digital lines whose state (and therefore current requirements) varies wildly, from potentially zero to some max. From page 29 of the data sheet, a maximum of 76 mA seems a reasonable number to design around. 1.05 volts over 76 mA gives a nominal digital load impedance (for high current) of about 14 ohms. To allow a 15% rise when the load is removed requires the Thevenin resistance of the voltage divider be about 1/6 of this value, or about 2 ohms. Then, roughly speaking, the divider will be a 2:1 divider with values of 3 ohms and 6 ohms. Total resistance is 9 ohms. From this, we can calculate the power dissipated in the divider, and it is about (3.3^2)/9, or about 1 watt. And that's with no margin. If we restrict the voltage swing on the divider to 1/2 the specified range, the power dissipation goes to 2 watts. Assuming the specified regulator has an efficiency of 80%, at 1.1 volts out and 76 mA its power dissipation will be about 20 mW. Plus, of course, the 1.1 volt level will vary by a few millivolts over the current range, rather than a much larger swing. So, yes, you can use a voltage divider. You'll dissipate something on the order of 100 times as much power, but you certainly can do it.
H: IVPort raspberry pi camera module Im trying to design multiplex camera system for my raspberry pi something like this https://www.tindie.com/products/canerdurmusoglu/ivport-dual-v2-raspberry-pi-camera-multiplexer/#product-description Does anyone knows, what kind of chip is on a board like this, something like 14bit bus 2:1 mux. But I cant find something like that AI: ..something like 14bit bus 2:1 mux Unlikely. The Raspberry-Pi camera interfaces are MIPI CSI ports. You can't use a normal multiplexer. what kind of chip is on a board like this? Look for a MIPI multiplexer.
H: Multiple I²C slaves with different addresses VS. using a multiplexer I'd like to interface a lot of identical I²C sensors, let's say 32, with a MCU that has only 2 I²C busses. I can configure each sensor to have up to 8 different addresses. Hence I can have 8 sensors per bus or 16 sensors in total which is not enough for my application. I plan to use a multiplexer or some sort of I²C buffer (described in this document, page 8) in order to increase the number of sensor I can interface. However, I have now to choose in between several options : Having 4 different sensor busses with 8 sensors each and using two 2-channel multiplexers (or buffers) on each MCU bus to switch between those 4 sensor busses. Having 8 different sensor busses with 4 sensors each and using two 4-channel multiplexers on each MCU bus to switch between those 8 sensor busses. Those are just examples, there is plenty of other configurations but the question is the same : Is there a reason to prefer having more channels with fewer sensors on each over having fewer channels with more sensors on each ? I tried to figure out if there would be a change in the max. update rate of my sensors in each configuration but I can't see any difference. If some of you already faced this dilemna and/or has any element of answer, I'd be glad to hear it ! EDIT : the sensor in question is the TLV493D, a 3-axis magnetometer. A descritpion of the bus with up to 8 sensors is available at page 24 of the User Manual linked previously. I have no precise idea of multiplexers yet but it will probably be something similar to the PCA954* family. AI: On further inspection of the devices you are using, it seems that in order to configure their address, you need to be able to power up each device individually, which means that you will need one I/O pin per device to be able to set the address. Additionally to be able to configure 8 addresses, you need to be able to set the voltage on the SDA pin when the device is powered on. This condition will be difficult to satisfy using I2C multiplexers. In order to achieve it, you would have to send a packet over the I2C bus, making sure to hold the SDA line either high or low for 200us. During these 200us, you need to power on a device. Because of this, you may be better off choosing a different set of options from my original suggestion: Option 1 The simplest method would be to use a pair of I2C multiplexers, one connected to each I2C master. Each I/O expander would have 4 downstream buses of 4 devices. Because there are only 4 devices on each bus, this means that the LSB of the address (set by the SDA/ADDR pin voltage at power on) can always be set to 1 (the idle value of the I2C bus). This removes the difficulty of setting the SDA voltage to the correct level when powering on the devices. Secondly, you can limit yourself to only needing 3 I/O pins to power up the devices. The power on sequence can become: The first device on each bus powers on with VCC. Once powered on, you write to each bus to change the MOD1 register to b11. You use an I/O line to power up the second device on each bus. Again you can now write to each bus and change the MOD1 register to b10. You use a second I/O line to power up the third device on each bus. Write to each bus to change MOD1 to b01. You use your third I/O line to power up the forth and final device on each bus. This now gives you 8 buses, each of which consists of 4 devices with a unique address. There is no need to mess around with setting the SDA/ADDR pin to a specific voltage. Option 2 The second option is to use an I2C buffer/isolator (e.g. PCA9515a) for each device. You connect one group of 16 via isolators to one master, and the other group of 16 via isolators to the second master. You would then need 16 I/O pins to control the enable pins of the isolators. Each I/O pin controls an isolator on each I2C master. To read from a device, you simply enable the corresponding isolator, and read two devices simultaneously using your two masters. Enabling I/O pin 0 allows reading from device 0 on each master, I/O pin 1 enables reading from device 1 on each master, and so on. To save I/O pins, you could used a 74HC154 or similar 4:16 line decoder, given that you will only ever have one isolator selected at any given time. This reduces your I/O pin requirement from 16 down to 4. Old Answer (applicable to devices that set address using Axx pins): When using an I2C multiplexer, you have to write a command to the multiplexer to change which downstream bus is currently active. This takes time to do. If you have fewer downstream buses to switch between (i.e. maximise the number of devices on each bus), you reduce the number of commands required to read all devices - you can read all devices on a bus, then switch to the next bus. The fastest way to read all devices is going for the option which has more devices per downstream bus and fewer downstream buses. In your case you have two upstream buses. Connect each of these to an I2C multiplexer. To each I2C multiplexer make two downstream buses of 8 devices. While you can choose to go with a 1:2 mux which gives you just enough address space, you could still go with a 1:4 mux leaving two downstream buses unused on each mux. This gives you the ability to add extra devices later on if needed.
H: Manually placing Rooms in Altium does not create a rooms I am currently creating a pcb that will, at some point in future, be placed in a case that is not known yet. Therefore, the final PCB shape/size and connector placement is not determined yet. I began to route functional groups in themselves, intending to not route the connections to other functional blocks yet, until everything has been set. In order to move the groups easily, I would like to use rooms. There are options to place rooms via Design - Rooms - different options for room placement. i would like to use this option instead of having the ECO generator generate rooms from my schematics, as im more flexible with their shape if placed manually. However, placing a room manually does not actually place a room. When starting to place a room, the cursor changes, I can click to e.g. set a polygons points. On finishing the placement, Altium runs through some design rule checks and then ... nothin happened. No Room has been placed. (Same if i select the components and tell Altium to place a room around the selection). I have used this before. Not sure why its not working now. Maybe there are some options I am not aware of? SOLVED yes, it was an option that I was not aware of: Design - Board Layers and Colors - Show / Hide tab - Rooms was set to hidden. AI: Okay I found the "solution": The view configuration. When i checked the rules for my board, I realized that there were many more rules in the "rooms" than i expected. Means the rooms ive been trying to place were placed. They were simply set to "hidden" under Design - Board Layers and Colors - Show/Hide Tab ...
H: Increase voltage and current with external power supply I have an ECU A controlling a relay, in which when there is an activation command I can measure 12 V and 100 mA. The project I'm working on is to replace that ECU A with an ECU B, but when I send my activation command to the relay, it is only able to draw 12 mA from ECU B due to internal limitations. The voltage I measure in that situation is 3 V, but ECU B has a voltage driving system connected to a 12 V supply. My question is what kind of circuitry I can use to increase both the voltage and the current to reach the values I got with ECU A. I have access to a power supply of 12 V, which is the one being used for the voltage driving system. I imagine some sort of amplifier would be the necessary component, but then which type and how to determine the specs for it? My background on electrical circuits is not very extensive, so please bear with me. I could really use your feedback. Thank you! AI: It sounds to me that with a limited ability to drive current to the relay you are currently using you have two options: - Choose a relay that takes less current (maybe an opto relay or SSR) Use a MOSFET (that can be driven from the IO line at low current) to connect the relay coil to 12 volts. Don't forget the flyback diode of course. The 2nd option would require an N channel MOSFET interface like this: -
H: Turn off automatically - timer I'm creating a simple circuit and I need it to turn on when I press a button and stay on for the time that I choose on the timer (choose the time on a potentiometer, and it needs to go from like a few minutes to 3 hours). Eg. I choose 1 hour, press 'start', the light stays on for an hour and it turns off. The problem is that I can't find a timer that would work that way, can anyone help? Ps: I don't want to use a microcontroller Thanks AI: Like an eggtimer? Most are digital now not pots, well because long analog delays are hard. But if you want to make one , get a CD4060 and run clock with pot then choose any divider ratio, fixed or tap. Then use a power FET to drive your load.
H: Why is neutral wire connected to ground at the transformer? I understand the use of ground wire at the home appliances but why is the neutral wire connected to ground at the transformer? Why doesn't the neutral wire go back to the power generation plants. I found this image online. AI: I understand the use of ground wire at the home appliances but ... The earthing / grounding of applicances helps in two ways: It prevents the appliance case or chassis getting a high potential with respect to ground. Without this protection a live appliance (due to internal fault, for example) would present a risk to life should a person touch the appliance and have sufficient path to earth for a few tens of milliamps to flow. It provides a low impedance return to the transformer and when sufficient current flows it will blow the fuse or trip the breaker. ... why is the neutral wire connected to ground at the transformer? Connecting to ground at the transformer (or at the incoming connection point, depending on local regulations) ties the return conductor to ground and effectively "neutralises" it. Because it presents a low risk of significant voltage on it the neutral lines are normally unfused. Why doesn't the neutral wire go back to the power generation plants. The diagram you provided hints at this. There is no connection between the three-phase, high voltage primary and the low-voltage secondary. The supply is feeding a three-phase transformer without a neutral on the primary side. The high-voltage network may be "floating" with no direct earth reference. This means that the distribution system can sustain a single earth fault on any one of its phases without causing an unplanned power interruption. This wouldn't be possible if the distribution system used a neutral as well. From the comments: I didn't understand the part about low impedance return path in the first part ... Imagine that we have the option of earthing the neutral locally or back at the power station. The short local cable might have a resistance of, say, 0.05 Ω to earth while the much longer cable back to the substation might be, say, 10 Ω. Now create an earth fault by touching a live wire to the metal case of an appliance. Let's say that 10 A flows to earth. What voltage will the case rise to? For the local earth \$ V = IR = 10 \times 0.05 = 50\ \text{mV} \$. This is very safe. For the power station earth \$ V = IR = 10 \times 10 = 100\ \text{V} \$. This is dangerous. The local neutral-earth link is safer. ... and the neutralising part of the 2nd highlight. To "neutralise" means to make something ineffective. To neutralise a current carrying cable means to remove its voltage or potential difference with respect to earth. We do this by earthing it. In your picture we now have four current carrying conductors, three of which have high voltage with respect to ground and one, the neutral, will have close to zero potential as it has been neutralised. So in order to minimize the potential of the appliance case in case of faults we need to choose the low impedance return path. Correct. 'return' - does it mean that the ground wire actually is a part of a loop (as if connect to the power station at some point). No. The transformer is isolating. There is no connection between the primary and secondary so no current flows from the house back to the power station. As far as the house is concerned the local transformer is the "power station". Ok, I now understand neutralising. So earthing an appliance is also neutralising. Isn't it? No, that's not quite the right way to think about it. There is normally no potential on the chassis or case of the appliance. They are not conductors. But you are correct that it prevents the chassis / case from achieving a high voltage. So only a conductor which is always at a potential can be neutralised? That doesn't make sense. If it's always at a potential then it can't be neutralised. Only if the supply would otherwise be floating can one of the conductors be neutralised. Let's look at a very simple example. simulate this circuit – Schematic created using CircuitLab Figure 1. (a) A floating battery. (b) An earthed battery. In (a) the battery is floating. There is no ground connection unless there is a fault and one of the wires touches something earthed. Then the other-wire becomes live. In (b) the battery negative has been connected to earth. It is grounded or neutralised and the other wire is 9 V with respect to earth. One of the advantages of neutralising is that no fuses are required in the neutral line as there is no significant voltage with respect to earth.
H: Do I need to care about mounting hole contact oxidation? I am designing a pcb which I have some mounting hole with the function to connect the mounted screw to the PCB ground. I found good resources about this subject in the blog, like this one and this other. However, there is one point that I am still in doubt: I was thinking about the possibility that, after a long time, the interface between screw head and mounting hole pad goes into oxidation. Just the correct screw tightening is enough to prevent oxidation process? Or there is specifics combinations of screw's material and pcb pad finalization I should choose to avoid oxidation? If possible, I would like to avoid golden plating, for cost reasons. AI: Eventually oxygen will migrate everywhere, having the terminals mated together will stop this process, but if there is a micro gap the oxygen is much smaller and will eventually diffuse into the gap. Get an ENIG coating instead of bare copper Or use deoxit and clean it periodically The real question is: is it going to affect your signal? resistance will but the worst thing is thermal noise from the junction. If you're not concerned about turning your junction into a thermocouple and only about resistance its probably not going to be a big deal, just size your contact bigger.
H: Code Composer Studio 6.1.0 debugger is not acting as it should I am learning to code on a microcontroller from Texas Instruments, MSP430FR6969 (link), using MSP-EXP430FR6969 launch pad (link). I am also using an IDE CCS 6.1.0 (link). I am doing a simple odometer, where the program counts from 0 to 99,999 and then resets again. code below #include <msp430.h> #define DEVELOPMENT 0x5A80 #define ENABLE_PINS 0xFFFE int main(void) { WDTCTL = DEVELOPMENT;//disable WDT PM5CTL0 = ENABLE_PINS;//this is needed in order to enable pins P1DIR = 0x01;//P1.1 is output P1OUT = 0x00;//port 1 = 0x00 unsigned int tnth, thou, hund, tens, ones; unsigned long km = 0; while(1) { for(tnth = 0;tnth < 10;tnth++) { for(thou = 0;thou<10;thou++) { for(hund = 0;hund<10;hund++) { for(tens = 0;tens<10;tens++) { for(ones = 0;ones<10;ones++) { km = 10000*tnth + 1000*thou + 100*hund +10*tens+ ones; } } } } } P1OUT = ~P1OUT;//I added a breakpoint there. km = 0; } return 0; } I added a breakpoint at P1OUT = ~P1OUT;, build it and debugged it like in the image below. When the debugger reaches the breakpoint, I see in the variable watch window ones, tens, hunds, thou, and tnth all equal to 10, which is what I expect. But I also expected km = 99999, instead I have km = 34463, which doesn't make sense as km is an unsigned long Also. When I modify the code and change unsigned int tnth, thou, hund, tens, ones to signed int, put a breakpoint at P1OUT = ~P1OUT build it and debug I get km = 4294936223 in the variable watch window. I asked the question in TI forum (link), and a member said that in my build "../main.c", line 16: warning #552-D: variable "km" was set but never used Kindly help me on this matter, and sorry for the long post. AI: Your MSP430 is a 16-bit machine, so the compiler is doing the (10000*tnth) as a multiplication of 16-bit numbers and truncating the result to 16 bits before continuing with the rest of the calculation. 10000 * 9 = 90000 = 0x15F90 truncate to 16-bits = 0x5F90 = 24464 24464 + 9999 = 34463 If you cast the 10000 integer constant to 32-bits with something like 10000UL and/or cast the variable with (unsigned long)tnth you should see your expected results. The warning for 'variable "km" was set but never used' is expected. You're assigning values to km, but never reading them back or using km in any other way, but this has nothing to do with your undesired behavior. When you changed your 16-bit data type from unsigned to signed, what happens is that the 34463 (0x869F) value is treated as a negative 16-bit value of -31073 (since the MSB is a 1). When converting this into a 32-bit value, it first gets sign-extended to a 32-bit signed value - so now it's 0xFFFF869F. But since you're putting this into an unsigned 32-bit integer variable this value is now represented as 4294936223.
H: H Bridge only working one way I have this schematic. My problem is it only turns the motor when I supply the 5v to the right transistor (Q2). I remove the 5v and put it on Q1 and nothing. I've replace all parts and still does the same thing. FQP27P06 has an Rdson at -10V, RFP30N06LE has Rdson at 10V. Is there something I am doing wrong? simulate this circuit – Schematic created using CircuitLab AI: Here is an existing h-Bridge circuit that I used in another working project. This one leverages a low-cost H-bridge IC, the Diode International ZXMHC3A01N8. Note the 22K bias resistors used in conjunction with the GPIOs. This circuit is driven by a low-power MCU, similar to your Arduino. The firmware always sets the two GPIO outputs to opposite states to switch the relay in one direction for like 30 ms., then switches them both back to the same state. Switching the relay to the other direction resets the relay in the opposite direction. You need to actively apply current flow to BOTH sides of the H-bridge to reverse it. In your original description, it sounds like you're just removing the 5 volts from one, assuming the other side will switch. My experience is you want deterministic control on both sides of this h-bridge. Also, depending upon your current requirements, you may be able to get away with a less expensive, much more compact H-bridge IC solution like mine. Hope that helps.
H: Component identification - do you know what are the values of these components? I am trying to identify the capacitance and resistance of two components that are soldered on a PCB. The capacitor below should be 10 nF according to the datasheet. But its code is not 103. What's the value of this capacitor? The resistor below should be 4k7 Ohms according to the datasheet. Then the band colors should be yellow, violet, red, and tolerance. But the third band is black instead of red. Then it is 47 Ohms instead of 4k7. Am I right? AI: The cap is 33nF (333 -> 33 x 10^3 = 33000pF) The resistor is 4k7. It's an odd-looking 5-band, so the 4 resistance bands are: 4701 (470 x 10^1 = 4700). The 5th band looks brown-ish, so probably 1% tolerance.
H: Amplitude Spectrum of FM wave from Bessel First order given the values for \$\beta=5\$, for the Bessel of the first order: \$ J_{0}(5)=-0.26, J_{1}(5)=0.34, J_{2}(5)=0.49...\$ in order to plot the amplitude spectrum of the FM wave, do you treat the negative numbers as absolute? The \$ J_{0}(5)\$ amplitude should be \$ |J_{0}(5)|\$ ? AI: If a frequency component has negative amplitude, it means 180 degrees phase shift for that component. If you only compare component strengths, it's ok to use absolute values.
H: Verilog assigning fractional value to integer I am new to Verilog, but have some coding experience in VHDL. While reading someone else's code, I came across the following part: genvar i; generate for (i = 0; i < 8; i = i + 1) begin : gen_for integer p = (66.0*i)/8.0; assign data[p + 1] = ... My doubt here is what will be the value of p rounded to? Will it be rounded to the nearest integer or to the largest integer < (66.0*i)/8.0 (floor operation)? AI: Whenever there's a decimal in an integer variable, it typically floors the value. So if the answer is like 8.25 for i=1, the answer would actually just be 8. Then at i=2, the answer will be 16.5 but with the integer variable will make it 16. And so forth. You could also execute the code and see what it does :)
H: Why should half-bridge driver have resistance in series with VCC? I am using the three of the RT9624A half bridge driver as part of a 3-phase motor control circuit. Everything was working well in testing until I got to about 80% duty cycle and one of the drivers started getting hot. Probing it found that the low-side output had gotten internally shorted to VDD. I looked back at the datasheet of the RT9624A and noticed that all the example schematics include a resistor in series with the VCC, apparently limiting current into the IC. Why is this necessary and is it always necessary? Could this have something to do with my failure? The datasheet does not seem to explain. I also notice that the datasheet warns that too small a bootstrap capacitance can lead to overcharging and damage the chip. They give a minimum of 0.1uF, and recommend 1.0uF. I have 0.47uF, which seems fine to me, but could I need a higher value? This is my circuit, with GHA and GLA directly wired to 51nC total gate charge N-type mosfets. At 12V, this makes 4.25nF, and with a PWM frequency of 20kHz, switching losses should be less than 100mW. The part handles up to 800mW, so that shouldn't be the issue. Edit: Although I haven't confirmed anything, I have several action items to prevent similar issues in the future. Adding gate resistors, and also fattening and shortening the gate traces to limit potential harm from inductance loops. Similarly reducing inductance of the SW/PHASE trace, and adding a schottky diode on the SW/PHASE node to prevent damage from negative voltage spikes. Currently my mosfet's body diode will be limiting those spikes to at worst -1.1V, but the RT9624A can only handle voltages below -0.3 for at most 100ns, so extra protection will help. If anything, based on my probing my circuit, I think it was low voltage produced by motor back EMF that might have caused the damage. This different datasheet says "Pulling HO more than –0.3 V below HS can activate parasitic transistors resulting in excessive current flow from the HB supply, possibly resulting in damage to the IC. The same relationship is true with LO and VSS. If necessary, a Schottky diode can be placed externally between HO and HS or LO and GND to protect the IC from this type of transient." The IR2301 specifically notes it is "Tolerant to negative transient voltage dV/dt immune" and says the VS/SW/PHASE pin can go as low as the bootstrapped voltage -25V, which in my case would be something like -8V. When dealing with a BLDC/3-phase controller, this is probably an additional feature that could be very useful. (and saved me this problem). This guide gives the motivation behind using a series resistor to not only bypass noise but also decouple the chip from the rest of the circuit. Accordingly, I will also be adding in the 2.2Ohm example resistance from the datasheet in between the battery power and VCC. I do find it interesting, though, that in looking at more than 10 other half bridge datasheets, not a single other included a series resistor on VCC. AI: That resistor in series isn't just a resistor in series. It is combined with that capacitor to form a low-pass filter. Notice that the resistor has a very low value in their example, just about 2 ohms. When the gate driver turns on the MOSFETs, it is going to suddenly draw a lot of current as it attempts to charge the gates as fast as possible. The resistor forces it to take it from that capacitor and isolates the VCC line from resonating/ringing. You want a larger capacitor so that your VCC takes longer to dip down. Since the VCC's sudden draw of current only happens for a short time, this will reduce the amount that VCC drops. Remember that with an RC filter, that capacitor will take time to recharge after VCC briefly discharges and so if you make your capacitor too large, it will take a longer time to recharge. Now, what happens if you don't have that resistor? Your driver will first draw from the capacitor, but the sudden inrush of current makes its way backwards along the power rail in the form of a voltage dip. When that dip hits the source (your regulator or another capacitor), it will likely reflect and become higher as it returns back to the driver's VCC pin. This oscillation could persist for some time and may lead to destructive voltages on the part, depending on the speed (frequency) of the draw on VCC and the geometry of the connection to your power rail (most every piece of copper is a a non-negligible inductor at 10's of ns gate speeds). Adding the resistor in series damps this oscillation (with a corner frequency of \$1/(2\pi RC))\$. In short, that resistor should be considered always necessary, though the value may vary and could depend on the capacitor value you choose. Another issue you might face is with the length of the trace to the gates from your driver. You must do anything you can to minimize the inductive loop between the gate signals, the GND terminal, and the SW terminal. Keep the copper carrying the signals short, fat, and as close to the other signals as possible. If you don't you'll get the same sort of inductive ringing that you could see on your VCC line and that too could destroy your part. I would recommend probing at two places: Your Vcc and your two gate signals. You might immediately notice the problem. Based on your failure mode I would suspect ringing on one of your gate lines is doing your driver in. I also would recommend simulating this circuit with parasitics as well if you have an accurate spice model of the RT9624A that includes VCC inrush. Represent the connection from your power rail to VCC with a small inductor (like 1nH or some other calculated value). Put small inductors on your gate lines (like 1nH or some value you calculate). Just see what happens.
H: RSET pin function of RTL8211E I'm using Realtek's ethernet PHY RTL8211E, but can't figure out what's the purpose of pin 'RSET', and how to connect it. The only datasheet I can find is here. It's wired I can't get that datasheet from the official web page about RTL8211E/EG. So, anyone can give some informations? AI: I'm using Realtek's ethernet PHY RTL8211E, but can't figure out what's the purpose of pin 'RSET', and how to connect it. The only datasheet I can find is here. On page 12 of the datasheet you provided, it says: And if you look at the high level circuit diagram on page 5, it shows the pin feeds a bandgap stage. So it looks like the resistor is part of the bandgap reference voltage generation for the internal voltage regulator. The bandgap stage (see here) offers a very precise voltage reference so that the voltage regulator provides a more stable output. This specific datasheet doesn't specify what the value for the RSET resistor should be. But after a bit of looking around, I found another datasheet, page 8 for a Realtek IC (PHY) which uses a bandgap reference as well and they use a value of 2.49k for that resistor. The regulator voltages are about the same for both ICs (1.05V vs 1.0V). That may be a good place to start .
H: What is the purpose of fifo in serialize of HDMI? I'm trying to understand and study about HDMI. currently I'm referring with here (https://www.fpga4fun.com/HDMI.html). But I'm confused that why does that fifo need for higher resolution? in case of 640x480, they don't use the fifo in example. but why does the fifo need for higher resolution? AI: At lower resolutions, your clock can be at a lower frequency which means that the timing requirements are relaxed when you place and route your design in the FPGA. The issue with higher resolutions is that they require a higher clock frequency, which in turn tightens these timing requirements. Let's say you wanted more resolution. What do you need to do? You need to increase the rate at which you feed data to your serializers. This is done by increasing the frequency at which you shift data out. As you increase your frequency, the clock period decreases and the amount of logic you can perform in that cycle also decreases. You also need your logic to be placed physically closer together on the FPGA. Your timing requirements just got very tight. Your design tool might not even be able to find a solution that fits on the FPGA since everything would have to be so close together and implemented in very few LUTs. The solution is to have a slower clock domain that "feeds" your fast clock domain. You put your complex logic in the slow domain and minimize the fast domain logic as much as possible. You then communicate between the two domains using a short FIFO to send lots of bits all at once from the slow domain to the fast domain. Another way commonly used to increase the datarate is by using hard IP blocks that implement the serializer for you (and "fifo" as well, though it's not necessarily exposed as a FIFO). These sort of things are very common these days on FPGAs (take a look at the GTP tranceivers on the Artix-7). You pass it tons of bits at a time (think 60, 80, etc) at some slow frequency and it shifts them out at a far higher frequency. Once you start requiring your data to be shifted out at frequencies exceeding 500MHz or 1GHz you absolutely must use FPGA with this kind of hard IP since FPGAs that can handle a <2ns cycle time on actual logic are quite expensive.
H: Difference between increasing microphone sensitivity and amplifying output signal in software I am a bit of a newbie to the audio world, so please bear with me. What would be the difference between getting a high sensitivity microphone and using a low/medium sensitivity microphone and using some software like audacity to increase the gain of the output signal? AI: From a really basic point of view: you can't amplify what you can't see. There's two things to that: Your microphone converts sound waves (changing air pressure) to voltage. The sensitivity is how much volts you get per sound volume. That voltage get digitized by some sound card to digital values; that means that some range of very low voltages get mapped to a discrete set of digital numbers. The less sensitive your microphone, the smaller the voltages, the more get mapped to a single value, for example 0. You can amplify zero all you like: it's going to stay zero. The same goes for all other digitization bins: The smaller your mic's output amplitude, the fewer of the potential "bins" get actually used, the more quantization noise you get. The digitizer in your sound card sees the voltage-converted sound signal, and it sees additional noise, for example from random electron fluctuations in its electronics, and from cables picking up electromagnetic waves etc. The lower the sensitivity, the lower the wanted signal, the worse the ratio between signal and that noise – you get bad SNR. You can't "solve" SNR afterwards: if you amplify, you just amplify the noise part as much as you amplify the signal part, so you lose. TL;DR: Can't recover information you never got.
H: How to map 0.40-1.87V to 0-5V? I cannot seem to wrap my head around this. I have read about using an instrumentation amplifier, however even then I am not sure how to use this in this scenario. Could someone explain to me how to: Map a voltage range of 0.40-1.87(V) to 0-5V Map a voltage range of X-Y(V) to 0-5V, where X is non-zero AI: The gist of it is basically this: Let's call the input range (X, Y), the output range (J, K). Then the 'mapping function' is as follows: $$ V_{\mathrm{out}} = {V_{\mathrm{in}} - X\over Y-X} \times (K-J)+J $$ You can easily derive it - what the division by the endpoints of one range does is it maps the input to some 0 to 1 range. Then you can 'stretch' it to cover the other range. Then just adjust for the offsets. The hardware implementation usually follows that pretty well. First, you get the difference of the input against the reference (\$X\$). Then you amplify it (by the \$K-J \over Y-X\$) and apply the offset \$J\$ if required. In your case, the \$X\$ and \$Y\$ are 0.40 V and 1.87 V respectively, \$J\$ is 0 V (no output offset relative to ground), and \$K\$ is 5V. So you just need to implement a thing that does: $$ V_{\mathrm{out}} = {V_{\mathrm{in}} - 0.40 \mathrm{V} \over 1.87\mathrm{V} - 0.4\mathrm{V}} \times 5\mathrm{V} $$ or $$ V_{\mathrm{out}} = (V_{\mathrm{in}} - 0.40 \mathrm{V}) \times {5\mathrm{V} \over 1.87\mathrm{V} - 0.4\mathrm{V}} = (V_{\mathrm{in}} - 0.40 \mathrm{V}) \times 3.4 $$ So. You just need to make a differential amplifier that measures against a 0.4V 'reference', and amplifies stuff by 3.4!
H: How to compute dissipation of switching regulator considering the input? I want to use a 5V 500mA to my circuit, also this will have a current spike for 1A. The input will be from 9V - 36V. I have reviewed the difference between the linear and switching regulator and obviously I should be using the switching regulator. How suitable is this switching regulator for my application with a real 36V input? https://www.digikey.com/products/en?keywords=OKI-78SR-5%2F1.5-W36-C This is on its datasheet. I know that switching has less power dissipation than linear, but how do you compute the power required, or power dissipation, power loss considering the input, ouput voltage and the output current on a switching regulator? Will I able to use it on 36V input to have a really 5V, 1A output? AI: At 36V input, 5V 0.5A output, efficiency is rated at ~80%. So to output 2.5W of power (0.5A*5V), you draw 3.125W (2.5W/0.8). Losses are 0.625W. Will I able to use it on 36V input to have a really 5V, 1A output? Yes, the output at 1.5A with 36Vin is represented below:
H: How to check (with DIY methods) if an Inverter returns a Square or a Sine Wave? I do not have an Oscilloscope, but I want to check if my 12V DC to 230V AC inverter does produce a sine or a square wave. Any way to verify that? I know how a sine wave and a square wave sound, so converting this to audio might be a possibility? Maybe with a transformer? Just some input ideas. AI: I would try a soundcard. Connect a resistive load (eg. light bulb) to the inverter. Wrap a piece of wire around one of the cables leading to the bulb (DO NOT CONNECT DIRECTLY), connect to mic input and try recording. You should be able to see how (un)clean the power is.
H: Watertight enclosures - what production steps are required to ensure no condensation on the insides? Background We want to waterproof an electronic device and the specifications call for IP-65 protection. To this end, we have selected a sealed polycarbonate box to put the electronics in. The external connectors are reduced to a minimum and we use automotive IP-67 connectors. We tested a few prototypes and they cope with submersion. I'm closing on any remaining issues that may cause water damage in operation. I'm worried that atmospheric air that gets trapped inside when the device is fully assembled might condense if cooled significantly. Especially if assembly is in mid-summer. It seems that this problem is tackled in the industry by displacing ("backfilling") the air in the enclosure with nitrogen, helium and/or clean dry air. I don't have any experience with these, but they seem to be expensive operations that only make sense for medium- to large-scale production, when you have the equipment required. Question What production technique can be used for small-scale production (10-100s/month) to keep the humidity of the air low enough so that it doesn't condense? Non-solutions The device has a display which needs to be visible through the transparent box, so condensation-resistance is a must. Conformal coating alone won't suffice. The device is battery-powered, so keeping the innards at elevated temperatures is also not an option. I've read the excellent question about waterproof enclosures and unfortunately the "leaks more on the bottom than the top" strategy cannot be used here. Moreover, its answer specifically assumes "this is not meant for production" :) AI: Use silica desiccant This is the stuff that often comes with clothes or moisture sensitive components in a little bag, often marked "do not eat" for some unfathomable reason. It's also used in some double glazing units to scavenge any moisture that does leak in, to avoid condensation. Silica desiccant is cheap and is available in bulk, or pre-packaged in little permeable bags. You probably want the bag, and you can stick it somewhere out of the way inside the case with a dob of glue or double sided tape. The desiccant will take up the moisture which is inside the box when it is sealed, and also any which leaks in over time. Eventually, it will saturate, and lose it's effectiveness, but if you use enough it will last a long time. You can increase the life of the desiccant by minimising the moisture in the box when it is sealed. Warming the whole assembly, or blowing with warm dry air will help. Doing the final assembly in a small room with a dehumidifier running would be an option too. It will also last longer if the seal is good. Once the desiccant is saturated, it is possible to dry it out again in an oven, and it may be helpful to do so before putting it in the box, to make sure it hasn't got damp sitting on the shelf.
H: Use crystal or oscillator for a Ethernet PHY? I've saw so many reference designs use just a crystal to generate the clock for ethernet phys, though they can be generated with a crystal oscillator too. Such as KSZ9021's 'XI' and 'XO' pin. Are there some special reason that a crystal is better than a oscillator here? Or just because crystal is cheaper than a oscillator? AI: If the PHY has a crystal driver built in, then using a separate oscillator just for the PHY is rather silly. A crystal with caps is usually cheaper, smaller, and takes less power than a whole separate crystal oscillator module.
H: Minimum Clock Period from setup and hold time I found several different answers to how setup and hold-time of Flip-Flops influence the minimum time between two rising clock edges. tclock >= Propagation delay + tsetup + thold tclock >= Propagation delay + tsetup tclock >= Propagation delay + Max(tsetup, thold) Which one of them is right? From my understanding, it should be the first version, but I've found some answers that say that hold-time doesn't change the clock speed. AI: The ambiguity comes from the fact that the meeting the hold time requirement depends on the propagation delay. If you assume that the propagation delay of the FF is always longer than the hold time, then the propagation delay assures that the hold time is met and tclock >= tprop + tsetup. It would be unusual for the propagation delay of a FF to be shorter than the hold time. There is of course extra complication caused by the fact that propagation delay, setup, and hold change with voltage and temperature, and you need to account for skew between the clocks at the source and destination FFs.
H: Do I need to connect the battery to send data to an ESP32 chip? This may be a basic question, but I'm really new to electrical engineering. I got an ESP32 chip with no micro-USB port. I got with the device a 3-Wire cable one side and USB other side. I have to connect these 3 wires respectively to TXD / RXD / Ground. So, to transfer data to my chip, do I must add a battery (connected to 3.3V and GND) to power it up ? Or just this 3-wires cable is enough ? AI: You need at least a battery or other DC power supply to power it up. You said you have a “chip” which sounds like just the ESP32 MCU without any supporting peripherals. You will also need a crystal and some means of programming the ESP32 MCU. Try searching for “esp32 minimal circuit”. There’s a lot of existing info available. For early stage prototyping, I would recommend getting a ESP32 dev board with USB so you have a working reference as a starting point, as they’re inexpensive and it will get you going faster with the basics, while you learn and prototype with the chip.
H: Calculate maximum Interface Speed 32 Bit 100 MHz I have a HSMC Interface which has 32 Bit width data word changing at 100 MHz. How is the correct maximum data throughput calculated? Is it just dataword_length / clock_period [bits/ns]. And then I will convert to MByte/s. This is a question on the raw data speed (signalrate). There are no protocol headers involved here. AI: Clocked 32bits wide clocked at 100MHz would be: 100E6 DWords per second. 400E6 Bytes per second. 3200E6 Bits per second.
H: Spectrum Analyzer Mode -- TX Duty Cycle With Time Domain? I have a basic Rigol spectrum analyzer that sweeps across a range of frequencies and displays the amplitude of the signal. When we go to a testing lab, their expensive spectrum analyzer has a mode where you put in a fixed frequency and it measures the duty cycles of your signal in the time domain. What is that time-domain / duty cycle reading called for spectrum analyzers? AI: Since the input frequency is fixed you can set the spectrum analyzer to this frequency and then change the X-axis to display amplitude over time instead of over frequency. This mode is called zero span mode. Here's an example: The X-axis shows time from 0 (trigger point) to 10 ms The Y-axis shows the signal amplitude Note the "Span 0 Hz" in the bottom right corner Here the signal(s) are present at 3 MHz in a 3 MHz (-3 dB) resolution bandwidth. So signals between 1.5 MHz and 4.5 MHz show with nearly the correct (less than 3 dB attenuation) amplitude.
H: FT2232H current consumption at 3.3V calculation I would like to estimate the current consumption of the FT2232H chip and I have some unclear issues with it. In the chip's datasheet, it says the current for each voltage rail(except VCCIO). In Digikey and a reference design that I have found it says that the chip current supply is 70mA at a supply of 3 - 3.6V - I think it might be a mistake. because the datasheet says the same current supply for the VCORE voltage rail (Icc1) Also, the datasheet doesn't mention VCCIO's current supply. Is it possible to calculate the current consumption without this parameter? How did Digikey calculate it? I would like to calculate it by myself. How can I do it? Thank you very much! AI: As mentioned in the comments, probably 100ma. ps: never rely on the parameters provided by digikey/fernell/etc, theyre just a rough guideline to help you search. Many parts have wildly incorrect listed parameters, or just dont have any. edit: as chris says, remember that these are typical figures. They will vary as the chip does its stuff. Notice that no maximum current is given for the core, but we can infer what the maxmimum could be by assuming that the regulator will always be able to handle it, meaning that it must be <90ma (150-60). If the core does require more than this in normal usage, it would probably malfunction often, and no-one would buy it.
H: Using RTC DS1307 in multiple programs I'm kinda new to electronics and programming, but I managed to make a DS1307 RTC functional when it is used by only one program (I'm using C code). Buf if I try to use it in multiple programs at the same time, it occasionally gives me some strange dates and times. For example, I'm using these two programs: test.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include "ABE_ExpanderPi.h" void main() { int i = 0; while( i < 100 ) { struct tm datetime; char buffer[80]; datetime = rtc_read_date(); if (strftime(buffer, sizeof buffer, "%Y/%m/%d;%H:%M:%S", &datetime)) { } else { puts("strftime failed"); exit(1); } printf("%s\n", buffer); i++; usleep(10000); } } test2.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include "ABE_ExpanderPi.h" void main() { int i = 0; while( i < 100 ) { struct tm datetime; char buffer[80]; datetime = rtc_read_date(); if (strftime(buffer, sizeof buffer, "%Y/%m/%d;%H:%M:%S", &datetime)) { } else { puts("strftime failed"); exit(1); } printf("%s\n", buffer); i++; usleep(10000); } } The DS1307 functions can be found in ABElectronics_C_Libraries. When I run both at the same time, it shows me something like this: ... 2018/07/11;19:07:53 2018/80/40;05:06:92 2018/80/40;05:06:92 2018/07/11;19:07:53 2018/80/40;05:06:92 2018/07/11;19:07:53 2018/80/40;05:06:92 2018/07/11;19:07:53 2018/80/40;05:06:92 2018/07/11;19:07:53 2018/07/11;19:07:53 2018/07/11;19:07:53 2018/07/11;19:07:53 2018/07/11;19:07:53 2018/07/11;19:07:53 2018/80/40;05:06:92 2041/53/02;90:12:90 2018/07/11;19:07:53 2018/80/40;05:06:92 2018/07/11;19:07:53 2018/80/40;05:06:92 2018/07/11;19:07:53 2018/07/11;19:07:53 ... In my project I will be using the RTC more than twice at the same time. Can you help me, please? AI: The problem you are having is one of concurrent access. Both processes are reading from the same file and so depending on the OS, one process gets a few bytes, then the other one, then the other one, etc. The mistakes will be seemingly random and based off how the OS schedules tasks to run. So the nice tidy sequences of date-time information from the DS1307 is getting chopped up and divided between the two processes, resulting in nonsense for both. I would recommend looking into a shared memory solution. You would have a single process that is allowed to call rtc_read_date that places "messages" in a FIFO structure in shared memory. Then all the other processes that need date-time information could take the "messages" from the FIFO structure. This is not exactly trivial for a beginner but would be great to learn. Looking through this repository would be a good start.
H: Long distance button I have always had problems with my wireless doorbell solution. Since my driveway is around 50m (160ft) the signal is never quite strong enough to trigger the bell all the times. So I was thinking about creating my own wired solution, but my question is how I would make this work. Would a let’s say 5v DC signal be able to travel this distance and still be picked up by a microcontroller? Or is there maybe a better way to make this happen (using AC and converting it to DC at the gate)? AI: 5V signal is sufficient to make travel till the end of 50 m but you cannot connect that directly to your micro controller. Best thing is to isolate the noisy weak digital signal from the MCU port. One way is to use optocoupler as mentioned by Michael. You can use say from example below circuit. Replace 3.3 V (only the one connected to R1) with your 5 V supply and a series switch at the entrance. Choose a optocoupler with good CTR (current transfer ratio, higher is better) The optocoupler will turn on(the internal LED) when you close the switch It will in turn, turn on the transistor. Microcontroller will sense it because now the output is shorted to ground via transistor in the optocoupler. Microcontroller can run with independent supply. (3.3 V) for example. You have isolation between signal and MCU.. Hence there will never be pseudo triggering of the signals due to voltage coupling because of a generator close by or some power spikes.. When switch is closed a finite current will flow through the series resistor and the LED in the opto coupler. Choose R according to optocoupler data sheet. You can also use higher voltage (instead of 5 V) there by reducing ohmic losses in the cables. This idea is feasible with just a battery for 5V side. Because the current will flow only when the user activates the switch.
H: Qi charging multiple devices with single transmitter I am looking for a Qi charging compliant transmitter and have found kits from different manufacturers like ST/TI/Microchip. These kits have one receiver and are tuned to work together. How can I build a transmitter (chip+coil) such that I can transmit power to multiple lower power devices with one transmitter? I haven't been able to get much information on how that can be done. For example, to use a 15W transmitter to power four 3W receivers. Can the transmitter communicate with all devices under the Qi protocol? Will this boil down to designing the coil appropriately or there needs to be support from the transmitter chip as well? AI: The Qi technology doesn't allow for multiple devices on a single transmitter. There is considerable handshaking between a transmitter and receiver. The receiving device transmits control information to the transmitting device, which then adjust its own power transmission parameters. This repeats, if I remember correctly, every 250 ms. In this way, the power transfer can be optimized with single-direction communications. There is nothing in the Qi spec that allows for multiple devices or device addressing, and so multiple receiving devices would simply try to talk over one other's transmissions and break the control loop. The communication method is pretty clever! The receiver varies the impedance of its own coil by switching in capacitors onto the resonant circuit. These perturbations are seen by the transmitter as differences in current through the transmitting coil. Here is an example from TI's BQ51003 datasheet:
H: Do ferrite beads need snubbing diodes? Inductors, when applied as inline power filters, need a parallel snubbing diode so that when the load opens, the current can be safely discharged. In certain contexts, ferrite beads such as the Laird 28L0138 series can be used as inline power filters. These have nonlinear, mixed inductive/resistive properties dependent on frequency. Since there is some inductance in ferrite beads, should they too have a snubber, or is their internal resistance adequate to discharge current after an opened load? AI: Since there is some inductance in ferrite beads, should they too have a snubber, or is their internal resistance adequate to discharge current after an opened load? Short answer, No. Why? because ferrite is a magnetic material with a saturation point (whereas coils with air do not saturate magnetically). Ferrite material also has more magnetic resistance and is lossy. So you will store less energy. The internal resistance will help dampen out sharp rises associated with "instantaneous" changes in current. There will however, be some ringing at high frequencies (as shown in figure B below) when used with a capacitor in a filter, and there are better ways to compensate the circuit (Method C) to avoid overshoot. Source: http://www.analog.com/en/analog-dialogue/articles/ferrite-beads-demystified.html
H: Is it Possible to control LED with arudino pins combined with PWM from IC? What I'm looking to make is a multiplexed 16x16 LED grid with with 2-bits of brightness (aka 4 levels of brightness). There might be a better way to do this. I've built a prototype 8x8 grid with an Arduino Nano, it works great. I have 8 pins to connect the anodes and 8 pins to the cathodes. I'm using 3v 20ma 5mm LEDs But, since arduino only has 6 PWM pins, i can't get the resolution I want. I'm looking to get more pwm pins I'm looking at the ADAFRUIT 24-CHANNEL 12-BIT PWM LED DRIVER, which gives 24 pins of PWM over SPI. While 8x8 I can do on the board, if I wanted to do a 16x16 matrix while connected to the Arduino. Is it possible to use pins from the LED driver to run the anodes (16 of the 24 pins) with PWM while using 16 GPIO pins on the arduino to run the cathodes (to get more pins for multiplexing)? From my experiments, only the anode needs PWM while the cathode just needs to be high or low for multiplexing. Would the VCC for the Driver need to come from a power supply? Thanks! AI: When you make a grid of LEDs that need to be multiplexed you will not be able to make PWM work to set the brightness level for each and every LED. The reason being that the multiplexing is already chopping each LEDs visible time to some low duty cycle. With your 8x8 grid that already means that each LED is only ON for 1/8 of the time. If PWM were to have any meaningful effect during the interval that the LED is on it would have to (a) be synchronized with the multiplexing rate and (b) be running some factor faster than the multiplex rate. Since you already want the multiplex rate to be quite fast so the LEDs do not look like they are flickering it seems like PWM idea is not going to be particularly useful. I think a better approach will be to run your matrix row multiplex anodes with a transistor that pulls the LED anodes to the supply rail. Then have two sets of column bits, each one with a different sized resistor selected so that the two column bits can set the 4 possible combinations of the series resistors to GND. This will let each LED on time have a current setting suitable for the brightness selection for that LED. (Interestingly you will want to probably support an LED off state so in reality with two sets of column bits you would only really get three possible brightness levels). Another couple of things to keep in mind: When multiplexing LEDs where they end up having a low duty cycle like 1/8 it is necessary to over drive the LEDs at greater current than their nominal steady state current. You could foreseeably use three sets of column bits to get to 7 total brightness levels plus the off level. LED brightness is not linear with duty cycle. This shows the concept in schematic form:
H: Question regarding ripple factor For the pictures above, I am confused as how to how they got/derived the formulas for the peak to peak ripple voltage (VrPP) and Vdc. So far, I got the output voltage, which is 14.9 volts. However, I am also confused with that VrPP and Vdc mean as well. Another question: How exactly do the ripples occur, and what would happen if there wasn't the resistor (RL), or a resistor when there's a capacitor? AI: The non-technical answer: Ripples occur because the input is alternating current. 60 times per second the voltage goes from zero to maximum (~1.414 * 115 VRMS, because RMS is sort of an average, rather than the peak, ~163 V), then back to zero and then to -163 V (below zero). The full wave bridge rectifier "flips" the negative portion over to positive, but the input now is going from 0 to peak voltage on each half cycle, 120 time per second. The job of the capacitor is to store some electricity from the peaks to fill in the gaps where the voltage falls below that peak. With no load at all, i.e. no resistor, the capacitor would charge to the peak voltage and stay there with no ripple. Because the resistor bleeds out some charge, the voltage drops a bit between peaks, as the graph shows, and then the charge is replaced when the input goes up again. Put simply, a larger capacitor can store more electricity to better fill the gaps. A smaller resistor allows more charge to flow, so the voltage drops more from the peak value. If your teacher has mentioned it, include in your calculation that there's a voltage drop inside each leg of the rectifier, about 0.6 V for each if "ordinary" silicon (Si) diodes are used (as opposed to Ge, SiC, CuO, Schottky Si, etc.). Since there are two in series in each direction, that's an additional drop of ~1.2 V below the peak output of the transformer.
H: Why I2S is better for transmitting audio compare to SPI I am trying to understand why we use I2S is better for transferring audio than SPI as I2S has less bandwidth compare to SPI. AI: There is a lot more to audio than bandwidth. The way I2S works, the data are provided just in time to be converted to analog. So the I2S DAC or codec doesn't need to buffer data or maintain any type of complex synchronization. It relies on the incoming clock to determine the sample rate. This also means that the data must be sent continuously, meaning that the I2S bus will be completely utilized at all times while audio is playing. If you wanted to use SPI the same way, you would have to run it at exactly the right rate, always delivering data just in time to be converted to analog. This means that the bus would be 100% occupied during audio playback and unavailable for anything else. Otherwise you would need to work out a complex buffering scheme and hardware flow control to tell the host when to send more data, etc. I guess a simple way of answering the question is that I2S is specifically deisgned to send audio to a DAC. SPI is more general purpose. Most SPI implementations do not support the type of fine-grained clock speed control that would be needed to interface directly to a DAC the way I2S does.
H: Double the voltage did not double the amps? I have two brand new AA batteries. I measured the voltage and current of each battery and they are both 1.5v and 5A respectively. I connected these same batteries in series and I measured the voltage. I expected the voltage and current to increase to 3v and 10A respectively. The voltage doubled to 3v as expected, but the current only increased to 7A. Why didn’t the current double? I didn’t add any resistance I just doubled the voltage. AI: You put two batteries in series so that doubled the resistance. Each battery has an internal resistance, so you need to include that effect. If you measured the current directly across the battery, then you were lucky you did not damage your meter - you should have a load in the circuit - even just a bulb will suffice.
H: Using a multimeter, can I tell if a lithium-ion battery pack is brand-new? A few years ago, I ordered a replacement cell phone battery from Amazon, and while it worked, it didn't last as long as I expected. I wondered if the seller had scammed me by selling me a battery that had been previously used, so it gone through a few dozen (or hundred) discharge cycles and had a lower capacity than a new battery would have. That phone is long-dead by now, but I still wonder: was there some way I could have tested the battery when I received it, to tell if I had truly gotten a new, never-been-used battery as advertised? In my attempts to search the previous questions here, I've found several references to internal resistance increasing as a lithium-ion battery pack ages, so that's a partial answer to my question. But I still have two things I haven't been able to find answers to yet: 1) Would all lithium-ion battery packs have the same low internal resistance if they are new? (Or at least, all battery packs intended for use in smartphones, which means their physical size and voltage will be roughly similar to each other even though there will be some variance.) Or do different lithium-ion batteries vary too widely for this question to be answerable without a model number? (In which case I would have to find the manufacturer's data sheet for that battery to know what its internal resistance should be when new.) 2) Can I measure that internal resistance with a multimeter, and if so, how? Can I simply set the multimeter to resistance mode, then touch the red probe to the battery's positive terminal and the black probe to the negative terminal? And a sub-question: is this safe? As I understand multimeters, when in resistance mode they put a small voltage across the probes, so that a trickle current would pass through the battery. I don't think that this would be dangerous to the battery, but I'm certainly no expert. (I understand enough about electronics to know that V=IR, and to know how to use a multimeter, but that approaches the limit of my knowledge. I'm a software developer, not a electronics engineer.) So if this is dangerous and I shouldn't do it, I'd rather find out now than by having a battery explode in my face. :-) NOTE: The question I'm asking is close to How to measure capacity of a Lithium-ion battery, but I'm coming at it from a slightly different approach. I want to know whether I can tell if the battery is new if it's been heavily used (where "heavily" is a little vague, but I'd define it as "enough to make a significant, measurable difference when compared to a brand-new battery of the same type"). Maybe measuring the capacity is exactly what I need, but I'm too ignorant to know how to interpret the capacity results to tell if the battery is new. If that's the case, please feel free to close this question as a dupe, but I'd appreciate a brief explanation of how I should interpret the capacity results. :-) AI: Whether a battery is brand new should be detectable from quality of housing and printed datacode. However, determining if a battery is "brand new" in not a very useful parameter. Manufacturers of smartphones/tablets can use different sources for Li-Ion batteries, and after-market batteries may have a different (even a bigger) "rated" capacity than the original battery. However, actual capacity of Li-Ion batteries varies depending on charge-discharge rate, and battery temperature. So the results of measurements might disappoint. Regarding the question (1), no, according to Battery University article, BU-902: How to Measure Internal Resistance, the DC battery impedance is not a very good indicator of battery SOH - State of Health. The impedance would go down significantly when the battery is really EOL. Regarding how much the internal resistance varies from one battery of about same size, yes, it differs for "low discharge" batteries as compared to "high-discharge" batteries, this is one of design parameters. The same article also explains how to measure internal resistance of a battery. Your idea of measuring it with DMM in Ohmmeter mode is absolutely wrong. The article also explains that the battery equivalent model has more than one impedance, depending of load frequency you will get different results. The simplest approach is to measure the lump DC impedance, but it is a poor indicator of battery health. Finally, no, you can't tell if the battery is good with simple DMM measurement. The only right approach is to measure the actual battery capacity under conditions specified by manufacturer, using approaches as explained in the linked SE answer. And then compare the result with either advertised capacity, or to batteries with similar size and construction. A load of information about actual performance of batteries can be found on this website, lygte-info.com
H: Do I need a BMS for Li-ion batteries connected only in parallel? I have a device that runs on a single cell Li-ion / LiPo. The physical case for that device allows me to put in one to three 18650 cells. Unfortunately given the disposition of the cells, I can't buy a 2 or 3 pack already assembled. The device already has a charging circuit. The maximum load will be 300 mA and the maximum charge current will be 500 mA. Given the above, if I connect 3 cells in parallel (1S3P), do I need a BMS (Battery Management System) or any additional protection circuit? I'll take care to have them at the same voltage level before connecting them together to avoid current flow between the cells. TL;DR; Does a 1S3P Li-ion 18650 pack need a BMS? AI: Depends. What do you want the BMS to do? When I design a BMS, the first thing it does is safety: Temperature monitor for charge/discharge Over current events (with a software fuse) Charge control stopping over discharge events The only other tasks a BMS will do are things like: state of charge some basic functionality (if you're doing something very basic, complicated functionality should be taken out of the BMS to make sure the safety tasks are taken care of) cell balancing (if you have a series pack of cells) So, as you have your charger outside the BMS, the question is how safe do you want you pack to be? If you're selling it, then you need a BMS as safety is (should be) paramount. If it's just for you, you know what you're doing, and you can control the environment, charge and discharge patterns and all that, then there is no reason to have any BMS at all. Personally, I'd say yes you do. But if I'm quickly throwing something together, I have been known to go without.
H: Why does a fault lead to increased reactive power demand? When we have a fault, say on one line out of three, the reactive power demands increase, which leads to voltage instability if the source can't provide it. My question is, what causes reactive power demand to increase? Reactive power depends on frequency and frequency in power systems is always fairly constant. This concept is quite confusing to me. AI: The reactive power loss in any short, lossless transmission line is given by, \$\Delta Q= \frac{P_{flow}^2+Q_{flow}^2}{V^2}\times X\$ where \$P_{flow}\$ and \$Q_{flow}\$ are the active and reactive power flow in the line. Now let us analyse Pre-fault The power flowed from bus1 to bus2 is divided on 6 lines. Which means that the power flow in each line is 1/6 of total power (\$P_{total}\$), assuming that all lines having same parameters and length. This \$\frac{1}{6} P_{total}\$ flowing in each line will not lead to much voltage drop and reactive power losses in each line. Post-Fault When three lines are tripped, the total power \$P_{total}\$ will be redistributed among all lines. Again, assuming that all lines having same parameters and length, the share of power flow in each line \$\frac{1}{3} P_{total}\$ which means double of power flow, and hence (from equation above) almost \$2^2=4\$ times more reactive power losses compared to pre-fault case. Moreover, the voltage drop across the lines will increase as total impedance of the lines is significantly increased (doubled in case of same parameters and length) after fault occurred compared to pre-fault case.
H: Understanding Vgs(th) on a datasheet I am trying to understand the Vgs threshold on this datasheet. it says that the maximum is 1.45v but I have switched with 3.3 from a microcontroller. am i damaging the mosfet using this voltage? AI: Maximum voltages and other limit values are specified under "Absolute maximum ratings" usually: - So the gate-source voltage should not exceed + or - 12 volts and, as a design recommendation I'd keep below +/- 10 volts. And, if you look at the forward characteristic of the device here: - There is very little reason to go to a gate-source voltage beyond 5 volts. If you need that extra bit of conductivity with higher than 5 volt operation on the gate you should consider a better device.
H: How to calculate MOSFET internal gate resistance? I was trying to figure out how to calculate the internal gate resistance of the MOSFET. For the purpose of analysis, Let's take the MOSFET as - BUK7Y3R5-40E From most of the documents I read, best way to get the internal gate resistance is to measure it out. With my current circumstances, I would like to go with a mathematical calculation but I could not find anything as reference. Can someone suggest how to do calculate the MOSFET internal gate resistance. If it is difficult to calculate the value accurately, any approximation will be sufficient. AI: You can extract some typical values from the SPICE model for the MOSFET you have in mind. For example, for the one you mention in the question the model has the following lines: LG GATE 1 7.81292696075128e-10 RLG GATE 1 1.96360271543439 So the gate acts like it has about 2 ohms in series with 0.8nH
H: Is it really the Power required for comparing input and output? Hi I want to drive a 5W (5V*1A) output... Can it be carried by a 10W input (15V*0.670A) ? Is it just the power needed? Or should I need a larger current than 0.670A ? Is this applicable for LDO Regulators or/and Switching Regulator? AI: The power output for any voltage regulator cannot exceed the power input. That's a fundamental rule of nature. In the real world, the power out is less than the power in. The ratio of power out to power in is the efficiency of the regulator. A switching regulator can have a higher output current if the output voltage is less than the input voltage, or can have a higher output voltage if the output current is less than the input current. However, a linear voltage regulator must have a higher input voltage than its output voltage and a higher input current than its output current. That means that the efficiency of a linear regulator is usually much lower than a switching regulator.
H: Transfer function of a bandpass i was doing some homework and one thing I had to do was to derivate the transfer function of a given bandPass. I have done it myself but i dont know if it is correct nor if i followed the right path / right assumptions. I'd be happy if someone of you could look at it and give me some feedback. Important: In my notes Ua = V(out) and Ue = V(in) the rest should be (I Hope) self explanatory.This is how I've done it: And this is the bandpass: Thank you in advance! AI: I have done it myself but i dont know if it is correct nor if i followed the right path / right assumptions. Yes, it appears to be correct and you have followed the right path. Apart from the number "1" missing on the first line - you put \$j\omega C\$ rather than \$j\omega C_1\$. You also omitted brackets around the top line numerator but corrected that in the denominator. I derived it my way (to avoid me being influenced) and got the same answer. I'd be happy if someone of you could look at it and give me some feedback. Feel Happy! Here's my scrappy mess: - This is why you should take the time and use Latex!! The very bottom line is me just checking the j terms match yours.
H: Battery Life Calculation, Sleeping and Wake modes I have a circuit that consumes 1.6μΑ during sleep mode and 40mA during awake mode. The awake period lasts for 3 seconds and the circuit is on awake mode every 30 minutes. The circuit is powered by this battery (the link leads to the datasheet). I used this battery life calculator because i do not have the knowledge to do the maths on my own. I know that as the circuit working the capacity of battery is decreasing as well as the voltage. But as the battery voltage is decreasing there are a few components that cant work under 3.0 volts. I am trying to say that there is point where the battery will be capable of feeding power the circuit but some components are not going to work because the voltage will be lower than their voltage threshold. For example, if i have a battery at 8500mAh 3.6V and at 2.9V are still left 1000mAh i dont care because my circuit doesn't work at 2.9V. Is the rest capacity "wasted"? Is that thought wrong? Does the attached calculator take care about that too? Because i didn't see in the equations nothing about voltage. Many thanks AI: This isn't that hard that you need an on line calculator. First determine the average current consumption: In sleep mode, the current (1.6 uA) is so much smaller than the wake mode current that we can assume that this 1.6 uA is used 100% of the time. In wake mode we have 40 mA for 3 seconds every 30 minutes = 30 * 60 = 1800 seconds. That is a duty cycle of: 3 / 1800 = 1/600 = 0.00167 So those 40 mA peaks average out to: 0.00167 * 40 mA = 66.7 uA Total average current consumption: 1.6 uA + 66.7 uA = 68.3 uA Now we look in the datasheet to see what battery capacity that gives us given a discharge to 3.0 V. The nominal capacity of this battery is 8.5 Ah. Let's look in the graphs if that is the value we can use. Battery capacity decreases with increasing load current but the load current for that 8.5 Ah is 4 mA, a lot less than the 68.3 uA we need. So yes, we can use the 4 mA value, our 68.3 uA is so small that the battery's capacity is not deteriorated by it. From graph 1 we can determine to which voltage the battery is discharged in the capacity test. All curves are quite flat above 3.0 V so when the voltage is below 3.0 V then the battery is quite empty already. So that 8.5 Ah is valid for discharging to 3.0 V. So let's continue with that 8.5 Ah. 8.5 Ah means the product of current and hours is 8.5 Ah. So: 8.5 Ah / 68.3 uA (from above) = 124451 hours = 5185 days = 14 years ! In practice batteries for long life applications are often only guaranteed for a 10 years lifetime. The 14 years exceeds that. So when used in a product you should instruct the user to replace the battery every 10 years for optimal performance.
H: Arduino VIN and usb toggle circuitry Link to the schematic on arduino's website.From my understanding there is a comparator circuit in the arduino Uno schematic which turn off USB supply when there is a Vin present of greater than 7V by switching the PFET off. What I don't understand is why there is the need for the comparator circuit? Is it just to ensure that the Vin voltage is never below 7V? To ease with cost could you not simply plug in the vin into the gate of the pfet. That way if it goes low the pfet would turn on and vice versa? Also the LDO's connected to the Vin won't work anyway when the voltage is below 7V. Is this to prevent damaging the design if you put loads of volts across the vin and burn the fet? AI: The comparator circuit serves one simple purpose. If the board is connected to external power supply of greater than 6.6 V, it receives the power from internal +5V LDO, and disconnects the +5V rail from USB connector. If the external power is not connected or is too low, the board becomes "bus powered" and receives +5V from USB VBUS. The purpose of PFET is to prevent voltage backdriving current into the USB source on USB VBUS pin in self-powered mode, which is prohibited by USB specifications.
H: Effect of large capacitor for differential channel in S-parameter simulation I have created a differential channel with Transmission line and interconnects for simulation. In the real channel, there is 100nF capacitor in between 2 transmission lines. Now the problem is when I put this capacitors in series while connecting the transmission line (TL), I see very steep transition of S21 as well as S11 at low frequency (around kHz level). but If I remove the capacitors the transition is not there at those very low frequencies. I am not sure why is this transition happening at low frequencies while capacitors are placed? I have given the pictures below: Simple block channel with capacitors: S21 and S11 for the channel with capacitors: Simple block channel without capacitors: S21 and S11 for the channel without capacitors: AI: Your transmission line has an impedance of (possibly) 50 ohm and it is terminated in 50 ohm hence the two capacitors (net value 50 nF because they are in series) form a high pass filter with the 50 ohm load of the t-line. The 3 dB point of 50 nF and 50 ohm is about 63.7 kHz and pretty much occurs where the slope is in your first graph.
H: Capacitively coupled shunt resonator The diagram below shows a capacitively coupled parallel RLC resonator. Through simulations I observe that C2 and C3 influence the resonant frequency . I'd like to obtain the analytic expression for the resonance and eventually calculate S parameters. What would be the good approach to analyze this circuit ? simulate this circuit – Schematic created using CircuitLab AI: This kind of circuit very often has a high-Q resonator (R1,C1,L1) matched to low-impedance source and load (Z0) where Z0 is a pure resistance. Pushed to an extreme (Z0 << R1), you can estimate the resonant frequency of the network by simply paralleling C1,C2,C3 (add their capacitances). The resulting resonant frequency \$ \frac {1}{2 \pi \sqrt{L_1(C_1+C_2+C_3)}} \$ will be lower than that of \$ \frac {1}{2 \pi \sqrt{L_1C_1}} \$. For the somewhat more general case at resonant frequency where Z0 value is similar to R1, you can find the series-to-parallel transform, changing the series network of Z0,C3 to its parallel equivalent Rp,Cp: \$R_p =\frac { Z_0^2 + XC_3^2}{Z_0} \$ \$XC_p=\frac{Z_0^2 + XC_3^2}{XC_3} \$ The network then becomes (at resonance) a simple, parallel RLC of lower Q than \$ R_1 C_1 L_1 \$. Keep in mind that far from resonance, these transforms must be re-calculated for every frequency. This network's basic form is a high-pass filter.
H: Is this a 0.25% "precision" bleeder resistor? In the AC input section of a PCB, I found a resistor (in parallel with an X capacitor) with 5 color bands: BLACK - GOLD - YELLOW - GRAY - BLUE(LIGHT BLUE) Sorry because now I do not have anything to take a picture of it. It's probably rated 2W and the PCB is made in Japan. If I interpret it from left to right, the result is a 400 MOhms 0.25 % resistor. This is clearly wrong for a bleeder. If I interpret it from right to left, the result is still unreasonable(68.4 Ohm). The precision is unknown as black isn't coded for any tolerance. How should I interpret this resistor ? AI: It is a 680K 5% resistor. You're reading it backwards. The black band is over the end cap, and should be on the right-hand side when reading the resistor. It is just to indicate orientation. Fairly common on Asian parts.
H: Ethernet transformer saturation at low frequencies I am using a 10/100BASE-T Ethernet transformer TG110-E050N5RL (Circuit A in the datasheet) in a circuit. I am applying a 60 Hz 500 Vac hipot across C9 (T1 pin 16 and T1 chassis ground) as shown here: . Pin 14 is open, to simulate a test stand failure. Nothing is connected to T1 pins 9, 10, 11. I am seeing nothing -- flat, 0 Vdc -- on the corresponding secondary, T1 pins 1 and 2, with a scope during hipot. My best guess is that core saturating because of the very low frequency of the hipot signal relative to what the transformer was designed for, but I am surprised that I am seeing nothing at all. I have measured the windings' resistances, and the windings do not appear to be damaged. What, if anything, should I be seeing? AI: Consider that the transformer windings have inductance of 0.4 µH, from the specs you provided, and the capacitor is 1,000 pF. At 60 Hz, the capacitive reactance is ~2.7 MΩ and the inductive reactance is ~150 µΩ. Calculate the ratio -- how much voltage is across the capacitor and how much across the inductor? BTW, if you were to put a spark gap, perhaps 0.5 mm, in series with the HiPot supply, you probably would get measurable RF voltage out.
H: Altium 18 multi-board design. How to connect 2 PCB's with a pin header? I am trying to use Altium's multi-board design tool to connect 2 PCB's. The PCB's will be connected with a right angle, male-male pin header (shown in image below). Bottom PCB: Motherboard                   Top PCB: Daughterboard My project structure looks like this: Project.PrjMbd Source Documents Project.MbsDoc Project.MbaDoc Daughterboard.PrjPCB Source Documents Daughterboard.SchDoc Daughterboard.PcbDoc Motherboard.PrjPCB Source Documents Motherboard.SchDoc Motherboard.PcbDoc I intend to join the two boards using only one pin header. The trouble is that both boards need to have the header library component so that the correct pads and nets are connected. Does Altium have a mechanism for doing this? EDIT: I do have the System:Connector parameter added to the header library component. AI: I would make a footprint on either board with no 3d component installed and ensure the pins match. Multiboard connectors need a special parameter to link properly. Add the following to both connectors "ParameterName: System, ParameterValue: Connector". Then the MBA should find the pins and walk you through the rest. A 3d component shouldn't be required for this to work
H: Calculating Resistance Can somebody tell me why R_o2 is RD Why dont we take Rs into consideration ? Their answer is Ro2=vt/it = Rd My question is why didnt they take in consideration Rs and the current source? AI: In your diagram, we can see a voltage controlled current source. The control voltage is \$V_{GS}\$. And \$V_{GS}\cdot g_m\$ current can only flow if \$V_{GS}\$ voltage is larger or smaller than \$0V\$. But in your circuit \$V_{GS} = 0V\$ therfore \$V_{GS}\cdot g_m\$ also must be zero. The situation will be different if you add \$r_o\$ resistor between the drain and the source terminal. In this case \$V_{GS}\$ is no longer equal to \$0V\$. Because now \$r_o\$ provides a path for a current from \$V_t\$ to GND. So the voltage at \$V_S\$ is larger than \$0V\$ I/O Resistance of common source MOSFET with source degeneration
H: What is the difference between MCU and TTL screens? I'm trying to build a HDMI decoder board for a 4in 480x800 IPS display. I found an HDMI decoder board on adafruit(https://www.adafruit.com/product/2218) which says it works for most 40pin TTL displays. The display I'm intending to use has 51 pins and says it has an RGB/MCU interface. I'm trying to look at the schematic and see if I can modify it and make a board that accepts the additional pins of my display but I'm not sure what the difference is between MCU and TTL? I know the chip used on the adafruit decoder board (TFP401) supports both screens since I have an off-the-shelf 4in IPS display that uses that same chip. Here is the datasheet of the display I plan to use: https://www.scribd.com/document/383775532/4in-IPS-display AI: The RGB interface means your display will use some of the pins to input 24-bit RGB color data and some control signals. The Adafruit board supports an RGB interface. Some displays also have a MCU interface option where a parallel or serial bus is used to access frame buffer memory in the display itself, for drawing pixels, lines, etc. under software control. As you are using the RGB interface you don't have to be concerned about this. It just means your display can use either interface depending on the application. On your display's ribbon cable there will be several pins used to select which interface to use. Pull the pins high or low (as documented in the display datasheet) to select the RGB interface. While you'll need to check the display datasheet and compare it to the Adafruit schematics and TFP401 datasheet, most likely the signals used by the RGB interface will be a 1:1 match between the the display and board.
H: What is the meaning of output voltage and current? I have a 5V power supply with DC output rating: 5V @ 1500mA. It could power my High Torque servo very well. I, however, have a fairly used 9V Alkaline battery. I shorted this battery and I measured the current to be ~3 Amps using a multimeter. Later on, I connected this battery to a 5V regulator to power my High Torque servo, and it doesn't seem to be drawing as much power as my 5V DC power supply. My question is, what does 5V @ 1500mA mean exactly? Is 1500mA the maximum current it draws or the minimum? If it's the maximum then my 9V battery seems to produce more current than the power supply, but that's not the case. And why are power supplies not equally as powerful even though the voltage measure maybe similar. My guess is that it all boils down to less internal resistance produces more current, and my 5V DC power supply has less internal resistance. Is the internal resistance of my 5V DC power supply then: 5V / 1.5 A ? Or maybe this doesn't even have anything to do with internal resistance. AI: Your battery when shorted produced zero volts and thus zero power, but internal losses were 27 Watts but suggests it has an ESR of Voc/Isc= 3 Ohms. So at 1.5A it will have an output of 4.5V Meanwhile your DC supplies 5V @ 1.5A or 7.5W but you don't say what the voltage load regulation error is. Let's say it is 1% or 50mV . This would suggest the regulator output impedance is 50mV/1.5A= 33 milliohms . Any questions. So what did you learn? ESR= ΔV/ΔI For both linear unregulated batteries and regulated sources in the linear range ( not short circuit protected range) P max = I max @ Vout. A 9V battery can generate 27 Watts of short circuit internal heat but zero output power. (warning) But now you can estimate how much current any battery supply with say a 10% drop in voltage using the ESR of the battery. What you didn't ask is that every battery has memory, some less than others. As if a bigger capacitor with a larger ESR restores the battery voltage after a temporary short circuit. (double layer electric effect) So in effect R1C1//R2C2 storage in the battery above the 0% SoC voltage. ( look up what you dont understand ) Also the max a battery "should" supply depends on ESR and more importantly the junction internal temperature rise. THis is often defined by the C rate for some temperature rise. Any questions?
H: Need a help with adjustable DC power supply I just purchased an adjustable DC power supply. https://www.amazon.com/Variable-Eventek-Adjustable-Regulated-Alligator/dp/B07DQR177D It has three terminals : "-"(black), "ground"(green) and "+"(red). When I test it with multi-meter, there is no voltage between the negative rail and the ground rail. Same for the voltage between the ground rail and the positive rail. When I connect the negative rail and the positive rail together, it works correctly. However, this is not why I bought an adjustable DC supply with 3 terminals. I bought it so that I can use operational amplifiers... What would the purpose of this ground terminal? Is there a way that I can use this adjustable DC power supply as I want to use it? AI: The green terminal is true earth ground. It is connected to the ground lug on the ac power cord, which should ultimately be connected to a ground rod. The output of the power supply would seem to be isolated from ground, meaning that neither the positive or negative terminal is connected to ground. For work with operational amplifiers you probably want a symmetrical bipolar power supply, which outputs both a positive and negative voltage having the same magnitude. Both of these voltages are with respect to a third common output. Such a supply would likely have four terminals where the fourth was the green earth ground.
H: Insulating from static electricity I am happy to announce that my pocket extra-strong static electricity generator project is now complete and works well. However there is one problem, I am often getting zapped severely (to the extent I get muscle contractions) by touching the wire that carries out the high voltage negative output even though it is supposedly insulated. My guess is that the wire is too thin, what is the easiest way to solve this problem? Is it best that I insulate it further with hot glue? AI: I haven't tested it buy my gut feeling is the breakdown of hotglue will be below 5kV Some high voltage electric tapes are rated up to ~70kV, make sure there is a continuous wrap that is clean as any residue on the tape could conduct. Any residue on the outside of the wire could also conduct. The best way would be to get some high voltage wire that has a breakdown above that of the voltage you are experimenting with.
H: Stepper motor power supply causing large ripple I currently am rebuilding a machine that uses 3 large 24V stepper motors, running at 1A per phase. The machines' original transformer has a 10V and 28V output, and I have tried limiting the 28V output to 24V, with varying degrees of success. Below is the current design for powering the motors (the 6A load is the maximum power draw) Ninja edit - The IGNOREME resistor changes the regulator to a 24V regulator (originally 15V) Simulating the circuit, at 1A load gives a ripple of about 3V, but at 6A it gives up to 14V ripple. (With or without the regulator part) I recently did read on a different website that large stepper motors can handle up to 35V before you need to worry about power considerations, but we don't have replacement motors, but the forum didn't have many replies, and a few of them contradicted the main post. (https://forum.arduino.cc/index.php?topic=462832.0) I am asking for ideas of reducing the ripple further, and if the regulator circuit is unneeded. Thanks for your time. AI: There is no need to over complicate your supply, and putting inductors in will seriously cause problems where the current drawn (by the stepper motors is pulse in nature). You simply need to increase your filter capacitor and ensure your diodes have a peak current capability at least twice your load current (so about 12A rating). To calculate your filter capacitor size is simply: C(F)= (I(Load) * (1/2F)) / V(ripplemax) //2F because you have a full wave bridge rectifier (6A * 8.3 mS) / 3V --> 16000 uF I selected 3 V ripple here, but you can select whatever you want. The output peak DC voltage is about (1.4 * Vrms) - (2 * diode Vf) The minimum is V(outputpeak) - V(ripple)
H: USB HID keyboard: why 4 URBs are generated for a keypress instead of 2? This is system log when keyboard is plugged in: usb 5-1: new low-speed USB device number 7 using uhci_hcd usb 5-1: New USB device found, idVendor=04f3, idProduct=0103 usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 input: HID 04f3:0103 as /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/0003:04F3:0103.000D/input/input23 hid-generic 0003:04F3:0103.000D: input,hidraw0: USB HID v1.10 Keyboard [HID 04f3:0103] on usb-0000:00:1d.0-1/input0 input: HID 04f3:0103 as /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.1/0003:04F3:0103.000E/input/input24 hid-generic 0003:04F3:0103.000E: input,hidraw1: USB HID v1.10 Device [HID 04f3:0103] on usb-0000:00:1d.0-1/input1 Then I run wireshark and press a key. But instead of 2 URBs there are 4. What part of the URB contains the pressed key code and what for are two extra URBs? Here is the trace. These are images, one per packet: AI: There are two types of packets shown: URB type: URB_COMPLETE: This is clearly sent from the device and contains the key data. URB type: URB_SUBMIT : This is the host (hid driver) asking for the next data packet. Note that source is host and destination is device, which would otherwise be invalid for an IN type packet on the USB bus.
H: How to select Max. switching voltage and current of Relay for a LC resonant circuit I have a LC resonant circuit as the above shows. And I want to switch the inductor between L1 and L2 with relays (sometimes L1 is used and sometimes L2 is used). The high voltage point between the inductor and capacitor has a voltage about 400Vp-p, and the current in the inductor is about 10Ap-p. Could I think a relay with max. switching voltage no less than 200VDC and max. switching current no less than 5A is needed? Or how should I select a relay for this application? AI: I'd stick with solid state - add another couple of MOSFETs to your bridge and select one of the left pairs for driving the appropriate inductor: -
H: splitter design I want to split the signal from my electric guitar to 6 amplifiers. Does this splitter design look legit? I want to use 6 FET op amp followers to do it. R2 - R7 are 47R to prevent oscillations (they're not 1k). AI: Providing the supply is a minimum of +/- 5 volts and you add decoupling capacitors to the Vcc/Vee lines on the op-amp packages you should be good to go. You could probably use one op-amp to drive two or three output lines and save at least 50% of the op-amps. I'd also avoid using polarized capacitors in the output feeds - you cannot guarantee what the DC voltage levels might be between your circuit and what it feeds so use ceramic caps is my advice.
H: adjustable window and adjustable reset delay watchdog Timer I am using watchdog timer which have adjustable window BUT ITS RESET delay is fixed.This reset pin is active high during normal operation and during fault condition its gives 200ms low pulse. So how can I drive power supply using this reset pulse? AI: As you already presumed, you can use a monostable multivibrator to extend your pulse, for example using a 555 timer. If you enter "555 timer monostable" this is the first image that pops up: (Image source) Just connect your watchdog timer output instead of R2 and the switch and connect a transistor (with base resistor) to drive the relay on the OUT pin. Select R1 and C1 so t is 10 seconds according to the formula in the picture.
H: Changing the LED in a circuit (to change its color) I would like to change a LED in a circuit, in order to change its color. The circuit is this one (LED on the right) : First, can someone confirm that the "LED part" of the circuit "has a purpose" (I don't know how to say this), like explained in part 3 of this comment. Then, is it possible to change the LED with one of a different color, without messing up the behavior of the circuit ? I would like to put a purple one instead of the red one which is connected right now. My intent was to remove the LED and measure the voltage "at its place", and use the value as the supply voltage to calculate a resistor value. That would lead me to add a resistor+LED in place of the current LED (or maybe just the new LED if the calculous gives me a resistor value of zero ?). Or is it a bad idea and there is no other solution than to let the current LED in place ? Thanks a lot to whoever can help me ! AI: the LED is serving dual purpose, it's showing an indication when the pedal is on and passing voltage into the 4.7M which eventually turns on the JFET 2N4320 using a higher voltage LED will reduce the peak voltage on the 10k resulting in less drive to the circuit before the FET You're going to get a different effect, but still mostly within the range of performance you get from a 9v battery, it probably won't be very noticeable.
H: Reading values from Force Sensitive Resistor - Arduino I am trying to read the values from a Force Sensitive Resistor with Arduino. Actually, I am already reading them, but it only works if I use a 10 Ohm or lower resistor and it really heats up. (See attached schematic). If I try to use a higher resistor, Arduino continuously reads 1023, as if there was no FSResistor. How can I read the values of the FSR without having to use a 10Ohm resistor that heats up? Note that the FSR, without applying any force has 50 Ohms resistance, and when applying pressure, it goes down to 5-10 Ohms. AI: simulate this circuit – Schematic created using CircuitLab Vo = V1* R2 /(R1+R2) Total power Po = V1*V1/(R1+R2) Adc unit (5V reference) = 5V/1023 ~= 5mV Adc unit (1.1 internal reference) = 1.1/1023 ~= 1mV No pressure R1 = 470 ohm: Vo = 5*50/520 = 480mV ~= 96(5V) or 480(1.1V) ADC units Po = 25/520 = 48mW No pressure, R1 = 10 kohm: Vo = 5*50/10050 = 25mV ~= 5(5V) or 25(1.1V) ADC units. Po = 25/10050 = 2.4mW No pressure, R1 = 10 ohm: Vo = 5*50/60 = 4.16V ~= 803(5V) ADC units. Po = 25/60 = 0.41W Same calculation for pressure applied until the sensor has 10 ohms: R1 = 10 ohm: Vo = 5*10/20 = 2.5V ~= 500(5V) ADC units. Po = 25/20 = 1.25W, that's why the resistor is heating It's better to put the sensor on the ground side because you can use 0 to no pressure voltage instead no pressure voltage to 5V then subtract the no pressure voltage. You also can use a lower reference for better resolution which is not possible with the sensor on the upper side since V0 will be higher than the reference voltage. By using the internal reference you will lose the ratiometric output but the gain in resolution will compensate this.
H: What is this part? Is it a speaker? I found it in my parts bin. I can't find anything about it when I Google on the number on the back. Not visible on the picture but behind the net it looks like a speaker. Am my assumption that this is a speaker correct? AI: It looks to me like a common ultrasound transducer. The "40R" may indicate the intended frequency is 40 kHz, and that this is the receiver, not the transmitter. I've seen ultrasound transducers that look just like that. For example, here is a snippet of the datasheet of a SensComp 40LR12 ultrasound receiver:
H: Need a switch/circuit breaker that stops power supply to equipment when power comes back after outage I need a switch that stops power supply(220VAC) to led tv when power comes back after outage. So i need a circuit breaker that breaks the circuit when power supply is off and needs manual switch on from this circuit breaker device when power supply is on. I have two ideas: I feel its possible using microcontroller and relay but i think it would be costly and time consuming to make such device. I am also having idea about using magnetic coil as in magnetic circuit breakers but not confident about its effectiveness. As i am unable to find such device on commercial websites, so i need help in finding such device if commercially available and/or making such switch/circuit breaker in a simplest and cheapest possible way. AI: A standard latching relay circuit seems appropriate for this: - When AC is first applied you need to press the trigger switch to activate the relay and that also activates the load. The normally open (NO) contact of the relay re-inforces power to the coil via the contact closing and so if you stop pressing the trigger button, the relay has latched. This can be optionally "tested" by the reset switch. If power is removed the relay unlatches until power is returned and the trigger button is pressed.
H: OptoCoupler Relay and EMI - How to be sure it is not a "regular relay" Motivation: A way to be sure a relays in hand are opto-coupler ones. Reason: Due to AC power interference ( on the client side of relay - an AC motor ), I'm afraid wrong ones were sold. Edit 1: Attach 2 kinds of items both ( and there is some more ) Example #1 Example #2 Edit 2: Adding pics: tries to overcome EMI on relays ( one try - is sheilding wire only, second try - shield relays box) **edit 3: add schematic ** AI: In your examples, the part labeled "Songle" is an ordinary relay. The part with 4 pins with the two sides spaced fairly wide apart, beige colored in example 1 and black in example 2, are the optocouplers. You can google the part numbers marked on these parts to find the specifications and see if they match what the board vendor told you. This of course assumes they don't use counterfeit parts.
H: How is binary data 'split'? If one computer sends data, for example 001101, how does the other computer know, where one bit starts and the other one ends? If you were just to monitor the change, you would get 0101, which is totally inaccurate. Is it just a timing thing? (I apologise if this is a noob question) AI: It's a timing thing (I don't like the word 'just'). In the case of a UART, in which the A stands for Asynchronous, there is a line idle state, then a start bit, which edge the receiver uses to synchronise its timing. After that, all the bits are sent each with an equal period. The word finishes with a stop bit, which ensures there is a transition into any following start bit.
H: T.I H-Bridge design with No protection diodes? I am still on my struggle trying to design my own Brushed DC H-bridge with all N-MOS, still in the research stage and burning mosfets left and right. I have come across this T.I design ,relatively recent. The full document about their design is here. On page 12 and pictured below is the schematic of the H-bridge portion. My question is as follows: I see no schottky diodes protecting it from the proverbial inductive spike. How come? I do see the zener and resistor network but the paper says: a Resistor-Zener network is provided on the switch nodes of the driver to protect it from overshoots and undershoots I assume this "overshoot" refers to overshoot due to the bootstrap circuit and not inductive spiking? Could it be that if you drive an H bridge in a complimentary manner, where the top and bottom mosfets are driven opposite of each other this gives the inductive spike a route to ground on off times. For examplel: If you turn Q2 and Q3 ON the motor spins one way and when you turn them OFF there will be inductive spike so if you then turn Q1 and Q4 ON the spike has a route to ground and to Vbus. that is the only explanation i can think of why they dont have protection diodes... and yes I understand there has to be deadtime to protect from shoot through and all of that but my question is why there are no diodes? One more question is what is the purpose of the resistor and capactors highlighted inside the bridge?? are these what they call snubber circuits? AI: I see no schottky diodes protecting it from the proverbial inductive spike. How come? The bulk diode that is pretty much a 100% feature of all modern enhancement mode MOSFETs can be relied upon to shunt any excess energy from inductive loads to the power rails. Most data sheets go to great length to describe the bulk diode's characterisitic so that the reader is under no-doubt that they can be relied upon. For the MOSFET in your design: - Forward voltage is maximum of 1 volt at 10 amps Reverse recovery time is typically 53 ns In addition it has a couple of graphs that help the designer: - a Resistor-Zener network is provided on the switch nodes of the driver to protect it from overshoots and undershoots That's to protect the MOSFET driver ICs. what is the purpose of the resistor and capactors highlighted inside the bridge?? R6 and R7 protect the zeners i.e. they limit current into the zeners that protect the driver ICs. The capacitors supplement the internal drain source capacitors of the MOSFETs (circa 300 pF) and although they represent a switching loss overall, probably are provided for EMC reasons.
H: What's this certificate mark? The bottom row has an ETL Mark, a double insulate, an FCC logo, not quite sure what that little house next to the FCC logo is but what I am most intrigued about is the logo above them, it looks like VI. AI: CEC Level VI Efficiency standard. More info here
H: Short antenna feedline So this was talked about in the comments of a previous question, but not in great detail: I'm using a 2.4GHz ble chip, with a chip antenna. The recommended layout for this chip has a capacitor and an inductor to convert its output to a 50 ohm feed line. This feed line is going to be less than 1cm long before it hits my chip antenna. Someone previously said that the characteristic impedance of my (pcb trace) feedline doesnt matter if it's that short (considering that the wavelength of 2.4ghz is around 10cm). Does this also apply to the characteristic impedance of the source, and the antenna? Can I get away with no pi matching network at all? NRF52832 datasheet showing conversion to 50 ohm AI: Research suggests the latest version of the NRF52832 contains a built in balun for 50 ohm output to make it easier to match to common antennas. If your chip has this matching balun, then the output is already 50 ohms and with a 1cm (less than 1/4 wavelength) PCB feedline the chip antenna should match up. Be sure the chip antenna impedance is 50 ohms. Keep your feedline straight or use 45-degree bends, to avoid introducing additional inductance if it ends up longer. This may affect placement. However, you still need the L-network you have circled up to act as an RF choke. Details here: https://devzone.nordicsemi.com/f/nordic-q-a/8147/recommended-chip-antenna-debugger-for-nrf52-based-design/29286#29286 Chip antennas may also require a proper ground plane underneath them on another layer and a “keep out” area around them. Here’s an excellent source of additional design guidance: https://www.nxp.com/docs/en/application-note/AN2731.pdf
H: Will a standard 9V alkaline battery (300mAh- 400mAH) be able to supply 2.5A for 5-10 second at a time? For example, I have a motor that needs a surge of 2.5A for a short amount of time from a 6V power supply. Will any 6V battery able to supply that current? Even if let's say it has only a 500mAH. How does AMP rating matter when talking about this? AI: You might want to use rechargeable NiMH batteries instead of alkaline cells. This Energizer AA NiMH cell is specified for 4.6A continuous discharge current, for example - way more than typical alkaline cells can provide. It'll probably provide even more current for a few seconds. Plus, you can recharge it! Five of those in series and off you go.
H: how to identify transistor/IC by its model/product number? How to identify(biasing/company/working sections) transistor / IC by its model/product number? or details ?Example: 2sc2078, 2n2219 etc. Please help, i need to understand... Thanks AI: Do a web search for "[part number] datasheet". For example, searching for "2N3904 datasheet" should lead you to datasheets for a 2N3904 transistor. The transistor and diode part numbers appear to just be randomly assigned numbers, with no inherent meaning.
H: gates operation in flip flop The operation of logic gates in the flip flop is pretty confusing for me. If I am not wrong then the NAND and NOR gates provide output only when there are at least two inputs. But in case of the flip flop, the output of one gate is used as others input. Lets take SR flip flop for example. There are two NOR gates and each has its input form the output of another one. So both gates should not produce any outpu. Would be of great help if someone can figure out where I am missing the core idea.....Thanks AI: If I am not wrong then the NAND and NOR gates provide output only when there are at least two inputs. You are wrong. Gates always produce an output. The output is high or low depending on the state of the inputs.
H: What does 600R@100M mean from RDA5807M datasheet? I’m trying to assemble a bare radio module using RDA5807M IC. The most popular diagram I can find is this: What the filter is used on vcc input? That inductor sign, 600R@100M, what does it mean? EDIT: as this marked duplicate, i want explain i need just a component which can be placed there, if its an inductor, inductors are specified by microhenry, where, how can i find some thing place able in there AI: What the filter is used on vcc input? It's almost certainly implied to be a ferrite bead Here's a good example of a ferrite bead that has 600 ohm resistive losses at 100 MHz. Ferrites are notably quite lossy as frequency gets above 10 MHz and of course 100 MHz is the middle of the broadcast FM band so it's a suitable design choice in order to keep the power rails of your receiver being "infected" with any 100 MHz: - The one above is an SMT 0805 component but there are plenty to choose from. Losses at 1 MHz and below are very, very minor as you can see. Here's the Farnell link to over 200 that meet the spec 600 ohms at 100 MHz.
H: Can a power supply be too powerful for a device assuming that the power supply is at operating voltage of the device? Let’s say a device’s operating voltage is 5V and maximum current that it can draw is 5A. Is it possible for a 5V power supply to have very low internal resistance such that a device that operates at 5V turns down its resistance in attempt to draw 5A from the power supply , but instead accidentally draws greater than > 5A due to the power supply having very low internal resistance or being “too powerful” ? Of course this is assuming that the way a basic electronic device draws current is first, it assumes that it is being supplied the correct voltage, and 2nd, it lowers down its resistance at some constant number base on the current it needs to draw Is this how regular devices such as servo motors draw current? Or can they actually monitor how much current a power supply can give and lowers its resistance base on that? I know that it is possible to be at operating voltage and still not supply enough current, but could it be possible to be at operating voltage, and supply too much current for a load? Wait Unless of course, as long as the voltage across the load is less than or equal to the operating voltage, it can never accidentally draw too much current. ( I think I answered my own question, not sure if this is right ) AI: My two cents here Is it possible for a 5V power supply to have very low internal resistance such that a device that operates at 5V turns down its resistance in attempt to draw 5A from the power supply , but instead accidentally draws greater than > 5A due to the power supply having very low internal resistance or being “too powerful” ? Assuming power supply can provide voltage of 5V (10A)... If the current drawn by load (6A, accidentally) is less than the current supported by the power supply, power supply will be just fine. If the current drawn accidentally is more than 10A (max. Supported by the power supply) Power supply will either detect that and trips, or drops the output voltage to zero or may get damaged. Power supply's current output is completely dictated by the load as long as load is drawing the current which is with in the power supply limits. So if the load's operating voltage and current are within the specs of power supply it will be a safe working setup. Can a power supply be too powerful for a device Yes. For an example.. If power supply can supply up to 30 A and we are using a small Motor and an arduino.. Due to some accident if we do short then it can fry the parts..too powerful PTCs are some examples which can be used to limit the current inrush, in case if it helps.
H: Can you calculate internal resistance of battery by shorting it? Can I measure the current of a battery by shorting the circuit and by ohms-law divide the voltage of the battery by the current measured to get internal resistance? AI: I would like to direct you here BU-902: How to Measure Internal Resistance For a quick idea, measuring open circuit voltage and again with a suitable load (so that battery's internal resistance will be comparable in ration with this load) should give an idea of internal resistance. With the load, the voltage read will be less than 1.5 V. Say, it is 1.3 V. Then the remaining 0.2 V is dropped somewhere other than the load. The drop will be across internal resistance of the battery. You know the load resistance value(Rload), supply value (1.5V) and drop across load that is 1.3 V. Internal resistance can be calculated easily. Please take care of wattage of resistors being used and the allowed safe limit of current of the battery.
H: Excessive voltage drop from LiPo battery I am using a 750mAh 25C 3.7v LiPo battery for a custom electronics project which currently draws ~1.5 amps, far below the rated operating current of (0.75 * 25 = ) 18.75 amps. However, at the battery terminals (before any PCB traces) I am noticing a drop from 4.03v to ~2v, below the 3.3v I require for my MCU. Why is this drop so significant? Is the battery bad? AI: Assuming it was fully charged before, either your battery is bad or its rating is hugely overstated. LiPo batteries should never be discharged below 3V, but for longevity it is best to have cut-off at 3.2-3.5V Note that 1.5A is relatively high load for only 750 mAh battery of any C rating. I am not saying they shouldn't be used this way (RC toys and electronic cigarettes use same batteries at currents many times more than that) but cell lifetime will be affected. The usual definition of C rating is "how fast the battery can be discharged safely". The safety bit should be understood as not blowing up or exhibiting immediate drop in performance. This does not mean, however, that discharging at full C rating has no negative effects. In fact, by pushing the cell to its limit you severely reduce its lifelong capacity. I've seen many 400 and 750 mAh cells used in RC helicopters completely giving up after only 50-70 charge-discharge cycles.
H: Measuring Non idealities in an op-amp First time poster: I want to learn about opamps. I am just a college graduate with no practical experience. What I know: A few basic high level applications such as Hysteresis, Voltage follower, Inverting and non inverting configuration, Various Filters, and Oscialltors All these we studied (and some lab experiments) and passed but I want to learn deeper. I want to use the worst(where I can feel the effects such as offset voltage, offset current, leakage current, etc) opamp available (I couldn't find the question here but I remember, it is useful) And do practical measurements with oscilloscope and understand and see it practically. I will put all the efforts needed. I want a direction to start with. How can I start? Please suggest if i have to share any other details. AI: Instead of (or in addition to) on-the-bench experiments you should also consider using a circuit simulator to experiment. You can then make your own opamp model, start with a voltage controlled voltage source with a gain of 1000 and see what happens. It is then easy to add input offset, play with the gain, include a bandwidth limitation etc. In a simulator you have full control so you're not limited to DC offsets of a few mV, you can set it to 1 V DC if you like. LTSpice is an example of a suitable simulator. Also have you read "Opamps for everyone" ?
H: Reduce supply from 4V to 3.3V What is the simplest and cheaper way to have 3.3V 0.5A from 4V? I'm developing a board which uses a SIM800 so it must have 4V 2A power input from 24V external power supply (I'm using a LM2596S adj, able to supply 4V 3A). SIM800 has 4V Vdd and 3.3V logical input/output. The rest of the board (microcontroller, etc) needs 3.3V, so I want to take it from the 4V (because if I take it from 24V I would need another step-down converter... and that means more components and cash). The cheap AMS1117 has 1V dropout voltage, so it's not suitable. The cheap MCP1700 has only 250mA output current. What's about to use diodes to get this voltage? There is another cheap regulator with less than 0.7V dropout voltage? 3.3V 500mA is needed (STM32 Cortex M0 + wiznet w5500 + some leds...). Efficiency is not a problem (AC power) Solution: I will take diode voltage drop as the simplest solution versus cost. AI: A warning about using a diode to get 3.3V: the voltage drop does vary with current and temperature. For example a standard 1n4007 might drop 0.6V at 10mA @ 50C and 1V at 1A @ 0C.
H: Drive 24V input (active LOW) using 5V microcontroller I have a device that is activated by grounding a pin that is pulled up to 24V. I want to control this using a microcontroller (ESP8266 which operates at 5V) using as little components as possible (no relays, transistors). It is easy to ground the pin by just writing LOW to the output of the microcontroller. And 'disconnect' the pin by setting it to INPUT. Since the pin is only pulled up (not directly connected to 24V), is it safe to connect it directly to the microcontroller? If not, how can I do it (preferably using only resisters/diodes/etc)? AI: @sunny-lan, even if you write the pin to be INPUT, there's still a protection diode from the IO pin to VDD inside the microcontroller. So if your VDD is 3 volts, you're basically still pulling the pin low to 3.6 volts even if you set the pin as INPUT. If you set it as OUTPUT, LOW then you're pulling it low to zero volts. I know everybody is saying that you shouldn't connect the IO pin to a 24V pulled up pin, and they're basically right. But the only way to be sure is to find the absolute maximum ratings in the datasheet and I cannot find them. 10 k pull-up to 24 volts is 2.4 milliamps and the protection diode just might be able to sink that amount of current. But whether you could control the external device or not, that's another matter. Remember, you're only going to be able to make a 3.6V difference in the voltage at the MCUs end. Depending entirely on what is the Vil/Vih decision level point in the external equipment, you might be able to find a series resistor value that allows you to swing over that decision threshold. But you're basically probably going to destroy your ESP8266 in the process. Especially if your ESP is unpowered and there's nothing to sink that current, and the 2.4mA from the pin lifts the power rail over something like 5 volts, the chip is dead. And the NPN suggested by Umar only costs something like 2 cents US or less than 0.1 RMB so why not use it. It's the only practical way to do it, really...
H: Test current capability of a 24V 15A power supply I have a power supply from a broken 3d printer. I want to test if it is still okay. It is specified as 24V, 15A (360 W). It is giving me perfect 24V at idle, but I wanted to test if it is still performing well under (almost) full load. But what could I use to dissipate 360W at 24V? And: my multimeter is only specified for 10 A, so I will have to use something as a shunt resistor... I'd appreciate any suggestions avoiding expensive equipment. AI: To test if your 24-V power supply can deliver 15 A of current, you need to get or make a massive load resistor with value of 1.6 Ohm. Better make it 1.5 Ohms, since every power supply must have some margin. You can make it out of piece high-resistance wire, or maybe out of a spool of household iron wire. Or you can get 10 pieces of massive 50-W 15-Ohms resistors in parallel (you need your load to hold about 340 W). Many variants exist. Connect the load with thick copper wires (12-14 AWG), and see if your PSU still delivers 24 V.
H: 5mm RGB Led built in IC Is there any standalone IC do the same job this 5mm Led (standalone flasher and builtin control IC) does? AI: The IC used inside these specialty leds are very very difficult to find outside of chinese street markets and you'd have to be pretty good at understanding chinese to find them. They are often not found in "regular" sizes. The specific ones used are wire bond, the size of a pin head. That said, this is nothing that can't be done with a general purpose microcontroller. All it does is cycle through a routine, and doesn't need anything other than a few pwm routines or 3 pwm channels.
H: How to use a relay to "lift" 12v ground of a two 12v battery system First off, sorry about the long title as I don't know a better brief of my situation. Project: I am converting a bus into a trailer to be pulled by a semi truck 5th wheel style. The bus has it's own electrical systems that I don't want to take away, but i need to control the stop lights, etc from the semi truck when it is attached. The semi truck by design of course can power lights on a trailer so I will be using it in this way to control the lights on the bus. I want to have a bypass switch. If the bus is powered on by the master disconnect switch, then I need it to lift the ground from the semi truck power feed...thus turning off the control of the lights from the truck battery Concept: Here is what i think will work using a 5 pin relay. Your input will greatly help me. Explanation: I'm thinking to tap the bus positive, post master disconnect switch, to feed relay point 86. 85 goes to the bus ground. This same ground is where 87a, via 30 allows the semi truck to complete the circuit to control the lights. Application: When the bus master disconnect switch is switched off (normal usual operation), the ground from the truck connects to the bus allowing the truck system to control the bus lights. When the bus master disconnect is switched on (rare but to operate the bus systems independent from the truck), the ground from the truck should "lift". This will assure that both battery systems are not powering the same circuit. Is this a good way to do it even though I'm only working with 12v on either side of the relay? Am I missing something? AI: You are imagining a problem where there is none and likely to create headaches for yourself. The solution is to wire a multicore cable with regular trailer plug on it along to the back of your trailer, ground the negative to the trailer chassis and wire the cores to the lights, disconnecting and insulating the original tail lamp wiring. simulate this circuit – Schematic created using CircuitLab Figure 1. It should be clear from the schematic that the only connection between the two systems is the common battery negative chassis connection. Without a positive connection between the two systems no current can flow between them. The result is a system that will work on any tractor unit, doesn't rely on trailer battery condition, is simple, standard and reliable, and can be maintained by any decent mechanic.
H: LCD SPI clock frequency with STM32L0 MCU I'm designing a PCB that includes LCD Display NHD-C12832A1Z-FSW-FBW-3V3 (datasheet) connected to the STM32L071KZU6 microcontroller (datasheet). I'm afraid that the SPI interface of the LCD will not work with the SPI clock from the MCU. According to the MCU's datasheet, it says that fCLK is 16MHz in SPI master mode while the LCD (the SPI slave) has Tscyc of 50ns -> 20MHz. Am I correct that this is a problem? How can I make them work together? MCU: LCD: Thanks! AI: It's likely that the LCD can work at pretty much any SPI frequency, as long as it is slower than those conditions specified in the datasheet, they're all listed as minimum times. The 16 MHz quoted for the micro is a maximum frequency it can run at, it can also be slower if you desire. It is fine to use these parts together, and to choose an SPI frequency which suits as long as you don't violate the conditions specified in either datasheet.
H: Total Device vs Total Package Dissipation For my design I need a bunch of 2222A transistors with each transistor dissipating at maximum ~500mW of power. The transistors come in single packages, dual packages, and quad packages. The datasheet has it listed as "Total Device dissipation" for the single at 300mW, "Total Device dissipation" for the double at 700mW, and "Total Device dissipation" for the quad at 1000mW. Does "Total Device dissipation" refer to the individual transistor(s) in the package or to the entire package? https://www.fairchildsemi.com/datasheets/FM/FMB2222A.pdf Edit: None of the answers have really made me feel its confidently its one or the other so here's another way we could answer the question maybe more definitively. TI has a document on understanding power dissipation: http://www.ti.com/lit/an/slva462/slva462.pdf The unit in question is \$P_D\$ on the data sheet. TI tells us that this value can be derived from the following equation. Maximum Power Dissipation \$P_{DMAX}\$ is defined as the following \$P_{DMAX} = \frac{T_{JMAX}-T_A}{\theta_{JA}} \$ From the data sheet it gives maximum operating junction at \$T_{JMAX} = 150C\$ The ambient temperature will be room temperature which is \$T_A = 25C\$ The question now is what does the data sheet means by "Thermal Resistance" \$R_{\theta JA}\$? For the single package it has "Thermal Resistance, Junction-to-Ambient" at \$R_{\theta JA} = 415C/W\$ which does equate to 300mW. So for the single package no doubt it has a dissipation of 300mW for the package and device For the double it has "Thermal Resistance, Junction-To-Ambient" at \$R_{\theta JA} = 180C/W\$ which equates to ~700mW. For the quad it has two different paramters. "Thermal Resistance, Junction-to-ambient, Effective 4 dies" \$R_{\theta JA} = 125C/W\$ which equates to 1000mW and it has "Thermal Resistance, Junction-to-ambient, each die \$R_{\theta JA} = 250C/W\$ which equates to ~500mW For the double package it almost seems as though thermal resistance refers to each individual transistor making each device have a consumption of 700mW and the whole package a consumption of 1400mW For the quad package it seems like effective 4 dies means divide result by 4 so each transistor dissipates 250mW but then it says each die and results in 500mW. So I am again still confused. Thoughts? AI: It's per package, also you will have to derate for ambient temperature so the maximum per transistor is the dual at 350mW per transistor at 25'C. However note that that puts the junctions at 151'C at 25'C Ta. The 25'C ambient maximum is unrealistic in most cases, and 151'C is very high if you care about reliability. Personally I think more like 150mW per transistor would be more conservative. That would yield a Tj of about 125'C at Ta = 70'C. If you need a nominal dissipation of 500mW per transistor, I suggest individual TO-252 or at a minimum SOT-89 transistors, mounted on an adequate area of copper. Just as an aside, it's unusual to have a wimpy transistor like a 2N2222A dissipating 1/2-W, there could be other issues cropping up like SOA. Makes me think you might be doing something wrong, but that's just a guess, feel free to ignore if you are all set.
H: How do designers know about kilowatt power of wind turbine generators like 1.5 MW? Generators and transformers are always designed in kVA because designers never know about the load it will provide power to. Then how do we know the wind turbine generator will deliver 1500 kW or 2 MW etc? AI: In most practical contexts, the load of a wind turbine is pretty well specified: It will be connected to a regional power distribution grid. For the relevant purpose here the grid can be considered an ideal AC voltage source -- pushing 2 MW into it will not affect its voltage amplitude or waveform much. It is therefore reasonable to design the generator to work in that specific electrical environment -- and, in particular, to avoid delivering significant reactive power to the grid (which would tend to make distribution companies unhappy). So specifying its capacity or operating limits in watts is appropriate.
H: Help making a 205 LED lamp I had the crazy idea of making a lamp for my soon-to-be-born son. It is a bunch of LEDs (about 205.. yes I know...) representing a picture. The LEDs vary slightly in voltage and current specs, but I don't need all of them to burn full power regardless. So I plan on going with the 'safe' limits that go for all LEDs which are 2,5V and 20mA. I understand the concept of placing a resistor of 'n' Ohm to make sure to not burn out the LEDs. I also am aware of the concepts of parallel and series set-ups. But... (here it comes)... I am unsure how to hook up these lights and to what power source. Going by the calculations I have seen, I either end up with a 512,5V (all in series) or 4,1A (all in parallel) power supply. So I reckon I need to split it up a bit in a combination of series and parallel, but this is where I'm stuck at. Any help would be greatly appreciated! AI: My recommendation is that you go for a safe voltage as this effectively eliminates electric shock hazard concerns. 24 V would be a good choice and power supplies are plentiful. You can now sort out your LEDs by type and group each type in a series string to make up about "20 V worth" of LEDs and calculate a series resistor to drop the remaining 4 V on each string. \$ R = \frac {V}{I} = \frac {4}{20m} = 200 \ \Omega \$. I've chosen 4 V as a balance between having enough resistance to control the current adequately versus wasting power as heat in the resistors. You can adjust to suit the maths but don't go too low. Then parallel each string and connect to your 24 V supply. simulate this circuit – Schematic created using CircuitLab Figure 1. Series-parallel arrangement for 24 V supply. If I were to work with 22,5 V worth of LEDs (so 1,5 V remaining on each string) it would amount to a 75 ohm resistor, correct? Ideally, for driving LEDs you want a current source. An ideal current source has an infinite output impedance - i.e., a very high series resistance. The lower you make your series resistor the poorer a current source it makes. Let's do the calculations for your 9 LEDs, 22.5 V, with a 75 Ω series resistor per string and work out what happens if the headroom changes by 1 V either due to a variation in the LEDs VF or a variation in the PSU output voltage. Nominal headroom: 1.5 V. \$ I = \frac {V}{R} = \frac {1.5}{75} = 20\ \mathrm{mA} \$. 1 V low, 0.5 V. \$ I = \frac {V}{R} = \frac {0.5}{75} = 6.6\ \mathrm{mA} \$ (-66%). 1 V high, 2.5 V. \$ I = \frac {V}{R} = \frac {2.5}{75} = 33\ \mathrm{mA} \$ (+66%). Now let's reduce your string of nine LEDs to eight with a nominal voltage of 20 V and a series resistor of 200 Ω and repeat the calculations. Nominal headroom: 4 V. \$ I = \frac {V}{R} = \frac {4}{200} = 20\ \mathrm{mA} \$. 1 V low, 3 V. \$ I = \frac {V}{R} = \frac {3}{200} = 15\ \mathrm{mA} \$ (-25%). 1 V high, 5 V. \$ I = \frac {V}{R} = \frac {5}{200} = 25\ \mathrm{mA} \$ (+25%). You should be able to see from all this that the 200 Ω / 8 LED solution will regulate the current better if there is variation of the LED VF due to manufacture or temperature or variation in the supply voltage. This is the background to my recommendation in the original answer.
H: how is this conversion possible? I was reading Morris Mano's - Computer System Architechture and My problem is the simplification of F = AB + A'C which was: simulate this circuit – Schematic created using CircuitLab which was simplified to: simulate this circuit I am confused why NOT1 was replaced with NAND4? AI: I am confused why NOT1 was replaced with NAND4? First, it sould be clear why it was legitimate to do so - a NAND gate with the inputs joined is just an inverter. To understand the motivation why it was done, it's useful to look at the final OR gate preceded by inverters on each input, and realize that DeMorgan's theorem shows that the OR with inverted inputs can be replaced by a NAND gate. At that point you have a circuit made of 4 NAND gates, and in traditional 74xx logic families, NAND gates happen to come four to an IC package... ie, the 74xx00 is a quad two input NAND.
H: How is the amount of outgoing power controlled in a grid tie inverter? I'm trying to figure out how grid tie inverters work on a basic level. From what I understand, the inverter would have to monitor the grid wave create its own wave exactly like the grid make it a little bit higher voltage connect the two and then the power would flow into the grid What I don't understand though is how it controls the amount of current going into the grid. Current is determined by voltage / resistance right, so, does the grid have a set resistance and does it just raise the voltage until desired amount of power flow is reached? The grid having a set resistance makes no sense though, maybe it measures the resistance very quickly and then creates a tiny bit of charge at the appropriate voltage that gets dumped into the grid at that instance? That option seems like it would make the grid wave messy though since there would be little discrete bumps on an otherwise nice sine wave. AI: Your understanding has some of the elements, but it is more like this: Monitor the grid wave. Create an inverter wave exactly like the grid matching frequency and phase angle. Connect the two and then no power would flow into the grid. Monitor the current output of the inverter very carefully. Increase the voltage very slightly and dynamically control it to deliver the desired current. The grid appears to the inverter to be an ideal voltage source behind a complex impedance. The inverter voltage must be raised above the grid voltage just enough to drive current through the source impedance. The ideal voltage source is the voltage measured just before the grid tie is closed. Once the grid tie is closed, it can no longer be measured. The inverter voltage increase is performed by a control system that monitors the inverter voltage, frequency and phase angle. Those parameters need to be controlled and adjusted continuously to keep the inverter synchronized with the grid and deliver the desired power. The grid voltage, phase angle, frequency and impedance can all fluctuate. The inverter control system essentially makes the inverter act as a current source. This is a simplified explanation of a grid-tie inverter control system that is actually more complex. The system also must include some protective features. While some small inverters may be designed to be used with any type of input system, others may be designed specifically as solar-PV or wind turbine inverters. "Consumer" inverter designs are different from "utility" inverter designs.
H: Mosfet's Vgs and rds If I use n-channel MOSFET (IRF3205) for high side switch, I need a gate driver for that MOSFET to turn on. For high switch the mosfets gate require higher voltage than it vcc. I have to switch 50 positive supplies, so I have to give more than 50 V for the gate to turn it on. http://www.irf.com/product-info/datasheets/data/irf3205.pdf But in datasheet Vgs= ± 20, what that vgs exactly means. AI: It's easier to understand with a drawing: simulate this circuit – Schematic created using CircuitLab The way you propose to use the NMOS as a high side switch is correct, you have to take the gate voltage above the supply voltage. Let's use Vctrl = 10 V to open the NMOS and the supply is 50 V, that means there must be 60 V at the gate. Note that that is 60 V referenced to ground. That -20 V / + 20 V limitation of the NMOS is for the NMOS itself, for its Vgs. That Vgs is the voltage across the Gate and Source of the NMOS. Since the source of the NMOS is at 50 V when the NMOS is switched on, the Vgs will be 10 V, not 60 V. So this condition is allowed and OK. But watch out! If you now want to switch the NMOS off you might have a problem. Let's say you make Vctrl = 0 V then the gate will be at 50 V. That will not turn off the NMOS will as the voltage at the source will drop until it opens the so much that the NMOS will still conduct somewhat. It will work as a source follower. Avoid that ! What needs to be done is to make the Vgs of the NMOS itself equal to zero. In order to do that you need to take the Gate all the way down to 0 Volt so ground. That means 0 Volt referenced to ground, just making Vgs = 0 is not enough as explained above. For this we would need to make Vctrl = -50 V !