text
stringlengths
83
79.5k
H: Antenna's resistance: meaning and evaluation When I studied elementary antenna's theory, I saw that the resistance (for simplicity let's consider only the resistive terms) of an antenna Ra is made of: 1) a parasitic resistance Rl, which causes antenna losses. 2) a radiation resistance Rr which is in practice the free space resistance, and it is like a load resistance if for instance we think at a transmitting antenna. Now I have two questions: about 2), from its definition it seems to me that the radiation resistance should depend on the space conditions (rain, humidity, temperature, presence of turbulences etc). If it is true, how can we design a correct matching network between an antenna and a transmission (since it is not a fixed value)? how can I physically evaluate the impedance of an antenna? For instance a stylus antenna (I must connect it to a coaxial cable and so I thought that its knowledge is important to choice the correct matching network)? AI: about 2), from its definition it seems to me that the radiation resistance should depend on the space conditions (rain, humidity, temperature, presence of turbulences etc). If it is true, how can we design a correct matching network between an antenna and a transmission (since it is not a fixed value)? That is true, but in general such things don't have much effect. A microwave antenna in a heavy rain may see changes, but I'm not sure how much. In general, if it's a concern, you'd establish the range of expected antenna impedances (because it won't be just the radiation resistances that change) and design a matching network that works well for anything in that range. how can I physically evaluate the impedance of an antenna? For instance a stylus antenna (I must connect it to a coaxial cable and so I thought that its knowledge is important to choice the correct matching network)? You connect it to an SWR meter, or an RF impedance analyzer, and you do some test transmissions.
H: Protection circuitry for AC/DC converter I'm using the RAC02-GB (Datasheet) as an AC/DC converter and I'm confused about the protection circuit they included in the datasheet: I want to make sure the AC/DC converter has the proper external protections but I'm a bit baffled by the datasheet's directions. I'm assuming the component labeled 'F' is a fuse but I'm not sure what the component labeled 'U' is. The datasheet lists the parameter "input fuse" as "internal" does that mean the protection circuit is already included in the converter and I don't need any external circuitry? If I do need external circuitry, how do I spec the fuse and/or the component labeled 'U'? AI: The U is a varistor (=MOV). It protects the converter if there's input overvoltage. Such voltages can easily occur as peaks when the input is taken from the mains AC. For the same reason measuring equipment must stand much more than the nominal mains AC voltage. Read as quickly as possible something about CAT ratings of multimeters if the thing is never heard for you. External MOV is recommended in the datasheet (see the notes). The fuse trips if the MOV gets shorted which can happen in serious cases.
H: Allwinner H3 TFT LCD display 40 pins So I want to modify this board in order to add a 40 pins tft connector to drive a 5" LCD 800x480 display so the user can "flip" between HDMI and TFT. I have no idea where to start, could you give me a clue? AI: You can't. (At least, not without ugly workarounds like adding an HDMI switch and a HDMI to TFT decoder.) The Allwinner H3 is designed as a TV set-top box controller; it only supports HDMI and CVBS (composite video) output, so it cannot drive an LCD directly. Some of the other parts in the Allwinner SoC family, especially in the "A" series, do support LCD output. Whether they will be appropriate for your needs is for you to determine.
H: What is the lowest voltage that a microcontroller can successfully read on the analog pin? I'm testing the Seeeduino v4.2 board with the ADCInOutSerial code in the Arduino IDE and the lowest voltage the board can read is 18 mV, showing an equivalent ADC of 4 on the serial monitor. The chip that the board uses is the ATmega328P. It works on a 5 V power supply and has a 10-bit ADC (1024 levels), so the voltage that I calculated for an ADC level of 1 is, 5/1024 = x/1, where x is the equivalent voltage for the ADC level of 1, which comes to 5 mV. But the board fails to read anything below 18 mV. Is this normal for the chip to be unable to read an ADV value below 18 mV or am I going wrong somewhere? I tested the voltage using a multimeter. AI: See data sheet section 28.8 ADC Characteristics: typical offset error 2 LSB and typical gain error 2 LSB. Absolute accuracy (INL, DNL, gain error, offset error, etc) could be typically 4.5 LSB under some operating conditions. These are Typical, not Min/Max guaranteed specs. So yes it’s pretty much normal behavior. You can buy an external ADC that has guaranteed min/max performance specs. But the internal ADC trades convenience for performance. Oh and by the way, your multimeter probably has its own measurement error specs, check the booklet it came with.
H: Why does reverse supply polarity damage the ICs? Assuming you need for example an OR gate for your circuit project, you can use a 4071 IC or simply use two transistors as shown below: But I wonder why the ICs are very sensitive to reverse supply polarity (as any other IC) but the transistor version circuit is not sensitive to supply reverse polarity connection (no damage.) Note: I found another question which asked about what causes damage when the car battery is connected in reverse (but his question is about the car fuses not logic ICs): Why reverse polarity causes damage AI: The 4000 series ICs (and most modern ICs) use some form of CMOS topology. This use complementary MOSFETs to drive high and low, rather than the resistor-BJT arrangement shown in your diagram. The problem with MOSFETs when it comes to reverse polarity is the body diodes within their structure. If we look at the structure of say a simple inverter, we end up with something like this: The diodes aren't added intentionally, but rather come about due to the structure of a MOSFET (*). These diodes aren't disastrous issue (**) in a CMOS gate if the source of the PMOS (to transistor) is at a higher voltage than the source of the NMOS (bottom transistor). The diodes are always reverse biased, so pose no threat. If however we were to reverse the polarity and connect the PMOS source to a negative voltage with respect to the NMOS gate, then clearly there is now a direct current path through both body diodes. This causes a direct short-circuit across the power supply. Regardless of whether the transistors are switched on or off, a large current will flow, causing excess heating and damage to the circuit. (*) You can search further for MOSFET body/parasitic diodes. (**) Ignoring possible latch-up issues.
H: Unknown equation in the SPICE resistor model I was looking for simple resistor spice model, and came across this: parameters +rsh = 40 dw = 0 dl = 0 +tc1 = 0 tc2 = 0 pvc1 = 0 +pvc2 = 0 pvc3 = 0 ... +teff = 1+tc1*temp+tc2*temp*temp R0 ( p n ) resistor r=rsh*(l-dl)/(w-dw)*teff*(1+pvc1*(tanh(pvc2*abs(v(p,n)/(l-dl))+pvc3)-tanh(pvc3))) Source I am pretty familiar with almost all of typical resistor parameters, but I can't find any information about that particular resistance equation and any of the "pvc" parameters. Specially about this part: (1+pvc1*(tanh(pvc2*abs(v(p,n)/(l-dl))+pvc3)-tanh(pvc3))) Where does this equation come from? Where can I find out more about it? UPD: This is probably on-silicon model AI: pvc* could be "process variation coefficient " similarly to the tc* which i'd read to be "temperature coefficient " when used in the way they are to produce a value for teff.
H: Power a 12V Solenoid and a RPi Zero with the Same Wall Socket I'm building this circuit using an RPi Zero and this 12V solenoid. I would like to be able to power the RPi and the solenoid from the same wall socket using a single power supply. For example, I've been using a 5V 2.5A switching power supply to power the RPi, but am open to other options. How would I go about doing this? I'm open to using a rechargable battery pack to power the solenoid if it can be recharged via the power supply or RPi. Size is a consideration - smaller components are better. Any input is welcome! AI: Power the entire circuit from a 12V wall adaptor with enough oomph to run the solenoid, the Pi, and everything else. Then run the Pi itself from a 5V regulator that runs off of your 12V rail.
H: What happens when you assign the result of a reduction operator to a multi-bit wire? I may just be having a mental breakdown, but what should be the value of f after the following: wire [3:0] u = 4'b0101; wire [3:0] f = |u; Should this not create an error? What am I missing? AI: After simulating in Vivado, I found that the undefined bits are overridden when the | operator is applied to a vector with a 1 in it, and the result 1 is placed in bit 0. If no 1 is detected (only 0 or X), the rest of the vector is returned as 0, but bit 0, the result, is returned as X. In other words, Verilog, at least in Vivado's implementation, produces: |(4'bX010) = 4'b0001 |(4'bX000) = 4'b000X |(4'bXXXX) = 4'b000X Per your question, no "error" is caused, because these are all defined values of Verilog's wire data type. This result makes sense because a 1 in the input vector must, by definition, OR to produce 1, but since an undefined value could be anything, we can't say for certain what the result is if we're only ORing it with 0s.
H: Voltage controlled connection of two signals that are at higher voltage than the control voltage Given are two signals A and B. I want to control the connection between them by a signal C. However, signal C is a logic signal with a voltage of 3.3V for high and 0V for low whereas signals A and B are at a level of 4V. How can this be done? Using a Mosfet with C as gate and A and B as Drain or source, respectively will not work as C would have a lower voltage than the source. Therefore, the difference G - S would always be negative. AI: Is this what you are trying to think of.
H: Is there a meaning of stripes on RS485, Phone and Ethernet cable? I recently bought some RS485 cable, it had two pairs, both had stripes. One was mostly blue with a white stripe and the other was white with a blue stripe. I'm mostly used to ethernet with a pair consisting of completely solid and white with a stripe. Large phone cables have solid with white stripes, and solid. So is there a meaning to any of these? Is the striping set by manufacturers or have any meaning beyond indicating a pair? AI: User @Justme was correct about it being a twisted pair but the stripped line indicates positive and solid colored line indicates negative. So for an example, let's say you have two twisted pairs: One for RX and TX. Much like RJ45, etc., RS485 will also have RX and TX signals. Picture can be found here... Not my picture. The positive and negative wires are for differential signaling. You can find more details on that with this Network Engineering StackExchange answer (What do the positive and negative (+/-) transmit and receive pins mean on Ethernet cables?).
H: How does this circuit start up? I'm trying to understand how CI HT7A6322 starts up. Relevant part of the datasheet says: Control circuit power supply. Also provides a charging current during start up due to a high voltage current source connected to SW. For this purpose, a hysteresis comparator monitors the VCC voltage and provides two thresholds: VCCON: Voltage value (typically 14.5V) at which the device starts switching and turns off the start up current source. VCCOFF: Voltage value (typically 8V) at which the device stops switching and turns on the start up current source When the circuit is connected to mains the internal current source is ON state which is connected together with SW pin. This current source in winding A induces a voltage in winding B powering the VCC pin. Is my explanation correct? AI: At the top of the block diagram on page 2, there's a MOSFET that functions as a current source connected between SW and VCC that can withstand the full line voltage. It passes a tiny current (via winding "A" of the transformer) that doesn't cause too much dissipation inside the device. This current is not sufficient for operation of the switching regulator, however. This current source charges the capacitor attached to VCC until it reaches Vccon, at which point, the switching begins (powered temporarily by the charge on the capacitor) and larger amounts of power can be transferred via the auxiliary winding "B" on the transformer to keep things going continuously.
H: Constant current LED driver using opamp I'm trying to design a constant current LED driver and am totally confused! This is the schematic i end up with: simulate this circuit – Schematic created using CircuitLab What's the formula for calculating R1? What's the formula to calculate the required low-pass filter capacitor? Is this how we calculate the current: output current = Vref / R2? How reference voltage affects the circuit (decreasing Vref to 2.5V)? AI: simulate this circuit – Schematic created using CircuitLab Figure 1. The redrawn schematic. This shows the feedback arrangement more clearly. What's the formula for calculating R1? R1 and C1 are creating a low-pass filter between the base and emitter to help prevent oscillations. What's the formula to calculate the required low-pass filter capacitor? $$ f_{cut-off} = \frac {1}{2 \pi RC} $$ Is this how we calculate the current: output current = Vref / R2? Yes. The voltage will rise on the output until V- = V+. This will occur when \$ I = \frac {V_{ref}}{R_2} \$. How reference voltage affects the circuit (decreasing Vref to 2.5V)? The current will be affected. You need to reduce it anyway. See below. As presented the circuit will try to pass 3.3/1 = 3.3 A. The emitter of the transistor will be at 3.3 V. That means that the collector will be > 3.3 V. If 3.3 A was able to flow you would have a maximum of 1.7 V available for your LED and it won't light much, if at all, unless it's an infrared type (as it has the lowest Vf). In practice (as pointed out by @What below) the current would level off at a much lower value but more than enough to light an LED. simulate this circuit Figure 2. An adjustable current source. Any pot in the 1k to 100k range should work fine. Drop the reference voltage to 1 V (for easy maths) and you should get it to work.
H: Need smaller pullups on i2c lines, but design is low power, what is best? The pullups on my i2c lines are 4.7k. People are afraid of draining the battery by fixing this waveform with smaller pullups, like 2.2k. It doesn't seem much power is wasted considering the short duration of the bus being low (2-4 byte transfers) and the 400k bus speed. I am concerned about reliability with the waveform this distorted. What is the effect of the curving leading edge? It would seem to delay sampling of sda on the rising edge of scl. AI: Short answer: You are absolutely right not to worry about the smaller pullup resistors, since your bus will be in a high state the vast majority of the time. Moreover, the slow rise times will probably increase the power consumption significantly. Just use the 2.4kΩ resistors. Long Answer Very slow edge rates will actually cause CMOS inputs to consume more power than faster edge rates. Let's take a look at a typical CMOS input stage: When the input voltage is in an intermediate state, both the PMOS and NMOS transistors will be partially on, resulting in a surge current (typically on the order of several milliamps). This current will be drawn by every device on the bus as long as the voltage is in an intermediate state. It is reasonable to assume that most I2C devices use Schmitt trigger inputs, which are designed to handle slow input transitions. However, do Schmitt trigger inputs consume less power? Unfortunately, no. This is a common misconception, so let's look at a typical CMOS Schmitt trigger: Note that the basic structure stays the same, meaning that surge current is still a problem. So, long story short: the slow rise times from the weak pullup resistors will most likely increase power consumption. This is especially true if there are multiple devices on the bus. Take a look at these articles from Texas Instruments for more information: Implications of Slow or Floating CMOS Inputs (source for first image) Solving CMOS Transition Rate Issues Using Schmitt Triggers (source for second image) Understanding Schmitt Triggers
H: How to power a device using a USB port instead of AA batteries? I have a device that uses 3 AA batteries and I would like to power it from a USB port instead. As I understand I will have to use resistors but I have no idea on which ones. I have found the following calculator: Voltage Divider Calculator While it does its work, the wiring shown in diagram is quite confusing: I guess this is some logical schema rather than real wiring schema. Question: What resistor values do I need to get ~3.6V from a 5V USB port, and how should I wire them ? Is there a better way than using resistors to get 3.6V from 5V? AI: Resistors will not be the best option, you need to know the source current of the device and there will be large voltage swings if the device changes it's current. Resistors may also not be possible if the device draws large amounts of current. Three alkaline batteries is lower than 4.5V (could be as low as 3.6V when their dead). Since the device running from 3 alkaline batteries should be able to accept 4.5V, a voltage regulator like the might be a good way to ensure that the device is getting the appropriate voltage, however you might need to select one with a lower dropout than 0.5V which might be hard if your device needs more than 100mA. Another option would be to find out if the device already has a linear regulator or switching regulator on the input. If it does, then you might be able to run 5V straight into the device.
H: Do I need to recertify a product if I add a DC to DC converter? I have a product that has been FCC verified as an unintentional radiator, I have fixed a problem with the power that required a DC to DC converter that operates in the 100kHz to 300kHz range (added to the product). Would I need to get re-certified? Why or why not? Can you provide an requirement from the FCC? I have my opinion and so does my supervisor, and we are not on the same page, so I will need concrete evidence to support one way or the other. AI: First of all you have to re-verify your product to check if it has higher EMI emissions or not. If not, no re-certification is necessary provided you comply with the required documentation for such verification (Section 2.1043). Otherwise, if the DC/DC converter is incorporated in the circuit of the original product, you have to re-certify. If the DC/DC converter is a separated box and connects to the power source and your product through wires with connectors) either it is already certified by its manufacturer, or you have to certify it yourself, apart from the already certified product. https://transition.fcc.gov/bureaus/oet/info/documents/bulletins/oet62/oet62rev.pdf
H: ICSP (pickit2) on 3.3v dsPIC33 I'm using a dsPIC33FJ64MC202 (@3.3V) for some project. I normally program my PIC projects with MPLABX through a PICkit 2, but I never tried using it on a 3.3V chip. Will it work? I know the target Vdd value can be adjusted but, based on the programmer's schematics (datasheet, appendix B, page 77), only the Vdd pin would change and data pins would still be driven by the programmer's internal PIC's outputs (PIC18F2550 @5V). My PIC's datasheet says it supports ICSP but it does not clarify if specifically PICkit 2 are supported. The chip has three different PGD/PGC pairs, where two are located on pins that support 5V logic. Is that the only way? Am I supposed to only use those? AI: So long as you have an official Microchip PICkit 2 or 100% clone it should be able to safely program 3.3V chips. You might want to choose 'manual device select' to ensure that it doesn't apply 5V while trying to detect the device. Here is part of the schematic showing the ICSP interface. Q2, Q3 and Q5 clamp the signal voltages to target device Vdd if they try to go above it.
H: SPI signals show overshoot and ringing - does that affect reliability? Here is MISO in yellow and MOSI in purple. I thought I would use a ferrite bead in series of each signal to filter out the noise. I will be making hundreds of these boards. I'm not sure it is worth fixing, but I wanted these boards to be reliable as possible. Here is an updated photo: 1. yellow CS 2. light blue sclk 3. purple MISO 4. dark blue MOSI I used 4 probes on 10x with close grounds. I am running SPI at 2Mhz. The under and overshoot (see ringing) on MISO is 1V magnitude. It seems the ringing couples to MOSI. How can I mitigate this? Would a series 33ohm resistor help? AI: There are two potential issues that come to mind: Signal integrity affecting reliability of communication. Although you don't say so explicitly, I'm assuming you don't see any indication of corrupted data in either direction. But that's not enough - you want to know how much margin you have, both in time and in voltage, to datasheet guaranteed thresholds. If those margins are very healthy (exactly what that means is an engineering judgement call) then you have some confidence that things will still be ok on different units and at different temperatures and over modest variations in supply voltage etc. If the margins are not enormous then you can gain some confidence (or concern) by testing on different units and at extremes of anticipated temperature and supply voltage. Don't just functionally test - take scope measurements in all of those conditions and see how much the margins change. SPI can generally tolerate quite substantial ringing, overshoot, crosstalk and other waveform ugliness on the MOSI and MISO signals - more extreme than I see in the scope shot provided - provided they are adequately settled by the time the sampling edge on SCLK occurs. Integrity of SCLK and to a lesser extent CS is more critical, because there is logic in the slave and/or master that's triggered by the edges of those signals. Monotonicity of SCLK is particularly important. You haven't provided scope shots of SCLK so I can't comment on how yours looks. As BBON notes, correct probing technique is important to prevent things from looking worse than they actually are. Conversely, sometimes probe tip capacitance will slow down an overly rapid edge, mitigating ringing and overshoot and giving false confidence. At least make sure you're using a 10x probe rather than 1x to reduce the loading effects. Overshoot and undershoot violating abs max voltage ratings. The signals appear to briefly exceed 3.3V on the rising edge and go below 0V on the falling edge. If severe enough, this can cause cumulative damage to the receiving buffer structure in the ICs. Typically they can tolerate up to 0.3 V above Vdd and 0.3 V below GND indefinitely without any problems, but check the datasheets. Usually they can tolerate larger excursions than that if they are very brief (as they will be in overshoot) without damage, even when repeated billions of times. However, often the datasheets do not give info on this, and if they don't and you care a lot about long-term reliability then you should ensure you don't exceed the DC absmax even for nanoseconds. Termination of some kind will help with this. For digital signals up to tens of MHz, adding a 33 ohm resistor in series with each output driver (close to the driving IC) will usually tame it adequately without needing to bother with fancier term schemes or controlling the impedance of the PCB traces. Also, apparent overshoot/undershoot is very often just due to inadequate probing technique, so make sure you're doing that right before wasting time with circuit mods.
H: Are electrical properties measured using the International system of units (SI)? What measurement system is used to measure electrical properties such as voltage, current, etc.? I understand the units are defined by SI (at least according to this article), but is that considered the measurement system used to measure properties of electricity? It is confusing me because I have some people telling me that scientific notation is required for it to be considered part of the SI system, and that engineering notation is not part of the SI system. So I am unclear if I am indeed using the SI system when measuring electrical properties. If not, then what system am I using? To clear up ambiguity, the old definition of "the metric system" is not intended to be the topic of the question. I aim to clarify that any statements I make that refer to "the metric system" in comments refer to the modern International System of Units (SI). AI: The term "metric system" is not the correct terminology. We use the SI, the International System of Units that defines certain base units as well as a much larger set of derived units. The base units must be defined in terms of reproducible physical phenomena, then the derived units are defined in terms of the base units. The ampere is a base unit. According to IEEE/ASTM standard SI 10-2016: The ampere is that constant current that, if maintained in two straight parallel conductors of infinite length, of negligible circular cross section, and placed one meter apart in a vacuum, would produce between these conductors a force equal to \$2\times 10^{-7}\$ newton per meter of length. The volt, the farad, the coulomb, etc. are derived units. The SI does not say that you can or can not use exponential notation and it does not specify what "engineering notation" would be. It tells you what letter to use for the symbol for a unit (e.g. F for farad) and specifies the prefixes that can be used instead of exponential notation. There are quite a few other rules and suggestions...too many to include here.
H: Does increasing voltage increase the torque of a brushless motor? 1.) I have a brushless motor with testing data at 12V. I want to know if I increase the voltage supply, will this increase the torque? In my research I keep seeing "current controls torque, and voltage controls speed." But that doesn't seem quite right. Let's say I have a theoretical electrically powered unicycle that is weighted. With a 5V source and 2A, the motor can't move the unicycle. But now I increase the voltage to 10V, and I believe current will also increase by x2 if resistance is constant (V = IR). So now the torque increases and the unicycle can move itself. It that a reasonable sequence of events? Can I say that increasing voltage increases torque? 2.) A similar question: if P = VI = tau*omega, then P/omega = tau, so: 2*(P/omega) = 2*tau, which means increasing power will increase torque, correct? And since P = VI, increasing V will increase P, which will in turn increase torque. Is this accurate at all? AI: In my research I keep seeing "current controls torque, and voltage controls speed." But that doesn't seem quite right. Let's say I have a theoretical electrically powered unicycle that is weighted. With a 5V source and 2A, the motor can't move the unicycle. But now I increase the voltage to 10V, and I believe current will also increase by x2 if resistance is constant (V = IR). In the situation where the motor is not yet turning, doubling the voltage will indeed double the current and double the torque — because the voltage is acting against the resistance of the wire in the windings only. But the winding resistance is only an inefficiency (it turns input power into heat, not motion). In addition to the resistance, a motor exhibits a phenomenon called back-emf where it generates its own voltage (acting as a generator) when it is turning. At zero speed, the back-emf is zero, and the applied voltage is unopposed and the maximum current flows. (This condition is called “stall”.) As the motor speeds up, the back-emf increases, and thus less current flows because there is less of a voltage difference. Think of it like charging a battery or a capacitor - when the internal voltage is low, the current is high, and as it charges (as the motor increases speed) the current decreases (unless the applied voltage is also increased). (This description is most simply applied to a brushed DC motor, but a brushless DC motor acts generally similar if you consider the motor and the motor controller (at its simplest, an electronic replacement for the mechanical commutator) as a unit.) To summarize: "Current controls torque" — or more precisely, “current is proportional to torque”, since the motor is a bidirectional system that can equally well generate current if there is input from the mechanical side — is true all the time. "Applied voltage controls torque" is the whole story only when the back-emf is zero, when the motor is stopped. A similar question: if P = VI = tau*omega, then P/omega = tau, so: 2*(P/omega) = 2*tau, which means increasing power will increase torque, correct? And since P = VI, increasing V will increase P, which will in turn increase torque. Is this accurate at all? \$P = VI\$ is not wrong, but the \$V\$ here is the difference between the voltage source and the back-emf, so \$P\$ depends on the speed, not just the voltage. Another way to think about all this: consider a simple non-speed-controlled motor that's turned on and “up to speed” with nothing attached to the shaft — no load. We know from practical experience that such a motor does not waste enormous amounts of power, only get a little warm compared to a motor driving a big load. There is a significant voltage applied to its terminals, yet there must not be a large current (if there was, there would be power going somewhere). The reason there is little current is because the back-emf is nearly equal to the supply voltage. Here's a simple simulatable model: the current through the "winding resistance" is 0.1 A, but if the motor were not turning, the back-emf (modeled as the voltage source labeled Vemf) would be 0 and the current would be 1 A. simulate this circuit – Schematic created using CircuitLab
H: Reducing power draw from appliance I have an appliance (electric skillet) that draws 1500W when plugged into a regular (120V) household circuit. If I want to be able to use it on an inverter that can supply max 1000W@120V, can I build a device with a transformer to limit the current drawn from the appliance to 1000W? AI: yes, you can use a transformer to reduce the power draw. Assuming a nichrome heating element with a resistance of 9.6 ohms Reducing the voltage to 96 volts will bring the power down to 960 watts at 10A so you need a transformer that can handle 10A with a ratio 4:1 (primary and sencondary in series) or 5:1 (secondary bucking) simulate this circuit – Schematic created using CircuitLab series droppinmg is preferred as you only need a 200VA transformer , but off the shelf parts are more common in 5:1 ratio (120V in 24V out), for that layout 240VA is needed you could maybe use this one: https://nz.element14.com/schneider-electric/abt7esm032b/transformer-320va-1-x-24v/dp/2070221 but replacing the inverter might be cheaper.
H: Disturbance Rejection in a Closed Loop Control System I was reading an article about disturbance rejection of closed loop control system and I came across the sentence "becomes almost zero, and the effect of the disturbance is suppressed." I have also attached snapshot of article and highlighted the confusing part of sentence. I am not able to understand how closed loop transfer function of the disturbance accounted in the system becomes zero?? AI: In control systems the loop gain LG (product of all transfer functions within the closed loop) is a very important parameter. In your case, the loop gain is LG(s)=G1(s)*G2(s)*H(s). As you can see, the closed-loop transfer function for the disturbed input Hd(s)=Cd(s)/D(s)=G2(s)/[1+LG(s)] will be rather small ("almost zero" in the text) for a large loop gain LG(s)>>1. For the reference input the situation is different because the product G1(s)*G2(s) appears also in the numerator of the closed-loop function Hr(s)=Cr(s)/R(s). With other words: Both closed-loop functions have the same denominator (1+LG) - however, the numerator for the closed-loop reference function (G1*G2) is larger than for the closed-loop disturbance function (G2). Hence, the influence of the disturbance signal is smaller if compared with the reference signal.
H: How to convert capacitor impedance to ESR? I select an output capacitor for a DC / DC converter (LM2596), it is said that it needs a high ESR (50-60mOhm). In the characteristics of electrolytic capacitors there is no given value, but there is impedance. How can I get ESR from impedance? I'm considering the YXF series from Rubycon, data sheet here AI: You can't directly get the equivalent series resistance (ESR) from the impedance. You can estimate it from the measured impedance in the datasheet. The datasheet impedance value includes impedance from the capacitor, the equivalent series inductance (ESL,) and the equivalent series resistance. You could calculate the capacitor impedance for its value and the given frequency, and subtract that from the impedance given in the datasheet. Take an example from your datasheet: The 1uF, 50V capacitors from that series have an imepance of 4 ohms at 100kHz. An ideal capacitor has an impedance of 1.59 ohms at 100 kHz. The difference of 2.41 ohms is then the sum of the ESR and the ESL. There's no way really to separate the two. In any case, I can't imagine that your LM2596 would be happy with it. Another thing to look at is the rated ripple current. This value should be part of the design process for your circuit. The calculated ripple current for the capacitor must be lower than the ripple current rating in the datasheet. The datasheet for the 2596 specifies low ESR capacitors, and recommends solid tantalum. If it were me, I'd just use tantalum and be done with it. Many folks don't like to use tantalum because they have a tendency to burst into flames if mistreated. In that case, look around for aluminum electrolytics with about the same ESR as tantalum. You should either get the ESR from the datasheet, or you should measure it. The preference should be to get the ESR from the datasheet. The manufacturer will have designed the part and tested enough of them that the value should be reliable. If you measure the ESR yourself, you'll have to check all (or at least a representative sample) of every batch you buy. If it isn't in the datasheet, then the manufacturer probably isn't making any effort to have the ESR be consistent - you will have to keep an eye on it if it is critical for your design. For a one off hobby project you could probably put up with it. If you are making thousands a week, not so much. There are some general rules about ESR. Certain types of capacitor tend to have certain ranges. But, that won't necessarily help you. Two aluminum SMD electrolytic capacitors could look nearly identical and have the same voltage and capacitance rating - and drastically different ESR ratings. If you need a (relatively) high ESR, then you can add a small resistor in series with a low ESR capacitor. Tantalum capacitors have (relatively) low ESR. Aluminum capacitors can have very low ESR (lower than tantalum) but they can also have higher ESR - you must select the ESR you need. Ceramic capacitors can have very low ESR, but the capacitance is limited and can vary with the applied voltage.
H: 230VAC line voltage sensing using MCU pin I Am designing a circuit to detect the presence of AC line voltage.It is basically to detect the switch On/OFF for a load. Here is the circuit. Here Input resistor ladder to step down the voltage. Varistor added to get it away from surge (Fuse included). zener to protect the opto. Opto is darlington with transistor to reduce the opto input current and therefor the input resistor losses. Since this going to commercial product i would like to gather some info on reliability and surge protection. 1) Is this circuit good enough to handle potential surges/Back emf from inductive loads. 2) Is there any better/cost effective alternatives. 4) I am using 8 in my board to detect 8 channels all are powered from same AC source. Is there a way to consolidate these and reduce overall cost? Thanks in advance! AI: This is simplified version of your schematics, that should work equal. simulate this circuit – Schematic created using CircuitLab For example SFH628A-4 has a CTR ratio of 250 at 0.5mA IF current. The absolute maximum allowed forward current is 50mA. The insulation resistance is 5.3kV. So at 5.3kV spike, the current trough diode would be 5300/440= 12mA, which is far from absoulte rating.
H: Side-channel leakage and instruction types on microcontrollers Since the end of 90s, it is known that side-channels (e.g. execution time, power consumption, electromagnetic emanations) of computation platforms can be analysed to recover information on data being manipulated (e.g. keys in cryptographic calculations). On load/store architectures, it seems that the amount of leakage depends on the type of instruction. For instance, some papers report successful results when exploiting leakages related to intermediate values manipulated by memory instructions (e.g. load/store instructions) while ALU operations do not seem to produce any exploitable leakage. See for instance this paper for experimentations on ATmega2561 processor (using power consumption as side-channel) and this paper for experimentations on ARM-Cortex M3 processor (using electromagnetic emanations as side-channel). How could we explain, from an architectural point of view, that ALU instructions might be less prone to information leakage than memory instructions? AI: I think it should be obvious that anything that causes operations on memory is going to involve a lot more logic switching than operations that are handled entirely within the CPU itself. The signals associated with doing an "add" versus an "and" are going to be extremely subtle compared to everything else that is going on associated with instruction fetching and execution in general.
H: Convert select / trigger coils to direct fire Working on ignition system controlled by prehistoric ECU, it has 2 signals: select and trigger. Select switches CoilA and CoilB. Trigger controls dwell time. I want to purge old broken coils and install modern ones with integrated ignitors. So need to convert select/trigger signals (0..5V) to 2 direct outputs for each smart coil (0..5V). The power applied via different inputs so these signals can be considered as logic only. That can be easy done with a few general purpose logic elements, but I feel this is very common case in electronics and there should be simple existing solution (simple -> single chip). Any ideas? AI: I think the solution you're after is a de-multiplexer (or demux) like one of these with some buffering on the input and output to handle voltage level shifting and line driving. The select line is the 'address' and the trigger line is the 'data' which you want to route to one coil or another. In reality, an integrated demux is only 3 gates. 1 NOT, 2 AND or not many more if you want a pure NAND implementation. So it's not saving you a great deal but i think it's the solution to the common case you're thinking about.
H: What happens to the torque/speed curve of a brushless motor when I increase the voltage? Here is a an image of the torque/speed curve. My guess is that increasing voltage will simply translate the curve up because the slope is the torque constant, which is a physical motor property that will not change with added voltage. I know from this post that increasing voltage will increase stall torque: Does increasing voltage increase the torque of a brushless motor? So does the increasing voltage not only increase the stall torque, but also the overall range of torques the motor can achieve? In other words, the same RPM now correlates to a higher torque in the higher voltage curve? Additionally, if the above is true, here is another question. If the original stall torque in the lower curve is 2.5 N-m, but the stall torque of the higher curve is 3.5 N-m, does this mean that with the added voltage I can now run the motor at 2.5 N-m more safely than I could before since it is no longer the stall torque? Or is the power dissipation the same in both curves so that 2.5 N-m will still be dissipating the same heat? So, if the motor was going to burn up at 2.5 N-m, it will still burn up at 2.5 N-m at the higher voltage input? AI: You characteristics is missing a straight horizontal line, which is called as nominal torque. Even if you increase the voltage, the nominal torque is still the same. The torque is directly correlated with current. Therefore the nominal torque is related to the nominal current which is a continuous current that a motor can accept to maintain the temperature within working conditions. Small peaks are allowed as long the overall utilisation remains below the nominal curve. What you gain with higher voltage is the higher speed at nominal torque, see the double line. Green, yellow and red rapresents load torque curve. The green one is acceptable for both voltages, the yellow would be good for low voltage but overloaded for hiher voltage, the red curve represents overload for both voltages. The final speed is the point where torque curves (your red lines vs load curves) intersects.
H: On interpreting this set of curves (Transistor in Saturation mode and decrease of \$h_{FE}\$) The following figure was excerpted from Horowitz's The Art of Electronics, Appendix G: Transistor Saturation (page 1089 for the 2nd edition), It represents the current gain \$\beta\$ of an npn transistor ( or \$h_{FE}\$) as function of the collector to emitter voltage in the saturation mode of operation. If I understand the curves correctly, for a fixed collector current value, for example 10mA, the current gain \$ \beta\$ decreases as \$V_{CE}\$ diminishes. What I don't understand is how can \$I_{c}\$ remain constant while \$ \beta \$ decreases? We know that \$ I_{C} = \beta I_{B} \$, thus, if we reduce \$ \beta \$ by decreasing \$ V_{CE} \$, then so must \$I_{C}\$, i.e., it should become less and less smaller than 10mA as \$V_{CE}\$ is reduced. Or am I misinterpreting the curves ? AI: Think of applying a constant Vce voltage (say with a lab power supply) and adjusting the base current to get the specified collector current (1mA or 10mA in this case). Then plot Ic/Ib where Ic is constant on the dependent (y) axis for each Vce. As to the reasons why Ic/Ib decreases as Vce decreases, obviously the transistor cannot pull the collector beyond the emitter, so as the collector voltage approaches the emitter voltage the incremental increase in collector current for Ib must at least approach zero (in saturation).
H: TFT RGB LCD construction and I am trying to understand the construction of an RGB TFT LCD that has brightness control in it. I could not understand how does the TFT color LCD pixels glow? Does each of the pixel has its own light that it emits just like an LED or is it that there is a backlight bulb behind the TFT LCD screen and that bulb gives out the light that is passed through the transparent pixels while blocked by the opaque pixels? If this is the case then how does the colors come on the TFT LCD? Are the colors due to the backlight bulb or the colors are in each of the individual pixels? Edit: For example this LCD: https://www.alibaba.com/product-detail/High-brightness-1000cd-m2-5-inch_60312509314.html Is there a single backlight bulb behind its screen? AI: An LCD doesn't emit light. It either has a reflector behind it, or a separate light source (backlight). The backlight may be controllable on any scale from a monolithic whole to a pixel. The LCD selectively blocks light. In a color LCD, each pixel will have 3 segments which correspond to red, blue, and green filters. Color is achieved by blocking these filters to varying degrees with the corresponding element of the LCD matrix.
H: op amp non-inverting input isn't working? simulate this circuit – Schematic created using CircuitLab Why in above schematic if i left the non-inverting input floating or connected to 1V or 3.3V the LED stays ON and current doesn't change with increasing/decreasing the Vref voltage? Also LED current increases with increasing voltage and it's not constant... Table 1 (when 3mm LED and transistor is connected): Vref | Op-amp out | Emitter | VBE -----+------------+---------+-------- 0.0 V| 2.96 | 2.75 | 0.81 0.5 V| 1.16 | 4.48 | 0.66 1.0 V| 1.68 | 3.96 | 0.68 2.0 V| 2.77 | 2.93 | 0.75 3.0 V| 2.98 | 2.75 | 0.80 AI: When Vin- matches applied input Vin+ the current in Rs matches the LED. Thus 100mV/mA= 100 Ohms for a max of 5V-Vce-Vf =2~3V thus 20~30mA. When Vin+ is floating I assume the constant LED on is due to reactive leakage of wire signal , from stray noise such as 50 Hz? Line noise where 0.01 uA leakage into say 10MOhm (OpAmp) is 1V and is possibly more then clipped by supply voltage diodes. With AC stray noise duty cycle would be 50% on a floating control input. V(in+) Thus Vin+ is voltage controlled yet be a low impedance relative to Zin = 10M. So even 100k would be adequate. Shunt cap of 100pf may be necessary in that case if there were large RF EMI signals. So a lower impedance control is preferred.
H: Capacitor Negative Current Flow I have a basic quesiton about circuit theory in general. Consider the following circuit: I understand that the resistor will have a constant voltage of 1V across it as it takes the DC component of the input voltage source. The capacitor will take the AC part of the input voltage source (the 0.5V peak-peak signal). There's my first question: How can there be 1V across the resistor and 0.5V peak-to-peak across the capacitor when both devices are in parallel? Don't they have the same voltage across them? The second question is when the capacitor current goes negative, it's supplying current to somewhere -> where does it supply current to if top node is at same voltage? I feel like I'm missing some basic rule here? AI: I understand that the resistor will have a constant voltage of 1V across it as it takes the DC component of the input voltage source. This is way off base. We model an ideal resistor as able to respond to any applied voltage, whether DC or AC of any frequency. If you want a resistor that only responds to the DC component of the applied voltage, you'd want to include a very large series inductance attached to that resistor. There's my first question: How can there be 1V across the resistor and 0.5V peak-to-peak across the capacitor when both devices are in parallel? Don't they have the same voltage across them? They have the same voltage across them. 1 V DC plus a 0.25 V 1 Hz sinusoid. The second question is when the capacitor current goes negative, it's supplying current to somewhere -> where does it supply current to if top node is at same voltage? In general it could supply current to either the resistor, the voltage source, or both. There's no rule that the current through the voltage source must always flow out the positive terminal.
H: Filter before or after switching regulator? I will be passing a power line (12V-60Vdc depending on the circumstance) with a lot of noise, 300Hz and above, riding on it through a buck regulator. I want to remove this noise with a filter. I don't know whether to place the filter before or after the regulator. The choice that seems more obvious to me at first is to filter after the switching regulator - the power will be attenuated and it's easier to filter a smaller signal. However, I am not sure if this is correct, because this assumes that the AC noise is reduced like the DC power in the regulator. Is this the case? Or does an AC signal in a buck converter behave differently? In summary, I want to attenuate and filter noisy DC power. I'm not sure whether to place my filter before or after the buck converter. AI: It really depends on what you want to protect: The input power from the buck converter, or whatever is being powered by the buck converter. A buck converter primarily causes ripple and noise on its input, due to the fast rise times of most switches used in such converters. You generally place as much quality, ceramic capacitance as you are willing to pay for or have room for on the buck's input, and you place that capacitance as close to the switching current loop formed across the high and low side switches as physically possible. If you aren't extremely careful with the input filter, you can cause all sorts of instabilities in the buck converter, or make the input ripple even worse. 300Hz is nothing, the converter will filter that out like it was never even there. If your input power is already noisy, and you don't really care if it becomes even noisier, then let the buck converter deal with the noise first. It is going to inject wide bandwidth harmonic noise starting at the switching frequency and the harmonics thereof up to as much as several hundred MHz (depending on the rise times). Your switch node will ring well into the MHz range due to parasitics. If you put the filter after the output, then you will attenuate all of this as well as whatever noise remains from the input. Unless it is noise on the same order as the converter switching frequency though, I don't think very much of it will make it into the output. Some always does, but it will be drastically attenuated. By how much depends on the specific regulator and its ripple rejection across the frequency range in question. Long story short, if you put a filter on the input, this will filter the input from the buck converter more than it will filter anything on the output, while putting it on the output will almost entirely filter the output. It is not uncommon to have input and output filters, but if you don't care about even more noise getting dumped into your input from the buck regulator, just filter the output. Also, slap a nice series connected ferrite bead on the input and output. They're cheap, simple, and can work wonders on those higher order harmonics. No one wants those.
H: Window comparator diode direction What happens if we reverse the configuration of diode in window comparator? Will it remain a window comparator? AI: It won't work at all in this case. The output of the opamp goes high, and the diodes turn on when the output goes high. The diodes are in an "or" configuration allowing either of the comparators to pull the 4049 high (towards 5V). If the diodes were reversed, very little current would flow and the circuit would not function as intended and the input of the 4049 would always remain low.
H: Driving a TC4428 using PC817 I want to drive a mosfet using a mosfet-driver (TC4428). The frequency of turning on-off of mosfet is 5-10 Hz (yes Hz) and duty cycle is 10-20%. I use PC817 as below to make isolation: As you see, if FLASH1 STROBE be 4.8 volts, voltage of collector will be 0.18 volt. FLASH1 STROBE comes from a ATMEGA16 port. Is there any problem with this design? I mean 0.18 volt on collector and 4.8 volt on FLASH1 STROBE. AI: There are two problems normally optoisolators in this setup: - Rise times - Not a low enough V_IL for the gate driver Rise times aren't going to be a problem at 5 to 10Hz. The V_IL is 0.8V for the TC4426 so if the optoisolator pulls down to 0.2V you should be fine.
H: What the R value to this operational amplifier isn't saturated? In the following circuit, the three ideal operational amplifiers are polarized such that their saturation voltages are ± 20 VDC. The other components of the circuit are resistors, one of them being adjustable (the Rx). What is the limit condition for adjusting Rx so that the output voltage does not saturate? A) 3kΩ < Rx < 4 kΩ. B) Rx > 5 kΩ. C) Rx < 5 kΩ. D) 4 kΩ < Rx < 5 kΩ. E) Rx < 4 kΩ. My attempt: Consider \$V_{down}\$ and \$V_{up}\$ the voltage on Buffers inputs are \$\frac{40}{3}V\$ and \$\frac{20}{R_x + 1}V\$ respectively. So the Summing Amplifier is: $$V_{out} = -2k\left(\frac{\frac{20}{R_x+1}}{1k}+\frac{\frac{40}{3}}{2k}\right)$$ Consider that \$V_{out} \leq -20V\$ (I'm not for sure this statement) $$-20 \geq -2k\left(\frac{\frac{20}{R_x+1}}{1k}+\frac{\frac{40}{3}}{2k}\right)\Rightarrow 10 \leq \frac{20}{Rx+1}+\frac{20}{3}\Rightarrow \frac{1}{Rx+1}+\frac{1}{3} \geq \frac{1}{2}\\ \frac{6}{Rx+1}+2 \geq 3\Rightarrow 6\geq R_x+1\Rightarrow R_x \leq 5k\Omega$$ I find the letter C) but the correct answer is letter B). What did I miss? AI: Your bottom buffer drives the output to -13.33V. The top buffer can drive it only 6.66V lower before hitting -20V. The top buffer has a gain of two through the last stage, so it must be kept BELOW 3.33V. The voltage divider with the potentiometer then has to keep the center tap node BELOW 3.33V. That means the pot value has to be at LEAST 5 times the 1K value of the fixed resistor, or that node will be pulled too high. There's no danger of saturating the output on the plus side, since it inverts and there's no way to give it a negative input in this circuit.
H: What does an U244B IC’s input voltage do? I’m new to electronics and I’m trying to connect a U244B ic on a breadboard. One pin says it’s an input voltage (pin 7). It works without anything being connected to the input and with battery connected to the supply voltage (pin 8). What is it supposed to do? https://www.web-bcs.com/oem/tf/U244B.html AI: The U244B is a bar graph display driver. It lights up the LEDs in relation to the input voltage. It is designed to work together with the U254B. Each drives 5 LEDs. Together they drive 10 LEDs. The levels to turn on each LED are interleaved so that you can use the two together to get a finer grained display. Both ICs together looks like this: The response of the ICs to the input voltage looks like this: You supply an input voltage between 0 and 1 volt, and the bar graph lights up in proportion to the voltage. Higher voltage, more LEDs light up. If the input is unconnected, it "floats" up to some higher voltage and all of the LEDs light up. Apply 0 volts to pin 7, and all of the LEDs will shut off. Apply 0.6 volts to pin 7, and 3 of the LEDs will light up. If you wire and arrange the LEDs as shown in the diagrams, you get a simple bar graph readout of the voltage. Sort of a like a bargain basement version of the LM3914 bar graph driver.
H: Can a DC brushless motor produce the same torque at different power levels? I am looking these Neo Brushless motors for a project. Here are the links to the data sheet and also to stall testing from the company: http://www.revrobotics.com/neo-brushless-motor-locked-rotor-testing/ http://www.revrobotics.com/content/docs/REV-21-1650-DS.pdf So in the stall torque testing, on the last test with 80A limiting, they were able to achieve a torque of about 2.3 N-m. You can see the current is about 25A and the voltage is about 10V. This gives a power of 250W at stall. Now, looking at the data sheet, they list a stall torque of 2.6 N-m. They also give a voltage of 12V and current of 105A. This equates to power draw of 1260W. How is this same motor producing the same torque at wildly different power values? I assume this isn't gearing related since these are motor tests to figure out the limits of the motor itself. Does it have to do with current limiting? AI: The motor controller acts as a buck type switching regulator with the motor windings acting as the inductor. Since the voltage across the windings when stalled is only the resistive drop from the current passing through them, there's no back EMF to overcome from mechanical work being done, the controller will be switching at a (fairly low) duty cycle that maintains the 80A limit through the windings, and this translates to only a smaller mean input current to the controller - the 25A you mention As the motor warms up, and the resistance of the windings increases, the controller will increase the duty cycle to maintain that limit, and so the input current will rise for a steady phase current. This is spelled out in the OP's linked page describing the testing - Please take the following into consideration when interpreting the data below: Average motor phase current (or winding current) is different than the average input current to the motor controller. Average Input Current = Average Phase Current x Duty Cycle Motor torque is proportional to phase current, not the input current. Therefore, it is important to control the phase current and not the input current. 2.3Nm at 80A and 2.6Nm at 105A are not too far out of line with each other.
H: Can I use individual strands in cat5 or cat6 solid core wire for pcb mods / jumper / repairs? I have a small PCB repair I need to make. I am reading that wire-warp is a suitable option. I don't have any wire wrap, but I do have tons of cat5 and cat6 solid core wire. I was thinking about gutting one of those and using an individual strand from as a jumper. Is this a bad idea? Or is this a case of if it works then it is a good idea? AI: You can, its really great for breadboard wire. I used to use Ethernet or phone as my primary way to prototype (now I only solder). A better way is to use the standard "blue wire" 30AWG for jumper connections, its smaller so it's easier to attach to most SMT pins. There are some caveats with solid core ethernet wire though, The main problem is strain relief and breakage. As with any wire, stripping can nick the wire, and the wire breaks after moving. This is especially a problem if the wire is causing intermittent connections, it can be hard to track down. So be careful not to nick the wire, and if you can, provide strain relief with tape or soldering. Don't move the wire after it is placed. (you should also not use solid core ethernet from the wall to the computer, if it's stepped on it breaks, and if it's moved too much it breaks, use stranded instead)
H: Do I really need to learn how to use registers - Programming a microcontroller? I have a curious question. Do I really need to learn how to use registers when I program a microcontroller? I have been using Arduino for a long time. I quit using Arduino and starting to use STM32 because they are more cheap, faster and just better microcontroller. They do require more knowledge about C programming and what a microcontroller can do, because you can do more with STM32 than Arduino. Anyway! I have tried to blink LED and read digital inputs e.g toggle with a STM32 by program it with registers. It's time consuming and painful. Luckily STM offer CubeMX so the user can setup a complete project with HAL-libraries without using any registers. Super easy and super fun! This is how Atollic CubeMX looks like. And now my real question, why I started this question. I have been using Atollic TrueStudio. Works fine. But today I upgraded my Atollic TrueStudio and STM have implemented CubeMX into Atollic TrueStduio. Before I have to download both Atollic TrueStudio and then CubeMX. Seperate software in other words. But today Atollic TrueStudio and CubeMX is merged together into one software. Great! That's really good. But...to create a project for a STM32 microcontroller, you need to create a CubeMX project. There is no "Create a blank ARM project in C" as it was before. Now is like "You want to create a STM32 project? Well, you never going to use register anymore so we choose for you! Here, have a CubeMX with HAL-libraries project! Ready to run!" Well...that's great! But do STM assume that working with registers is not necessary when I use STM32? I have no problem to use SMT32 with CubeMX + HAL libraries. Not at all. But I'm worried if I become "stupid" if I use CubeMX + HAL just to make it easy for be. Should I program a STM32 with registers or should I use CubeMX + HAL libraries? Notice that this is a 32-bit microcontroller of tons of documentation and not a simple AvRTiny8. Today I create large projects with STM32 thanks to CubeMX + HAL libraries. I could never do that without this technology. Here is the reason why I use STM32. It's just.....better if you compare the price and what you get. AI: do STM assume that working with registers is not necessary when I use STM32? Yes. They don't want you to bang the registers directly, because then they would have to document them properly and you would have to know about any differences between devices (including hardware bugs). By going through the Hardware Abstraction Layer you are shielded from all that and can concentrate on application code, which will then work without modification on different STM32 chips. There may come a time when either the HAL libraries can't do what you want, don't have the performance you need, or have bugs you need to work around. Then you have a choice - learn the hardware and write your own code (preferably using the same HAL system), wait for ST to update the HAL, or go to another MCU with better support. Today I create large projects with STM32 thanks to CubeMX + HAL libraries. I could never do that without this technology. So you already have the answer. In the past it was different because the HAL was poorly documented and CubeMX was full of bugs, so some of us tried to work without it - and failed. Banging the hardware is only tenable if you are a masochist with a lot of time to waste, or an expert who has already built up their own codebase.
H: Arduino lack of accuracy in AD conversion let's consider this simple piece of code: void setup() { Serial.begin (9600); } void loop() { int code = analogRead (A2); double voltage = code *5/1024; Serial.print("Voltage is "); Serial.println(voltage); delay (500); } It is simply the A/D conversion of a voltage applied between A2 and GND. Unfortunately I saw that this reading is not so accurate. Precisely, if I use a battery of 3.5V, on the serial monitor I will see the value voltage = 3.00. If I use a battery of 1.5V, I will see 1.00 V. This means that the program works correctly, but it is not accurate. Which is the reason for this and how can I solve it? I do not understand the reason for this since the resolution of Arduino as ADC is equal to 5/1024 = 4.88 mV, so I think that we may have a quantizazion error of 4.88mV, and not of 0.5V. AI: The problem is how your calculation is being expressed. The calculation for voltage will be done using integer math and then the result is converted to a double, resulting in the values you report. Corrected code: void setup() { Serial.begin (9600); } void loop() { int code = analogRead (A2); double voltage = (double)code * 5.0 / 1024.0; Serial.print("Voltage is "); Serial.println(voltage); delay (500); }
H: Components calculations for this circuit. Is my reasoning right? In order to review some concepts, I decided to solve the circuit below that I found. It looks like a homework, but actually it's something I'm doing by my own. Below the circuit you can check my calculations and correct me if I'm wrong. This is the statement: The circuit shown can be used to monitor the voltage of the source VCC. Determine the unspecified components in order to: a) turn D7 on when VCC >= 13.5V, b) turn D2 on when 12V =< VCC < 13.5V, and c) turn D1 on when VCC < 12V. Assume that: Diodes voltage drops are 0.7V VCE_sat = 0.2V Pz_max = 500 mW Iz = 20 mA V_LED = 1.2V I_LED = 10 mA Hfe = 100 VBE = 0.7V This is what I have: I'm going to start with LED D7 which is going to be driven by Q3. Let's assume VCC = 13.5V, minimal condition for case a). Voltage at node n1 is 11 + 0.7 + 0.7 = 12.4V. LED current has to be set at 10mA, so minimum base current for Q3 is 10 mA/100 = 100 uA. Say 130 uA to ensure saturation. Voltage drop across R7 is ((13.5 - 0.7) - 12.4) = 0.4V, this yields R7 = 0.4V / 130 uA = 3.08k. Zener current is 20 mA. This means that Q3 base current plus current through R8 should be equal 20 mA. So IR8 = 20 mA - 0.130 mA = 19.87 mA. Voltage drop across R8 is (13.5 - 12.4) = 1.1V. R8 = 1.1/19.87mA = 55.36 ohms. Assuming Q3 is saturated, then voltage across R6 is VR6 = VCC - VCE_sat - V_LED = 13.5 - 0.2 - 1.2 = 12.1V. As D7 current is 10 mA, then R6 = 12.1/10 mA = 1.21k. When Q3 is ON (VCC>=13.5V), voltage at node n4 will be almost the same than VCC, so LED D2 will be off. When VCC goes below 13.5V, let's say 13.4V, would that be enough to turn Q3 off? For LED D2 to turn on, Q3 must be OFF so voltage at node n4 drops. Imagine now that VCC drops to 12V. Q3 and D7 are OFF and D2 should be ON. Voltage at node n3 should be Vn3 = 12-0.7-0.7-10 = 0.6V. Does not this look insufficient to turn Q2 on? The only component missing now is R1. Below 12V, D1 and Q1 have to be ON. Q2 and Q3 should be OFF. But here is where I'm stuck. Does this mean Q1 base is being pulled up through R3 and D2? I appreciate any input on what I have so far. AI: Below 12V, D1 and Q1 have to be ON. Q2 and Q3 should be OFF. But here is where I'm stuck. Does this mean Q1 base is being pulled up through R3 and D2? Yes. That means D2 will glow weakly as it supplies Base current to Q1. Current will be about 0.3mA, so depending on LED efficiency it might be weak enough to not worry about. If it is a problem then put another resistor across D2, high enough to not draw too much current when Q2 is on, but low enough to reduce voltage below the turn-on voltage of D2 when Q2 is off. eg. 3.3k at 0.3mA will drop 1V keeping the LED off, while at 2V (voltage of green LED when on) it will only draw 0.6mA away from the LED.
H: Generate accurate 20mV Vref I want to generate 20mV Vref using Op amp, like this: When simulate with TINA using model from TI, instead of 20mV at output (Vref port), i see that it is 27.95mV. My question is: Why I can't get 20mV at Vref How to improve this circuit to have accurate 20mV (+/- 5%) Any recommendation for me (other way) to have 20mV Vref? Update: The full schematic here: Current max is 0.4A, Shunt is 10mOhm. AC voltage is 220V 50Hz. R14/R15~ 100 Ohm 3.3VDC is generate from AC/DC Power supply (using LNK306 - I've have prototype) I don't want to add negative Power supply because of cost and space of board. Thanks AI: With a shunt resistance of 10m&ohm; and maximum current of 0.4A rms the full scale input voltage will only be 4mV rms (11mVpp). Op amp input offset voltage could a similar amount so you may have difficulty getting it trimmed out, and the gain is very high so drift could also be a problem. I suggest using a higher value shunt to get more input voltage, eg. 100m&ohm; for 40mV rms. Then you can reduce gain so offset voltage and drift are less of a problem, and the reference voltage will be high enough to buffer accurately. If RV1 is fixed at 10k then you don't even need a buffer. Just give the voltage divider a Thevenin equivalent resistance of 10k and it will do the same job. For example:- simulate this circuit – Schematic created using CircuitLab
H: Load cells in Wheatstone bridge to produce logic signal The goal is to use 4 units of 50kg load cells in Wheatstone bridge to act as a load detector. It should output a logic 0 or 1 if the load is greater than a threshold value. A MCU will read the states of 100 load detectors through a series of PISO shift register. Potentiometers will be used to adjust threshold level and they have to be placed near the MCU which is 5-10 meters away from the load detectors. I have trouble determining a circuit to read the differential voltage signals from the bridge. A signal amplifier IC and a comparator IC might be sufficient. But is there other approach? Edit: The default weight around 2kg. The threshold value varies from 5kg to 20kg. AI: Use an indirect current feedback instrumentation amplifier MAX or Analog Devices,...then subtract tare or threshold setpoint value. Make the REF input voltage such that you will have some well defined voltage in middle of supply voltage, so you can use some comparator with in-built reference voltage. Note that AD needs an opamp buffer for REF voltage, while MAX has a built in buffer. simulate this circuit – Schematic created using CircuitLab Let we have a load cell with 2mV/V and you supply the cell with 5V, so it would output 10mV at full span, 10mV/50kg = 0.2mV/kg. You want to have an adjustment of 5-20kg, so delta mass is 15kg and delta V is 3mV. Let we amplify this with gain of 1000 and we get voltage swing of 3V. $$V_{out}=G(V_+-V_-)+V_{REF}$$ $$V_{out}=-200\dfrac{mV}{kg}\cdot m +V_{REF}$$ $$V_{out}[20kg]=-4V +V_{REF}$$ $$V_{out}[5kg]=-1.0V +V_{REF}$$ $$m>20kg: V_{REF}-4V < 0.4V ; V_{REF} = 4.4V$$ $$m>5kg: V_{REF}-1.0V < 0.4V ; V_{REF} = 1.4V$$ You invert the cell output, so that signal subtracts from V_ref.
H: Understanding of a W65C02 micro computer I found a tutorial with a schematic where you can buy a PCB for an old computer with a 6502 microprocessor. I want to do this on my own with my own PCB (but I test the circuit on my breadboard first) and I have some questions for a better understanding of the design and this old technology (which is quite interesting). How does the program flow work? As I understand it, I will write the program into the 28C256 EEPROM. The EEPROM is read-only (because of WE high) and so the EEPROM will output the program data which is stored in the address range of 0x7FFF to 0xFFFF. The address bus represents the program counter and so when the program counter increases the address increases too? Why is the NAND U4C connected with the main clock? If I understand it right, the SRAM of the microprocessor is mapped in the memory region from 0x00 to 0x7FFF, because a15 is connected with the ´CS`. But what is the reason to connect the clock with the NAND? The memory space 0xC000 to 0xC00F is reserved for the I/O. So the I/O is "mapped in the same region as the SRAM" and when I write to this specific address, I will write into the SRAM and the I/O controller. Is this correct? How does this microprocessor handle an interrupt? In my understanding, the microprocessor will change the address on the bus to 0xFFFE when an event on IRQ occurs. So I have to place my interrupt code at this specific address in the EEPROM. Is that correct? It seems that I need an EEPROM programming device to write the EEPROM. Do I have to use some kind of high voltage programming or can I use a microcontroller to write this EEPROM? Otherwise, I have to buy an EEPROM programming device. AI: That's a lot of questions! The address bus represents the program counter and so when the program counter increases the address increases too? The program counter (an internal register in the 6502) is just one of the things that appears on the address bus, during an instruction fetch cycle. Why is the NAND U4C connected with the main clock? This prevents the SRAM from starting a cycle until its inputs have been correctly set up. These inputs include the address bus, the R/W line and (for writes) the data bus. The memory space 0xC000 to 0xC00F is reserved for the I/O. So the I/O is "mapped in the same region as the SRAM" and when I write to this specific address, I will write into the SRAM and the I/O controller. Is this correct? Yes. In this design, the writes go to both I/O and SRAM. However, the SRAM is disabled for reads from the I/O space. Note the connection between A14 and the SRAM's OE- pin. However, note that the address range for I/O is actually 0x4000 to 0x7FFF, wasting half of the available SRAM capacity, which would otherwise run all the way from 0x0000 to 0x7FFF. But it's true that the 65C22 only needs 16 of those locations, even though it occupies half of that I/O space, from 0x6000 to 0x7FFF (A15 low, A14 high, and A13 high). How does this microprocessor handle an interrupt? In my understanding, the microprocessor will change the address on the bus to 0xFFFE when an event on IRQ occurs. So I have to place my interrupt code at this specific address in the EEPROM. Is that correct? Not quite. The 6502 uses "vectors". The 16-bit value stored at 0xFFFE is the address of (a "pointer" to) your interrupt service routine. The actual code can be placed anywhere in memory. It seems that I need an EEPROM programming device to write the EEPROM. Do I have to use some kind of high voltage programming or can I use a microcontroller to write this EEPROM? Otherwise, I have to buy an EEPROM programming device. That kind of EEPROM could be written by a microcontroller. For exmaple, there's MEEPROMMER for the Arduino. (Thanks to Bruce Abbott for the link.)
H: Op-Amp unusual symbol I find this circuit in an old book. Regardless what is the task of this circuit, i wonder why the op amp symbol is unusual(curved)? This is the datasheet of LM301A: http://www.utm.edu/staff/leeb/LM301.pdf But the other circuit in the same book using the traditional symbol for the op amp AI: It's just an older style of drawing that has since dropped out of common usage. It doesn't mean anything special about the opamp.
H: Is there any relation/leak between two sections of LM358 op-amp? I want to use section A of an LM358 OpAmp to limit the current and section B to convert Arduino PWM to analog, and then connect output B to non-inverting input of input A as reference voltage. The LM358 VCC is not going to be lower than 12V or higher than 16V. Is there something like "leakage" of current/voltage or anything else between two sections that can damage the Arduino or two sections are isolated from each other? AI: There is a very slight interaction between the two amplifiers at low frequencies that is likely equivalent to a few uV of Vos shift. That is in part due to the shared bias network. Changing dissipation from the output section of one amplifier can cause temperature gradients across the die as well has heating, as @analogsystemsrf mentions in a comment, which will cause Vos changes in the other amplifier. If both amplifiers are working with signals measured in volts it won’t likely be noticeable, let alone problematic.
H: Represent the given signal in mathematical form Is this the mathematical form? I highy doubt myself $$ -2r(t+3)+2r(t)+16u(t)-r(t)-2u(t-3)+5/2r(t-3)-5/2r(t-5) $$ AI: Let the horizontal axis by time t and vertical axis by signal value x(t). From t=-3 to t=3 the first part you wrote $$ x(t) = -2 r(t+3) + 2 r(t) + 16 u(t) - r(t) - 2 u(t-3) $$ is correct. From t=0 to t=3, the signal x(t) above is sloping down with \$\frac {dx(t)}{dt} = \frac{7-10}{3-0} = -1\$. According to given graph, this slope should become \$\frac {dx(t)}{dt} = \frac{0-5}{5-3}= -2.5\$, so, a ramp giving a slope of -3/2 should be added. $$ x(t) = \bigg( -2 r(t+3) + 2 r(t) + 16 u(t) - r(t) - 2 u(t-3) \bigg) - \frac{3}{2} r(t-3) $$ To compensate after t=5, the slope of -2.5 should be nullified: $$ x(t) = \bigg( -2 r(t+3) + 2 r(t) + 16 u(t) - r(t) - 2 u(t-3) - \frac{3}{2} r(t-3) \bigg) + \frac{5}{2} r(t-5)$$
H: Calculate Vth between A and B simulate this circuit – Schematic created using CircuitLab In this circuit, I am asked to calculate Thevenin Voltage Vth between A and B. This is the first time I am asked to calculate Vth between two distant point and I am not sure how to proceed. AI: In other words, you are asked to find Thevenin voltage across R3, R2, R1, Voltage source or Current source, which are all same: simulate this circuit – Schematic created using CircuitLab Because the potential is the same on all points shorted along the wire.
H: Plastic platform for THT electrolytic capacitor? SMD capacitor looks like this I did not see "plastic platform" to be sold separately. But I want such to put under THT capacitor so that it looks like exactly the way as quarts crystal with the gasket I just like the way it looks, mechanically holds the the electrolytic capacitor, and separates the cap from the other components. Does such technique exist for THT electrolytic caps? Update: I desoldered one of the SMD caps of the required size, and compared the constructions and tried to put THT cap in: Both models appeared to be covered by the protective material, but up to different point at the bottom - SMD cap is required to be put into the platform/spacer. I also see that it is bad idea to put vias or anything else conductive under the THT cap as it has very small exposed area (however risk of shorting is minimal, just to be sure and have a "good practice"). Putting the THT cap into the SMD cap's spacer has failed: THT is having rubber protruding at the bottom, effectively eliminating bottom of the capacitor seating onto the conductors. However, per datasheet, it is only for some packages: Smaller sizes are having flat rubber, and must be able to seat into the repsective spacer salvaged from SMD cap. AI: Look for "spacer" or "capacitor spacer". They exist. Sources here and here. Can't say as I've noticed them being very common in the wild, however. They would probably need to be made from a decent plastic to withstand wave soldering and solvent cleaning. For careful and fast hand soldering you might be able to 3-D print a suitable shape- be sure to pick a material that meets electrical and fire safety requirements if you try that.
H: flyback diode across the relay coil so my question is regarding the diode used across the relay coil. My A level textbook (the section from the textbook is given below) says that its purpose is to protect the op-amp from a back emf induced when the current in the coil is switched off. But this explanation is not adequate enough for me. I don't understand how this will protect the om-amp. My problems are: 1)I don't understand, how the emf is induced in the relay coil when the current is switched off. 2)I can't visualize how the current will be moving in the flyback diode when the current in the coil is switched off. 3)I don't understand how the diode will protect the op-amp, given that the first diode will stop any current from flowing back to the op-amp. Please explain in layman terms. My qualification is just UK Cambridge international A level physics. Hence I don't understand the other complicated explanations given about flyback diode in this site. thank you very much! AI: In layman's terms, a current through inductance cannot change suddenly, so even if supply voltage is cut off, the energy stored in the inductor would still like to keep the same current flowing. It must generate voltage over the inductor to do that, and this can be limited with the diode over the inductor. The current has a path via the diode and voltage is limited to the diode forward voltage until the current has ramped to zero.
H: Using MOSFET to turn off the circuit Usually MOSFETs stay in switched-off state by default and get switched on by a signal. But I want to use MOSFET the opposite way: 1) it should pull down a line to GND all the time by default, after power supply is ON 2) if needed, should be turned-off by signal from MCU, so that the line gets automatically floating Is this possible? In the schematics below R24 should either be connected to GND to enable charging or let float to disable it (according to datasheet MCP73833, chapters 3.4 and 4.2). As per chapter 1.0 the resistor R24 could be at least 200K to disable charging. If the PROG pin is open or floating, the MCP73833/4 is disabled and the battery reverse discharge current is less than 2 µA. In this manner, the PROG pin acts as a charge enable and can be used as a manual shutdown. AI: I am going to use CPC1117N solid state relay to simply disconnect R24 from GND. This completely resolves my problem with minimal PCB space.
H: Coax characteristic impedance measurement How is physically possible to get the value of the characteristic impedance of a certain coaxial cable? Precisely, in my case I have a coax of 50Ohm impedance, and I need to cut it and connect some alligator clips or some tester leads. Now I thought that this variation maybe will change the characteristic impedance of my coax. Since the device I would connect to it gives an accurate value only if connected to 50Ohm cable, do this variation modify it a lot? Is there a kind of measurement I can do? AI: When you connect to a 50 ohm device, you usually make the connection with a co-axial connector. Alligator clips, and the tails of wire leading up to them, will introduce a section of higher impedance. Whether this makes a negligible or a significant difference depends on your operating frequency, and the length of the tails. If you keep them well below 1/10 of a wavelength long, you'll probably get away with it for power transmission, though not for precision impedance measurement. Once they're approaching 1/4 wavelength or more, they'll really mess with your setup, whatever you're trying to do.
H: How to check if my quadrature encoder is broken or not? I have purchased some cheap quadrature incremental encoders (YUMO E6A2-CW3C) for which I have found "a" data-sheet here. Now based on my limited knowledge the quadrature incremental encoders are conceptually two switches. on the encoder itself, there is a color coding as: Brown: 5 to 12 VDC --> this I suppose I should connect to 5V Blue: OV(COMMON) --> this I think should be ground? shield: GND --> this is also ground? Black: OUT A --> this I think is the first phase/channel White: OUT B --> and this should be the second phase/channel but there is an orange wire which according to the above data-sheet is channel Z, but I have no idea what it is for. now what I expect to see is if I connect the output of channel A or B to some LEDs it should blink when I rotate the encoder: simulate this circuit – Schematic created using CircuitLab However, what I see is those LEDs are on all the time. I measured the resistance between the pins using a multimeter: | | Brown | Black | White | Blue | Orange | |:------:|:-----:|:-----:|:-----:|:-----:|:------:| | Brown | ----- | ----- | ----- | ----- | ----- | | Black | 1.4M | ----- | ----- | ----- | ----- | | White | 1.4M | ----- | ----- | ----- | ----- | | Blue | 0.6M | ----- | ----- | ----- | ----- | | Orange | 1.4M | ----- | ----- | 0.7M | ----- | and the resistance doesn't seem to change by rotation. Now I want to know if my encoder is broken or am I making a mistake here? plus what the heck is the orange one? AI: plus what the heck is the orange one? Quite possibly a "zero position" output, for those types with a zero-position sensor. For your variant, this is likely unconnected. If it was connected, you get a single pulse for every shaft rotation. The electrical interface does not use mechanical switches, but does use transistor switches for the quadrature signals...(from the data sheet): If you want to check it out using LEDs, try this circuit. Use any LED you have handy...rotating the shaft should blink the LED on-and-off quickly: simulate this circuit – Schematic created using CircuitLab
H: Invert or turn Aux Signal mono using Rotary Switch Is it possible to use a 3 Pole 4 Position rotary Switch to do the following on the respective positions: Send the Aux signal through normally Invert Left and Right Send the Left Signal to both outputs Send the Right Signal to both outputs Please excuse the crude drawing, I was just wondering, if on position one, for example, the left signal then passes through the yellow link into the right channel and cause interference. If so, how could this be done correctly? AI: It would make more sense if you connect the outputs to the wipers of the switches. simulate this circuit – Schematic created using CircuitLab
H: Is a PWM required for regenerative braking on a DC Motor? The DC Motor is question is here: DC Motor I was wondering if you use a diode and a switch in a manner shown in the below picture if the motor would exhibit regenerative braking when SW1 is open? (Assuming that the voltage from the motor when braking exceeds the motor power) Is the use of PWM required? simulate this circuit – Schematic created using CircuitLab AI: (Assuming that the voltage from the motor when braking exceeds the motor power) That's the problem — it doesn't. You need a way to boost the voltage coming from the motor to a level that will actually charge the battery. You can use a separate boost converter, or you can create a more tightly integrated solution that uses the inductance of the motor itself as an element in a boost converter. Either way, it does involve some sort of PWM control in order to regulate the power flow.
H: Parallel transformer output not expected RMS value I have a 115V/230V transformer with specifications of: outputs 10V (parallel)/20V (series) and 1.2A (parallel)/600mA (series). Product I'm no electrical engineer, but I need to get this set up to power my first hobbyist project. The reason for purchasing this particular transformer was due to height restrictions. From what I understand, I can set this transformer up with 120V in parallel by connecting pins 1/3 to LOAD and 2/4 to NEUTRAL. If I then hook up pins 5/6 and 7/8 in parallel, I will get 10V/1.2A output. I have a cheap oscilloscope that I am using to measure the transformer output. I hooked it up to the test leads (2Vp-p 1kHz square wave) and it looks like it's working. simulate this circuit – Schematic created using CircuitLab When I hook up to the transformer output, I am not getting the expected A/C sine wave. Instead, it looks like the sine wave is cut off at the 5V mark. The measurements are 10.3Vp-p, 4.81 Vrms 60.02 Hz Is my oscilloscope incorrect or is this the correct output for a 10V parallel transformer? I was expecting a 10 Vrms output (with peaks up to 14.14 V) I also have a similar 9V AC transformer (single primary single secondary) that produces a similar output. Are my assumptions incorrect about these transformers? AI: Looks like your oscilloscope input is saturating. The input will have a certain range and beyond that you need to add attenuation (as in a x10, x100 etc. probe) or you will get that effect (and can possibly damage the oscilloscope at some point, though most should be protected to a couple hundred volts peak or so). Try a x10 probe (and change the software setting to get it to read right, but that's not as critical).
H: Fixing an old radio I am trying to fix an old radio that my girlfriend just bought. It's from around 1964. I'm just a normal electrician and I am not used to fixing things like this. Radio model: Huldra 7-45 Skapmodell Is there anything I should keep in mind before powering it up for the first time. In my experience, capacitors tend to fail. Is a capacitor from 1964 considered old? Should I replace any of them before powering up? I can probably test the vacuum-tubes later with the power on. I'm aware of the 400VDC that is probably lurking around that thing. EDITS: I have been looking over the capacitors and many of them are named HUNTS, should I replace them too? Here is a list of all the capacitors: What do I have to keep in mind when trying to find replacements for them? Also, is this the same, 002µF and 02µF, or does the amount of 0 matter? HUNTS: 0.008µF 150V | 02µF 150V | 05µF 150V | 01µF 400V | 002µF 400V | 003µF 400V | 04µF 400V | 005µF 400V | 008µF 400V | 0015µF 400V | 500pF 600V. Rifa Miniprint: 0.22µF 200V | 0.47µF 200V | 0.022µF 400V. B 41 283: 100µF 15V. Metallic ones: 5µF 100/110 | 50µF 350V | 5µF 400V. AI: Absolutely replace the ones marked Rifa Miniprint; I don't know about the electrolytics but Rifa's film capacitors are notoriously unreliable and I can see a visible crack on the one in the second image (which is a sign that it's failing and ought to be replaced). I would also replace the electrolytics as a manner of course, as electrolytic caps tend to dry out over time (reducing capacitance and increasing ESR) and being 55 years old certainly isn't doing them any favors.
H: How to power a nickel chromium wire to produce heat without burning the power adpapter I want to build a toaster just for fun. I want to buy a nickel chromium wire to heat the toaster's plate. How to avoid burning my power adapter cuz the resistance is too low. I currently have a variable power adapter that goes from 9 volts to 24 volts. At 9/12/13.5\15 volts it outputs 1.5Amps. At 18/20 volts 1.2 Amps and at 24 volts 1Amp Thank you AI: A typical two-slice toaster uses around 1kW. That toasts about 4 x 5" x 4 = 100 square inches of surface. You have no more than 24W. If we can do as well at lower powers, you would be able to toast about 2.4 square inches of surface or about two 1.1" square (27mm square) pieces. Not even the size of a piece of melba toast (and that comes pre-toasted). Maybe you can toast one side at a time, but still rather small. Anyway, to calculate the resistance you decide whether to connect the (presumably) two sides in series or in parallel, and calculate the resistance from Ohm's law. For example, to use the 24V you might connect them in series. You need 24 ohms to get 1A, so each one should be 12 ohms. Find a size of nichrome wire that will allow a decent watt-density (you want enough surface area that the wire will not burn up and will cover your desired surface area reasonably evenly). Here is a link that will help with estimating the desired wire gauge etc. But it's not really much fun to make something that doesn't work, so I think you should re-think the power source unless you're making toast for your gerbils' breakfast.
H: Trying to simplify a Boolean expression Simplify the following expression using Boolean Algebra: $$ x = \bar{A} \bar{B} \bar{C} + \bar{A}BC + ABC + A \bar{B} \bar{C} + A \bar{B} C $$ Answer: \begin{align*} x &= \bar{A} \bar{B} \bar{C} + \bar{A}BC + ABC + A \bar{B} ( \bar{C} + C ) \\ x &= \bar{A} \bar{B} \bar{C} + \bar{A}BC + ABC + A \bar{B} \\ x &= \bar{A} \bar{B} \bar{C} + \bar{A}BC + A( BC + \bar{B} ) \\ x &= \bar{A} \bar{B} \bar{C} + \bar{A}BC + A( \bar{B} + C ) \\ x &= \bar{A} ( \bar{B} \bar{C} + BC ) + A( \bar{B} + C ) \\ \end{align*} Now, I feel I am stuck. The book's answer is: $$ x = BC + \bar{B}(\bar{C} + A) $$. Based upon @StainlessSteelRat comments I tired this: \begin{align*} x &= \bar{A} \bar{B} \bar{C} + \bar{A} B C + ABC + A \bar{B}\bar{C} + A \bar{B}C \\ x &= \bar{A} \bar{B} \bar{C} + A \bar{B}\bar{C} + \bar{A} B C + ABC + A\bar{B}C + ABC \\ x &= \bar{B} \bar{C} ( \bar{A} + A) + BC(\bar{A} + A) + AC(\bar{B} + B) \\ x &= \bar{B} \bar{C} + BC + AC \\ x &= \bar{B} \bar{C} + C(A + B ) \\ \end{align*} However, I still get the wrong answer. AI: Simplify the following expression using Boolean Algebra: $$ x = \bar{A} \bar{B} \bar{C} + \bar{A}BC + ABC + A \bar{B} \bar{C} + A \bar{B} C $$ Answer: \begin{align*} x &= \bar{A} \bar{B} \bar{C} + (\bar{A}+A)BC + A \bar{B} ( \bar{C} + C ) \\ x &= \bar{A} \bar{B} \bar{C} + BC + A \bar{B} \\ x &= BC + \bar{B} ( A + \bar{A} \bar{C} ) \\ x &= BC + \bar{B} ( (A + A \bar{C}) + \bar{A} \bar{C} ) \\ x &= BC + \bar{B} ( A + (A + \bar{A}) \bar{C} ) \\ x &= BC + \bar{B} ( A + \bar{C} ) \end{align*} The trick is to introduce \$A \bar{C}\$ in the 4th line.
H: Resistor placement for Zener diode for over voltage protection I have searched in over voltage protection (like MOSFET.) I wanted to use a Zener diode in parallel so it won't dissipate power unless in over voltage protection, but its power is low so I read that I need a resistor to control the current passing through it. I found people put the resistor in this shape: This resistor will dissipate power, so I thought if we can put resistor like this: In this situation the resistor (R3) will only dissipate in case of over-voltage but in desired voltage current won't pass through zener so won't pass through the resistor. Is the voltage going to the LED equal to source or to the Zener? Is the new placement for the resistor right? If wrong, why? Is there another placement for resistor if this doesn't work ?** AI: The first circuit you show, with the resistor in-line with the load current, is what you require. That way, the Zener diode will limit the voltage, and the excess voltage will be dropped across the resistor. In your suggested circuit, the excess voltage will also be dropped across the resistor, but since the resistor is in series with the diode, and the combination is in parallel with the load, the load will still see the full voltage - the load voltage will not be limited by the Zener. The circuit shown here uses the Zener to regulate to 3.3V, and R2 limits the current through the LED at that voltage. simulate this circuit – Schematic created using CircuitLab
H: Will the capacitor stop receiving more voltage when max is reached I'm trying to understand how capacitors acts in different situations. Let say i have a constant power input source that is rated 5v and my capacitor that is 100uf 25v is receiving this voltage. If the power input is always running and the capacitor is keep receiving it without without passing it over to any component. will the capacitor keep storing the voltage until it reach 25v and fail/explode if it exceed that limit or will it just stop accepting more until the power have been used ? AI: A capacitor can only charge up to the applied voltage, regardless of the capacitor's voltage rating. The voltage rating of a capacitor is the maximum voltage that it can withstand without damage. If you connect a 5 volt source to a capacitor rated at 25 volts, current will only flow into the capacitor until it is charged to 5 volts.
H: Problems with DRV103 PWM I've been doing some work lately with the DRV103 IC by Texas Instruments (datasheet here, essentially it creates a PWM signal of variable duty cycle and frequency, preceded by an 'ON' signal of variable time), which is a pretty cool chip, but I've hit a snag with it. For a particular application, I decided to control the duty cycle with voltage rather than resistance. According to the datasheet, this should be straightforward. I found the right resistors and potentiometer for the values needed, selected somewhat arbitrary delay and frequency values, then set it up as per this schematic: P1 and P2 are generic wire-to-board connectors, the transistor is a PMF170XP,115 P-type MOSFET which I used to invert the output. Parts arrived, I soldered it up, hooked up the power, but when I switched it on, rather than the expected PWM, the output went straight to 12V and stayed there. The voltages everywhere seem correct (including the potentiometer range), there are no shorts that I can see (and the benchtop power supply I used shows almost 0 current draw) and I replaced the chip as a sanity check; no luck. Have I missed something obvious? There's no flyback diode, but the chip is only driving the signal input of another piece of hardware; adding one is the next thing I'll check, along with a pulldown resistor. AI: I believe I found the problem - one of the example circuits has a pullup resistor between OUT and V+ when working with a transistor. I added a 4.09k and now it seems to be working. EDIT: The output was still not quite right, so I added a second 4.09k pulldown resistor between the PWM line and ground. This completely fixed it, giving a perfect square wave.
H: How do I Avoid Very Long Horizontal Signal Path "Snakes" in a Schematic? I'm drawing a schematic for my DIY project, a RF mixer, it has a local oscillator followed by a bandpass filter, a voltage divider, eventually the signal is fed into a mixer. Unfortunately, even before I manage to finish the LO port, the signal path on the drawing becomes very long ("snake syndrome?"). The mixer is supposed to be the center. I expect it to be even more difficult to manage, as the RF port and IF port would also have their own impedance matching and low-pass filter, both will be long snakes. It will make the schematic very unbalanced. I know hierarchical schematic is a solution: you show all blocking blocks as blackboxes, and then "expand" each blackbox separately. But there should be a way to achieve the same result in a non-hierarchical way. What is the industry standard to show the long signal paths in a reasonable way? LO: Overview (RF and IF would also be snakes when finished): AI: The question is still open for suggestions. Meanwhile, I've spent some time attempting to rearrange the diagram, and I identified three modifications and the schematic is significantly better now. 1. Increase the Width of the Blocks Do not put wires directly to the points of connection on the symbol. Use some vertical wires to create additional widths. This is a snake. But this is better. Similarly, larger versions of components symbols (resistors, capacitors) should be used to fill the gaps, so the dense parts and sparse parts of the diagram can have the same width. 2. Put "Snake Like" blocks vertically. I've finished the RF parts of the circuit, still a "snake". But when you arrange two "snakes" vertically, narrow "snakes" becomes rectangular. 3. Put Input and Output At the Same Side Although the rule-of-thumb is routing all signal flow from left-to-right, but putting both the input and output port at the same side avoid irregular shape of the drawing. Final result I think It's not the best possible schematic. But now the readability of the drawing is greatly improved. There may still be rooms of improvements. Any comment? 4. Move the Output to the Right Following the comments, I moved the output to the right to make sure that the signal always flow from left to right, meanwhile I've put the LDO circuit at the left side to balance the schematics. Not too bad.
H: How to keep PWM from "contaminating" analog read values on my pcb So I'm designing a PCB for a MIDI controller with a lot of slide potentiometers and push buttons. I'm also backlighting the pushbuttons with LEDs running on PWM and I'm worried that the PWM for the LEDs is going to create a lot of noise in the analog values from the potentiometers. There is also USB on the PCB wich also is the power source. How do I make sure that the analog values from the potentiometers are as clean as possible? I guess PCB layout is critical and the use of bypas capacitors is a good idea? Any help is appreciated :) AI: This is a MIDI controller, so I guess no analog audio processing will take place inside, which means the internal circuits should be rather noise tolerant. You should of course take care not to radiate noise which could affect other devices. Using PWM for your LEDs means traces carrying pulsed currents. I assume your LEDs, buttons and pots will be on a PCB, which could be quite large, since you mention "a lot of slide pots". First thing to worry about is common impedance coupling. If pulsed LED currents run through the same traces as voltages used to read the pots, then the bits of trace in common will result in extra noise in your analog readings. The solution is quite simple: don't run pulsed LED currents through traces that also carry analog signals. So, if your pots have one end at GND and the other end at VCC, simply avoid sharing GND/VCC traces between the pots and the LED driver chips. An alternate solution is to sync your microcontroller's ADC with the PWM timer, and acquire when the LEDs are all off. Consider adding a RC filter before your ADC, make sure the cutoff is high enough so the pots don't feel "slow". This will also reduce noise picked up by the pots themselves (via capacitive coupling with the user's finger, nearby cellphones, etc). Then, AC currents in traces mean loop antennas, which emit electromagnetic waves. You need to reduce the area of loops carrying pulsed currents. This simply means being aware of where your LED current flows, and routing both traces close to each other. For example if your current loop is: GND - Decoupling cap at LED driver - VCC - trace - LED - trace - resistor - driver chip - GND Then, if you route both traces between the LED driver and the LED close together, it will radiate much less. If you multiplex your LEDs, the first layout that comes to mind would be a grid, but that's also the one with the largest loop area. A ground plane would work if your LEDs are grounded, but most drivers put LEDs between VCC and the driver, so a ground plane won't carry the return current. It would only act as a shield. Also make sure that whatever drives your LEDs does not output very high slew rate current. Don't use a superfast logic gate. Slow edges are much nicer.
H: Confusion with interpreting this power supply's power ratings This 24V 150W power supply below is marked by the following ratings on its surface: I use it for 200-240VAC and it is not clear to me how to interpret these values. The AC input range is given as 200-240VAC. The max AC current drawn is given as 1.8A. The output voltage is 24VDC. The max output current is given as 6.25A. The cos phi is given as 0.45. So I try to write an equation between the input and output real power as follows: Pin × cos phi = Pout For max input real power: Pin × cos phi = 240 × 1.8 × 0.45 = 194.4W For min input real power: Pin × cos phi = 200× 1.8 × 0.45 = 162W For output real power: Pout = 24 × 6.25 = 150W So Pin is always greater than Pout. Does that mean it is because of other power losses? More importantly I want to ask something different: Let's say The power supply output is always kept at its max that is to say at 24V and 6.25A. Now if we vary the AC line voltage between 200V up to 240V (by keeping the load current at 6.25A), would the AC input current remain as 1.8A? If so, something is odd to me that I cannot explain to myself. Maybe my approach of interpreting this information is wrong? AI: Let's say The power supply output is always kept at its max that is to say at 24V and 6.25A. Now if we vary the AC line voltage between 200V up to 240V (by keeping the load current at 6.25A), would the AC input current remain as 1.8A? No: to see why it is so, let's remember that the apparent input power is related to the load power by the following formula $$ A_{in}=\frac{P_{out}}{\eta \cos\varphi}\label{1}\tag{1} $$ where \$\eta\$ is the efficiency of the power supply \$\cos\varphi\$ is the power factor. Now, assuming that \$\eta, \cos\varphi\$ are approximatively constant respect to the output power \$P_{out}\$, and remembering that $$ A_{in}=V_{\mathrm{AC_{in}}}\cdot I_{\mathrm{AC_{in}}}, $$ by substituting this equation in formula \eqref{1}, we get $$ I_{\mathrm{AC_{in}}}\simeq \frac{P_{out}}{V_{\mathrm{AC_{in}}}\eta \cos\varphi }\label{2}\tag{2} $$ therefore, keeping the output power constant and lowering the input voltage makes the input current rising. Few observations The nominal input current (\$1.8\mathrm{A}\$ for the range considered in the question) for a given range usually refers to the maximum value measured at the minimum input voltage (if the datasheet is properly written). This is due to the fact that this value also serves as a design parameter for the upstream part of the circuit (overload protection devices like fuses and other kind of breakers), so the designer should rely on it. The assumptions \$\eta\simeq\mathrm{const.}\$ and \$\cos\varphi\simeq\mathrm{const.}\$ are only approximately true, thus you can expect noticeable variations in the real behavior \$I_{\mathrm{AC_{in}}}=f(V_{\mathrm{AC_{in}}})\$ respect to the one predicted by formula \eqref{2}. However, ceteris paribus, you can always expect an increase of the input current when lowering the input voltage.
H: The TI quad-XOR gate acts as it is short circuit I have a TEXAS INSTRUMENTS CD4030BE Quad Exclusive-OR gate. I have an electronic board of simulate this circuit – Schematic created using CircuitLab using this and this refrence. According to the XOR data-sheet: I should have A ⊕ B = J. However, what I get is that when I press any of the pushbuttons all three LEDs are on: I would appreciate if you could help me know what is the problem and how I can solve it. AI: The answer is very simple - you have not connected the power supply to the IC. In that state, nothing can be predicted with certainty about how it will operate - you are outside of its specifications. The ESD protection diodes can allow current from input pins to (incorrectly) partially power the IC, so the IC may not appear dead, but it may operate in unknown, unpredictable, ways - as you are seeing. So, don't do that! Correctly power the IC. (FYI, you also have unconnected inputs, which can be a problem on CMOS ICs. Unconnected CMOS inputs can float to intermediate voltage levels (neither a valid logic high nor a valid logic low) and lead to high power consumption, potentially even causing internal damage to the IC. This has been covered in previous questions. You need to correctly pull-up or down any unused CMOS inputs.)
H: LM324 - Issue with output in negative feedback In my analogue output circuit, the following ripple voltage occurs when wired to the analogue input of a PLC with an input resistance of 69.3 kΩ. If I put a resistor in series, this ripple disappears. Why is that? Is it an impedance problem? The schematic of the circuit is the next: AI: The effective load on the op-amp is likely capacitive. From the LM324 datasheet: Capacitive loads which are applied directly to the output of the amplifier reduce the loop stability margin. Values of 50 pF can be accommodated using the worst-case non-inverting unity gain connection. Large closed loop gains or resistive isolation should be used if larger load capacitance must be driven by the amplifier. It's not too hard to pick up 50pF of stray capacitance when driving an off-board cable or interconnect. The fact that a series resistor solves the problem is another clue that supports this.
H: Why does a IR Transmitter need a VCC? I'm building a IR hub to control several LEDs stripes, and a projector in a room and noticed that my IR transmitter works even when VCC is not connected. Should I wire it in anyways? Why is it there? What does it do? This is the IR transmitter I have. AI: Ideally, the IR-led is powered by a VCC line, capable of delivering the ~60mA a infrared LED generally needs. This should be done by a MOSFET, which is essentially a switch, which switches on and off based on the data line, which is connected to the gate. In the case of your IR transmitter, no MOSFET can be seen. It means that the IR-led is directly fed from your data line. It works, because your data source can deliver enough current. It's generally not the way you'll want to switch an IR-led on and off. Hence the fact you can detach your VCC line: it's not being used.
H: Stiff, shape-retaining insulated wires vs "floppy" ones which "bounce back" - are there actual technical terms for those two types? Pretty much what the questions says. I find myself in need of some wires and I want to get the "floppy" ones, but I realised I don't know what the actual technical term for it is and so I don't know what to search for. Also, while we are at it - is there much difference between the two types in terms of durability? AI: Solid wire These contain one thicker wire inside, and after bending, they stay bent that way. Typical example is breadboard jumper cables. Examples: Stranded wire Multiple very thin wires turned around each other, they bend easily and after bending, move back to their original form (or hang down due to gravity). Stranded wire can come in various number of strands and thickness (see comment of TimWescott below). Also there is stranded building wire (see comment of Nate Strickland below). Example: Remark of Hearth (see below) think it wouldn't be a bad idea to mention that, for instance, silicone-insulated wires are much more flexible (and don't bounce back nearly as much) than, for instance, PVC insulated wires
H: Comparison of the SOAs of two MOSFETs Below the SOA for the IXFP6N120P: And the SOA for the IRFBG30: The first one shows a DC line beyond 100 ms, but the second one does not. Does this mean the second one is unreliable beyond 10 ms, or the manufacturer decided not to put a DC line assuming the area beyond 10 ms is safe? AI: If you notice, the IRFBG30 does not have a 100ms line either. Generally speaking, the manufacturers do not put SOA lines that do not intersect the \$V_{DS(MAX)}\$ vertical line and from inspection it appears that would be the case for the 100ms line for the IRFBG30 (it looks as if it would terminate at about 500V). The DC line would be similarly constrained at a much lower voltage. An interesting thing about SOA graphs; they are showing that if you can somehow hold the case temperature at 25C then the lines shown will not result in excess dissipation (Tj at 150C in this particular case) but holding the case at 25C (unless you are outside in the Antarctic and even then it might be troublesome) is nigh on impossible. This application note from Ixys is recommended reading.
H: Back branches in code While reading this file on software hazards this slide says: "No Back Branch in the Code" I wonder what does it mean? Normally when we write code in C-language then we don't actually do branching explicitly as in the case of assembly language programming. Does it mean that the above design rule is only possible to follow at assembly level and not at the c-level programming? AI: Back branches create loops. And any module that contains a loop becomes subject to the Halting Problem — to wit, you cannot write a program that can in all cases determine whether the module will exit the loop. When you're writing software for real-time systems that have hard deadlines, you want to be able to prove that the deadlines are always met. Modules without loops have definite execution times for every path through the code. Modules with loops do not. There are of course, broad classes of code with loops for which you CAN predict a maximum execution time, so this theoretical constraint is overly restrictive in the context of modern tools.
H: Identify dead component in notebook battery Battery name is GARDA31, based on bq29330 and bq8030. Most probably I killed it myself when soldering by shorting terminals with solder wire :( Controller is alive (communicates through SMbus), but shows "critical" and 0% charge in the OS. The marking seems to be R005 FZ81 but I am not sure in first 0 as the defect is exactly in its place. It has relation to the - terminal of battery. I would think it is a current sense resistor Rsns (see circuit diagram of page 4 of datasheet), but my colleague says that it does not look like resistor but rather like semiconductor; I measured it to be a short (voltage is 0 across it and Ohmmeter shows the shortage), and if it would be a current sense resistor then battery would start or/and catch fire? Battery pack was replaced and is fully charged. I have another battery controller with current sense resistors, and they really look differently: I did not desolder the battery pack yet, seems will have to do it to perform signal tracing. Update: I removed the batt pack, and desoldered the device. It appeared to have two terminals. Also found out that fuse is blown - and that's why there's no further damage. This "resistor" is going to the notebook battery connector. I can not trace it more precisely because I have no datasheet for bq8030. Update 1: I shorted the fuse with solder (expected to melt in case of emergency), and replaced defective current sense resistor with two R010 resistors in parallel. No change. OS still says 0%, and "Online, Critical". There's something else, up to gas gauge chip's firmware defecting the assembly because it thinks pack is damaged. AI: Its a current sensing resistor, probably 5mΩ maybe a cree because they make resistors that neck down and have FZ in their ordering name (but the ones made now do not print the FZ on the resistor, so this makes me somewhat unsure, might be an older version of the same part): https://www.bourns.com/docs/Product-Datasheets/CRE.pdf I'm 80% sure it's a 2512 (you did not supply dimensions and should have), I'm 90% sure its a 5mΩ resistor. You need to be sure of the value though. Maybe contact cree and see if this is one of theirs. Edit: It's possible that the battery pack reached a critical or short circuit condition, and BMS protection fuses. Check the battery voltage and make sure it's above the danger levels for li ion
H: Simplifying electrical circuits I have looked everywhere, but I can't seem to find a way to simplify this circuit. I wish i could tell you some of my ideas, but I'm really lost here, can someone help me? If you could explain how to go about it, it would be awesome. AI: The schematic is a bit confusing, because the 2nd loudspeaker is drawn "upside-down" with its driving signal connected to its lower terminal. It might be more clear (but take more space) if you draw it this way, simulate this circuit – Schematic created using CircuitLab There is nothing more to simplify. You can use mesh or nodal analysis to complete the analysis of the circuit. The speakers are neither in series nor in parallel. They are just sharing a ground node.
H: Capacitor Replacement - Markings: 622JA - GD 1000 My tube light choke was not working, I tested its circuit using multi-meter and found that a capacitor (labeled 622JA on first line and GD 1000 on second line) was short-circuited so I pulled it out and tested, same result. There is no documentation or information available online for that part number. Is there a replacement for that part or where do I find it on existing circuits that I have? Update Image and Dimensions: Update - Solved I replaced it with 1600v 7.32nf capacitor (a red giant one), it is working fine. AI: It appears to be a 6.2nF, 5% tolerance ceramic capacitor rated for 1000V. The Wikipedia page for capacitors includes a section on markings. The first two digits are the value. The third is the multiplier. For 622j it looks like this: 62pF * 10^2= 6200pF= 6.2nF. The tolerance code "j" stands for 5%. The voltage rating is the other number on the capacitor. That 1000 means "1000 volts." Here's what you need to look for in your relacement part: 6.2nF, 5% tolerance, 1000V. I am surprised that it has gone bad. You can usually recognize a bad ceramic capacitor because they crumble or crack. If you are using an ohmmeter to test it, that probably won't tell you much. You need to use a capacitance meter to test it. If you don't have one, but you do have a small AC transformer and an AC voltmeter then you could try this: Depending on the AC powerline frequency, get a resistor of either 510k (for 50Hz) or 430k (for 60Hz.) Those are the approximate impedances for a 6.2nF capacitor at the given frequency. Solder the resistor in series with the capacitor, and connect to the low voltage side of the transformer to the ends of the capacitor/resistor. Measure the AC voltage across the capacitor. Measure the AC voltage across the resistor. Both voltages should be approximately equal. If your capacitor is shorted (as you think) then you will measure zero volts across the capacitor and the full voltage from the transformer across the resistor. I think you will find that your capacitor is OK.
H: Does the 433 MHz transmitter/receiver, transmit the voltage? The title, says it all... I would like to know if the 433 MHz transmitter/receiver (couldn't find a datasheet, here is all I found on it) transmits the voltage, or if it just a logic output of '1' or '0'? For example, if I send through the data pin on the transmitter a current of let's say 2.5V, does the receiver connected to a circuit of 5V, output 5V or 2.5V through the data pin? I think it would logically output 5V but I am not sure... Thanks in advance :) Disclaimer: I have no components, I just bought some basic components and an Arduino kit on Amazon. But I am so impatient and excited to get the parts that I already started drawing up some circuits. So beware, a lot I am saying may be wrong... AI: These 433 MHz transmitters use OOK modulation (also called ASK), making the transmitted signal look like: So the transmitter is simply switched on (1) or off (0). Most 433 MHz receivers will "filter out" the 433 MHz so we're left with the blue signal. When no signal is received for some time, most receivers will try to decode a signal from the noise they receive and the noise from the receiver itself. That then results in a random 0 / 1 pattern. To do something useful with this system that random signal must be ignored and the useful signals must be extracted out. This is a typical job for some software on a microcontroller. You also want a microcontroller on the transmitter side. Then it is easy to create long 0 /1 sequences like: 0010100100111010101101 When you transmit that code, the microcontroller will respond and that will open your garage door while the noise doesn't open the door. Also your neighbor's door will use a different code so the two doors will not interfere even though you would both be using 433 MHz.
H: Are current and voltage orthogonal in a transmission line? If there is a phase difference on a lossless transmission line between current and voltage, is it always 90deg? Assume the Load matches the transmission line characteristic impedance. If not what are the conditions for the phase not being 90deg (load or no load)? Anyway to show this orthogonality or phase difference in the equations? Source: https://www.ibiblio.org/kuphaldt/electricCircuits/AC/AC_14.html AI: A transmission line can support two waves, one travelling left, one travelling right. For each wave, the voltage and current are always strictly in phase, with the ratio of the line impedance. When you add the two waves together to get voltages and currents at a particular point on the transmission line, which gets a bit non-intuitive as voltages add but currents subtract, then depending on the position on the line and the characteristics of the terminations, you can get essentially any phase, any ratio. Some interesting line lengths are Very short - an open or shorted line behaves like a capacitor or inductor respectively Multiples of half a wavelength - the ratio is the same at each end Odd multiples of a quarter wavelength - the most interesting - inverts the ratio at one end through the square of the line impedance - so open becomes short - 25 ohms becomes 100 ohms if the line is 50 ohms
H: What's this regulatory symbol? I am trying to identify this symbol as a part of personal research. I could not find any leads with Google Image search. AI: That's the symbol used by the Ukrainian State Committee for Technical Regulation and Consumer Policy. I'd give you a URL but the links from their Wikipedia Page don't seem to be working!
H: Please help identify capacitor - turntable motor drive PCB My Rega Planar 3 turntable is belt driven. It has been a year in storage, and now the platter spins backwards. A Google search suggests that one of the motor capacitors is to blame. I reckon I'll replace both, as the turntable is over 20 years old. But since this is a 220 V circuit, I don't feel comfortable basing my actions on assumptions, hence this question. Here is a picture of the PCB that drives the motor. The PCB is driving a "PREMOTEC 9904 111 31813" 50Hz 110V synchronous motor, even though the turntable is rated for a 50Hz 220V line. (Am I looking at a capacitive dropper?) These two caps are the only components on the PCB (Update: I also found a 1MΩ bleeder resistor hiding under the Rifa). In addition, there's the motor, and a mains switch, and that's the whole circuit. Here is a picture of the traces: And here is the whole compartment. The white wires go to the mains switch. An attempt at a schematic: simulate this circuit – Schematic created using CircuitLab First, to get the yellow capacitor (C1) out of the way: It is a Rifa that hasn't gone boom yet. The top is marked 220n X2 One side (visible in the picture) is marked 275 V ~ SH The other side is marked RIFA / PME 271 M / 40/100/56/B / 250VAC / K5 I suppose I can replace this one with any 220nF X2 class 275V rated mains filter cap, am I right? The white one (C2) is harder. The top is marked 220n K J0 (OR JO?) One side (visible in the picture) is marked EVOX / MMK / 400- The other side is blank. So my main question is: What type of capacitor is this? Or rather; What type of capacitor is it safe to replace this one with? AI: MMK is a metallized polyester film capacitor. 220n is 220 nanofarads. K is 10% tolerance. It is rated for 400V.
H: How to terminate unused transformer pins? What is the correct way to terminate/wire these unused transformer pins? Do they get tied to GND? AI: You don't do anything with them, they are fine if they are floating and left open. If you're worried about a charge developing on the coil (which probably won't happen), you could tie one end to ground. Tying both ends to ground would result in a short and a considerable loss in energy.
H: SVC-350 Power Supply Modification I am trying to modify a Roland SVC-350 that is currently configured for 240V power to run on 120V. I ran into some questions as I was speccing out the transformer that I needed. The full schematic can be found here, but the relevant section is here: note: The OP-143 fuseboard shown just uses a different cap/fuse combo for the different voltage configurations. Capacitance is the same across all versions (only the voltage rating changes) so I should only need to swap out for the fuse. The closest thing I could find to a datasheet for the TA7179p is here. My first thought was that a 120V:35VCT transformer would work fine, as it should generate the spec'd 18V RMS with respect to the center tap. However, the +/- 22V spec doesn't make sense to me. If it's rectified voltage it should be around 16.2 VDC with maybe +/- ~1V of ripple based on the power rating of 8W for the device and those 1000uF caps, minus a diode drop. I don't think it's peak voltage either, as that should be closer to 25V (minus a diode drop) if my understanding is correct. I admit that I'm not entirely sure the what the function of those two transistors is, though I imagine it's just to act as a current source so the regulator doesn't have to work as hard. They're connected via jumpers and bolted to the frame so I assume they're expected to dissipate a fair amount of power. My concern is the regulator itself appears to require a dropout of at least 2V, and is designed to work at 20V. So, I'm inclined to believe that I'd need more than 18V RMS to have enough room above 15V after rectification. The next "standard" transformer size of 48VCT would lead to +/- 24V RMS. Those peak voltages get pretty uncomfortably close to the 35V spec on the 1000uF caps though. So, I see a couple options: Just use a 36VCT transformer and trust the spec Use a 48VCT transformer and replace the 1000uF caps with 50V rated ones Get a more expensive 44VCT transformer (It's $25 vs $10, so it's not a huge deal, but I want to be sure it's the best option) Say f*** it, cut a bunch of traces, and just replace that TA7179 with a 7815/7915 pair. I'd rather not mess with a circuit board on a piece of "vintage" equipment, but... AI: You want to go with the transformer with the 18VACRMS rated secondary. A transformer with that rating will have a peak output of 18/0.7071 = 25.46V peak. The rectifier diode will contribute about 1V of voltage drop to the 1000uF filter capacitors. So I would expect the filter caps to see a peak value of ~24.5V. During operation as the load is drawing power from the filter caps the voltage will discharge the caps by some amount less than the 24.5V peak. It is a very good guess that the average value of the voltage at the filter caps is the 22V as shown on the schematic. The beefy transistors that are inline with the current paths to the outputs are the linear regulator pass transistors. The TA7179 chip regulates the base current of these pass transistors to achieve the +/-15V outputs through variations in the load current. I built a simulation of the transformer secondary and the diodes plus filter capacitors. Then I added a load resistor to each of the outputs. Here is the simulation circuit: Note that the voltage sources have been specified at a sine wave peak of 25.46V. The two sources have been arranged to be 180 degrees out of phase as you would expect for a center tapped transformer. The load resistors were selected at 22 ohms to represent a nominal 1A load at 22 volts. Here you can see the positive voltage at the filter capacitor and the current load into 22 ohms. Note the average value of the voltage is almost on 22V as labeled on your schematic. In like manner this shows the corresponding negative filter capacitor voltage and the current load.
H: Role of syscalls.c What is the role of syscalls.c file in GNU ARM(STM32 for instance) based projects? I found 2 ways of successfully building the project Delete syscalls.c and include -specs=nosys.specs in the linker flags Simply include syscalls.c What is the fundamental difference between these two methods? What is the importance of system calls in a non-os environment like microcontroller? If it is used for implementing system-level functions used by printf, scanf, etc. then who is calling these function(because I am not using any of these functions in my code)? Edit:- As an experimental step, I deleted syscalls.c and added -specs=nosys.specs to make the linker happy then I wrote a simple malloc program to check whether it is working or not. To my surprise, it is giving the expected output. How did the malloc function work without the _sbrk definition in syscalls.c? I checked the startup file but it has only a few functions like copying data from flash to SRAM during startup, zeroing out .bss section, etc. Can I assume that it has to do something with C Runtime Library? If so where is it located? P.S - I am using System Workbench for STM32 & STM32F4Nucleo board for this particular example AI: Some reasons: printf uses _write and _read. You can write your own ones for example if you want to redirect output to SWO malloc & friends use _sbrk. Bur I would rather avoid dynamic allocation in the limited resources implementations. This version of _sbrk is very poor (it assumes that the stack is at the largest addresses and heap is just before etc etc). The rest of the functions are stubs just to make the compiler C standard conformant. They do nothing.
H: 4mA to 20mA transmitter design question Checking Vishay AN54 using IL300 for current loops, the Figure 6 (Isolated 1 V to 5 V, 4 mA to 20 mA Transmitter) circuit is explained but I really don´t get exactly how it works. Other interesting document on this IL300 device is here, where multiple circuit topologies are explained (included the one similar to the figure, in fig.15, page 8). I have imported this design to LTSpice to check how it works. After checking the simulation this is how I think it works (please correct me here if any of these points is not correct): 1.- K1 = K2 so IP1 = IP2. 2.- To set IP1 just take Vin and R1. IP1=Vin/R1 3.- As IP1 = IP2, current through R3 is equal to current through R1, IR3 = IR1. 4.- Due to negative feedback in U2, VR3 = VR4, so loop current can be configured changing the value of R4. Iloop = IR4 5.- 100pF capacitor is placed in order to avoid voltage ripple. 6.- Transistor is placed to reduce thermal drift of U1. So, main operation of the whole circuit is more or less understood. The main question comes when, checking the current at the output of U1, this current is exactly the same as the one through R1. UPDATE Please check the simulation and the analysis of the current in both U1 output and R1 output: Please keep in mind current sign just depends on how it is being measured...if the current is measured at the base of the transistor, both R1 and U1 output current are exactly the same. Can anyone help me here to explain how the current in R1 is being replicated at the output of U1? I still don´t get it. AI: The circuit goal is to have a good replica of the input current, from Vin-R1, flow through IP2. The replica is then amplified and sent to the next device in the chain. To have a good replica of the current, you need to shine light on IP2 through the LED inside the IL300, but of course you need to shine just the right amount of light. To do so, you should know K2 down to a very high precision, but unfortunately in microelectronics having a value be very near something is difficult. What we are good at doing is matching values, so the manufacturer guarantees that K1 and K2 are very well matched, but their absolute value can vary quite a lot. So you know that to have a replica in IP2, you should shine on it the same light that produces a good replica on IP1, because K1 = K2. You achieve this by having the input current flowing into IP1, and then having a negative feedback ckt that feeds the diode with just the right amount of current in order to have the right current flowing into IP1. How does this happen? Assume that Vin goes up a tiny bit, then the voltage on the inverting input of U1 goes up the same tiny bit, because IP1 cannot change since the light has not changed. The opamp now sees a more negative voltage, thus it absorbs more current. That current is amplified by the transistor, and more current flows into the LED. More current in the LED means more light means more current in IP1 means more drop in R1 means that the negative input goes back to zero, and the opamp is happy and doing its job. The output current of the opamp is thus very similar to the input current, because the circuit is built in the way it is built. The gain of the transistor is ~100, while the gain of the optocoupler is ~1/100, so this can lead you to think that the two currents are the same. They are not, they are incidentally very similar in amplitude, but if you change the K1 of the model of the IL300, you will see that the current will change in amplitude. The shape of the currents are very similar because the transistor that amplifies, and the IL300, are pretty linear. If you had non linearities, you would see a very different current, just the right current to compensate for all the ckt non linearities.
H: How can I sum two PWM signals of different frequency with a Op Amp? I need a suggestion how to sum two PWM signals, PWM 1 + PWM 2 to an output that have them both included. Questions: Is this possible? Other suggestions? What Op Amp do I need to use if I want the output handle heavy load of 12 volt? I'm going to control a large 12 DC motor and the small frequency PWM 2 is going to be the dither signal to make sure that the 12 DC motor is still in a vibrating movement. It reduces friction and makes the 12 DC motor more linear and proportional to the PWM 1 signal. AI: You could try a non inverting summing amplifier. https://masteringelectronicsdesign.com/the-transfer-function-of-the-summing-amplifier-with-n-input-signals/ You put your two input values on the (+) input. The link also provides the output equation as If you make all the resistor values the same it should come out as Vout = V1+V2
H: Why does a Peltier cooler heat up when cooled by ice? On this post, the question presents a problem of a Peltier cooler heating up after operating for a while. The explanation was that the Peltier cooler is only able to maintain a fixed temperature difference between the cold side and the hot side. Because of this, as heat is taken from the cold side and deposited onto the hot side, the temperature of the hot side begins to rise. Because the cooler is only able to sustain a fixed difference between the sides, if the temperature of the hot side begins to rise so does the temperature of the cold side. So in order to cool the cool side, the hot side's heat needs to be dissipated. That's my convoluted reinterpretation, but I think I got the idea. Ultimately, I need a way to expel the heat generated by the Peltier cooler. I've seen many people invest in large heatsinks with multiple fans, but I'm kinda low on money:P I was wondering if ice would work well. The heat generated would be, just as in a heatsink, sucked out from the hot side of the cooler. So after some preparation, I took my device and slapped the hot side onto a slab of ice. Unfortunately, the same issue rose: the temperature dropped to the point where little flecks of snow began to precipitate on the cool plate; however, it soon started to heat up, melting the snow and, along with it, my hope. I don't understand, wouldn't the heatsinks used in this application be at higher temperatures than the ice? How come people using heatsinks are reaching lower temperatures instead of when the device is cooled by ice? Furthermore, if the heatsinks are at higher temperatures than the ice, then this doesn't align with the temperature differential spec of the Peltier cooler, which I guess means the unit could be defective. But I have a feeling my understanding of how these units work is wrong. Any help would be appreciated:) AI: You still have to ensure thermal coupling to the ice. Once your ice melts, it forms a thin layer of water, which is warmer towards your TEC element. Ice by itself is a decent thermal insulator (look at igloos), so the heat from water doesn't have anywhere to go (at least not fast enough). And the layers of water create a gradient with warmest part being on your TEC surface, which eats into your thermal budget. Forced air cooling works better despite poorer thermal conductivity of air (as opposed to the water) and higher temperatures than the ice purely because they can ensure that warm air gets blown away. I think it could be more effective to try using just a water bath as a coolant instead of putting TEC directly on ice. That way heat mixes into the whole bath gradually heating it up. Warmer layers of water next to TEC should "push" their heat away to cooler layers (via convection currents) and this process wouldn't be blocked by the insulating properties of ice. Even better, if you could throw in a ventilator to circulate the water around. If you have access to large amounts of distilled water, you don't have to worry about short circuiting either, not unless water becomes dirty enough to start conducting.
H: Simplifying a Boolean expression that has 3 variables in it Problem: Simplify the following expression using Boolean Algebra: $$ z = (B + \overline C)(\overline B + C) + \overline{ \overline A + B + \overline C} $$ Answer: \begin{align*} z &= (B + \overline C)(\overline B + C) + A \overline{B} C \\ z &= \overline C \, \overline B + BC + A \overline{B} C \\ z &= \overline B \, \overline C + C ( B + A \overline B ) \\ z &= \overline B \, \overline C + C ( A + B ) \\ z &= AC + BC + \overline B \, \overline C \\ \end{align*} However, the book gets: $$ BC + \overline B ( \overline C + A ) $$ I believe both answers are right but I would like to know how to get the book's answer. AI: Take your answer: $$ z = AC + BC + \overline B \, \overline C $$ Now make the following transformation: $$ z = AC(B+\overline B) + BC + \overline B \, \overline C $$ Expand: $$ z = ABC+A\overline B C + BC + \overline B \, \overline C $$ Use the redundancy rule \$X+XY=X\$ on the first and third terms: $$ z = BC + A\overline B C + \overline B \overline C = $$ $$ = BC + \overline B(AC+\overline C) $$ Use another rule: \$X+\overline XY=X + Y\$ on the expression in parentheses: $$ z = BC + \overline B(A+\overline C) $$ And now it is exactly the book answer.
H: Why do older (green) PCBs have primarily a darker color, whereas new ones are lighter Note the difference in color between this old commodore board and this newer board. It might seem like lighting, but after looking at my own collection of scrap boards, the older ones tend to have a much darker color than the new. I thought it might be aging on the mask, but all the old ones essentially have the same color, so I thought it unlikely. Does anyone know the reason for this color change? Is it a change in board material, masking chemicals, etc? AI: It is superficial, the color is determined by the place of manufacture. Earlier on a darker green was the most used and often the only color available at most board houses. After a while, there were other colors available but often at an added cost. Today you can even order dark green or light green from some manufacturers with no additional cost. Most of the boards I order look the same color as the commodore board. The color does not change unless maybe the PCB has been exposed to UV (sunlight) or a chemical and I would expect that would make the color lighter not darker. Exposing the PCB to heat can make the solder mask darker, but usually this is not uniform across the PCB.
H: Using open termination to intentionally reflect RF signal Part of the calibration for an RF system we designed involves measuring the frequency response so that we can equalize the return. Part of this calibration requires measuring the reference response of our test setup so we can remove it during our calculations. Previously we had a two-antenna setup, with one path for Tx and one for Rx. For our reference collection we then would connect the Tx and Rx cables together, cutting out only our system under test. Now we are trying to move to a single-antenna setup which can both transmit and receive from the same antenna. Below is a basic diagram of our setup. The antenna is transmitting to the system we are calibrating, but that part isn't really relevant here. simulate this circuit – Schematic created using CircuitLab In order to remove the test equipment from this setup, we would need to perform a reference measurement of just the circulator and cables. Since an open circuit acts as a reflector, I had the idea to terminate the cable with an open connector from a cal kit, so that the signal is returned while still isolating from the system under test. Is there anything wrong with intentionally reflecting the RF signal in this way? Everything I've read so far only treats reflections as unwanted in explaining why impedance matching is important. None have looked at how to take advantage of reflections. We don't need a super-accurate calibration, as part of our SUT includes free-space transmission. I just want to make sure there's not something inherently wrong with trying to use the reflected signal. AI: It depends how accurate a calibration you need. The open standard in the cal kit has some parasitic capacitance. When you use it to calibrate a network analyzer (VNA) you'll specify this (and a couple other parasitics) to the VNA to get the most accurate calibration. It's usually possible to make a short standard that is closer to an ideal short than the open standard is to an ideal open. So if you want a more accurate calibration with a single standard that you assume is ideal, you'll probably want to use a short instead of an open. But even a short standard has some parasitic inductance and/or capacitance. Which you would want to characterize and use in the calibration math if you want a calibration comparable to what you get with a VNA. And of course for the most accurate calibration, you'd probably want to combine open, short, and match standards like the VNA does. (Using the match standard, for example, would help you to separate the effects of reflections by the circulator, rather than at the end of the feed cable) Of course there's also some complexity to the math for using a full set of well characterized standards for calibration, which would take more than a SE answer to describe.
H: String DAC - Question I was reading about String DACs here https://www.allaboutcircuits.com/technical-articles/voltage-mode-r2r-dacs-operation-and-characteristics/ and I saw Is the highlighed wrong? I mean, if just SW4 was on, shouldn't the output analog voltage be 1/2 Vref, since there are 4 resistors above SW4 and 4 below AI: You are correct. The author probably meant to write For example, to produce an analog output equal to VREF/4, we only need to turn the switch sw2 on. Note that with this circuit the output range is 0 to VREF × 7/8. You can't get VREF.
H: STM32 Nucleo UART2 tx/rx pins wired to UART3 tx/rx pins I am exploring UARTs on the STM32F103RB on a nucleo board. The board is connected via USB to my laptop, and I can send/receive messages using the HAL_UART_Transmit_IT and HAL_UART_Receive_IT functions. What I am actually failing to do, is send a message from UART2 to UART3. I wired as follows: UART2 TX (PA2) => UART3 RX (PB11) UART2 RX (PA3) => UART3 TX (PB10) Then I send a transmit an array of 2 bytes from UART2 to UART3, but the interrupt handler never fires. So I thought to isolate the problem further, and just connect RX to RX and TX to TX, so that the signals to UART2 are "mirrored" to UART3. Wiring as follows: UART2 TX (PA2) => UART3 TX (PB10) UART2 RX (PA3) => UART3 RX (PB11) From the pinout here that I identified the following pins: PA2 and PA3 PB10 and PB11 In that setup, I again activate the callback on UART3, send a message from my laptop to UART2 (and thus 'also' to UART3 if my theory works in practice) and hoped to hit the breakpoint in the HAL_UART_RxCpltCallback. But it doesn't work. The code for completeness: In the main function: // Activate the callback on receive UART3 HAL_UART_Receive_IT(&huart3, receive, 2); __NOP(); while (1) { // Do nothing, all is done via callbacks } (the default setting up of UARTs and GPIO, generated with CubeMX, is left out for readability) The UART receive callback: void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { /* Prevent unused argument(s) compilation warning */ UNUSED(huart); if (huart->Instance == huart3.Instance) { __NOP(); HAL_UART_Receive_IT(&huart3, (uint8_t *)receive, 2); } } I am sending a few bytes using a tool (Hercules). It works fine when I change to huart2. So I am sure the code works as it supposed to. Is it possible to "mirror" UART2 pins to UART3 pins like I did? Or is there something else that comes to mind what I might be doing wrong? Update As already explained in the comments, this is not a duplicate of the linked question (otherwise I wouldn't have asked it, since both are mine...). The problem in the linked question was regarding transmitting from UART2 to UART3, the question now is to mirror receiving pins to drill down to the actual issue at hand. Update 2 Justme was spot on. The problem that I can't mirror the pins is simply because no signal is receive on the PA3 pin. I need to solder a bridge to make that happen, as explained in the user manual: The answer / comment of Justme is most likely the actual problem that solves my issue. AI: Do not wire two or more outputs together. That is a standard rule for push-pull type digital outputs. When other drives low while other drives high, abnormally large current flows from pin to pin and may damage one or both output pins. Also, UART needs TX output connected to RX input for communications.
H: Why does my IR receiver spit out random codes when my motor is on? I'm learning electronics and trying to understand why my IR receiver spits out random codes when my motor is on. I have a basic setup with this: Arduino Power supply set to 5V IR sensor receiver module PN2222A transistor that turns the motor on/off 3-6V motor When the motor is off, my IR sensor detect all my commands sent with an IR remote and works well. But at the moment I send the command to turn on the motor, the motor turns on and the IR receiver starts to blink and send random codes. This tells me that, because the motor is draining power, the receiver acts weirdly. In fact, when I connect the motor directly to the tracks of my breadboard, I have the same problem (without transistor and connections in between). Edit: Schematic added What is the cause of this behavior? A change in the amperage received by the IR receiver? Is this something else? Should I add a capacitor (how many farads?) Should I add a resistor (how many ohms?) Note: I'm actually learning it, so please, don't tell me to go back to school and learn all the laws and formulas, I'm on it. Be constructive and guide me in your responses. AI: Motors are noisy, and they dump noise onto their power supply rails. You've done nothing to isolate the IR receiver from that noise. You should have a capacitor from +5V to ground. You probably want a "bulk" cap of 100uF or so, in parallel with a 100nF cap (and there's more than one way to do this "right", so don't be surprised at comments). You should isolate the IR receiver from that noise. If you're truly running the motor from a separate +5V supply, and intend to continue to do so, then power the IR receiver from the Arduino's +5V supply. Better, if the receiver is rated for 3.3V operation, power it from the Arduino's 3.3V supply for better isolation. Either way, put a 100nF cap in parallel with the receiver's power supply pins, right at the receiver package. While you're at it, put in that catch diode that @KingDuken mentioned. That's a diode, rated for your motor current (i.e., not something too wimpy) from the transistor collector to the motor's +5V supply. Orient it so that it's reverse biased when the motor is on -- that way, when you shut the motor off suddenly, the inductive kickback won't destroy your transistor.
H: Can I use a ST-LINK V2 as a universal JTAG or TTL serial interface? I have a ST Link V2 as pictured below. I would like to use it as a general purpose JTAG and or Serial TTL USB interface for communicating with a wide variety of devices. The documentation claims it supports SWM, which appears to be JTAG, but it's unclear if it is a vendor specific version of the standard. Since the ST Link V2 has built-in firmware to function, I'm assuming its not just a dumb interface and may require additional steps to make it work. Can this be used for my purpose or should I just get a general purpose JTAG cable? If so, what's entailed? AI: First of all it is not an JTAG probe. It is the ARM SWD debugger probe. Probably you can use it with non STM32 ARM microcontrollers using openOCD. . This probe does not have UART <> USB converter you of course can't use it. You need ST-LINK V2/1
H: Capacitor Discharge Pin 7 555 Timer I am very new to electric engineering, so bear with me ;) Before building the circuit IRL, I wanted to try to build a simple 555 timer with a simulator following Ben eater's tutorial on it. Here are the schematics of the circuit... If you want to see the tinkercad project... Now, even though I seem to have copied the exact same circuit as shown in the video (or at last so I think) - the first seconds of YT video - the 2uf capacitor doesn't seem to discharge trough Pin 7 when I simulate the circuit. What could be the problem here? I am 100% sure I am missing something very obvious but I have tried, and tried and tried to no avail. So I hope you guys could explain this to me :) Thanks in advance! AI: It looks like you have your LED pins shorted together. The way a breadboard works is every pin in that line is connected. You need to put the long LED leg in the line with the wire to pin 3 and the short leg on a new line with the resistor to ground
H: Why does this electret microphone with op-amp circuit cause the negative half wave of the signal to distort? This circuit works quite well with low signal levels, but when the RMS AC signal is approximately 0.8 to 1.0 V (measured on pin #1 of the op-amp,) the negative half wave of the sinusoidal signal is distorted so much that you can see it clearly on the oscilloscope. I am not asking how to correct this circuit. I would like to know the reason for this behavior. This is an existing circuit and I know how it must be changed. Added: The image from the oscilloscope shows that the "negative" part of the signal is much wider and has a clearly different form. It is not clipping. If I add voice level to the microphone, clipping starts first on the positive half wave. AI: Is the distortion beginning at 0.8 to 1VRMS at the input or output? It's hard to say definitively without some bench time, but I suspect your biasing scheme. You have an 8.2K resistor (R2) which doubles as bias and feedback. The gain is apparently set by this resistor and the current output of the ECM. This is not a particularly accurate way to set gain, and it's a bit unconventional to bias an ECM with a variable voltage. It may be when the mic output drives positive, it's starved for bias as the output of the buffer goes negative. Usually an ECM is biased to a constant DC voltage (many CODECs and other audio components contain a special LDO just to generate a clean, quiet mic bias signal). Then it is buffered, usually, with the buffer having an input impedance somewhat greater than the ECM output. (All ECMs I've seen actually include a JFET buffer stage internally, since the voltage and current generated by the electret itself will hardly drive a short length of wire.) wire
H: In practice, what is the difference between the "nominal plant model" and the "plant model"? I am reading a book on nonlinear control and disturbance rejection, and in many examples, they distinguish between the "plant model" \$G_p(s)\$ and the "nominal plant model" \$G_p(s)\$. They also add that the discrepancy between these two models adds uncertainty that is lumped with disturbance. They specifically called this "unmodeled dynamics", or "modeling errors". Nominal model was defined as the system's dynamics in the absence of modeling errors. On another hand, it was described as "the ideal model". In another example, they provided expressions for \$G_p(s)\$ and \$G_n(s)\$. I am very confused: Is the nominal model the desired model? (i.e. do we want to reach it?) Is the nominal model an imprecise idealization of the plant to simplify the mathematics? Do we know both \$G_p(s)\$ and \$G_n(s)\$? In the book both were provided. If we know both, then what is the point of idealization and/or modeling errors? How does it work in practice? Do implementations by researchers and engineers target \$G_p(s)\$ or \$G_n(s)\$? I am really curious about both the theoretical and implementation side. Any insight is immensely appreciated. AI: Is the nominal model the desired model? (i.e. do we want to reach it?) In much the same way as I'd like a rich stranger to die and bequeath $100 million to me, yes, it's the desired model. Is the nominal model an imprecise idealization of the plant to simplify the mathematics? The nominal model is somewhere between your best guess of how the plant actually behaves, and a simplified model of how the plant behaves that you guess will be good enough for your purposes. It's not possible to know exactly how a physical system will work, and in general, any physical system will have essentially infinitely complex dynamics (just count the electrons and multiply by 2...) So you come up with a model that you hope will solve the problem at hand. Even if by some magic you could exactly know the real plant behavior at some point, aging and environmental changes will change the behavior -- and if you're making a controller design that needs to work on multiple units, manufacturing variation adds even more variability. Do we know both () and ()? In the book both were provided. If we know both, then what is the point of idealization and/or modeling errors? Nope. See "best guess", above. How does it work in practice? Do implementations by researchers and engineers target () or ()? You build \$G_n(s)\$ with some notion of how much it's going to miss the mark. Then you do a robust design. If I were writing the book, I think I'd carefully avoid the term "actual plant model" or "plant model" in favor of the term "actual plant dynamics" -- because we know the model, but we can never know the actual plant dynamics.
H: How to classify power electronics components in 2 main groups? I'm working on preparing a course about power electronics, and with my basic search conclusions. I thought that if it's possible or acceptable to classify the power electronics components in 2 main groups. Group1: Controlled/Uncontrolled rectifiers Includes: Power Diode, Thyristor, GTO, TRIAC and DIAC. Group2: Power Transistors Includes: BJTs, MOSFETs and IGBTs. My questions, is my dividing power electronics components in 2 main groups, acceptable; as: Controlled/Uncontrolled rectifiers Power Transistors Also, I don't want to add more components, because I want to keep it simple and just studying the basic and most important things. Any ideas? AI: It depends why you want to break them into groups. If you simply want to partition the course into more easily managed teaching sections, then an alphabetic grouping is just as rational. Put all the power devices into alphabetic order, and split them into two. If you want to group them by the way they're used, then the groups you've chosen aren't too bad. The second group covers quite a range of technologies, and the first controlled and uncontrolled behaviours, but if you want to reduce the number of groups, that's what you end up with. If you want to group things with similar underlying physics, then your groups are not suitable. For instance, the progression one junction diode, two junction BJT, three junction SCR is quite natural. The different method of operation between a BJT and a FET is very significant. If you want groups that are meaningful on both behaviour and underlying technology, then you're going to need a bigger set.
H: Is it possible to create power factor compensation for a single power supply? A 24V 150W power supply's power ratings is marked on its surface as follows: In this case as you can read the cos phi is 0.45. I know that the utility which provides power to the systems wants to supply low current so by compensation the current going into the system is lowered. And if I'm not wrong they use capacitors to reduce the power factor for inductive loads in industry. But back to this power supply's case. If we think this power supply as our system and if we want to bring the power factor from 0.45 to around 0.9 or close to unity, is there a way to do that? AI: The load this power supply imposes on the mains is not sinusoidal, so placing any value of cap across it's mains will not properly correct power factor. The only way is with a "Power Factor Correction" front-end. Essentially this is a special boost switcher which is optimized to pull sinusoidal-like power from the mains, thus increasing the power factor. Output is DC. If your supply has a DC input, you could implement a PFC stage and just supply it with DC to achieve higher power-factor.
H: can use these printer motors to made CNC machine? can i use this motor to make a cnc plottor ? is there any way to make a stepper motor using this motor? AI: No. That is a simple motor. It cannot be changed into a stepper. To use a simple motor then you will need feedback, an encoder. You will be better off getting real stepper motors or servo motors.
H: CPU cache write policy - evict already dirty? + storage of memory address I'm reading about cache in wiki https://en.m.wikipedia.org/wiki/CPU_cache and the following phrase seems not clear. Also, a write to a main memory location that is not yet mapped in a write-back cache may evict an already dirty location, thereby freeing that cache space for the new memory location. There could be writes from 1) peripherals and 2) CPU cache. For 1) I do not see meaning in the phrase at all. For 2) I understand computer need to write from cache to new location which was not in cache. Then that location becomes mapped to that cache line. Again I do not see any evictions. Do I miss Something? Added: found other part I could not understand and could not find good place via Web search where it is explained in a clear way (tags + index, how and where memory location is stored). Please point to good detailed article. AI: I can answer your second part. In the book Computer Architecture: Fundamentals and Principles of Computer Design by Dumas in 2.3.4 chapter (https://books.google.ru/books?id=TZ6VDQAAQBAJ&pg=PT89&hl=ru&source=gbs_selected_pages&cad=2#v=onepage&q&f=false) it is explained is much details and with better graphic aids (schemes). In summary from there: tags are most significant bytes, index are middle, but that is not by chance, for e.g. direct access adjustant memory blocks maybe loaded together w/out eviction because they differ by index, tag will be same and will allow to check for cache hit/miss. Also in the book it is mentioned (not seen in wiki too) ssociative type mapping is physically organized by storing tags in special type memory - content associative memory CAM, which locates not by address, but by content. You can read more on it in wiki, where there are mentions of specific semiconductor implementations: https://en.m.wikipedia.org/wiki/Content-addressable_memory. As for you first question, I think it maybe not perfect phrase in Wikipedia, it is written by people and that part does not have references attached to check the wording.
H: Why are there 2 connectors on li-ion batteries I'm looking at just about any assembled li-ion battery pack for sale and they all have 2 connectors coming out (4 wires total) and I'm wondering why is that? AI: Li-ion Ebike batteries often have a built-in BMS (Battery Management System) or PCM (Protection Circuit Module) that prevents over-charge, over-discharge, high temperature or excessive current draw, and may also have a balancer to keep all the cell voltages equal. As the normal discharge current may be 40A or more, Some have a separate connection that provides extra protection for low current charging. Here is an example:- 28S LiFePO4 Li-ion smart bms pcm for 28s battery pack Cheaper batteries sold on eBay etc. might have direct connections to the battery for discharge and a low current BMS for charging, or the charge port might be connected directly to the battery and is for convenience only. Without seeing inside the pack it's impossible to say what a particular battery has if the supplier can't tell you. Buyer beware!
H: Help identifying pins in EVQV9C00116E rotary encoder I'm trying to make a button box for a sim racing rig and need a few rotary encoders for menu browsing. I plan to connect it to an arduino but I can't seem to figure out how to wire things up. I have found the datasheet for the encoder, but can't figure out what pin does what. How do I connect and use the EVQV9C00116E rotary encoder with an arudino? AI: The pins are shown in this diagram: The first and second pins are shown here (the first diagram is from the bottom up, the second from the top down): Your confusion may stem from the fact, that a lot of rotary encoders around foster quadrature outputs. This encoder puts out a gray code instead. I.e. the four output pins are the bits of a series of numbers where only one bit is changing between two positions. This means, this encoder provides an absolute position but can be used as a relative encoder as well. You can use three XOR-gates to generate an single interrupt for rotation detection. Connect the VCC of the arudino to the pin 5 of the roatary encoder, and connect pins 1-4 to the arudino (or just one of the pins if you only need to detect one rotation). You could use interrupts to toggle code whenever it detects a rising or falling edge
H: How many ALUs (and threads) are in a Pentium CPU? I'm reading a book bottom up where it said: The Arithmetic Logic Unit (ALU) is the heart of the CPU operation. It takes values in registers and performs any of the multitude of operations the CPU is capable of. All modern processors have a number of ALUs so each can be working independently. In fact, processors such as the Pentium (*emphasis by me) have both fast and slow ALUs; the fast ones are smaller (so you can fit more on the CPU) but can do only the most common operations, slow ALUs can do all operations but are bigger. I started to find out how many and found that question https://stackoverflow.com/questions/29056968/how-many-alus-are-in-a-cpu where as far as understood many ALU referred to multi-threading, but Pentium is single threaded. Here I've found Are 32-bit ALUs really just 32 1-bit ALUs in parallell?. So I guess what was meant in the book is kind of many parallel "small" ALUs - am I right? AI: The Pentium processor has two execution units: the U and the V pipes. When two instructions execute in parallel in the two pipes, the two instructions are considered to have paired. The U-pipe can execute any instruction in the Intel(R) architecture while the V-pipe can execute only simple instructions. When two instructions pair, the instruction issued to the V-pipe is always the next sequential instruction after the one issued to the U-pipe. Simple instructions are entirely hardwired; they do not require any microcode control and, in general, execute in one clock. The exceptions are the ALU mem, reg and ALU reg, mem instructions which are three and two clock operations respectively. Sequencing hardware is used to allow them to function as simple instructions. Source: http://www.nacad.ufrj.br/online/intel/vtune/users_guide/mergedProjects/analyzer_ec/mergedProjects/reference_olh/pentium4_hh/lips/v_pipe.htm Source: https://www.ques10.com/p/13341/explain-in-brief-pipeline-stages-on-pentium-proc-1/ So in answer to your question, one ALU can work while the other one is working, so it's not exactly multithreading, because if a thread need u-pipe and it's busy, it will have to wait.