text
stringlengths
83
79.5k
H: Is a pulled down signal the same as a ground signal? I am using a multiplexer to switch my UART lines. When the logic signal (A0/A1) is high the UART lines responsible for firmware downloads are connected to my MCU, when the signal is low a GNSS module sends serial data to the MCU. In summary I am just switching what is connected to the TXD0 and RXD0 of my MCU. I decided a good way to implement the signaling would be to use USB_VDD as my logic signal such that when I plug in my micro-usb the multiplexer would switch to logic high state (firmware download mode). And unplugging it would take me to low logic mode (GNSS mode). The problem is I am not sure if the logic signal my multiplexer sees when the USB is unplugged is adequate. It is not a direct ground signal, just the VDD signal line is pulled down to ground by a 10k resistor. Will this cause problems? multiplexer datasheet AI: Generally, yes. A 10K resistor is a fairly standard pull up/down value. Not too strong not too weak. It should pull the line down enough when the rest of the node has no signal present. It's stronger than the stray signals or capacitance of the trance when nothing is connected. As mentioned in the comments, if your input has any pull-up resistor, then it works like a voltage divider and the subsequent voltage will be a ratio of your external resistor and the internal one. But for these chips, it's unlikely they will have internal pull resistors. The datasheet makes no mention of it. You can measure this with a multimeter to confirm.
H: Whats's the electronic component in this picture called? The photo is taken from an Acer Monitor's power board. The monitor model is K242HL and the power board part serial is 4H.220V2.A17. As an electronics beginner and being of curiousity, I tried to identify each electronic component on this broken circuit board. AI: 99% sure it's a 3.3V linear regulator. Clues: 33 marking on the package I (input), G (ground), O (output) markings on the PCB. Potentially a part like AZ1117CH2-3.3TRG1, which has the same pinout:
H: What's the difference between normal read and fast read on the W25N01GVxxIG? I noticed that there were two separate instructions to read data from the data buffer of the W25N01GVxxIG flash chip. There is Read Data(0x13) and Fast Read(0x0B), but their descriptions seem to be the same on the datasheet, except for the fact that the fast read instruction has more dummy clock cycles. I found a similar question on this website, and the answer for that was that the clock speed was slower for the regular read instruction. That doesn't seem to be the case for this particular chip. Does anyone know why there are two separate instructions that seem to have the same purpose? AI: The fast read allows functions described on pages 41-51. They seem to have allowed the basic read with similar frame as other fast read functions, which doesn't differ from the normal read in other aspects but the communication data frame. "...allowing equivalent clock rates of 208MHz (104MHz x 2) for Dual I/O and 416MHz (104MHz x 4) for Quad I/O when using the Fast Read Dual/Quad I/O instructions"
H: How should non-shielded connectors be handled in a casing design? Assume a design with a mix of shielded connectors (e.g. USB, HDMI) and non-shielded connectors (e.g. standard 0.1" headers) A metallic casing is designed to mesh with the shielded connector housings (using sprung metallic elements and/or EMC gaskets). In the case of the non-shielded connectors, the opening in the case is not ideal from an EMI/EMC perspective. How is this handled in practice? Note, this isn't about the signals on the cables/connectors themselves. It's just about the hole in the enclosure. AI: Don't worry about the hole in the enclosure. You have a far bigger EMC problem with the wires that are passing through it. EMI signals will get onto the wires, and will then pass happily though the hole, treating the hole as the outer of coax, and the signal lines as the coax inner. We all know how good coaxial cable is at conducting signals, right? It doesn't really matter if the hole is big or small, one per conductor or one for the bunch, the coaxial mode through the hole will dominate the EMI. Is EMI going to be a problem? There's no point doing expensive work to cure a non-problem. Can you test or model it at this stage to see? There are several different aspects to EMI which might require slightly different solutions. There's radiation produced by the signals in that connector. There's radiation produced by other signals within the enclosure coupling to the lines on that connector. And then there's pickup of external noise coupling into your case, which could upset operation of your device. If you do have a problem, there are several ways to reduce it. You can stack some of these ways together to improve the final result. Use shielded cable and shielded connectors for your 0.1" cables, they exist. Connect the shields to the case at the point of entry. Filter the EMI at the cable level. Put a ferrite tube onto the bunch within your case, and/or on the cable outside (you've seen these bulges on laptop power supplies and monitor cables). This will raise the impedance for EMI waves travelling in common mode on the bunch as a whole. It will improve the balance of any differential signals and improve the return current balance of any single-ended signals. The above two methods will work with any intended signal on the wires. The following methods may compromise the signals, so need to be designed properly, and are a compromise between reducing EMI and maintaining a good signal integrity. They may not be possible at all. Filter the EMI at the individual wire level. Place ferrite beads or resistors in series with each wire. Place capacitors (ideally feedthrough capacitors) grounded as near as possible to where the signal wire penetrates the case. Reduce signal swings. Reduce signal edge slew rates. Use differential signals.
H: Effects of backdriving a motor If you backdrive a motor do you risk damaging the H bridge it is attached to? What considerations must be made if the motor has current running through it? I will be using a PWM circuit to control an H bridge in conjunction with a current sensor. I plan on doing torque control while allowing the motor to be backdriven. AI: If you forward-drive the motor while applying back-torque externally, it will generate a back-current in direction of the torque and in proportion to the work done by the external torque, overlaying the instantaneous forward drive current. If you apply enough back-torque, you will generate more energy than is dissipated in the motor DC resistance and will lead to a net backward current. Usually, this current cannot be sunk by your DC power supply used to power the H-Bridge. Therefore, the supply voltage will rise. If you suddenly stop a spinning motor, i.e. apply a short and very high back-torque, an equally short and massive current spike will transfer all of its rotational energy to become potential energy in the DC supply. There are a few ways out of it: Provide a lot of bulk capacitance and allow the voltage to rise slowly. This works only if the generative operation is short. Add a shunt regulator, that sinks the excessive current into ground when a certain voltage is reached. This shunt regulator will be probably of switched type and will sink current into a power resistor. This is cheaper then dissipating the energy directly in a linearly-regulated shunt transistor. Only detect the overvoltage on the DC rail but don't dump it. Instead, disconnect it from the motor. The motor can either freewheel or low-side-brake leading to potential safety issues, due to the jerk. Use a DC supply that can sink current and allows backfeeding power to its inlet. This is used in controllers that have regenerative braking capabilities.
H: Can you touch a live wire without being shocked? I understand many questions about electric shock from live wires and I apologise for adding to that list but after reading many of them I still have my concerns. From what I have read from some of these previous questions, if there is a path from the live wire to the soil of the ground then current will flow along that path as there is a potential difference. This is the ground connection. It would be rare to acidentally touch the live wire with your finger whilst also standing on soil. A more believable scenario would be where you are standing on household flooring material such as tiles or carpet. The current would have to flow through the resistant body as well as the flooring material as well as whatever is between the flooring and soil such as wooden beams. Overall could there be sufficient current to deliver a shock considering the extra layers between a person and the ground? AI: Yes, you can get sufficient current through the floor, the carpet, and your shoes to get a painful or even deadly shock. I've gotten some painful zaps by accidentally touching a live wire that was supposed to have been turned off, and that I was pretty sure was turned off. I've been zapped while standing on an insulated ladder that was on a dry, tiled floor over concrete while wearing rubber soled shoes. If you are thinking of touching a live wire to see if you can do it, don't. It hurts and if you aren't as well insulated as you think you are it can kill you.
H: How to specifiy my USB cable so there is no risk of fire? I am making a USB powered device that draws very little power. It is powered by a USB 2.0 cable, with the power wires soldered to contacts on the PCB. The cable has to be about 3 meter (10 foot) long. I would like to sell this device but I would like to be sure it is safe. I am worried about a short occurring inside my device. For example, I may accidentally connect the two power wires of the USB cable where they are soldered to the board. What precautions can I take such that the device remains safe in such an event? Can I specifiy the USB cable in a way such that it remains safe even in the event of a short circuit in the device? I am especially worried about the USB cable melting and setting the house on fire, but maybe that isn't even the biggest risk. I would like it to be safe with any typical USB charger that people usually have lying around. AI: USB chargers are current-limited, and supposed to shut down if short-circuited. It might be fairly hard to start a fire with one even if you were trying. However, having a device made out of wood and hot glue is a good place to start if you are trying to start a fire. You should use a plastic case; they can be made fairly fire-resistant: https://www.polycase.com/techtalk/plastic-electronic-enclosures/determining-flame-ratings-on-plastic-enclosures.html You should also use some kind of cable strain relief. You should not rely on solder bearing the weight of the cable, and glue alone is probably not sufficient either. Normally USB devices have sockets (e.g. micro-B). I think this even might be required to use the USB logo?
H: Bode Phase Plot for negative transfer function My question is relatively simple. Supposing that we have a transfer function of the type \$\frac{-Kj\omega}{\omega_0}\$. Then for the phase Bode plot, I should start from \$\pi\$ and then add \$\frac{\pi}{2}\$ giving me a constant phase of \$\frac{\pi}{2}\$? Thank you in advance(I don't know why latex doesn't work). AI: Your transfer function \$H(j\omega) = \frac{-Kj\omega}{\omega_0} \$ has a zero at \$\omega=0\$ and no poles. In other words, your system has a pure differentiator and no integrators. Therefore, you should have constant phase \$\angle H(j\omega)=90^\circ\$ but due to the minus sign in your tf you obtain \$\angle H(j\omega) = -90^\circ\$. By the way, your transfer function describes a non-causal system which is unrealizable in the real world.
H: Package of Flash memory S25F064L I need to use a SPI Flash from Cypress / Infineon to build a prototype for a future product. The exact model I have ordered is S25FL064LABMFM000. According to the seller page it is a SOIC16 package which is confirmed by the datasheet : (there is no other 16 pins package available for this product in the datasheet). However the memory does not fit in the "SOIC16 to DIL" adaptor that I've bought. After few research it looks like the memory package is wider than the SOIC16 standard dimensions. Here is a quote from wikipedia: Wb is around 7mm on my package. After a closer look to the datasheet it mentions "16-lead SOIC 300 mil (SO3016)" and 300mil is indeed around 7.5mm. So my questions are: is this package a standard one ? and is it possible to find a DIL adaptor for it ? (I didn't find one yet, all adaptors for SOIC16 do not mention the IC wide). AI: Yes, 16-lead plastic small outline family includes a 300 mil wide package, so it is quite common. Yes, DIL adaptors exist.
H: Can I connect the pull-up resistors of I2C lines to 3.3 V on a 1.8 V device? I need to use the following sensor in my project : AS7341 (ams). It is a spectrometer whose data are accessed through an I2C inteface. The datasheet can be found here. It is stated that its power supply should be 1.8 V, and regarding the INT pin : "Connect pull up resistor to 1.8V". I need to communicate with this sensor from an MCU whose supply is 3.3 V. I have taken a look at the user manual of the AS7341 EVAL KIT (asm), which is the evaluation kit of the AS7341. On the schematics (page 12), they connect SDA, SCL and INT pin to 3.3 V through a pull-up resistor. I would have naturally connected them to 1.8 V and used logic level translators to communicate with the sensor. But if it works with 3.3 V I'm more than interested. So my questions are : Will it work? Is it always possible to do this with open-drain outputs? Why don't they comply with the datasheet regarding the INT pin? AI: Yes, it will work. No, it is not always possible to do so on I2C pins (as they are not only open-drain outputs, they are also inputs). It depends on the specification of the specific device. They do comply with the datasheet, as the datasheet states that the SCL, SDA and INT pin have maximum input voltage of 3.6 V, i.e. they are 3.3 V tolerant.
H: RTL to Gate Level Design - Verilog I have written the following code for sinc3 flter in verilog (Vivado). I need to ask how shall I now convert this RTL design to a logic Gate level design in verilog (add AND, NOR, flip flops, etc.)? Would appreciate any suggestions. `timescale 1ns / 1ps module dec256sinc24b (input mclk1, /* used to clk filter */ input reset, /* used to reset filter */ input mdata1, /* input data to be filtered */ output reg [15:0] DATA, /* filtered output*/ output reg data_en, input [15:0] dec_rate ); /* Data is read on negative clk edge */ reg [36:0] ip_data1; reg [36:0] acc1; reg [36:0] acc2; reg [36:0] acc3; reg [36:0] acc3_d2; reg [36:0] diff1; reg [36:0] diff2; reg [36:0] diff3; reg [36:0] diff1_d; reg [36:0] diff2_d; reg [15:0] word_count; reg word_clk; reg enable; /*Perform the Sinc action*/ always @ (mdata1) if(mdata1==0) ip_data1 <= 37'd0; /* change 0 to a -1 for twos complement */ else ip_data1 <= 37'd1; /*Accumulator (Integrator) Perform the accumulation (IIR) at the speed of the modulator. Z = one sample delay MCLKOUT = modulators conversion bit rate */ always @ (negedge mclk1, posedge reset) begin if (reset) begin /* initialize acc registers on reset*/ acc1 <= 37'd0; acc2 <= 37'd0; acc3 <= 37'd0; end else begin /*perform accumulation process */ acc1 <= acc1 + ip_data1; acc2 <= acc2 + acc1; acc3 <= acc3 + acc2; end end /*decimation stage (MCLKOUT/WORD_CLK) */ always @ (negedge mclk1, posedge reset) begin if (reset) word_count <= 16'd0; else begin if ( word_count == dec_rate - 1 ) word_count <= 16'd0; else word_count <= word_count + 16'b1; end end always @ ( negedge mclk1, posedge reset ) begin if ( reset ) word_clk <= 1'b0; else begin if ( word_count == dec_rate/2 - 1 ) word_clk <= 1'b1; else if ( word_count == dec_rate - 1 ) word_clk <= 1'b0; end end /*Differentiator (including decimation stage) Perform the differentiation stage (FIR) at a lower speed. Z = one sample delay WORD_CLK = output word rate */ always @ (negedge word_clk, posedge reset) begin if(reset) begin acc3_d2 <= 37'd0; diff1_d <= 37'd0; diff2_d <= 37'd0; diff1 <= 37'd0; diff2 <= 37'd0; diff3 <= 37'd0; end else begin diff1 <= acc3 - acc3_d2; diff2 <= diff1 - diff1_d; diff3 <= diff2 - diff2_d; acc3_d2 <= acc3; diff1_d <= diff1; diff2_d <= diff2; end end /* Clock the Sinc output into an output register WORD_CLK = output word rate */ always @ (negedge word_clk ) begin case ( dec_rate ) 16'd32:begin DATA <= (diff3[15:0] == 16'h8000) ? 16'hFFFF : {diff3[14:0], 1'b0}; end 16'd64:begin DATA <= (diff3[18:2] == 17'h10000) ? 16'hFFFF : diff3[17:2]; end 16'd128:begin DATA <= (diff3[21:5] == 17'h10000) ? 16'hFFFF : diff3[20:5]; end 16'd256:begin DATA <= (diff3[24:8] == 17'h10000) ? 16'hFFFF : diff3[23:8]; end 16'd512:begin DATA <= (diff3[27:11] == 17'h10000) ? 16'hFFFF : diff3[26:11]; end 16'd1024:begin DATA <= (diff3[30:14] == 17'h10000) ? 16'hFFFF : diff3[29:14]; end 16'd2048:begin DATA <= (diff3[33:17] == 17'h10000) ? 16'hFFFF : diff3[32:17]; end 16'd4096:begin DATA <= (diff3[36:20] == 17'h10000) ? 16'hFFFF : diff3[35:20]; end default:begin DATA <= (diff3[24:8] == 17'h10000) ? 16'hFFFF : diff3[23:8]; end endcase end /* Synchronize Data Output*/ always@ (negedge mclk1, posedge reset ) begin if ( reset ) begin data_en <= 1'b0; enable <= 1'b1; end else begin if ( (word_count == dec_rate/2 - 1) && enable ) begin data_en <= 1'b1; enable <= 1'b0; end else if ( (word_count == dec_rate - 1) && ~enable ) begin data_en <= 1'b0; enable <= 1'b1; end else data_en <= 1'b0; end end endmodule AI: Vivado synthesizes RTL into Xilinx primitives (LUTs), not gates. If your objective is to target a standard cell library restricted to gates and flops you need a synthesis flow (like Synopsys DC /VCS) that does that.
H: Scam? Does having this capacitor wired as shown provide any surge protection? Bought this on Amazon as a dryer 240V SPD. I was trying to find out if this device is an outright scam. I found a similar post on here from several years ago but that did not answer my question. Apparently this device was originally sold as a "power recovery device," but it appears they rebranded them as dryer surge protectors. Decided to open up the one I bought to see if it even had MOVs inside. All I found is this giant capacitor. Is this literally a capacitor with a switch that turns on a light? Would this capacitor provide any surge protection in either direction? Might it prevent the dryer from creating a surge? My best attempt at a schematic. Wire colors are correctly represented, blue is "white" and marked as such. Terminals are as marked on the receptacle. AI: All I find is this giant capacitor. Is this literally a capacitor with a switch that turns on a light? Would this capacitor provide any surge protection in either direction? Wondering if it might prevent the dryer from creating a surge? This device is NOT a surge protector. While it may have been advertised as such on Amazon (there is not really any control about what vendors say there, so you're on your own) it's clearly labelled as a "Power Factor Correction" device. Whether this does anything useful depends on your situation. Generally dryers are not really a problem with power factor as the majority of the load is purely resistive with the only inductive load being the small motor that drives the barrel. Generally homeowners don't care much about PF anyway because in most places the power company doesn't bill residential customers for having bad PF. So the bottom line is that this device will have little to no effect on "surges" and its impact on your PF is likely insignificant or irrelevant.
H: Pull-up and pull-down resistor on one trace Does it ever make sense to have both a pull-up and a pull-down resistor on the same trace? Background: I'm designing a backplane to follow the OpenVPX guidelines and I saw this rule Rule 7-20: The backplane shall implement a 5% 220-ohm pull-up resistors to 3.3V_AUX and a 1.8K-ohm pull-down to ground on the SYSRESET* signal, or the Thévenin equivalent implementation, located at each end of the backplane. Am I reading it right? Is it asking for both a pull-up and a pull-down on the same signal? Does this only make sense because the pull-down is a way higher resistance? What is the advantage of doing this instead of just having a pull-down? AI: Yes, but one of the resistors is much smaller than the other. This has the effect of pulling SYSRESET* up to ~3V if 3.3V_AUX is present and down to ground in its absence.
H: Can phased-array (ULA) gain tapering effects be modelled using digital windows? I am attempting to model the general behaviour of various tapering techniques. It seems applying gain tapering to a ULA has very similar effects to that of applying a digital window to a signal. In fact, some common tapering algorithms also exist in the DSP world (i.e., Taylor taper/window). I am more familiar with signal processing techniques, so I am wondering if, for example, it would be fine to assume the behaviour from a Taylor window would be the same as applying a Taylor taper to a ULA. AI: Yes, that is a valid analysis technique. Remember that a phased array antenna is essentially spacially sampling the incoming RF waveform, which is similar to time domain sampling a signal. So the same, or at least lot of the same analysis tools can be used in both domains. FYI, the Matlab code I use for analyzing antenna patterns uses an FFT.
H: LED driver 3.5V 25A. Low voltage, high current I need to make a driver for an LED that works at 3.5 V 25 A. My idea was to make a DC/DC regulator from 12 V to 3.5 V and then a current limiter, but I'm at a loss as to which IC to use or how to build a driver. The LED is the CFT - 90 W model from Luminus. AI: There are 2 feedback requirements for safe operation. Junction Over-Temp Protection (OTP) using the heatsink and Over-Current Protection (OCP) where 1) has priority over 2) There are also stringent requirements for cooling, not much different than a forced air CPU cooler for a 150W CPU. The general rule of thumb is to measure what you wish to control. For current a 50 mV current sensor could be used but would be 2 W resistor with R = 50mV/22.5 A = 2.22 mohm or a folded copper strip. The board has a Murata Thermistor which can also be conditioned for accurate heatsink thermal sensing. The method of step-down voltage conversions are many such as those used on motherboards from a regulated 5V supply but instead of sensing output voltage, you would feedback and compare the sensed current with the ramped up control voltage to reduce the stress and improve stability. What you choose depends on your budget, design skills, search results and learning skills. The goal should be not to exceed Tj = 90 'C. using OTP and OCP. For the DIY design, consider a CPU cooler and 5V rail from an old PC PSU > 250W for an old MOBO. That part would be free.
H: How to interpret S parameters on a Smith chart I am trying to understand S parameters on RF transistors. I chose the BFP840ESDH6327XTSA1 as my RF transistor, to operate it at 10 mA, 12GHz. The design should be optimal for simultaneously matching impedance and maximum gain. Lets say that the input/output loads are 50 Ω. I am unsure as to how can I spot the S11 values from the Smith chart that the datasheet provides. For example, for the S11 I have the below figure from the datasheet. S11 is on the input side, where I have a 50 Ω source, so the input (source) is on point A. My question is: How do I find the S11 parameter from this graph? In the meanwhile I am posting my ideas since I am doing it as a homework project: Now, point A is not being crossed by any line, so my ideas to find the S11 there are: Either the graph does not have information of S11 for a 50 Ω load (most probably?) so I need to match the impedance of 50 Ω that I have on the input to one of the drawn lines on the graph (green line) so that can I change my input impedance from 50 Ω to a known impedance and use this S parameter. I need to "walk" on the resistance path -blue line- (and select A2 point as S11) OR on the imaginary part -red line- (and select A1 point as S11), which both do not make sense to me. AI: I am answering my own question Okay I figured it out. The S parameters are Independent from the Input/Output impedance. So my question does not make sense. I was wondering on what does S parameters depend on? The answer (based on what I see from datasheets like this one where the S parameters are on a table) seems to be: the frequency, current and voltage. On the graph shown on the question, ALL of the three dependencies are visible. The frequency (which I failed to see) is depicted on some spots on the smith graph on the lines drawn. Since I want 12Ghz and 10mA, the point I am interested of, is at the top middle of the smith chart. Therefore, $$ S_{11} = 0.29 + 1.3j $$
H: Are solar panels ever used to remove energy? Solar panels convert energy from the sun into electrical energy. Following the first law of thermodynamics, this means they remove some of the solar energy that would otherwise most likely be absorbed as heat or reflected. Generally the former is the primary, intended effect, since the electrical energy can easily be transported elsewhere, stored, converted to various other types, etc. However, I can imagine they could also be used for the latter effect, i.e. to remove some (potential) heat from where you don't want it, to electrically transport it to some place where you freely can dump it, and without reflecting it elsewhere, where it may also be undesired. Is that practical? Are there examples where they are mainly or partially applied for this purpose? Or are there always better alternative solutions for that particular problem? AI: However, I can imagine they could also be used for the latter effect, i.e. to remove (or wick away, so to speak) some heat without reflecting it elsewhere, where it may also be undesired. Yes, solar panels do absorb radiation as heat, but I'm going to say that it usually isn't practical to use them primarily for that purpose. There may be some niche cases where they serve a dual purpose to keep something cool and generate electricity, but most applications where cooling without reflection is important will use different materials with better absorption properties that are also probably cheaper. For example, satellites will typically be covered in all sorts of reflective blanketing that is used for thermal insulation. Here's some people putting this blanketing on the James Webb Space Telescope (source is Wikipedia). But this can be a problem for the cameras/sensors/telescopes on the satellite and cause straylight effects. This is why some places on a satellite may have black paint. You may think it would be efficient to kill two birds with one stone and replace that black paint with solar panels that prevent straylight and generate electricity, but you have two problems. Black paint (at least the stuff they use on satellites) is much better at absorbing light than solar panels which are still somewhat reflective. Solar panels are more expensive and weigh more than paint. Satellite solar panels are really expensive, and every gram counts when you have to pay to throw something 400+ km into the air, so solar panels on a satellite are optimized to be in places where they will see maximum sunlight which leads to maximum efficiency. The places where you want to keep straylight away from the satellite, you want to keep out of the sun as much as possible because it's really hard to transfer that heat away from the satellite. I recognize this is only one application example, but it highlights some points as to why it's probably not practical to use solar panels as a radiation heat sink in most applications. Also as a side note, heating of solar panels is usually a big undesirable because it makes them less efficient and reduces their lifetime.
H: Add Voltage Bias/Offset to 2nd-Order Sallen-Key Highpass I need to add a highpass filter between a signal source and an ADC to get rid of high-amplitude low-frequency signals that would cause clipping. I built a second-order Sallen-Key filter and the circuit is working as expected. However the filter requires a symmetric power supply and I need to run it on a single supply. This is what I have: The input U_IN is a 0V ... 3.3V signal (the attached sensor has low output impedance). The filter is currently configured to have gain 1.1 (R2=1k, R1=10k) but a unity gain with a voltage follower would work aswell (the exact gain is not critical). The Op-Amp currently is supplied with +3.3V and -3.3V. The cutoff frequency is at 500Hz. In addition I already have a reference voltage source (voltage divider and buffer) that provides half of the maximum signal voltage (1.65V): How can I change the filter to output 0V ... 3.3V while supplying the Op-Amp with +3.3V and GND? AI: You'll be kicking yourself to see how easy this is. But perhaps you should review where is the 0V signal = "ground" and how can you use an INA with shielded twisted pair to eliminate the low frequency (grid) voltage noise from high E or H fields.
H: Grounding for working with electrostatic-sensitive devices I'm planning one of my first electronics projects beyond basic repair soldering (it's a small pre-amplifier for a contact microphone). So I've got some JFETs and other pieces and would like to put them together without ruining them with static electricity. Over here in Canada I can hardly walk through my apartment without getting a static shock in the winter. There are plenty of wrist straps with alligator clips, but my question is: What do I attach this to? I've got no metal chassis, I'm on a plastic table. Is there a way that I can ground to the middle screw on a receptacle? Maybe rip the alligator clip off and wrap the wire around the screw? Any advice for this newbie is appreciated AI: Unfortunately, the ground strap alone is not going to do much good if you are using a plastic table which is just as likely to have static charges sitting on it as you are. A common solution to this is to use a ground strap with an ESD mat like this picture shows here (source is esdmat.com). The mat is static dissipative, and can be plugged into the ground receptacle of an outlet in your home or as this picture shows tied down with a grounded screw on your outlet or a piece of grounded equipment. The wrist strap can be plugged into the mat where the mat attaches to the grounding cord. If your wrist strap doesn’t have a plug that will fit into the mat receptacle, you can use the banana clips to clip onto the mat which keeps a static dissipative path between you and earth ground. Safety Note: you will want to make sure that there is a proper dissipative path between you and ground when using your wrist strap (\$10^6 \Omega\$ to \$10^{12} \Omega\$). Otherwise if you touch a live connection, you will be fried along with your electronics. Most wrist straps have a built in resistor for this purpose, but it’s a good idea to double check before working with live electronics. Good luck!
H: Snubber Filter Circuit Not Working Triac Dimmer Hi I am working on a project using a triac to do phase control dimming of 120V ac powered devices. I recently translated my project from perfboard to SMT using an SMT fabrication service. The project appears to be working correctly, except for the snubber filter section. Despite having a snubber filter, I can see on my scope that the ac output still has a hard cut-in in the middle of the waveform and I can hear an audible buzzing from the board at dimmer settings where the ac waveform turns on mid cycle. I am testing with a 43W incandescent bulb. I have checked that the components are the correct value and were installed correctly. Is there anything in component selection that might cause this? Here is the relevant schematic section showing the triac and the snubber filter: Here are the components I picked for Q1, R13, and C6 respectively: AI: R13 and C6 are not really suitable for mains operation. C6 should be X2 rated. The capacitor for C6 you're currently using is piezo electric, so it is most likely causing the buzz you hear. R13 isn't surge rated. If you want to slow the edge, you need an inductor in series with the load like all good phase control light dimmers have. R6/C13 is only for snubbing the triac.
H: What is the name of this 5-pin connector? What kind of connector is in the images? AI: It's a MATE-N-LOK connector Header: https://www.te.com/usa-en/product-640467-1.html (Mouser: 571-6404671) Plug: https://www.te.com/usa-en/product-1-480763-0.html (Mouser: 571-14807630)
H: DALI DT6-DT8 Sending commands above 255 From my understanding and research, each DALI command consists of 2 8 bit parts one for addressing and one for the commands which are sent one by one, but there are commands above 255 which are more than 8 bits of data as shown below image. I am having a hard time figuring out how we can send these commands. for example for setting DTR1 the command number 273 should be sent. So how we can send these commands (above 255) as 8 bit? AI: The diagram only shows the correct format for the commands 0 to 255, and Direct Arc Power, which are the most common commands to use once a system has been commissioned (short addresses assigned). The commands above 255 do not use the format where the first byte is the address, instead the first byte is the command. Most of these commands are not addressed ie they are broadcast: received by all control gear. Notice that the Y bit is 1 in these commands. A few of them have the address in the second byte. Unfortunately DALI is not consistent in this respect. Eg Commands 267 and 268 Program Short Address and Verify Short Address use the second byte, but the address is left shifted one place. The Search Address commands use the second byte for the search address which is 24 bits so is sent as High, Mid and Low bytes. These can be distinguished from commands 0-255 by the fact that their "A" bits, the middle 6 bits of the first byte, are not valid address formats. Recall that the valid address formats are: Short Address 0 to 63: 0AAAAAAS Group Address 0-15: 100AAAAS Broadcast: 1111111S Therefore if the first byte starts 101... or 110... it must be a command above 255. This applies to all device types.
H: Implementing UVLO on battery charging and boost controller ICs I recently bought a Adafruit PowerBoost 1000 Charger and found out it does not have 32.V UVLO to protect the battery. The boost controller IC has low voltage sense (LBO goes low when undervoltage) but not active UVLO LBO cannot be connected to EN to form UVLO as there is no hysteresis, so the enable state will oscillate(LBO goes LOW -> EN pulled LOW -> LBO goes float -> EN pulled HIGH -> Repeat). I'm thinking about external voltage sensor with hysteresis such as S-808xxC but it's kind of exotic and makes LBO useless. Is there a way to utilize LBO to build a UVLO ? with a transistor perhaps ? AI: Is there a way to utilize LBO to build a UVLO ? with a transistor perhaps ? I don't think so. Reason: To be able to use LBI/LBO requires that the enable remains active all the time and, if enable is active, then the TPS6109x booster is always trying to deliver a boosted voltage to the output. This means that it will still carry on taking some current from your battery. The TPS6109x will properly disconnect the output load when enable is deactivated and this is what I believe you need i.e. only circa 1 μA flowing from your battery in this state. So, I would add an external circuit (that controls the enable pin) with the required amount of hysteresis to ensure that this happens. Clearly though, you need to use a low power circuit or you'll end up taking too much residual current from the battery when it is meant to be "protected" from further discharge. It looks like the S-808xxC is ideal for this as it only draws about 1 μA but, you could use a really lightweight op-amp/comparator and super-low current reference voltage and get consumption down towards maybe 400 nA: - Picture from this answer.
H: Why might you use 2 switch ICs for a 2-in-1-out VGA switch schematic? For a hobby project, I'm planning to build a 4-in-2-out VGA (yes, VGA) KVM switch/matrix circuit. The top result on Google at the time of researching is 'Building a KVM – Part 1'. I'm trying to figure out why the engineer who wrote the article used two switch ICs (TS5V330 and SN74LVC1G3157), and it's not clear from reading the article. The only text from the article close to explaining why there are 2 chips is maybe the following, but I'm not sure it gives me any clarity: there’s just a switch to the IN and S lines for switching displays. Might it be to save on cost (which the author alludes to later in the article when talking about USB switch ICs), since a full VGA switch IC could be more expensive? Or is it that VGA switch ICs are less available with HDMI/DP being the current de facto? If not, do there exist any specific VGA switch ICs? (Not asking for product recommendation, just information on whether or not this type of IC existed at any point in time). Is there a simpler solution than using two ICs? I appreciate that IC availability might be an issue since VGA is probably dying out (but VGA is necessary for my hobby project). I'd like to simplify the design if possible, since, if my back-of-napkin drawing of the 4-in-2-out matrix/switch is correct, I'd need a total of 8 chips (4x TS5V330 and 4x SN74LVC1G3157) which might produce a more complex circuit than is necessary. I can create a full schematic if requested in the comments (but I plan to do this later after playing with the chips). Side notes, possibly unrelated: In my case, I'm planning on using an ESP8266/Arduino or similar microcontroller to control the switch via a web interface (as opposed to a physical switch). I know, a bit weird for a retro tech project. Not sure if this is relevant to the question though, but let me know if it is. Also, I'll be switching both USB and PS/2 connectors, which look very similar in terms of having 4 lines, VCC/G/D+/D-, so maybe I'll be able to use the same USB switcher ICs for both connector types. AI: Two chips are needed because the selected chips can't switch all the necessary signals with one chip. And because it's just someone's blog about a hobby project, it is unlikely that there has been much thought given what parts to use and why, or how suitable they are for the task. The TS5V330 has only four switches, and it has the bandwidth to switch high speed video signals. Fourth switch is used for VSYNC, apparently, which makes no sense as HSYNC would be a logical choise, if you even would use a switch for it instead of logic buffer. The 3157 is used for switching the HSYNC, as it is not good enough for switching video due to it's resistance, but on the other hand, it has larger bandwidth than the video switch. Yes, actually chips that are specifically designed for switching all signals between two VGA interfaces do exist, from multiple manufacturers
H: Is the SWER (single-wire earth-return) system dangerous? If not, why not? When a live/hot wire touches the Earth ground, it creates step voltage and so it's dangerous to walk on ground during this fault. But in a single-wire earth-return system, we use earth/soil as conductor. So why isn't a SWER system dangerous? Even Wikipedia says that "Power engineers experienced with both SWER and conventional power lines rate SWER as equally safe". I think this question is closely related to the following: In the US split-phase system used in homes, why isn't it dangerous to walk on ground, if a live/hot wire is grounded (and so now it's called the grounded/neutral wire) and thus there should exist a step voltage. Is it because in order to have a step voltage, we need both wires to be grounded? (Note: I don't know much nor I have experience with SWER systems and step voltages, so I may be thinking incorrectly something.) AI: Naively calculated: The Step-Voltage is basically voltage-difference divided by the distance of the two connection points to earth multiplied by your step with. So we're normally talking quite big distances and quite low voltage differentials. Additionally, we have a lot of stuff that's better conducting than your skin. Like metallic water pipes in the ground, wet soil and other stuff. So in a working SWER system there is not much danger to humans. But SWER systems (like they are often used on electric roadcars and railways) can be bad for water pipes. Especially if the systems run on DC. Than you can get corrosion from the current on metallic pipes.
H: Switching Multiple Constant Current Regulators I'm looking to setup a grow light system but I'm a bit of a beginner. My aim is to be able to turn on/off two series of LEDs from an Arduino Uno. At the moment I have two constant current regulators (XL4015E1) for powering the two series of 3W Leds, as seen below. I will also connect the Arduino Uno to the same power source using a LM2596S voltage regulator. I'm currently looking at how I can turn on/off these two series of LEDs. I have some L2203N transistors but I've only seen these on constant voltage LED circuits (blog, diagram). Are there any recommendations on how I might approach this? Or is it best to find new constant current drivers with PWM? Thanks! Schematic for the regulator board. Picture of the constant current regulator board: AI: Without a module schematic it's pretty hard to tell, but I think you could either control the input voltage to the CC module(s) or feed the XL4015 chip a voltage to turn it off. Quite likely if you add D2 1N4148 (not optional) to pin 2 of the converter chip you will be able to turn off the XL4015 converter chip with a 3.3V or 5V signal as suggested in the XL4015 chip datasheet. There's plenty of opportunities here to burn various things out, so try at your own risk.
H: Load sharing MOSFET problem This is the schematic of the circuit: Power-supply1 is an external supply. Power-supply2 is a 3S Li-ion battery. AIM OF THE CIRCUIT: When an external power supply is connected, the load should draw current from the external power supply. So MOSFET should be turned-off in this situation. Power supply-1: https://i.stack.imgur.com/QdQ13.jpg Power supply-2: https://i.stack.imgur.com/sH3bf.jpg The circuit: https://i.stack.imgur.com/rPoUO.jpg PROBLEM DEFINITION: When the output voltage of the P.S.1 is 13V, load draw current from P.S.1 (as expected) When the output voltage of the P.S.1 is 12V, load draw current from P.S.2 (not desired) In the second case, although the G-S voltage is 0.1V, why does the MOSFET open and the current is drawn from power supply 2? In case of an external power source, the current must be drawn from the external source. Note: G-S threshold value of the P-channel MOSFET between -2V and -4V from the datasheet. AI: You are close. But you need to drive the P-channel MOSFET in a way that turns off the battery regardless of input voltage. You can do this by thinking of the V1 as a signal for switching input. When V1 is on it drives both the output through D1 and the base of Q2. This turns Q2 off, so there is 0V across Vgs of M1. When V1 is low/open, then Q2 turns on which puts ~6V across Vgs of M1, which allows V2 to supply power to the output. simulate this circuit – Schematic created using CircuitLab UPDATE: But I have to know the root reason about the problem. The body diode in your circuit is always forward biased. So even if you did turn off the PMOS FET, the diode would still conduct. Notice in my circuit that the M1 source pin is connected to V2. This makes the diode point to V2, thus blocking current from V2 when the FET is off. To turn on a PMOS FET, you have to put a voltage from the gate to the source greater in magnitude than the Vgs threshold voltage. This is what R1, R2 are doing. There is a negative 6V (referenced to the source pin)developed across R2. In your circuit you never put a negative voltage on the gate.
H: Hardwiring USB - Switch data lines? I am trying to hard wire a USB host to a slave, but i don't know if there is maybe a data line switch that would be there if I used a USB cable. I thought I might have to because I looked at some USB wiring and if a USB cable was wired so that the wiring stayed the same along a line: +5v ------------------------- +5v D+ ------------------------- D+ D- ------------------------- D- GND ------------------------- GND But then you put the USB ports in the same orientation beside each other the wiring is reversed: +5v ----------------┐ D+ --------------┐ | D- ------------┐ | | GND ----------┐ | | | GND ----------┘ | | | D- ------------┘ | | D+ --------------┘ | +5v ----------------┘ So I wondered if maybe the lines were reversed in cables I know with RX and TX lines on serial device that RX connects to TX and TX connects to RX, so that encouraged my wondering I did some looking online and some places vaguely implied I might be right, but I wasn't sure. So what do you think? AI: D+ and D- stand for polarity of the differential pair. They shouldn't be reversed. In your diagram the opposite ends should have the connectors upside down to eachother.
H: Zero current draw voltage divider equivalent The problem: I am trying to read a DC analog voltage (from a battery) by an ADC on a microcontroller. This can be done by a voltage divider, but I am looking for a solution that has zero, or near zero current draw. This is necessary to reduce power requirements (and extend battery life) while the microcontroller is in deep sleep. The battery voltage I am trying to read can be as high as +36/48V and referenced to GND Microcontroller max input voltage is 3V. What is the simplest way of doing this without using more pins on a microcontroller to toggle a MOSFET, for example? AI: Depending on your precise requirement, a solution could be to use a voltage divider (with a capacitor). Why do you not want a voltage divider? Because it uses too much current (it would be useful to say your max (I_max) is). To that, there is a simple solution : just make your voltage divider using HUGE resistors (ie. not the typical kilo ohms, but hundreds of kilo ohms or more). For example, if you have R1+R2=1Mohm, your current is less than 50µA, so you are at less than 0.5Ah per year. If needed, you can still go higher to consume even less. The problem now is that the ADC sees a very high input impedance. This leads to wrong results because the ADC can no longer charge its internal capacitor in time. This is easily solved by adding an external capacitor between ground and the ADC pin. If you add it, then problem solved. simulate this circuit – Schematic created using CircuitLab For the choice of the capacitor, it's a trade of : if the value is too big, then you might induce quite some delay when the battery voltage changes (it might or not be an issue, depending on application) if the value is too small, then the little current needed to charge the internal capacitor of the ADC might make the voltage drop a bit. And a second thing to look for is that the leakage resistor of the capacitor must be big compared to R1. NB : also make sure you are not reading the pin at too high of a frequency, or you will have to charge each time the capacitor of the ADC And a last thing that you might need to consider if using very big resistors is noise, either through EMI, or thermal noise of the resistors itself. But if you can satisfy all those constraints, you can get very low power while paying just for an additional capacitor.
H: IC that will hold LED ON after single button press, turn OFF after another button press? I am trying to design a circuit that uses 6V coin cell battery to turn on and off a white LED. A single button press should turn the LED on/off. Would an analog switch of some kind accomplish this? I would like the component to draw as little current as possible. AI: If you want to use an IC then you could look at a 4013 wired as a toggle type flip flop. The asynch R and S pins can be used for initial powerup state. It is best to use a transistor to run the led from the chip and current limiting is wise.
H: Difference between phase and polarity? Long story short, I did a bit of a career change, I'm now doing electrical engineering with an architecture firm instead of embedded systems. So I've jumped from the simple world of DC to the land of AC electronics and it's definitely different considering I never took a phasors class. Anyway, I'm really having difficulty understanding the differences between "phases" and "poles." I'm the type that needs a more concrete explanation than being tossed a copy of the NEC and told to read it (though I'm told that I'm supposedly doing fine and everybody else started from the same place or even worse). I made this little table below based on what was dictated to me (not sure if it's accurate), but I'm really not understanding it. In embedded-land we're taught that red is hot, black is ground, and life is simple. Now everything is flipped; black is hot, ground only serves as a last-ditch protection mechanism, and "neutral" is used instead as a means of returning voltage to the source which might not be needed sometimes if powering a motor (i.e. HVAC equipment, water fountain chillers, hand dryers, etc.). Myself being me, I feel like a burden grilling into these questions because I was the kid in college who'd ask questions at nauseam. The internet so far as been an OK resource explaining the basics between 3 phase and single phase. Things like the center-tap neutral to get 120V between hot and neutral and 240 between both hots make sense to me. I get the 120 degree phase differences in a 3-phase system, but again, nobody online seems to want to talk about polarity, and I'm totally lost on that. I THINK it has to do with the number of wires running though the cable (#poles/hots + neutral) but I really need a thorough explanation and the NEC is just a bunch of legalese at the moment. ---- Edit ---- By poles, I mean circuit breaker poles, not magnetic poles. And I didn't mean to say that neutral returns voltage, of course it returns current. I was rushing. AI: Concepts The first thing you have to get used to is that GND/Vss doesn't exist. There's a completely unrelated thing called earthing or safety grounding which is (as best possible) referenced to the dirt around your structure. It is a safety shield and never, ever carries current (except during fault conditions obviously). Here are 2 more concepts: AC power circuits are wired as an isolated system. Both sides of the loop are wired, with a dedicated return wire just for that circuit. It's disconnected from safety ground in all respects. Very important concept here: Neutral is just another live/hot wire for all practical purposes. It's handled a little bit differently because it is less unsafe than other live wires, but that's only for penny-pinching, there's not a fundamental difference. Tying down the float The problem with isolated systems is they can "float" to unreasonable voltages. Your 120/240V split-phase supply might come in at 4000V, 4120V and 4240V. That would break down insulation. So we also use the earthing system to "bias" the system to a sensible voltage above earth. You could use a car battery or a 1-volt transformer to create a bias, but a scrap of wire is cheap and has a 0-volt bias. You pick a live to be thus bonded to earth. Once you do, you call it Neutral. So "neutral" is a made-up concept. All voltages are then referenced from neutral. 120/240V split-phase has neutral in the middle. So is it "+120V, 0V and -120V"? You might very well think that; I couldn't possibly comment. People will throw tomatoes at you if you try to label AC power with + and -. (even though it's right half the time, which is a better average than the tomato throwers LOL). Usually, neutral is pegged in the middle (to minimize voltage of any wire). But on 3-phase "Delta" installations there isn't really a middle. So either a) a middle is synthesized; b) a corner is grounded making phase L1 neutral; or c) neutral is set halfway down a leg, typically in 240V "delta". Giving 120/240V split-phase down one leg, and a third "wild leg" which is 208V to neutral! Grab any 2 wires If you need to power something of a certain voltage, grab any two wires that have that voltage. For instance if you are trying to power a water heater. In US split-phase you'd grab L1 and L2 (240V across them). In the EU you'd grab any Line and neutral (230V across them). The nuts and bolts of physical installation have a book of rules (NEC in North America). A key rule is that if a wire is neutral, it doesn't need a circuit breaker and you don't (need to) switch that wire. (however if you do, it must have common trip with the live wires). That's pure economics - it's cheaper - but it depends on another rule: that every neutral serve only its partner non-neutral wire(s), and never any others. Thus, neutral is not like system common/GND on electronics. And then you have the Philippines, where the old US installations have the neutral wire simply deleted by anti-colonial edict. There is no neutral. Every conductor needs circuit breaker protection. What are poles, then? Whth 120V/240V split-phase, the phases are 180 degrees apart so they're really just the same phase with a center-tap. Since they're not actually different phases, some people will throw tomatoes at you if you call them "phases". So we call them "poles". That's it.
H: How do I power a board multiple sources including USB without exceeding the capacitance limit on USB power? I'm not entirely sure how to ask this because I'm just a hobbyist . . . but here goes. My daughter and I are working on a PCB for next year's pinewood derby car (I call it the Carduino). It's base on the ATmega32U4. I'd like to be able to use the same schematic for Christmas ornaments this year. So, to be flexible, here's my plan. I added a tag-connect footprint for flashing the Arduino bootloader onto the AVR; that footprint includes a power pin I called V_ISP. I added a USB port which provides power on a rail I called V_USB. Finally, I have a battery port for V_BATT. I tried to protect each of these with Schottky diodes and if the USB power is present, it should charge the battery and power the device (and allow you to flash the AVR with firmware). We have WS2812Bs on the board so we need a 5V rail . . . and I want to run the AVR at 16 MHz. So, I have a boost converter to get the input voltage (I call V_IN) to a stable 5V. Then I LDO it down to 3v3 to power accessories (like an accelerometer). Today I read that the USB power rail can have a maximum capacitance of 10uF! My boost converter has a 22uF capacitor on the V_IN line which I assume would contribute to the capacitance of whichever power supply is providing power. First of all, am I doing this all wrong in the first place? Will the 22uF cap on the V_IN line exceed the capacitance limit of the USB port? What's the right way to do this? Thanks!! Edit: Will this work? Following some of the answers and discussions, pushing the USB power into the boost converter will likely exceed the USB specifications because of the inrush current due to the large capacitance on the power side of the boost converter. But, I don't really need to boost the USB power because it's already stable . . . so the best bet is likely to switch off the power supply from the battery when USB power is present. Would this effectively put the device into "charging mode" by eliminating the load on V_BATT? simulate this circuit – Schematic created using CircuitLab Edit: The New Version Here's what I have now. I'll come back and update this question once I figure if it works or not. :) AI: The 5V from the USB should be stable. I'm not sure why you think you need a boost to be honest. Even if you did need 5V, I thought you would want a SEPIC or buck-boost or something that can bring both higher and lower voltages to 5V. Is the boost converter only there to make up for the Schottky diode's voltage? If so, don't use a Schottky; Use a PMOS circuit. The OP's circuit here will work if you just need the USB to override the battery whenever the USB is plugged in. It prevents the USB from injecting current into the battery. It is simple but does not accommodate battery charging: Is this MOSFET upside down?. This is why just a PMOS alone won't work in many two-supply situtations: nmos reverse current protection. Lastly, this here makes a true ideal diode with an PMOS that behaves in the way you take for granted with a real diode where any and all reverse currents are blocked irrespective of circuit voltages, and does generally work in two-supply situtations: Understanding an 'ideal' diode made from a p-channel MOSFET and PNP transistors You do not need this last one for your battery-USB function if you just need the USB to override the battery and not discharge into the battery. The first circuit works for that. But the very first circuit might not be applicable if you want to actually have the USB run through a charger for your battery. You may very well need something like this then. You may also need it in other parts of your circuit since I see multiple Schottky diodes. But just use Schottky diodes if you can tolerate the voltage drop. Much simpler.
H: Using the word tension in place of voltage I was reading this paper on electrolysis and on page 2 on the third line of the second paragraph it reads: In each cell there will be a tension of 4.5 volts and a current of 25 amperes will pass; While it may be obvious that tension would mean voltage, I'm curious as to why that would be the case? I'm also seeing it in this blog describing an LM741 When the power supply is tuned to the maximum, it will output almost V+ (9 V). At the minimum, almost V- (0 V). Between the two, it can output any tension (1.3 V, 2 V, 4.73 V, 6.89 V...). The adjustment of the power supply can change from the minimum to the maximum in about one millionth of a second. AI: I'm going to refer to voltage as "tension" throughout this answer. The English word "tension" (in the electrical sense) is much older than "voltage," and it was probably used long before scientists were able to formulate a clear definition of tension. Alessandro Volta certainly had some idea of tension. A handful of sources on the Internet say that Volta described a law of capacitance (stating that in a capacitor, tension is proportional to charge) in 1776. I haven't been able to find any primary sources for this, and I have no idea whether he used the word "tension," or a different word like "potential." In any case, he certainly never called it "voltage." Michael Faraday published a book titled Experimental Researches in Electricity in 1839. The book uses the word "tension" in a few different places. For example, in the section "Identity of Electricities derived from Different Sources," Faraday writes: Tension.—When a voltaic battery of 100 pairs of plates has its extremities examined by the ordinary electrometer, it is well known that they are found positive and negative, the gold leaves at the same extremity repelling each other, the gold leaves at different extremities attracting each other, even when half an inch or more of air intervenes. That ordinary electricity is discharged by points with facility through air; that it is readily transmitted through highly rarefied air; and also through heated air, as for instance a flame; is due to its high tension. It's not obvious exactly why Faraday chose to use the word "tension" rather than some other word, but he was probably imitating earlier authors. I don't think Faraday had a very clear idea of just what tension is. In the year 1861, Latimer Clark and Sir Charles Bright proposed a unit of measurement for what they called "electrical tension, potential or electromotive force," in their paper "Measurement of electrical quantities and resistance." Their proposed unit was the "ohma," and it never caught on. No later than 1873, as described in the Wikipedia article "Volt," a new measurement of tension had been defined, and, as you know, this new measurement was called a "volt." I haven't been able to find where the idea for a volt came from, though. Finally, since the unit of electric tension was called a volt, speakers of English started to refer to tension as "voltage" instead. (The Online Etymology Dictionary says that the word is from 1882, but doesn't give a source.) For one reason or another, the word "voltage" ended up becoming so popular that the older word, "tension," has been all but forgotten. (As TypeIA mentioned in a comment, English is pretty much the only European language that uses a word similar to "voltage." Most other languages use either a word related to "tension," or a completely different word like "napięcie.")
H: Is it OK to use a 2 pole RCD on each Line of an unbalanced 3 phase installation I have a building that is mains supplied, but has a 3 phase back up generator-- black outs are almost daily here. There is no 3 phase equipment in use. The current instillation is about 12kva, but the 4 pole RCD being used is too small. We don't have access to a shop to buy one for a wile.... Should I just use 3 individual RCD's, One on each Phase? Or use the existing 3 phase RCD and branch some loads off before it and give them their own single phase RCD? Right now their solution was to just bypass the RCD for some loads, not ideal! This came to light when I tried to switch a load to another phase to get the loads balanced better to keep the genset from overloading. the RCBO would trip no matter what I did, and I eventual realized what was going on, and why there were 2 neutral buss bars. Nothing is labeled so it is a bit of a frustrating job. I need to get going up ASAP, and NEED it to be safe as well. But need to do it with what i have on hand. AI: The key rule with RCDs is that current that goes out though a RCD MUST return through the same RCD. So if you use one 3 phase RCD you can share a neutral between the phases downstream of said RCD. If you use separate single phase RCDs then you must keep the neutral downstream of each RCD separate. It's difficult to give more specific advice without knowing both the regulations in your country and the design of the distribution equipment in use.
H: Why is my small DC motor so weak with this N-type MOSFET in this simple circuit and 9V battery? Here is my simple circuit. Any help is appreciated: When I press the momentary switch, the motor spins but it is very weak. I'm trying to figure out what I am doing wrong. When I connect it directly, it spins with a lot more power. Also, my multimeter is doing weird things when I try to measure the current. When measuring current in the 'mA' setting on my multimeter, the reading is 0.82 mA and the motor does not turn. When measuring current in the '10A' setting on my multimeter, the reading is 0.052 A and the motor spins. AI: As other people have already commented, switch the motor with the transistor in the circuit. When using a transistor to drive a load fully-on or fully-off, you want \$V_{GS}\$ to be independent of the current driving the load. In your layout, \$V_{GS}\$ will decrease as the motor gains angular velocity due to the back EMF generated by the motor, which will rapidly decrease the transistor's conductance, "starving" the motor of current. Eventually, the motor will settle at a speed much lower than the rated no-load speed.
H: 8 bit Analog to Digital, Then Convert to a 1 to 8 level LED display Getting back into electronics as a hobby, and I'm giving myself some breadboard tasks and drills to do to refamiliarize myself with both simple analog and digital circuitry. Here's what I want to do: 5VDC source, with a pot (say, 100k). I want to take that analog signal and drive 8 leds which light up between 1 and 8 of them at a time depending on the relative output of the analog signal. My first thought is 8 bit analog to digital. Got ahold of the ADC0804 chip (https://circuits-diy.com/adc0804lcn-8-bit-a-d-converter-datasheet/) Simple hookup with a pot driving the V+ relative input, and my output was hooked to 8 leds through some current limiting resistors. I turn the POT and the output is 8 bit binary value displayed on the 8 leds. Success! But now my thought is, rather than displaying an 8 bit binary value, let's drive 8 leds which turn on successively more lights as the 8 bit output goes up. At first glance it might SEEMS like the same thing, but it's not. For example, let's say the 8 bit output is 0b10000000. When displaying binary, of course, bit 7 is on, and bits 0-6 are off. But I don't want to do that. That value is 128, which is half of 255, so the lowest 4 lights out of 8 should be on instead. I'm racking my brain as to how to convert this without a simple microprocessor, which I can easily do. Probably could do it with TON of logic gates, but is there a 1 or 2 chip solution for this? I'm going through a bunch of data sheets, but since I don't know what this might be called it's difficult to find a prepackaged solution. Maybe I didn't need to convert to 8 bit digital in the first place, and there's a simple driver to accomplish this already? This truth table might help (I've added some logic tables below the truth table). The logic table is how I could accomplish this with AND and OR gates. Would still love to know if there's a chip designed for something like this. AI: As you want to (I assume linearly) may the 8 bit level to having one of the 8 LEDs on I would suggest the following mapping: decode the 3 highest bits to one each of 7 of the LEDs and then map the fourth most significant bit to the 8th LED. You won't need to ever consider the lowest 4 bits. See the truth table below. ADC Bits LEDs 111xxxxx 10000000 110xxxxx 01000000 101xxxxx 00100000 100xxxxx 00010000 011xxxxx 00001000 010xxxxx 00000100 001xxxxx 00000010 0001xxxx 00000001 0000xxxx 00000000 You can decode the top 3 bits with a 3 to 8 decoder IC like the 74LS138 anding the lowest order output with the 4th most significant bit for the final output.
H: How is this encoder supposed to be wired? I have this encoder: https://www.mouser.com/ProductDetail/Bourns/PEC12R-4020F-S0024?qs=sGAEpiMZZMsUJpHmmVieqHTo0n9kjhYO9zCZFTxUfRg%3D&countrycode=US&currencycode=USD and I am trying to figure out how it is supposed to be wired. I think the A & B terminals are supposed to be wired to the input of an MCU (or other sensing IC), and the C terminal is supposed to be wired to GND. I am not sure where the 5V is supposed to go since this component only seems to have three pins??? Here is what the datasheet shows: Edit: this is how I think it is supposed to be wired. Terminals A and B are internally connected to terminal C through the switches that get closed as the encoder rotates through the contact points. AI: The encoder should have 3 or 5 pins plus the two mounting lugs. Typically the latter would go to earth or ground, or you can leave them open for testing but it's better to do something with ESD especially if the shaft is metal. The outer two of the 3 pins in a row are the quadrature outputs and the middle one is ground. The remaining two pins on the other side (if present) are for a N.O. switch that is actuated by pushing on the shaft. You would (say) ground one pin and connect the other to Vdd through a resistor. You add the parts shown in the schematic (only the pullup resistors are 100% required) and connect the A and B signals to an MCU. You can use GPIO pins and an appropriate program- it's not necessary to use an MCU with dedicated QEI hardware- in fact it may make it more difficult. If you use the capacitors and 10K resistors in conjunction with an MCU that has Schmidt trigger inputs you may be able to simplify the program a bit, since debouncing in hardware may be adequate. Edit: your schematic looks okay, however the middle pin should be ground so it would be pin B if they are numbered in order A/B/C. Edit': Below is the symbol I made for a particular encoder. Probably one of the first I made in Altium, not claiming it's wonderful or anything. IIRC this particular encoder is guaranteed to have both A and B open when the shaft is in a detent position, hence the diagram showing open.
H: Differential op-amp battery cell monitor circuit odd behavior I'm working on a three cell LIPO battery cell voltage monitor using three differential op-amps. I had the circuit I designed below printed on a PCB and have assembled the board, but I am getting strange results on the output of op-amp 1 (Op1_output.) Op2_Output and Op3_Output work as expected. When connected to the 3 cell LIPO (cell voltage for each cell = 3.8V,) Op1_output is reading 4.6V as opposed to the expected 3.8V. I have tested all the connections and also soldered 3 separate boards in case there was an issue with my connections, but the results are always the same. I know that I can simply read the 3.8V directly because that cell is the first in the series, but I'm curious as to what my issue is, as creating the circuit in a simulator is yielding the expected results. Any insight is greatly appreciated. Op-amp datasheet AI: According to the 5532 datasheet you linked, the input range needs to be Vss+2V to Vdd-2V. Since you’re using ground as your negative supply, this limits the input range to no less than 2V. With the R3/R4 voltage divider between OP1 and GND, this value isn’t being met on the (+) input of OP1: it’s only 1.9V above GND if BT1 is 3.8V, and as low as 1.5V at BT1 end of discharge (3.0V). So OP1 is failing. As to exactly why, that is a result of this particular op-amp’s input stage design. Try an op-amp that includes GND in its input range. The LM324 can do this. It’s popular and cheap. So why doesn’t the sim fail? The Falstad simulator uses an ‘ideal’ op-amp which has no such input range limitations. However, if you try the Falstad 741 model it will fail; it’s similar to the 5532. There’s also an LM324 model you can try. Or, you can get rid of the resistors R1, R2 and R4 and just wire the op-amp as a follower. Then the (+) input will be the same as the BT1 voltage, 3.0 to 3.8V or so, and (-) will follow it. Still another option is to just measure BT1 directly. Since it’s referenced to GND there isn’t a need to use a differential amp. Save the one part, solve the problem. Win-win. Not sure what your intention is with the 7809 driving an LED, but the overhead voltage for that regulator is 2-3V. That means it’ll be at only be outputting ~7V at the end-of-discharge voltage of 9V (3.0V per cell).
H: Does a 220V AC fan emit much more EMI noise than a 24V DC fan? I've been discussing this with other colleagues for some time now and we can't reach a conclusion. Also searched on internet but didn't find a good article or proof that in fact a 220V AC fan will emit much more EMI than a 24V DC fan. For me this looks obvious but not sure. Does anyone know where can I find more information on this? AI: Most AC fans use a shaded pole induction motor. Here's an example:- NMB 4715MS-22T-B50-B00 FAN AXIAL 119X38MM 220VAC 13W 0.1A There are no switching devices in an induction motor, so EMI is only produced at the mains frequency and low odd harmonics. The magnetic field is largely contained by the stator core, but there will be some flux leakage similar to a transformer. AC current in the lead wires will also produce EMI at low multiples of the mains frequency. Most DC fans of similar dimensions and style use a 4 or 6 pole brushless motor. Here's an example:- NMB 4715KL-05W-B50-E00 FAN AXIAL 119X38.4MM 24VDC 12W 0.5A A BLDC motor is electronically commutated at the rotational speed multiplied by the number of pole pairs. At 3600 rpm the switching frequency of this fan might be 120 Hz, which is not much different from the operating frequency of the AC fan. However the switching action could produce harmonics into the MHz range, with varying frequency depending on fan loading etc. (commutation frequency is not locked to the mains frequency). At 0.5 A operating current it could potentially produce significantly more EMI than the AC fan, however the AC current is mostly confined inside the motor and control PCB, with the DC supply current being fairly smooth. The 220 VAC fan could produce significant EMI at mains frequency and low harmonics (180 Hz, 300 Hz etc. on 60 Hz mains) which could be a problem for sensitive audio or sensor applications. However devices generally have to accept a large amount of EMI at these frequencies anyway, due to the ubiquity of mains wiring and appliances that draw high AC current. The DC fan may produce a similar amount of magnetic EMI close up, but with more energy at higher harmonics caused by the fast switching action. Higher frequencies up to several hundred MHz could be efficiently radiated by the power wires or the tracks and components on the control PCB. Even if the total amount of EMI produced is less than the AC fan, the higher frequencies produced and varying frequency could be a bigger problem for sensitive circuitry that is receiving very low level signals. So which fan would produce the most EMI? You can't tell purely from the voltage or the motor type. Hopefully both fans would be designed to minimize EMI at frequencies where it might be a problem, but you would have to test the individual devices to find out exactly what EMI they produced.
H: What does impedance in datasheets mean? Can anyone explain impedance in a datasheet? What does this mean: (50 uH + 5 ohm) || 50 ohm Line impedance stabilization network (LISN). Like this one : schwarzbeck.de/Datenblatt/k8124.pdf. AI: If you post the datasheet that you're reading I could answer it with more confidence, but what you wrote here can be read as a \$50 \ \mathrm{\mu H}\$ inductance in series with a \$ 5 \ \Omega\$ resistance and all that in parallel with a \$50 \ \Omega\$ resistance. Like this: simulate this circuit – Schematic created using CircuitLab
H: Difference between the excitation current of a transformer and the magnetizing current What is the difference between the magnetizing current of a transformer and excitation current? The doubt came to me when I was reading a book and it explained the real model of the transformer and considered the excitation current as a Fourier series of the sum of the third, fifth harmonic components etc... But I know that the inrush current is composed of many second harmonic components. So is the inrush current the magnetizing current or the excitation current? AI: So is the inrush current the magnetizing current or the excitation current? It's the magnetization current reaching a high enough level so as to cause core saturation problems. That in turn causes an increase in the magnetization current (a runaway effect) and, in some circumstances this can create the situation where a massive pulse of current is see for a short time over a few cycles of AC. Inrush current is made worse if the transformer is connected to the AC line when voltage passes through zero: - The above picture (from here) isn't indicating a saturation problem; it's just showing that the peak of inrush current (even on a perfect transformer) can be double what is seen in normal operation. This of course only becomes a problem when the core saturates and magnetization current sky-rockets. Here is an example of the potentially sky-rocketing problems with magnetization current from this wiki page on transformers: - Hopefully you can see that although the flux appears to be sinusoidal, the primary magnetization current is reaching quite high and badly distorted peaks. The difference between excitation current and magnetization current is subtle and maybe not that well-defined. In the main magnetization current is what creates flux in the core and this numerically forms most of what the excitation current is. The remainder is usually taken to mean core losses.
H: Powering 12 V LED strip from a 3.3 V esp32 including PWM I'm developing an automation board and want the facility to PWM dim a strip of LEDs up to 5-10 amps @12 V. These are plain 2 wire LED strips, positive and negative, nothing special. My esp32 will be powered via a buck converter from a variable input and I will also have a regulator to level out the 12 V supply. I have seen projects using the TIP120 for this but I'm not too comfortable with it being at max capacity so I'm leaning toward a MOSFET. Any suggestions on the best way to power the MOSFET through PWM with 3.3 V logic? AI: I suggest using a N-channel MOSFET, connected between GND and the "-" of the LED. There are 3 things to check when choosing the N-channel MOSFET : that it is fully turned on with only 3.3V (this will eliminate many mosfets) : look for those with a low threshold voltage (well under 3.3V), and then check on the curves if it is really turned completly on at 3.3V check that with 3.3V on the gate, the mosfet can carry enough current for your application check that the mosfet can handle the heat without extra heatsink (or plan to add the heatsink, but be carefull that even that might not be enough). As a rule of the thumb, the bigger the current rating, the less risk of overheating simulate this circuit – Schematic created using CircuitLab Note that you will need the R1 resistor to limit current in your LEDs (excepted if they are already "12V LEDs", in which case they have it probably already included). Optionnaly, you might want to add a resistor (something like 10k) between gate (ie the pin of the mosfet connected to PWM) and ground to make sure the mosfet is turned off when the esp32 is off (or resseting). If you choose a really huge N-channel MOSFET, you might need to add a resistor in series between PWM and the gate to limit the current when switching the mosfet (huge N-mos have non negligible capacitance between gate and ground), but it you can avoid it, it's best (adding it makes the mosfet switching slower, therefore increasing the heat produced in it)
H: Latching an analog signal on a trigger event I am looking for sort of an analog equivalent of regular digital latches. I want it to mirror its input (voltage) to its output (voltage, with or without gain) only at a trigger edge/pulse and maintain this output until another trigger event. Basically, an analog flip flop. Instead of holding one digital bit, it holds an arbitrary voltage level. I believe I can design such circuit myself using opamps and switches, but I was wondering if there is a standard way of accomplishing this. I had a brief research, but all I found was clamping/protection circuits. AI: You're looking for either a "track and hold" or a "sample and hold" circuit. Traditionally these were used in front of ADC's to increase the effective analog bandwidth of the ADC.
H: How will BSS138 work if I apply the same voltage to both the LV (low voltage) and the HV (high voltage)? I'm making a circuit to connect to a UART pins on a mini PC. But it is possible to use different mini PCs, one using 3.3V TX and RX levels and the other 5V. I have BSS138 and I'm wondering if I could use a jumper to switch the LV (low voltage) between 3.3 V and 5 V? My circuit is equipped with both 3.3V and 5V. In one case, LV = 3.3 V and HV = 5 V. In the other, LV = HV = 5 V. Will I be able to use 2x BSS138 for input and output, if their LV and HV pins are connected to 5 volts? Ok, sorry! I thought the question was clear. I added a diagram, which I quickly drew. So when W1 is clear and W2 set, LV = HV = 5V, in the other case W1 is set and W2 clear, LV = 3.3V, HV = 5V. Either jumper W1 or jumper W2 will be installed, not both. AI: The circuit that you've shown will work perfectly fine.
H: What is the difference between impedance and reactance? I mean how are they physically different? What does it mean to have imaginary numbers in the reactance? AI: Reactance only refers to the imaginary component, whether it is on its own or paired with a real resistance. Impedance just implies frequency dependency. So it refers to both the imaginary reactive component and the real resistance, together, if the real resistance is present. You know how a resistance removes energy from the circuit and then dissipate it as heat thereby losing it permanently? That's real because it's real energy truly removed. The reactance is imaginary because it removes energy from the circuit at that moment but doesn't actually dissipate it. It just takes it out of circulation and stores it, releasing it back into the circuit at a future time. So the energy is removed from the circuit, but only in an "imaginary" sense if you want to somehow put it into words. The sign of the imaginary component is the lag-lead in the voltage and current which is opposite between capacitances and inductances. You see this in time-domain graphs and this translates to the complex numbers being the way they are in phasor representation when rotating around the circle. In a sense I guess you could say it describes whether energy is being removed from the circuit and stored by accumulating current or by accumulating voltage.
H: Tapered line for a SP4T RF switch I need to use HMC241AQS16 brand RF SP8T switch on an FR-4 board. The RF ports of this QSOP package integrated circuit have 50 ohms impedance. But there is a problem, the leads of the chip have just 0.41 mm in width. My original 50 ohm transmission lines on a FR-4 are about 3 mm in width. Therefore, I need to design a tapered transmission line as in the following figure, but it must have two ends that have 50 ohms characteristic impedance. The tapered line topics in the literature are generally about matching the lines with two different impedances. How can I handle this problem? AI: You won't be able to get 50ohm and 0.41 mm wide without changing the dielectric thickness. Have you reviewed the layout in the datasheet or other application material from the manufacturer? In the layout in the datasheet they keep the trace width the same until the pin. It is narrower than 3mm, they must have a lower dielectric thickness. You probably need to do the same. What PCB material and stackup are you currently using?
H: How to parallel shunt resistors with 4-terminals (Kelvin connection)? I would like to use multiple shunt resistors in parallel to reduce power dissiption to the power specified per resistor. However these resistors are 4-terminal resistors WSL40265L000FEB. The reason being I need the accuracy they provide. My CS amp has input range of +/- 50mV . Current passing is from 0 to +/-200A, which yields 10watts. Idea 1: Use 1 of the 4-terminal resistors in parallel with a normal(2 pin) shunt resistor of the same value. Does this defeat the purpose of the 4 Kelvin connection? Idea 2: Use 2 of the mentioned resistors in parallel, and connect the Kelvin pins in parallel before going to the amplifier (however it might be difficult in layout.) Idea 3: Using 2 of the 4-terminal resistors in series and connect the Kelvin pins in series, also difficult in layout. Please advise what would be the best method. AI: It would be best to find a resistor that does not require paralleling. If you absolutely must, I suggest arranging for the high current connections to be as symmetrical and close to each other as possible and then adding series resistance to the 'sense' terminals so that they don't conduct significant current due to any mismatch. For example, you might use 100 ohms or 1K 1% resistors (one pair per resistor). So, for 2 shunts you'd need 4 equal-value resistors. simulate this circuit – Schematic created using CircuitLab
H: When do I have to worry about shorting? (Coin cell battery assembly) At work I assemble coin cell batteries (lithium metal) inside a glovebox. I'm a bit confused as to when I do and do not have to worry about shorting. For example, say I'm making this battery: Cathode: LCO Anode: Lithium metal There is various advice online that states to be careful touching the battery to metal because you could short the battery. However, I am still confused about when exactly I need to worry about it. For example, if I drop the lithium metal on the stainless steel floor of the glovebox, it's ok, But if I have partially assembled the battery and touch the stainless steel tweezers from the lithium metal to the LCO, a short occurs? Or if I have 2 coin cell batteries assembled, and they touch each other, they both short. Can someone explain what is the the underlying explanation behind this? When do I need to worry about shorts? AI: As soon as there is a piece of metal (or other conductor) connecting the 2 poles of the battery (+ (top and side) and - (bottom)), you get a short circuit, which is bad. The good thing is, that the side (connected to +) is not going down totally to the bottom, so if the coin cell falls flat on the bottom, there is no short (because side and top don't touch the floor). Basically, there is no position on a flat (conductive) ground where the coin cell can be shorted, excepted if it falls diagonally, where there is a slight risk : but this position is unstable, so the short circuit will last no longer than a fraction of a second (which is not good, but will probably not cause any significant damage). There are other situations where continuous short might happen (and that's really bad) : the battery ends up on the "border" of a metallic box, with the bottom (-) of the cell on the bottom, and the side (+) touching the wall. This is not very likely (but possible) on a flat metallic box, but becomes very likely if the box is tilted (the battery will slide down until touching the "vertical" wall (that is now a bit inclined) you connect both poles with a conductive object (ex : tweezers) you hold the battery in such way that you cause the short (depending where you try to put it, it can happen quite easily if you tilt the battery too much So to summarize : it is not a problem if the coin touches a metallic object, as long as the metallic object don't touches the 2 poles at the same time (still, avoid to let it touch any metal excepted the connectors of its final destination)
H: STM32F723 : correct connection for VDD12OTGHS pi I'm currently designing a PCB for my caving robot. Initially, I wanted to use a STM32F722ZET6, but as it is currently out of stock, I'm switching for a STM32F723ZET6. There are a few pins displaced, and 2 GPIOs that are replaced by 2 "special pins" : VDD12OTGHS and OTG_HS_REXT. For those, I'm not totally sure what I need to do (knowing that I will not use USB OTG on this project, but that I will use nearly all GPIOs). From the datasheet (p30) and the application note on hardware development of STM32F7 (p8), I have to connect a 2.2µF capacitor between pin VDD12OTGHS and ground. From what I understand, I'm NOT to connect this pin to a supply, even if the name starts with VDD : do you confirm? For the OTG_HS_REXT pin, I have to connect a 3k 1% resistor between the pin and ground : correct? (cf app note, page 8) Do I still need it (and with 1% accuracy) if not using USB OTG? Thanks a lot in advance AI: From what I understand, I'm NOT to connect this pin to a supply, even if the name starts with VDD : do you confirm? Yes, the 2.2uf Cap is for a bypass cap for a voltage regulator for the USB PHY, which needs 1.2V. There is nothing in the documentation (that I saw anyway) that suggests that the regulator can be turned off. This diagram on figure 29 should prove useful: Source: https://www.st.com/resource/en/datasheet/stm32f723ze.pdf
H: Do high-speed asynchronous to synchronous UART converters exist? I need to send synchronous serial data with control characters and 8b/10b encoding at about 5Mbaud - and I need to send that from a laptop; I do have UART ports which can keep up with these speeds, but they're not synchronous so I don't have a clock signal output. I have thought of using an SPI transmitter and spread the encoded data myself bit by bit on the byte stream, but there is a +50% pause in-between bytes transmitted which would then occur in the middle of an encoded word (which I doubt makes for reliable transmission, if at all). My only candidate right now is an FPGA to which I send the data via USB or UART, but that sounds like a lot of effort for something for which there should be a widespread solution. Any idea is welcome... AI: You don't detail your application or the target equipment, so I'll presume there's some confidentiality or secrecy that stops you doing so. I'll presume you're trying to put serial test data into existing equipment. You say that your data is coming from a laptop, so you can only use USB or, if it has it, a COM port. The COM port is UART over RS232C and the latter won't do anywhere near 5 Mbps, regardless of what you can get out of the UART. That leaves you with USB. You can either take that into the hardware you want or connect an off-the-shelf communications IC or a USB-to-comms adaptor module. For ICs, an example is the FTDI FT232HP USB 3.0 Bridge. This connects to USB 3.0 on one side and has two interfaces on the other side. One is a UART for up to 12 Mbaud. The second is a FIFO with 8-bit parallel bus and handshaking, which can handle up to 8 MB/s async or 40 MB/s sync. Both well exceed your 5 Mbps requirement. If you haven't got a USB 3.0 port, another example is the FTDI FT245R USB FIFO IC. This connects to USB 2.0 on one side and has an 8-bit parallel port with handshaking on the other. It can handle up to 1 MB/s, same as 8 Mbps and exceeding your 5 Mbps requirement. There are other USB-to-parallel bridge ICs on the market that you can look into. For adaptors, you may be able to find a USB to RS485/etc. unit with a UART that can handle 5 Mbps. The RS485/etc bus standards can manage the bitrate, it's the USB-to-UART electronics that you'll have to be sure of. They'll also use these off-the-shelf USB bridge ICs. In both cases, the communications path will present itself to Windows as a virtual COM port. Linux will have an equivalent, if that's what you'll be using. You'd need to interface to the FT245R to something to (a) manage FIFO controls and (b) convert parallel data or UART communications to a serial stream with clock for your target equipment. That's a CPLD or FPGA (never an MCU) and some very short and simple firmware. If you're competent in VHDL, you can buy an FT245R board and a cheap CPLD/FPGA board and have that part built and going in a couple of days. Always prove your VHDL design in simulation before trying it on the board. It is possible to implement the USB interface in the FPGA but a lot of work compared to the low cost of the USB bridge ICs. It depends on your constraints of cost, units to make, development schedule etc., none of which are stated in your question. The harder part is getting the sustained transfer rate out of the laptop's USB drivers. The USB standard's speeds are one thing but Windows and its USB drivers are not great at maintaining high or flat-out communications speeds, from development experience. So you need to consider if your application can accept pauses and hiccups in communications and how it would be dealt with. Another problem is how to throttle the PC's data transmission rate to match the rate of data consumption at the equipment. You would need some feedback over the virtual COM port to do transmission start/stop, which requires sufficient RAM at the CPLD/FPGA while the PC is receiving the start/stop and acting on them.
H: Limit voltage follower output using Zener diode I created a voltage follower/buffer for a first stage transimpedance amplifier and want to limit its maximum output voltage to roughly 3.3 V to protect the following ADC from voltage spikes. Simulating the circuit on Falstad, I get 3.3 V of output voltage when inputting 4-5 V. But the real circuit on my breadboard gives 2 V when the input is at 5 V. I'm using 1N4728A Zener diodes for the clamping. Is there anything I got wrong in my circuit? What else could be the reason for my real output differing from Falstad? AI: The 1N4728A specifies its zener voltage at a test current of 76mA. With 5V output on your follower, you'll have well under 5mA in the diode, and your zener voltage may be lower. The tolerance of the part is +/-5%, but only at the test current. (Still, 2V seems very low, so double check your P/N maybe.) Your simulation model is probably not modelling the I-V characteristics accurately, so you don't see the issue there. To verify, use a current-limited bench supply to test your zener and record the voltage at your approximate current (3V/1K = 3mA)
H: High voltage +170V based on NE555 design - short circuit I love Nixie tubes so I decided to build a Nixie clock. I am a beginner. I have one successful design that electronics SE helped me design. That PCB was based on through-hole components and an Arduino. Now I decided to try a SMD design (and I think way more complicated than the previous one.) This design is based on an NE555 as that is the simplest one I could find online. This PCB is just to test the power supply generation and the drive of one Nixie tube IN-14. It is not the final circuit. Here is the design: Input voltage +12V +170V generation PCB without ground plane PCB with ground plane Picture of PCBA What I know / found out: I miscalculated the +9V LM317 resistors, it should be 1620 ohm and I soldered 1500 ohm. Footprint of the fuse is way off, I soldered a wire to short it C12 should be 100uF as per datasheet recommanded circuit C14 is a 4.7u 400V aluminium capacitor (should have been 470uF.) What is happening: My power supply is showing a short circuit. I wire +9V@1A (current limited) on the +9V test points as the +9V generation doesn't work. Using a very scientific method (my fingers) I feel that Q26 (IRF740) is getting very hot. Checking with my multimeter shows no short on any of the components (continuity mode) +9V and ground are not shorted when the power is off. Is the +9V generation a must or can I feed the +12V to the NE555 circuit? Can you guys see a problem in the design, maybe the choice of the components? Farnell codes : RV2 : 2786536 D1, D8, D10 ES3J : 2677398 F1 : 3701350 C3, C5, C11, C12 : 3013452 C14 4.7u 400V RS code 725-6966 (not 470u) C10 : 2812527 C9 : 3489975 L1 : 3370508 Q26 : 8657815 Q25 : 2706710 Q24 : 1081232 U12 NE555DR : 3121192 U2 : 2383003 D9 : 1081180 [EDIT] Probe on pin 3 of NE555DR (sorry don't have a USB key right now): [EDIT] I went and checked the OUT frequency before and after the diode, that's where the issue comes I guess: Here is the probe before D9 1081180: Here is the probe after D9: [EDIT] Continued troubleshooting here's new infos: Desoldered D9 and powered the circuit: no changes I'm losing the 555 frequency after the diode. Resoldered D9, desoldered Q25 and powered the circuit: no changes, same as before. When I power the power supply at 9V and allow a little bit of current it instantly goes to something like 5V (instead of 9V) so I guess that's another proof that something is wrong somewhere. AI: 30mV pulses on the 555 pin 3 indicate that either Q25 or Q26 are mis-wired, shorted, or wrong type; and/or R41 is a very low value. But something after the 555 pin 3 is misbehaving; should be seeing 9V pulses. This does run in simulation: Note that I drew this with power input on the left and output on the right. This is the "conventional" way of drawing schematics, flowing from left to right. Also note there is some significant ringing on the MOSFET gate around 0v in this simulation (not shown here.) Simulations are only so-good; suggest measuring this after the main issue is found to see what really happens there. And I had to change D8 to a (random) different type; the closest LTspice has is the ES3B and that was limiting output to ~100V. If you feel like giving this a try with LTspice, here is the .asc file: Version 4 SHEET 1 1084 680 WIRE 384 -368 -224 -368 WIRE 704 -368 464 -368 WIRE 784 -368 704 -368 WIRE 896 -368 848 -368 WIRE 960 -368 896 -368 WIRE 1008 -368 960 -368 WIRE 704 -336 704 -368 WIRE 368 -256 -96 -256 WIRE 464 -256 368 -256 WIRE 496 -256 464 -256 WIRE 608 -256 560 -256 WIRE 656 -256 608 -256 WIRE 896 -256 896 -368 WIRE 1008 -256 1008 -368 WIRE 368 -208 368 -256 WIRE 608 -208 608 -256 WIRE -224 -192 -224 -368 WIRE -96 -192 -96 -256 WIRE 464 -160 464 -256 WIRE 544 -160 464 -160 WIRE -224 -80 -224 -112 WIRE -96 -80 -96 -112 WIRE 368 -80 368 -128 WIRE 608 -80 608 -112 WIRE 704 -80 704 -240 WIRE 896 -80 896 -192 WIRE 1008 -80 1008 -176 FLAG -96 -80 0 FLAG 704 -80 0 FLAG -224 -80 0 FLAG 368 -80 0 FLAG 608 -80 0 FLAG 896 -80 0 FLAG 1008 -80 0 FLAG 960 -368 VOUT SYMBOL voltage -96 -208 R0 WINDOW 123 0 0 Left 0 WINDOW 39 24 124 Left 2 SYMATTR InstName V1 SYMATTR Value PULSE(0 9 1m 1n 1n 10u 34.483u 420) SYMATTR SpiceLine Rser=10 SYMBOL sym\\nmos 656 -336 R0 SYMATTR InstName Q26 SYMATTR Value IRF740 SYMBOL pnp 544 -112 M180 WINDOW 0 60 64 Left 2 WINDOW 3 57 37 Left 2 SYMATTR InstName Q25 SYMATTR Value 2N2907 SYMBOL voltage -224 -208 R0 WINDOW 123 0 0 Left 0 WINDOW 39 24 124 Left 2 SYMATTR InstName V2 SYMATTR Value 9 SYMATTR SpiceLine Rser=1 SYMBOL ind 368 -352 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L1 SYMATTR Value 100µ SYMATTR SpiceLine Ipk=1 Rser=0.16 Rpar=53868.3 Cpar=0 mfg="Bourns, Inc." pn="SRU1048-101Y" SYMBOL diode 496 -240 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName D9 SYMATTR Value 1N914 SYMBOL res 352 -224 R0 SYMATTR InstName R41 SYMATTR Value 1k SYMBOL schottky 784 -352 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 0 32 VBottom 2 SYMATTR InstName D8 SYMATTR Value UPSC600 SYMATTR Description Diode SYMATTR Type diode SYMBOL cap 880 -256 R0 SYMATTR InstName C9 SYMATTR Value 1µ SYMATTR SpiceLine V=400 Irms=0 Rser=0.0252581 Lser=10.4595n mfg="Würth Elektronik" pn="890283326009CS WCAP-FTBP 22.5 x 26 x 17 x 8.5" type="Box" SYMBOL res 992 -272 R0 SYMATTR InstName RL SYMATTR Value 100k TEXT -32 -152 Left 2 ;Simulated 555 output TEXT -42 -304 Left 2 !.tran 15m startup uic
H: Brushed DC Motor Closed Loop Speed Control Under Load I've designed a PI controller to control brushed DC motor speed between 0.6Hz - 6Hz (RPM:36 - 360). When I control the motor speed at 0.6Hz (approximately 4.0V supply and 60% PWM duty), it can rotate at target speed as I expected. But for this target speed (0.6Hz), when I apply a very small load, I can easily stop the dc motor (I think because of the low power, undervoltage etc.). How can I solve this problem or increase torque for 0.6 Hz target speed? AI: I have found that feed-forward compensation works well for brushed motors. It can maintain fairly constant speed, even at slow RPM. From your motor specs, stall current is 17A, with 12V supply. This spec suggests that winding resistance plus brush resistance is \$ 12V\over 17A\$ or 0.7 ohms. A compensating resistance of -0.7 ohms is required for feed-forward compensation. simulate this circuit – Schematic created using CircuitLab The negative resistance is generated by sensing motor current with a current-sampling resistor, which generates a small voltage which you amplify. For every amp sensed, you would add to the DC supply 1.4 V. This method is also applicable to PWM.
H: How do I increase the current a battery delivers? Let's say there's a 2Ah battery with a C rating of 2C. So this means that I could discharge 4 amperes for half an hour at best. Now, there is a default current that we get from a battery right? How do I increase the current discharge for this particular battery? Is there a component I can attach to my battery? Some sources said that the discharge increases depending on the appliance, and how much it requires, but if I take a lamp, I can pass less than the required current and although not as bright, it will still glow. If this is true, and appliances can determine the current discharge of a battery, how would I change the amount of current an appliance takes? AI: There is no default current that you get from a battery. The current delivered by a battery is determined by its voltage and the resistance of the connected load. A battery will have an internal resistance that will limit the maximum current the battery will deliver into a short circuit and will cause the apparent voltage of the battery to decrease with higher currents.
H: Effect of impedance on noise immunity I read an introduction for the CMOS inverter from [1], and it mentions: "In steady state, there always exists a path with finite resistance between the output and either VDD or GND. A well-designed CMOS inverter, therefore, has a low output impedance, which makes it less sensitive to noise and disturbances". I don't understand how the low output impedance influence the noise of the inverter. If the inverter directly links to a transistor, does the low impedance of the inverter still help the noise immunity? [1] J. M. Rabaey, A. P. Chandrakasan, and B. Nikolić. Digital integrated circuits: a design perspective, volume 7. Pearson education Upper Saddle River, NJ, 2003. AI: If some disturbance causes a current in the inverter output node, this current will seek to spread across the system capacitance, so it usually flows into high capacitance nodes such as GND or VDD. The impedance overcome by this current causes a corresponding voltage spike. Keeping the impedance small thus reduces the voltage spike and avoids spurious logic level crossing due to the interference.
H: What to do to stop PWM after N pulses in STM32? I am using an STM32Cube IDE and HAL library to generate two PWM using two timers. I want these two PWMs to stop i.e go LOW after one of the PWMs has generated N pulses. I don't know what to use in what mode. Should I use a third timer with a mode or something else? EDIT: After reading the answer, I'm getting closer but still some issues PWM does not stop. Here is my settings(NUCLEO-F302R8): I set PA0 as PWM output and PB1(myInterrupt_Input) as external trigger input. Here my main.c: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2022 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ TIM_HandleTypeDef htim2; UART_HandleTypeDef huart2; /* USER CODE BEGIN PV */ /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_USART2_UART_Init(void); static void MX_TIM2_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ int global_pulse_flag = 0; /* USER CODE END 0 */ /** * @brief The application entry point. * @retval int */ int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART2_UART_Init(); MX_TIM2_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */ } /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { Error_Handler(); } } /** * @brief TIM2 Initialization Function * @param None * @retval None */ static void MX_TIM2_Init(void) { /* USER CODE BEGIN TIM2_Init 0 */ /* USER CODE END TIM2_Init 0 */ TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; /* USER CODE BEGIN TIM2_Init 1 */ /* USER CODE END TIM2_Init 1 */ htim2.Instance = TIM2; htim2.Init.Prescaler = 640-1; htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = 1000; htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim2) != HAL_OK) { Error_Handler(); } sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK) { Error_Handler(); } if (HAL_TIM_PWM_Init(&htim2) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK) { Error_Handler(); } sConfigOC.OCMode = TIM_OCMODE_PWM1; sConfigOC.Pulse = 500; sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN TIM2_Init 2 */ /* USER CODE END TIM2_Init 2 */ HAL_TIM_MspPostInit(&htim2); } /** * @brief USART2 Initialization Function * @param None * @retval None */ static void MX_USART2_UART_Init(void) { /* USER CODE BEGIN USART2_Init 0 */ /* USER CODE END USART2_Init 0 */ /* USER CODE BEGIN USART2_Init 1 */ /* USER CODE END USART2_Init 1 */ huart2.Instance = USART2; huart2.Init.BaudRate = 38400; huart2.Init.WordLength = UART_WORDLENGTH_8B; huart2.Init.StopBits = UART_STOPBITS_1; huart2.Init.Parity = UART_PARITY_NONE; huart2.Init.Mode = UART_MODE_TX_RX; huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart2.Init.OverSampling = UART_OVERSAMPLING_16; huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_UART_Init(&huart2) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN USART2_Init 2 */ /* USER CODE END USART2_Init 2 */ } /** * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { GPIO_InitTypeDef GPIO_InitStruct = {0}; /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOF_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET); /*Configure GPIO pin : B1_Pin */ GPIO_InitStruct.Pin = B1_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct); /*Configure GPIO pin : myInterrupt_Input_Pin */ GPIO_InitStruct.Pin = myInterrupt_Input_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(myInterrupt_Input_GPIO_Port, &GPIO_InitStruct); /*Configure GPIO pin : LD2_Pin */ GPIO_InitStruct.Pin = LD2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct); /* EXTI interrupt init*/ HAL_NVIC_SetPriority(EXTI1_IRQn, 0, 0); HAL_NVIC_EnableIRQ(EXTI1_IRQn); } /* USER CODE BEGIN 4 */ void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) { if(htim -> Instance == TIM2) { if(htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) { global_pulse_flag++; if(global_pulse_flag>55){ global_pulse_flag = 0; HAL_TIM_PWM_Stop_IT(&htim2,TIM_CHANNEL_1); } } } } /* USER CODE END 4 */ /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) { } /* USER CODE END Error_Handler_Debug */ } #ifdef USE_FULL_ASSERT /** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval None */ void assert_failed(uint8_t *file, uint32_t line) { /* USER CODE BEGIN 6 */ /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* USER CODE END 6 */ } #endif /* USE_FULL_ASSERT */ Here is stm32f3xx_it.c: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file stm32f3xx_it.c * @brief Interrupt Service Routines. ****************************************************************************** * @attention * * Copyright (c) 2022 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "stm32f3xx_it.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN TD */ /* USER CODE END TD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ /* USER CODE BEGIN PV */ /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ /* USER CODE END 0 */ /* External variables --------------------------------------------------------*/ extern TIM_HandleTypeDef htim2; /* USER CODE BEGIN EV */ /* USER CODE END EV */ /******************************************************************************/ /* Cortex-M4 Processor Interruption and Exception Handlers */ /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ /* USER CODE END NonMaskableInt_IRQn 0 */ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ while (1) { } /* USER CODE END NonMaskableInt_IRQn 1 */ } /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) { /* USER CODE BEGIN W1_HardFault_IRQn 0 */ /* USER CODE END W1_HardFault_IRQn 0 */ } } /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) { /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ /* USER CODE END W1_MemoryManagement_IRQn 0 */ } } /** * @brief This function handles Pre-fetch fault, memory access fault. */ void BusFault_Handler(void) { /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) { /* USER CODE BEGIN W1_BusFault_IRQn 0 */ /* USER CODE END W1_BusFault_IRQn 0 */ } } /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) { /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ /* USER CODE END W1_UsageFault_IRQn 0 */ } } /** * @brief This function handles System service call via SWI instruction. */ void SVC_Handler(void) { /* USER CODE BEGIN SVCall_IRQn 0 */ /* USER CODE END SVCall_IRQn 0 */ /* USER CODE BEGIN SVCall_IRQn 1 */ /* USER CODE END SVCall_IRQn 1 */ } /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { /* USER CODE BEGIN DebugMonitor_IRQn 0 */ /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } /** * @brief This function handles Pendable request for system service. */ void PendSV_Handler(void) { /* USER CODE BEGIN PendSV_IRQn 0 */ /* USER CODE END PendSV_IRQn 0 */ /* USER CODE BEGIN PendSV_IRQn 1 */ /* USER CODE END PendSV_IRQn 1 */ } /** * @brief This function handles System tick timer. */ void SysTick_Handler(void) { /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ } /******************************************************************************/ /* STM32F3xx Peripheral Interrupt Handlers */ /* Add here the Interrupt Handlers for the used peripherals. */ /* For the available peripheral interrupt handler names, */ /* please refer to the startup file (startup_stm32f3xx.s). */ /******************************************************************************/ /** * @brief This function handles EXTI line1 interrupt. */ void EXTI1_IRQHandler(void) { /* USER CODE BEGIN EXTI1_IRQn 0 */ if(HAL_TIM_PWM_Start_IT(&htim2, TIM_CHANNEL_1) != HAL_OK) { Error_Handler(); } /* USER CODE END EXTI1_IRQn 0 */ HAL_GPIO_EXTI_IRQHandler(myInterrupt_Input_Pin); /* USER CODE BEGIN EXTI1_IRQn 1 */ /* USER CODE END EXTI1_IRQn 1 */ } /** * @brief This function handles TIM2 global interrupt. */ void TIM2_IRQHandler(void) { /* USER CODE BEGIN TIM2_IRQn 0 */ /* USER CODE END TIM2_IRQn 0 */ HAL_TIM_IRQHandler(&htim2); /* USER CODE BEGIN TIM2_IRQn 1 */ /* USER CODE END TIM2_IRQn 1 */ } /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ AI: There's an easy solution to this using HAL as there are drivers that call a function every time a timer (in this case PWM) is called. You can just count the number of times the function is called and then stop your second PWM. Enable PWM as interrupt-based in the .ioc / cubemx page in stm32cubeide and generate code go to Drivers/xxx_HAL_Driver/Src/xx_hal_tim.c in project explorer window Look for the driver called HAL_TIM_PWM_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel) and copy and paste it into your main. Obviously you will need to provide the correct timer handle and channel In the timer driver file also look for a function called __weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim). Copy and paste this function in your main.c Remove the __weak and define the pulse finished callback function yourself. HAL will call this function every time a PWM pulse is finished. You need to have a flag that increments every time the function is called. Once it is called N times you can set your second to LOW. Example code: before the main while loop ,start the PWM using timer 3 and channel 1: if(HAL_TIM_PWM_Start_IT(&htim3, TIM_CHANNEL_1) != HAL_OK) { Error_Handler(); } And defining what to do with the pulse interrupt call. In this case if the timer that called the function is timer 3, make sure that it was also channel 1 (in case you have multiple timers and channels). If it is as expected increment a global falg. /* USER CODE BEGIN 4 */ void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) { if(htim -> Instance == TIM3) { if(htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) { global_pulse_flag++; } } } /* USER CODE END 4 */ CubeMX screenshot to enable PWM interrupt:
H: If I just keep decreasing the resistance of the wire between the load and the battery, does that mean that the current flow is increased? If I keep decreasing the resistance of the wire connecting the load and the battery, will the current flow increase, until the maximum current level the specific battery can give is reached? If so, and I want to supply 12 amps of electric current, using a 6Ah battery with 24 volts, and a c rating of 2, then would I just need to add a wire that has a resistance of 2ohms? AI: "connecting the load and the battery" ... uh ... usually the load determines the current. As long as the wire has much less resistance than the load, decreasing the wire's resistance any further has minimal effect. Now there's nothing wrong with your 2 ohm example as long as you understand that the wire itself IS the load ... as in an electric heater. More generally, the current is determined by the battery voltage and the sum of three separate resistances: the battery's internal resistance the load resistance And the resistance of the wiring. To use a battery efficiently, you want the load to be the main part of this sum, and the wiring resistance and the battery internal resistance to be a small percentage or ideally 0.. The way you have worded the question makes it unclear if you understand this, or if you are actually asking something else.
H: Frequency of a ring oscillator using transistors only This is the standard design of a NOT gate without much sophistication: I've used R1 = 1k \$ \Omega \$ and R2 = 100k \$ \Omega \$. The transistor model I use is BC107B. In an attempt to create a seven-ring oscillator, I've connected seven of such NOT gates in series, and fed the output of the last gate to the first transistor's input. I get an approximately rectangular waveform with a frequency around 50 MHz. I can't seem to account for the frequency in this case. There are no capacitors used, and there's not any time delay component as such. How are we generating this frequency in this case? Can someone help me in figuring this out? AI: There are no capacitors used, and there's not any time delay component as such Those are assumptions, and not the good kind, I'm afraid. There are inherent delays due to the physics of the semiconductor, there are parasitic capacitances that cause the signals to have delays. On a breadboard you'll also have the parasitics of the PCB, the elements, themselves, etc -- all of these will contribute to a delay. That's what ring oscillators rely on. In general, no real-time circuit will have zero delay, otherwise causality will be broken.
H: Self programming fails on ATmega2561 We've been programming a custom Board with an ATmega2561 via a serial (RS232) connection for years, mostly without problem. We're using a custom bootloader that is closely based on recommondations in the datasheet and application notes. Interrupt routine writes data into 64 Byte Rx-Buffer If a line-break is received, check if data is valid intel hex Decode intel hex and write data to 256 Byte flash page buffer If page buffer is not full, go back and check for line break When page buffer is full, delete datablock in flash, write page to flash, validate data in flash, return to checking for line break in Rx buffer All the boards with the Problem had an ATmega2561 with a datecode of 20035EU (Week 3 of 2020, 5EU is probably some internal lot-nr) So why did programming fail on 80% of the boards with MCUs from that Lot? Replacing the MCU with one from another Lot solved the problem Reducing the data rate from 57600bit/s to 9600bit/s "solved" the problem Further testing showed, that all speeds up to 50000bit/s worked The external ceramic resonator worked flawlessly When programmed, all testing showed no further anomalies When beeing run on the internal "calibrated 8MHz" oscillator, baudrates were about 12% below of what we would have expected, indicating that the internal oscillator runs at about 7MHz instead of 8MHz AI: According to the Datasheet, the timing for flash- (and EEPROM-) Programming is controled by the internal calibrated RC-oscillator 64 Bytes of input buffer are filled within 11.1ms there is no flow control on the serial line during self programming If a buffer overflow accurs, the programming will fail According to the datasheet ereasing and writing a page in flash takes between 3.7ms and 4.5ms each. So at maximum 9ms, leaving 2ms for decoding, preparing and validating. That's 32000 cycles at 16MHz which is plenty. So the way this fails is because the internal "calibrated" RC-Oscilltor was running way too slow. So erasing and programming the flash memory takes more like 5.1ms instead of 4.5ms each. This led to an Rx-Buffer overflow which corruped the received data. The Bootloader detected the corruption via checksums and stopped programming (but not sending any feedback of the nature of the problem). Solutions sending the chips back to Microchip (but they don't confirm any problem) but at the current chip shortage this might not be an option Increasing the Rx-Buffer-Size to 128 Bytes Chaning the bootloader to accomondate for an out of spec product (and not knowing what else could be wrong) might not seem very satisfying. But at the current chip shortage you might just have to make it work because all other options are worse.
H: On mains AC, why is neutral different from live? In AC, we have a 50hz 'live' connector rotating from -240 to +240V at 50Hz, right? As a child, I imagined this is like someone taking a battery out of a flashlight and reversing it 50 times a second. With a battery reversing, positive becomes negative, and negative becomes positive but AC is NOT equivalent to that With AC power, there's only ONE live terminal and the other leg (neutral) is always at 0 volts so the voltage on the live leg varies from -240 to +240V and when it's below zero it's sucking, and when it's above it's blowing, but neutral is always at 0V and also always connected to ground. Is that correct? Secondly then, if Live and Earth are connected at the panel...how are they different? How do they have different purposes? thanks, AI: Take your imaginary flashlight model. Now imagine connecting one of the contacts to the Earth (literally, the ground). What happens to the other contact as you swap the battery, relative to Earth? When you have the negative battery terminal connected to your "Earthed" terminal, the other contact must be 1.5V higher, so it is at +1.5V. Now swap the battery so the positive terminal is connected to your Earthed terminal. Now the other contact must be at 1.5 below the Earth, so it's at -1.5V. So that contact is swapping between +1.5V and -1.5V. Now imagine this switching is turned into a smooth wave, and you have it gently "rotating" from 1.5V to -1.5V, 50 times a second. This contact is your "Live" wire. If you don't earth one terminal, you have an isolated supply. There is no live and neutral as such, just two wires where the voltage between the two wires is varying. This is sometimes used in a private (e.g. locally generated) supply. The difference between Neutral and Earth wires is a matter of use. Current flows in the Neutral normally, it is one of the current carrying wires (i.e. your two flashlight contacts). The Earth wire is separately connected to Earth, and does not carry any current normally. If it does start carrying current, a fault has occurred in which your Live has connected to the thing it is connected to, like the metal box of a device, and that current signals a circuit breaker to trip. It's not part of the "circuit" and if it does become part of the circuit, something is amiss, so the breaker trips.
H: RF direction finding Is it possible to build a system of antennas to find the rough direction of a radio frequency emitter such as a WiFi router, a Bluetouth tag, or, a 5G cell tower? I cannot use distant antennas to use triangulation. If several antennas are needed, they should be close (within 50cm) to each other. From wikipedia, it seems that such a system is possible: https://en.wikipedia.org/wiki/Direction_finding It also seems possible using Bluetouth 5.1 angle of arrival, but I cannot find a vendor. AI: Is it possible to build a system of antennas to find the rough direction of a radio frequency emitter such as a Wifi router, a Bluetouth Tag, or, a 5G cell tower? By the fact that direction finding works: yes. But note that Wifi, bluetooth, 5G exist in very strongly non-line-of-sight scenarios means that the directions you'll find will have little to nothing to do with the place where the emitter stands. I cannot use distant antennas to use triangulation. If several antennas are needed, they should be close (within 50cm) from each other. You do not get to choose the distance freely. There's practical lower limits, below which you get into ambiguities. Luckily, 50cm is larger than half the wavelength of all these technologies, so a (pretty much optimal) \$\lambda/2\$ spaced array is feasible. But again, if you're in a scenario where the propagation is not only a single direct line (like between a satellite and a satellite dish array), then you will get multiple directions, and/or directions that don't necessarily point in direction of the emitter, but just in direction of one path. It also seems possible using Bluetouth 5.1 angle of arrival, It is exactly what AoA does. Wifi is especially tricky, because it's very common that access points and mobile stations these days use MIMO techniques to dedicatedly combine physically independent paths in a way that allows the other end to form multiple, independent data streams (to get more data in the same bandwidth across, in the end). But that means that you can get a coherent wavefront at the receiving end that "looks" as if it came from one direction, where there's neither the actual transmitter nor a single propagation path. In the end, what I'm saying is, yes, it's possible to build a measurement system for incident wavefronts' angles, but these angles will not mean what you'd assume they mean.
H: Why are many radar antenna arrays not rectangular but rather octagonal÷icosagonal? I've seen that, despite some phased array antennas are rectangular, many of them are not. They are octagonal, decagonal and even more. Why are they built in this way? AI: There are several reasons for those shapes. First, the cut off/rounded corners make it easier to fit into the nose of an aircraft. This is true of the phased arrays, both active and passive, that are found on the B-1B, F-16 (newer versions), F-22, F-35, etc. Most square or rectangular arrays are found in ground or ship born applications, where packaging constraints aren't quite as severe. Typical of such an array is the Ground/Air Task Oriented Radar (G/ATOR) for the United States Marine Corps. Picture below is from Defence Blog: Second, if the array is an AESA (Active Electronically Steered Array), there's a whole bunch of expensive electronics (LNAs, filters, phase shifters, attenuators) behind each antenna element. For cost reasons, you like to keep the number of elements to the minimum needed to provide the aperture gain needed. Most arrays use amplitude weighting in both the X and Y axis of the antenna in receive in order to control the sidelobe level. This amplitude weighting means that the end elements along both axis, and especially the elements in what would be the square corner of the array are heavily attenuated and so contribute little to the overall performance of the array. So in the case of a receive-only antenna those elements are removed in order to save cost. For an antenna that's used to transmit (and receive), the name of the game is usually to put as much power out as possible. That is, to maximize the Effective Isotropic Radiated Power, or EIRP. In that application, edge or corner elements are usually left in place to take advantage of the transmit output power of those elements, even if they do not contribute much to receive operation. That is, assuming they're not removed in order to fit the array into the volume constraints. Added Antenna Below Here's an array antenna that is similar to some that I have worked with in the past. It is shaped like a parallelogram, and the elements are located parallel to the tilted side. An antenna shaped like this has certain characteristics related to sidelobes that make it attractive for some applications. Note that the individual radiating elements, denoted by the "X" in the diagram, are not located on a nice Cartesian grid. This makes the computation of the element's phase shifts a bit more difficult, but not overly so.
H: Trying to understand this electrical diagram schematic on an AC motor that I have, particularly symbol between yellow and black wires I'm new to electrical wiring and I'm trying to learn a bit and came across this AC motor which I have that isn't hooked up. I have attached the motor wiring diagram: This is also the wiring connection at the end: I'm trying to make sense of this all and would appreciate any input, here is my understanding on the wiring: Line wires are Red, Yellow, and Black? I don't understand the symbol used between the Yellow and Black wires in the diagram. White is neutral? Green is ground The circle symbol between Red and yellow indicate they are both connected to line White appears to be connected to blue? is this correct? Using this diagram, if I connected an AC power cord with hot going to red, ground going to ground, and white going to neutral, would I be able to supply power? I'm guessing the other colored wires may be different motor speeds and I could supply / switch power to the other wires for different speeds? I know I am probably wrong in a lot of this so any explanation or if someone wants to point me in a direction where I can learn more about things like this I would appreciate it. Thank You. AI: The motor has a split stator coil that allows for 120V or 240V connection. The black wire is a mains lead, and has a thermal overload switch on it (the weird symbol on the third wire down.) The red, blue, yellow and white wires connect to split coils, and are to be connected to each other and the other mains lead as shown on the diagrams for 120 or 240V line. Green is ground, and it’s not on the connector, so I’ll assume it’s a separate bonded connection. There is no ‘neutral’ wire per se on this connector, only two line-in wires. Further, the split coil lead colors don’t correspond directly to electrical wiring conventions. Don’t infer that the white wire on the connector is neutral - it isn’t. It is never connected directly to a line, only to another coil by jumper. For your testing, connect the jumper wires as shown first, as appropriate for your voltage. Then connect your line supply. This is best accomplished using a ‘pigtail’ mating connector that plugs into the motor’s connector. If you’re lucky the motor came with one, otherwise obtain one from a supplier first. Here's how that looks: simulate this circuit – Schematic created using CircuitLab The upper two diagrams show line feed colors that you'll find in a 120V country: black = hot, white = neutral, red = hot. Lower diagram is for 240V countries like the UK and most of the EU, which use brown = hot and blue = neutral. As to what's inside the motor itself, it's a capacitor-run motor that always uses 120V for the phasing coil. Here's what that looks like: simulate this circuit
H: Do I need to connect all pins of USB 4085 or can I use only the first row? I would like to add a THT USB-C for hand soldering to my PCB. I found this on KiCad: https://gct.co/connector/usb4085 (Full schematics) D+ and D- are differential pairs. Do I need to connect all of them or can I use only the first row? If I have to connect them all, how can I place the traces? one on each layer? AI: Typically a USB C receptacle should but is not required to, have both D+ and D- connected. A USB C plug may but may not have both D+ and D- pairs present. If not, you will get in a situation where plugging in a cable could not work data wise. This is an inconvenience and breaks the normal user expectations of reversible cables. Worse if both sides of the connection do this. See https://hackaday.com/2021/03/22/cursed-usb-c-when-plug-orientation-matters/ for an example and page 11 and 12 of this texas instrument primer https://www.ti.com/lit/slyy109 USB data connections are high speed and should be impedance matched. That typically means the total length of each connection should be equal. There is some leeway but best practices is to make sure it's equal length. Connecting one side above and the other below should not be an issue, the difference being at worst the height of your board. USB 2.0 has some forgiving specs. See the layout of this TI expert recommendation https://e2e.ti.com/support/interface-group/interface/f/interface-forum/512449/type-c-connector-layout-made-easy But the best source will probably be your usb c receptacle manufacturer. They likely have an app note or demo board that documents a recommended layout.
H: What component is like a jumper, but doesn’t actually conduct? I suppose you all know jumpers, those little things you put on top of 2 male, 2.54 mm pitch, pins. They serve to connect the 2 pins together (often used to "configure" a prototyping board), for example selecting a voltage or I2C address: My question is: what's the opposite called? By opposite, I mean a component having roughly the same shape, that I can put on top of 2 male pins with 2.54mm distance, but that does NOT connect them? For background: why do I want that? I'm currently designing a PCB for a caving robot. I have several rows of pins to connect various sensors/actuators, where I would like to use 2.54 mm pitch pins. In order to avoid risking shorts with all those pins, I would usually just use female pins. The problem is that in caves, there is mud, and if I get some mud in a female pin, it will be nearly impossible to get out again. So my goal is to protect the pins from accidental shorts. AI: For those connectors you can get them in almost every size practical (even one pin), and they're designed to fit next to each other. Just buy connectors that fit your unused pins, and don't connect anything to them.
H: Cascaded Op Amp Problem I have seen an op amp problem and I made a representation of it in LTspice. Attention! Vout is not grounded, I had made a mistake. Sorry for this. The problem wants us to find Vout. To solve it, I used KCL and Nodal Analysis. Here is my solution: I feel like something is wrong or missing. Is my result correct? How can I solve it with another way? Note: Please do not care model name of the op amps. AI: Assuming that \$V_x \$ and \$V_{out}\$ aren't grounded (that would be weird for a problem like this) your solution is correct. Assuming ideal op amps: - The gain of the first amplifier is \$A_{v1}=-\frac{5\Omega}{10\Omega} = -\frac{1}{2} \: \frac{\text{V}}{\text{V}} \$ The gain of the second amplifier is \$A_{v2} =-\frac{2\text{k}\Omega}{1\text{k}\Omega} =-2 \: \frac{\text{V}}{\text{V}}\$ So the total gain is \$A_{v,\text{total}} = A_{v1}A_{v2}=1 \Rightarrow V_o=V_{in}A_{v,\text{total}}=2\text{V}\$
H: Do I need shielding on a long, power-only USB cable? I want to use a long, 3m USB cable to power a board with an ESP32 WROOM module. Power draw is less than 100 mA. I am not using the data pins on the USB cable. If the cable is NOT shielded, should I expect issues with EMC? I need to be FCC compliant (FCC Part 15) The board goes into sleep and wakes up regularly, so the current drawn isn't totally constant. AI: I don't think a shield is needed. You want to make sure the power leads are twisted. You also might want to make provisions for a common mode (CM) choke. While the power is DC, there may be some high frequency noise on the power lines from the power supply (don't know what that is). It only takes a small amount (5 uA?) of common mode current to fail an FCC part 15 test. Answers to OP's Questions No. I was suggesting that you make provisions to put a common mode choke around the USB cable, close to the PS, to be added if you fail EMC testing (radiated emissions). If I knew more about the internal pf the power supply you're using, I might be able to make a more definitive recommendation. Twisting power leads (hot + return) is, in my mind, just good design practice. It may not be absolutely needed, but it doesn't cost anything (or very little) to do this.
H: Identify diode part number This is a diode from a small 5 Vdc power supply that is part of a powered subwoofer. Main supply voltages of about plus minus 45 Vdc look to be okay but the little 5V supply appears to be dead. A quick check shows that this diode is shorted. Markings are (top) V1H (bottom) P133L Google isn't much help (or I'm using the wrong search terms). Closest I can see is a Turkish supplier website that suggests this is a 100V 3A part. However, no hint of speed. Any suggestions of what this might be greatly appreciated! AI: The very first item that a quick google of "diode V1H" throws up is this site Scrolling down a bit you find a section headed "DIODE V1h Marking Code Datasheets Context Search". Follow the link to the data sheet PDF.
H: I know how to do it with K Maps but how to solve it without using them Let X=X1X0 and Y=Y1Y0 be unsigned 2-bit numbers. The output function F = 1 if X is equal to or less than Y and F = 0 otherwise. Find the minimized expression for F? AI: This question looks like homework, so I'll nudge you in the right direction. Write down all the cases for which \$F = 1\$ as products of \$X_1\$, \$X_0\$, \$Y_1\$ and \$Y_0\$ and add them together. For example, if \$X_1=X_0=Y_1=Y_0=0\$, then \$F=1\$, hence \$\overline{X}_1\overline{X}_0\overline{Y}_1\overline{Y}_0\$ is one of your terms. Alternatively, you can add all the cases for which \$F=0\$, negate the whole expression and use De Morgan's law to rewrite it as a product of sums, but this only makes sense if you have considerably less cases where \$F=0\$. After you find your direct expression, simplify it.
H: Why does current prioritize capacitor in a parallel circuit I am providing a 5V to my circuit. There is 10 µF capacitor in series with a 100 kΩ resistor and they are in parallel with a NPN transistor and LED. I am trying to understand why the base of thetransistor only gets current when C1 is full. Why does no/some current flow to Q1 (base), via R1, even though C1 is charging. Current chooses the path of least resistance. Current flows to base of Q1 only when C1 is fully charged which turns the transistor on and then LED lights. simulate this circuit – Schematic created using CircuitLab AI: There is no priority, just standard circuit. The transistor will be off until there is enough voltage in the capacitor. The base needs about 0.7V of Vbe to turn on the transistor. And the LED at the emitter also requires some voltage, let's assume 2V. The capacitor charges slowly due to the resistor. Therefore it takes time before capacitor voltage which equals Vb rises from 0V to about 0.7V plus the LED voltage and only then LED turns on.
H: When a BOM specifies 2x capacitors to be used together, are they used in series or parallel? Looking at the typical application example on this datasheet you can see that for COUT they specify 2 x 10 μF capacitors to be used although the schematic only shows the symbol for a single capacitor on COUT. Why doesn't the schematic show 2x capacitors, and should they be wired in series or parallel? AI: In table 5.2 (page 18), they say that Cout should be 20µF. So it is definitively 2*10µF in parallel. Why putting 2 identical capacitors in parallel? to increase the ripple current capability (ie be able to provide more current). to reduce the ESR (internal series resistor) of the "global capacitor": this means that there will be less voltage difference between when the capacitor is charging and when it is discharging, reducing the voltage ripple. You could of course use a single 20µF capacitor, but then you have to make sure that it has ripple current at least twice the one of a "normal" capacitor, and ESR not more than half of the one from a "normal" capacitor. PS: putting capacitors (same value or not) in parallel is very frequent. Putting them in series is very rare (the only thing you gain is doubling the voltage rating (provided you can somehow ensure that the voltage is equally split, you might need to add a voltage divider with the midle point connected to the middle of the capacitors), but the capacity is divided by 2.
H: Perturbation and linearization for boost converter I'm developing a boost converter (runs with DCM, and has \$n\$ turns ratio transformer) for uni which controls the input voltage with a constant output voltage. I'm at loss on how to get the transfer functions of the converter. Averaging the circuit is what I believe that I understand well (\$d_1\$ is duty for boosting, \$d_2\$ covers falling inductor current time, the methodology is found in a TPEL paper) \$d_2\$ is eliminated by assuming a triangular inductor current with $$i_{\text{peak}} = \frac{V_{\text{on}} \times d_1 \times T}{L}$$ The end result is this: I'm recalculating the work done by a PhD candidate, and up to this point it seems I get the same matrix. But when he does the perturb & linearization he gets: Which I cannot figure out how he got there. His equations turn out solid (tested in PLECS), but the way he did the perturbation is unexplained. Typical stuff I found online was to simply replace \$V_{\text{in}}\$, \$i\$, and \$d_1\$ with a DC + small signal injection inside and solve. However, due to the DCM of the converter there are small signal parameters in denominators, and I'm clueless on how to handle them. What I did was use the Taylor expansion, so \$di/dt = f\$, and then perform a partial derivative to fill the matrices for each small signal parameter. It ends up not being the same for the inductor current small signal model. TDLR: How do I perform perturbation and linearization when the perturbed variables are in denominators as well? (DCM boost is the application of interest) AI: The state-space averaging technique (SSA) has been introduced by Dr. Ćuk in 1976. Using the state variables approach, you have to determine the equations ruling a converter when the main switch is on - during \$DT_{sw}\$ - and when it is turned off during \$(1-D)T_{sw}\$. This is what I pictured below (excerpt from my APEC 2013 seminar): Once you have these equations, which, by the way describe a linear network in both events, you need to rearrange them to fit the state equation formalism proposed by Kalman. To smooth the discontinuity between the transitions, in other words to build a continuous time-domain equation he could later derive, Dr. Ćuk realized that you could weight each coefficients matrix by the time during which it was active: \$D\$ during \$DT_{sw}\$ and \$1-D\$ during \$(1-D)T_{sw}\$. This smoothing process lead to a nonlinear large-signal equation but continuous is time: and when you are there, you need to linearize this expression to form a linear small-signal expression: But the pain now is to build a small-signal electrical model that you will have to solve later on. You realize how painful this can be most of the time with the many traps in the derivation process and the difficulty to runs sanity checks in intermediate steps. Besides, as I said in the comment, SSA incorrectly predicted that the boost, buck-boost and buck converters were a 1st-order system when operated in DCM which is wrong as demonstrated later on with the PWM switch model: whether these cells are operated in CCM or DCM, they remain a second-order system but heavily damped in DCM, having a dominant low-frequency pole and a higher-frequency pole explaining why phase shift was going beyond 90° despite the 1st-order prediction of SSA. An interesting paper has been written by Dan Mitchell et al. in which they revisited this theory (Average Modeling of PWM Converter in Discontinuous Conduction Mode - A Reexamination) In 1986, Dr. Vatché Vorpérian published his paper on the PWM Switch Model in CCM and DCM. Rather than focusing his attention on the entire converter - as SSA does - he realized that the discontinuity was brought by the two switches while the other components (capacitor, inductor and resistance) were linear elements: The principle is quite simple: you identify the couple switch+diode and you replace it by the PWM switch model. This model can be a large-signal model (for dc and transient studies) or small-signal to determine transfer functions. The cool thing is that this model in invariant meaning that its internals remain the same regardless of the switching structure: whether you study a boost, a buck-boost, a forward, a SEPIC and so on, the model is the same, you just need to rotate it to fit the right connections on the circuit. This is a tremendous gain in time and understanding on how the circuit operates. Furthermore, while SSA considered the entire converter (add a few parasitics and you have to restart the analysis from scratch), the PWM switch models the two switches only: you can change the surroundings (add an resistance with the cap or the inductor), the model does not change. The subcircuit exists for voltage- and current-mode control but you can extend it to constant-on and off times, quasi-resonance etc. Below is a classic example of a CCM boost converter which delivers the dc operating point and the ac response in a second of simulation time: And if you want to go for a DCM model, then use the DCM PWM switch model to build the below small-signal circuit and check the response immediately. Then go and solve the transfer function using the fast analytical circuits techniques or FACTs as I shown in my last book on transfer functions of switching converters: As a final work, how do you check your analysis is correct in the end? At the time SSA was explained, you had no other options than resorting to a prototype in the lab and measure the loop response painfully as frequency response analyzers (FRAs) were scarce and expensive at that time. Nowadays, a program like SIMPLIS lets you immediately unveil the response of a switching circuit in a few seconds. Please note that you'll still have to build a prototype and run bench measurements but SIMPLIS is a good way to start the validation process. For that purpose, you can download the free 60+ simulation templates I released to go with my last book as most of them work with the free demo version Elements. That way, you can compare the theoretical response obtained via equations (or SSA) and what SIMPLIS delivers. Below is a typical example with a CCM boost converter:
H: STM32 bare-metal programming - Memory addressing in 32-bit system - memory offset I am coming from a mechanical background and some Atmega experience, now doing some bare-metal programming courses on ARM processors. So far it is looking great, digging into documentation about uC functional structure, toggling bits of correct address etc. But I never paid too much attention (until now) to memory structure and addresses. Looking at the offset (see pic below), you can see that the offset between each consequent register is 0x004. My question is, why the 0x004 offset? What does 0x004 mean? 32-bit registers have 4 bytes, is that the reason why? I haven't found any material online, also considering the RM0468 Reference Manual from ST. Thanks for all the feedback! :) AI: Yes the registers are typically 32-bit and that is 4 bytes, and as memory is accessed at byte granularity, usually the distance between two registers is 4 bytes. Note that the offset is just addition to the peripheral base address, because it's easier to have say 10 timers or 6 UARTs and while they each are at different base address in the 32-bit memory space, the peripherals are othrrwise identical.
H: What would happen if earth ground and the PCB ground came into contact? So I have an ATX PSU that I'm converting into a 12v, 5v power supply. I also have a group of 4 USB ports from an old computer that I connected to the 5v line of the ATX PSU. Unfortunately, the USB casing is connected to the common ground (of the PCB) and the casing of the ATX is close to touching it and I was wondering what would happen if the common ground of the PCB came into contact with the metal ATX casing, which is connected to Earth. AI: The ATX supply ground, i.e. the black wires, are internally connected to the ATX supply metal chassis, which is also connected to mains earth/ground. Nothing will happen, as they are already connected.
H: Difference between a relay and a fault passage indicator (FPI)? What is the difference between a fault passage indicator (FPI) and a relay (for example relay 50, 51, 67N) ? Are they the same thing? AI: A fault passage indicator is used by electric utilities to visually indicatd (such as by a mechanical flag) that a fault has occurred on a transmission line. A relay is an electrical switch that can be actuated by some sort of signal such as AC or DC voltage. The two devices are unrelated although, perhaps, a relay could be used as part of an FPI.
H: How do I display voltage on a Keysight DSOX1204G? On page 37 of the manual, It clearly indicates the voltage in the top left hand corner of the screen DSOX1204G manual and hints that it would display the voltage for each channel next to the channel number. But my screen does not show that. My screen has a 500ma reading in that position, and that appears to be miliamp, but does not update then I turn my DC benchtop power supply on and run 3.3v through it. It doesn't appear to have any reading on amps. How do I get to voltage on my DSXO1204G? AI: It's possible to configure the unit of the DCO channels to either voltage or current. See page 38 of the user manual: In the Channel menu, the Probe softkey opens the Channel Probe menu. This menu lets you select additional probe parameters such as attenuation factor and units of measurement for the connected probe. Table 5 Probe Features Channel units: [1/2/3/4] > Probe > Units (Volts, Amps) The chapter Measurements, starting on page 63, describes the features of measuring input channels. Table 19 (page 64) Voltage measurements: [Meas] > Type: (Peak-Peak, Maximum, Minimum, Amplitude, Top, Base, Overshoot, Preshoot, Average, DC RMS, AC RMS), Add Measurement
H: Two power supplies to ensure a specific voltage I am designing a soft start circuit for my bench power supply. The voltage input of the IC that control the mosfets in the circuit can not be under 4.3 V even when the output of the power supply is under 5 V. I've been doing some research on the web and I found a circuit so I decide to simplify it for simulation in order to understand it better. This is the circuit: V1 refers to a 5 V voltage regulator and V2 refers to the output of the power supply that can be between 0.8-20 V. What I can not understand for example is why when V2 is under 5 V, voltage output is 4.36 V and not 8.6 V (4.36 + 3.3 V). It's like depending what voltage has V2, the voltage output depends of V1 or V2. AI: Everyone is saying what it's not, but I'll throw my two cents in to explain what this circuit is: The technique you're using here is called OR diodes. The voltage at the load is not the combined total of supplies. It is the voltage of the higher voltage supply (minus any forward voltage drop). This technique is typically used when you have several power sources to a board. For example, if you have a battery backup you want to fall back on if your main supply fails. If the main supply is, say, 30V. You could make design the backup supply for 25V. That way, when the main supply is working, the diode leading to it is reverse biased and the battery is effectively taken out of the circuit, but if the main supply fails, you can be sure that the power to the board will never go under 25V (again, minus the forward voltage of the diode, typically ~0.7V for napkin analysis purposes.
H: Are systems with more zeroes than poles really non-realizable? I have learnt that systems whose transfer functions have more zeroes than poles become non-causal and thus non-realizable in practice for real time implementation. But an op-amp differentiator, like the one in the figure below, is certainly realizable and has a TF of the form: $$G(s) = -RCs $$ Couldn't we just cascade a bunch of these differentiators, at least in theory, and then generate a transfer function with more zeroes than poles? AI: But an op-amp differentiator, like the one in the figure below, is certainly realizable Yes, it is and has a TF of the form \$G(s) = -RCs\$ Generally not. You're using the method where you set \$V_- = V_+\$ and solve for the transfer function. That method is only valid if the resulting circuit happens to be stable. A more realistic method sets \$V_o = A(s) \left(V_+ - V_- \right)\$, calculates \$V_-\$ (and \$V_+\$ if necessary) as a function of \$V_o\$, and solves the resulting feedback equation. In this case, for most internally compensated, unity-gain-stable op-amps, our "more realistic" \$A(s)\$ is something like $$A(s) = \frac{A_{GBW} \omega_0}{s \left(s + \omega_0 \right)}$$ where \$A_{GBW}\$ is the gain-bandwidth product of the op-amp in radians per second, and the manufacturer has chosen \$\omega_0\$ for stability, probably setting it in the range \$\frac{A_{GBW}}{5} < \omega_0 < \frac{A_{GBW}}{2}\$, depending on how sporting they want to be with overshoot and stability. If you grind through all the math, you'll find out that for your circuit, with "sensible" component values (i.e. \$R\$ matches the op-amp's capabilities, so probably around \$1\mathrm k \Omega \le R \le 1\mathrm M\Omega\$, and \$\frac{1}{RC}\$ is well within the gain bandwidth product, your circuit is unstable, or at least shows a very strong resonance, with a little bit of differentiator action thrown in. Trying to actually wire up that circuit and seeing the result was one of my first practical introductions to the joys of trying to make op-amps do what the simplistic theory seems to say they can.
H: Battery charge current I set up my power source to 4.2 V @ 0.1 A. If I connect a Li-ion battery I get a current of about 0.1 A. If I connect a resistor of about 40 Ω I get a current of about 0.1 A. But if I put it all together (connect battery through the resistor) I get a current of about 10 mA. In the first place I just wanted to calculate what resistor should I choose for a charging current of 0.1 A. But now I'm confused. Can anybody explain it to me? AI: The charging current will be dependent on the state of charge of the battery (the voltage difference between the charger and the battery). Use Ohm's law: I = (Vcharge-Vbatt) / R. If the battery is nearly empty (around 3V), the current will be around 25mA and when it's nearly full it will be almost zero. Using just a resistor is not a good way to charge Lithium Ion batteries. There is no protection against overcharging or overdischarging. If you care for your battery and/or do not want to set fire to your house, use a proper charging IC. There is a reason these exist.
H: Is the voltage drop smaller in three-phase circuits? If the same power and the same distance are used for a single-phase and a three-phase circuit. Will the voltage drop of the three-phase circuit be smaller? AI: In general, the power transmission efficiency will be higher for a three-phase circuit compared to a single-phase circuit because three wires are used instead of two. The transmission line can be designed for lower voltage drop using the same size for each of the three-phase wires as for each of the single-phase wires. The three-phase transmission line could also be designed to save copper rather than save energy. If the transmission line supplies motor loads, three-phase motors can be used rather than single phase motors. Three phase motors have the advantage of dividing the current three ways, so that provides one similar savings opportunity. Three-phase motors have an additional saving opportunity in their ability to more simply provide a revolving magnetic field. Rectifiers are another load device that is improved bu using three-phase power. Their un-filtered output has much less ripple voltage than single-phase rectifiers.
H: Can a smart battery charger power a 12V windscreen wiper motor? I have a very old windscreen motor attached to a rotisserie which I would like to run. I was told that I need a battery charger, but most of the ones I can find are "smart" ones. I have a 2A smart charger and it doesn't work, reading a bit more it seems I need 10A capacity to start the motor while 'stalled'. My question is does the charger have to be one that can explicitly run 12V appliances? E.g. https://www.projecta.com.au/battery-charger-products/12v-automatic-10a-7-stage-battery-charger or, can I get this intelligent charger with 7 modes? https://www.supercheapauto.com.au/p/sca-sca-12v-10-amp-7-stage-battery-charger/544706.html I have no idea what the stages in the specifications quoted below are: SCA 12V 10 Amp 7 Stage Battery Charger Chemistry Types: Standard Lead Acid / AGM / GEL / Calcium Stages: 1: Primary Analysis (Desulphation) / 2: Soft Start / 3: Bulk Charge / 4: Absorption / 5: Voltage: 12V Start Voltage: 0 Volts Amperage: 10A Protections: Surge / Reverse Polarity / Overload / Short Circuit Suitability: Batteries up to 1100CCA / 100AH Warranty: 12 months AI: The battery smart charger takes samples of voltage and/or current, to sense the status of the battery, and uses sample data to control the charging output. This is why a smart charger is not suited to drive a motor. Wiper motor hobby page describes typical power sources: http://www.scary-terry.com/wipmtr/wipmtr.htm Sites listed on the hobby page that sell power sources to drive wiper motors: https://www.monsterguts.com/store/ https://www.frightprops.com/
H: reading data from L3GD20 gyroscope sensor using STM32L4 I'm learning how to control the L3GD20 gyro. sensor using STM32L4. In the datasheet of the sensor, Figure 13 shows how the master device should communicate with the sensor via SPI. My goal is to read the 'who am I' register at 0x0F. The register value is expected to be 0xD4, according to the datasheet. If I have understood the sensor datasheet and the reference manual of the MCU, then the following approach should be reasonable. (1) 16-bit data should be written to the SPI_DR register of STM32L4. Then the data are stored in the TXFIFO buffer in the MCU and then transmitted to the sensor through the MOSI line. (2) In the full-duplex SPI mode, a reading operation happens simultaneously with the writing operation. So, the RXFIFO buffer in STM32 is filled with the 16-bit data received from the MISO line. The first 8-bit will be 0b11111111 and the next 8-bit should be the value stored in the "who am I" register. (3) When the SPI_DR register of STM32L4 is read, the 16-bit data, 0xD4, in the RXFIFO buffer is read. However, it looks like people do not use 16-bit long packets when they communicate with this sensor. Instead, many people use 8-bit write/read functions. Can someone please explain why one has to use 8-bit write/read functions? To me that looks unreasonable. Figure 13 shows clearly that a packet should be 16-bit long. Obviously, there's no delay between the address bits and the data bits. This means that even a short delay is not allowed between the write and read operation. I'm having a problem with reading the 0xD4 value but didn't want to show all my source codes. That would be too lengthy and chaotic. I hope that this question is clear enough. AI: The largest reason people use 8-bit byte based transactions on a SPI bus is that all MCUs support it and not many MCUs support anything else. Even if you can use 16-bit transactions for communication, it only works when you have a command/response message that is divisible to 16-bit transactions. It would be difficult to support a transaction that requires transaction of 3 bytes, it does not divide to 16-bit operations. And the assumption that no gaps in the transmission are allowed has no proof. Even if continuous transmissions were required, you would have an equal problem with gaps no matter if the transactions are 8-bit or 16-bit. And transactions can be made continuous, regardless of them being 8 or 16 bits, most MCUs are quick enough, may have some FIFO and even your STM32 MCU can use DMA for the transactions. So, you don't have to use 8-bit transactions, but it is very easy and makes life simple, so there is little point in doing it in any other way that is more complex.
H: Specifications of infrared LED VX-301 During clean up I found an old pack of IR LEDs. They were bought ~ 20 years ago from the German electronics retailer conrad.de. The order number is 185540, but unfortunately, the store doesn't know that component, anymore. The part is named VX-301. I couldn't find any datasheet for it online. Thus, I'm curious of their specification, especially: wavelength viewing angle intensity current ratings Does anyone know some details about this part? AI: I found something. On this page https://www.flippermarkt.de/community/forum/threads/leds-fuer-optos-und-brueckengleichrichter-woher.56836/ There is a discussion in german regarding two alternatives of diodes and a receiver: Was ich schon probiert hab und was funktioniert sind folgende von CONRAD: Sender / IR EMITTER IR-EMITTER LD274/Q62703-Q1031, Artikel-Nr.: 153641 – 62 , >50mW, 950nm, 0,58 EUR Oder: VX-301 IR-SENDEDIODE, Artikel-Nr.: 185540 – 62, 80mW, 895nm, 1,28 € Empfänger FOTO TRANSISTOR BPW 40 = BPW 96 C, Artikel-Nr.: 184055 – 62 0,91 EUR BPW96: 620 – 980 nm; BPW40: 520 – 950 nm So the diode might be 80 mW 895nm
H: How is the upper and lower cutoff frequency found here? I got this from an IEEE journal (letter) regarding high frequency LLC converer control. AI: Assume the two cut-offs are far apart, and consider the cutoffs at V/I = G/2. Set s=0 ("very low") for the Ls/(N^2R) terms, and the G/2 cut off is where 1/(RCs)=1. This is observed by examining the numerator. Set s=inf ("very high") for the 1/RCs term, and the G/2 cut off is where Ls/(N^2R) = 1. The concept of a cut-off shows when s approaches s=0 or s=inf and the transfer function is dominated by the surviving terms.
H: Understanding HD5522 logic supply voltage requirements I'm working on a schematic for an yet another Nixie IN-12 clock using a Raspberry Pi Zero 2 and HD5522 32-channel serial-to-parallel converter with open drain outputs to sink the Nixies. The HD5522 Datasheet says its Vdd is -0.5 to +15V but recommends 10.8V to 13.2V. As the Raspberrys IOs are +3,3V I'd love to use 3,3V as Vdd. I've seen other Nixie projects using a Vdd of +5V for the HD5522. Are there any limitations of using a Vdd of 3,3V? AI: If the recommended range is 10.8V to 13.2, it means the recommendation is 12V with a tolerance of 10%. It is likely that it won't work at 3.3V, and using it outside of recommended values is not recommended. The -0.5 to 15V range are the absolute maximum values. It means that it will get damaged if these are exceeded. It does not mean it will work properly or at all within that range.
H: Flaxseed oil as insulating oil for wires I've bought clothed wires which look like vintage wires found in old audio equipment. I was expecting they are 'oiled' or waxed but they visually didn't. Now I got flaxseed oil and olive oil available and I prefer to use flaxseed oil for starting. I'm planning to sink those wires in the oil and bake it to let it dry quicker. Is there any suggestion for how long should it be sink and how long, what temperature should it be baked? AI: Linseed oil (derived from flaxseed oil) is apparently suitable for insulation as it is a "drying oil". Boiled linseed oil is suggested. Drying agents are sometimes used to speed drying- which are rather undesirable for electrical insulation applications because they involve metallic salts. Cloth wire insulation itself is (was) typically cotton or sometimes silk on fine wires. Source: Standard Handbook for Electrical Engineers (1949 edition). No indication of appropriate drying times, however relevant ASTM document D555 indicate that it is highly variable and that the drying process essentially continues indefinitely. Since the drying of oils is a continuing process that goes on indefinitely, it is difficult to select sharp end points that may be measured precisely. The “set-to-touch” point, where the internal cohesion of the film exceeds its adhesion to the finger, is probably the sharpest. This point coincides very closely with the point where the film changes from a liquid to a gel. The “dry time” is more subjective, and it is difficult to get close agreement between laboratories, especially for oils with relatively long drying times. Modern cloth covered wire is frequently seen in high-temperature applications, where glass fiber or other refractory fibers are used, generally with binders added to keep the insulation from fraying (at least before exposure to extreme temperatures). If I was trying this I would start with something like 50 or 60°C (well below 100°C in any case) and dry for at least several times the time to become tacky. If drying is taking too long, increase the temperature somewhat.
H: Simulating a RC Phase-Shift Oscillator in LTspice I'm having some difficulties in simulating this circuit in LTspice. I'm using op amps in the inverting configuration and buffers between each stage but it's simply not working. The simulation runs for several minutes and then the outputs of the stages come out all messy. I made the calculations and it is supposed to generate an sine wave with a frequency of about 90Hz. The Gain of each stage is supposed to be at least 2. Does anyone know to proper simulate this circuit? The capacitors and resistors are 100 nF and 10kOhm, respectively. AI: Try the following Use ideal gain stages with gain of 2 each. Inject small current pulse to force startup. (note I saw jp314 earlier post after I simulated -- mostly same idea).
H: Minimum wire gauge with vibration I've heard that there is effectively a minimum wire size for vibrating environments. In other words, when designing wires that will experience vibration (in my case, an automobile), it's recommended to make all wires 24 AWG or larger, regardless of the amount of current they'll pass. Is there any wisdom on this? How can I decide if my wires are big enough to avoid shaking themselves apart? AI: Step one in vibrating environments is taking care of your wire ends, such as hinted at by Spehro. If you solder or spread out the inner conductors they become effectively one or more individual wires with very limited strength and vibration resistance. This is why professionals crimp all their terminals and if really important use a ferrule around the cable and then crimp that. (A well chosen ferrule will keep the wires relatively well grouped, even when very forcefully crimped afterwards). After that, you need to be worried about the outer sheath of your wires vibrating along a rough edge. Either you need to prevent that, by use of many support points, or you can harden the wire bundle against it with reinforcements. Once you are at that point, you need to start considering wire size and stranding. For automotive they may set a silly standard as "AWG24 and no less", but that is more probably because of the limited insights into the matter in some parts of the industry. (Easier to tell garage personnel to never buy less than AWG24, than to explain the finer points). The more sensible rule, however is the one seen in Spehro's answer: No fewer than X or Y strands for N or M amount of vibration force. Of course many different kinds of definitions and specifications exist for minimum or maximum vibration force in any kind of system, so this may quickly get cloudy, again a reason to just say "AGW24". To expand a bit on mkeith's comment: The thicker a copper rod (wire or otherwise) the more distortion a bending force will create in the material. The more distortion accumulates the quicker the metal will fatigue. If you have an infinitely small wire, it has infinitely little distortion at a sharp angle. In fact, chip bonding wire, which can be as small as several or dozens of micron, can sway in the wind bending and vibrating without snapping for a very long time. So if you want very flexible and very long lasting wire, you're looking for a wire made up of as many tiny strands as you can find. A usual thing is 0.06mm buildup of wire with a silicone or teflon sheath for extremely high flexibility and vibration resistance. As well as high temperature performance. But the same wire make-up exists in PVC or PP wire, or wire wound, or glassfiber reinforced silicone. With such tiny wires you get the 19 stands Spehro mentions already at AWG28, with the added luck that the thinner strands will give you an extra margin, as discussed above. Be careful with Silicone or other soft plastics, though, as this is much, much easier to damage with small sharp edges. Many automotive solutions only allow soft plastics within safe areas, where the wires get wrapped in glassfiber reinforcement sheaths when they get routed along hard and sharp surfaces that may rub along them. TL;DR (concluding): If you have very thin strands, you can have thinner wires, because the metal fatigues much less the thinner the strand is. So if you have normal 7 strand wire at AWG24, that may well loose from 19+ strand AWG28 wire, vibration wise. But before you start thinking about the thickness and stranding of a wire, you need to think about safely terminating the ends of your wire, in no case use solder joints to start and about damage to your wires caused by rubbing and cutting along hard edges.
H: What happens if I exceed the load my PSU is designed to deliver? I want to use an old PSU I have for studying electrical engineering; to power my circuits. What will happen if I place a 0.6Ω load on the 12V output of a PSU rated for 10A? I'm sure the PSU will heat up, but will it deliver its max current or will it blow up? I could experiment, of course, but I don't want to risk ruining the PSU. AI: If it's a simple linear power supply it will probably either blow a fuse or overheat, break and possibly burn down your house, since most don't have active overtemperature or short circuit protection, altrough some do. This type can be recognized by the heavy transformer it inevitably contains, whose purpose is to step down the mains voltage to about 12V. The tranformer inside a 12 V 10 A linear power supply probably looks similar to this: Switching mode power supplies have become ubiquitous in recent years, since they are lighter, more compact and more energy efficient. A switching mode power supply usually has a somewhat "intelligent" control circuit that has features like short circuit protection and over temperature protection. Such a power supply will probably shut down to protect itself if you try to draw too much current. Keep in mind that the absolute cheapest power supplies from e.g. eBay are always built down to a price and in some cases lack any sort of protection. Switching power supplies replace the chunky tranformer with a smaller, high frequency tranformer driven by transistors: Summary It depends completely on which type of power supply you have, and you should check if it has overtemperature and short circuit protection.
H: Can an FPGA connected to a CPU via PCIE access peripheral devices? Is it possible for an FPGA connected via PCIE to a CPU, to directly access peripherals (USB Ports, data, Ethernet, etc) connected to the same CPU via a chipset? I had an Intel based system in mind, with a x99 motherboard or something equivalent. If it is possible how would the process be performed (Just rough steps.)? AI: The PCIe spec defines that devices can address each other, yes. Whether that actually works is another question. Several chipsets have access control logic that requires the CPU to explicitly permit that two devices talk to each other. This makes sense from a security point of view: if the sound card could instruct the graphics card to display a password prompt, you might type your password into the wrong window and send it across the network, and since no one expected the sound card to have meaningful attack surface, fewer permissions would be required to access it.
H: What is the output voltage of this OP amp circuit? I'm trying to solve (b): This is what the solution manual gives as an answer: However, this seems a little off to me. I tried using nodal analysis to solve this problem and I get the following result. Where is the mistake? AI: I found my mistake. In my step 1, I write: 0.2 = -vc/40 + vo/12, but it should actually be 0.2 = -vc/40 - vo/12. :SSSSS
H: Help me to understand this schematic I found 220V AC to 12V DC - 30A power supply schematic: My question is, where Ib1 current goes (where base pin is connected)? Edit: Here is one more schematic with same strange base pin connection: Edit: Is it same as: ? AI: With no load resistance, no current flows out of the 7812. No current flows in, either, therefore the voltage drop across R7 is almost zero. The bases of all the transistors are held at the same voltage as their collectors, so they do not conduct. As current is drawn by the load, the current out of - and into - the 7812 increases. This causes a voltage to be dropped across R7. As the load current increases (to around 7mA in this case), the voltage across R7 reaches 0.7V, and so the transistors begin to turn on and conduct. Their collectors are always held at the output voltage of the regulator. As the transistors turn on, they start to 'divert' the current drawn by the load away from the regulator. The 7812 does not have to be able to conduct much current at all, as the larger the drop across R7 the harder the transistors are turned on. Eventually an equilibrium is reached, usually with the 7812 only making up around 5% of the current supply. However, this figure depends on values of R1-6 and their ratio to the value of R7, plus the characteristics of the particular transistors.
H: Understanding the DTFT So I am taking a signal processing course in EE and my professor is an Engineer who really likes math however his book which we use for the class falls in the dreadful purgatory of math books in my opinion: too "rigorous" to be intuitive and way too abridged and takes leaps which make it impossible to consider rigorous. It leaves me scratching my head on the chapter on the relationship between z-transforms, Fourier transforms, DTFTs and DFTs. Here are some extracts from the book: Comparing \$V(z)\$ (implicitly meaning the z transform of a sequence say v[n]) with the Laplace transform \$V_s(s)\$ we note that the two transforms are realted by a simple change of variables. In particular letting \$z = e^{Ts}\$ we have: \$V(z)|_{z = e^{Ts}} = V(e^{Ts}) = \sum\limits_{n = - \infty }^{\infty}v_c(nT)e^{-nTs} = V_s(s)\$ (where \$V_s\$ is the Laplace transform of the ideally sampled function-with --fs = 1/T--\$v_c\$ which itself has a Laplace transform) Now this is where he starts losing me: We note that the transformation \$z = e^{Ts}\$ transforms the axis \$s = j\omega\$ into the unit circle : \$z = e^{j\omega t} = e^{j\Omega}\$ where \$\Omega \triangleq \omega T\$ which is the relation between the discrete-time domain angular frequency \$\Omega\$ in radians and the angular frequency of the continuous-time domain frequency \$\omega\$ in radians/s. The vertical line \$s = \sigma_0 + j\omega\$ in the s plane is transformed into a circle \$z = e^{\sigma_0 T } e^{jT\omega}\$ in the z-plane. In fact a pole at \$s = \alpha +j\beta\$ is transformed into a pole \$z = e^{(\alpha + j\beta)T}\$ of radius \$r = e^{\alpha T}\$ and angle \$\Omega = \beta T\$ in the z plane. That last paragraph doesn't mean much to me and I am having a hard time with the following concepts which seem pretty important: What does a discrete-time domain angular frequency stand for? What does he mean by the z plane in that context In the end if we consider transforms as morphism (I absolutely have not enough serious math background to consider morphisms for functional spaces but have some intuition into the concept form isomorphims in abstract LA), does he mean that the substitution \$z = e^{j\omega T}\$ is a morphism from "a sort of functional space resulting from the application of the z transform to sequences " to "a functional space consisting of complex functions defined on the circle?" (sorry if that last bit was cringy for some of you, just trying to get a grasp, thanks) AI: From the last highlighted paragraph: It's perhaps easier to relate a unit delay in the z and s domains; thus \$e^{-sT}\$ delays a continuous signal by \$\small T\$ secs, and \$z^{-1}\$ is the unit delay function in the z-domain, which delays a discrete signal by one sampling increment. Hence \$e^{-sT}\leftrightarrow z^{-1}\$, or \$e^{sT}\leftrightarrow z^{1}=z\$ is often a more convenient form. To go from the s-domain to the frequency domain we use \$s \rightarrow j\omega\$. Using the equivalence in 1., above we may go from the z-domain to frequency domain by: \$\small z\rightarrow e^{st} \rightarrow e^{j\omega T} = cos(\omega T) +j\:sin(\omega T)\$. Now, \$\small \omega T\$ is an angle, which is proportional to \$\small \omega\$, and it's convenient to denote this angle, \$\small \Omega\$, and think of \$\small e^{j\Omega}=cos\:\Omega\:+\:j\:sin\:\Omega\$ as a vector that rotates counter-clockwise from zero radians as frequency increases from \$\small\omega=0\$ rad/sec. Now consider an s-plane root, \$\small s=-\alpha\$. This would transform to a z-plane root: \$\small z \rightarrow e^{-\alpha T}\$, which is real, positive and less than unity in magnitude. Moving on, a complex root in the s-plane: \$\small s=\:-\alpha\:+ j\:\omega\$ transforms to \$\small z \rightarrow e^{-\alpha T\:+ j\:\omega T}=\: e^{-\alpha T}\:\small (cos\:\Omega\:+\:j\:sin\Omega)\$, which is a counter-clockwise rotating vector with radius: \$\small e^{-\alpha T}\$. The conjugate root would rotate clockwise with the same radius. Note that the radius is \$\small \lt 1\$, i.e. the vectors are inside the unit circle.
H: Controller security What is the general approach used by the military to safeguard controllers that fall into enemy hands? Let's say the controller needs to interpret radio / wireless signals to do it's job. But it could be any job I suppose. What approach is used to prevent reverse engineering of the logic that interprets the signals? Or more generally, how can hardware do it's job but not be reverse-engineer-able or susceptible to re-purposing? AI: This all comes down to destructibility of the functional structure. As in break-in prevention for homes, usually the safety of a structure is thought of in effort needed to get in, not "absolute impossibility", since a large army of engineers can always find a way to get around what a couple of them invented as protection. There are several ways to reverse engineer: One is just reading the memory. This one is quite simple and also reasonably easy to protect against. Since a processor or memory device can include encryption for the communication with any other device and a structure that destroys the data when the wrong interfacing is used. Another is cutting open a chip and "looking" at what's inside. You can protect against that through structures of metal and wiring that rip the insides apart when it gets "scalped". Yet another method is using acids or strong bases (chemical kind, not transistor) to dissolve the main package and again looking at it. For this protection is harder, but generally if this is a danger, vital structures are included that are highly susceptible to moisture or other required chemicals, or very strongly chemical resistant layers can be included in the packaging. The last one I can think of, top of my head, is using imaging technologies that look through stuff, such as X-ray diffraction techniques and such. Usually the metal structures used for the "ripping apart" option will scatter and glare so much on many of these techniques that no further action is needed. I'm sure there are more that I haven't ever considered before (because I earn my living by ways other than hacking other people's work), but usually there are many ways of protection against them. But many are expensive and the game of chance of the device falling in the wrong hands and needing those protections is a very strongly balanced one.
H: How do I simplify microcontroller-based prototype into a sensible production-like circuit? First some context: I'm an IT person by trade, and I dabble in electronics as a hobby. I have rather limited experience - apart from some toy circuits I've only made a single "production" quality installation, a lighting system for a display case. On the toy front, I've done some simple Arduino and ARM-driven circuits. In general, I'm not that eager to resort to coding, as this is something I'm already familiar with, and I'd like to learn something new :) Now for the question itself: I'd like to do more practical circuits, similar to the light setup I've mentioned above. Solving practical problems is a great source of motivation for me. Problem is, while I can sort of work out how to implement what I'd like to achieve, I have tremendous problems with picking sensible physical components to put in the final assembly. For example, I have an RF-controlled (433MHz) socket. I got a simple circuit working, with a pushbutton triggering an Arduino to send the right command via RF transmitter to toggle the socket on and off. I'd like to make a permanent "production" version of this circuit now, one that doesn't include a whole big Arduino shield. Heck, probably the AVR itself is an overkill for "press button, pipe 24 bits over RF" solution. Another example: a magnet-triggered LEDs like these. Getting a prototype that uses a reed switch to go from "wave a magnet" to "toggle LED" is simple. Trying to achieve the same effect in a tiny surface of plastic model part sounds next to impossible for me. In short: drawing circuits is all fun and games, but how do I get from "that's a working prototype that has way too many cables and PCBs" to "that's a sensible implementation that's not an overkill and fits within the space allotted"? And without practical experience in this matter, it's hard to get that practical experience - I literally have no idea what kind of simple building blocks I have at my disposal, and what constitutes an overkill. On the other hand, perhaps going with a micro-based solution is cheaper/simple than trying to work out something without a microcontroller just for the sake of it? I guess this question can be condensed to: What do I read on to avoid slapping a microcontroller everywhere? :D AI: You can absolutely attempt to move your design off the prototype platform onto dedicated logic or an analog implementation. This will require redoing much of the work you have already done in a way that you are more unsure about. An MCU does add some small cost (not much) and some headache dealing with programming and testing, but it does gives you a lot of flexibility. Generally though, even small projects can justify the ever shrinking cost of the MCU (and supporting components). You should start by deciding on what from your shields and arduinos that you actually need, combine their schematics and have a decent stab at laying out the PCB yourself. Have it fabricated, test, rinse, repeat. Many arduino shields and the arduino itself have freely available schematics and PCB layouts so there is a lot of example material to go on. This is a decent challenge in itself as well as the trying to figure out how to implement any design changes you may want.
H: Choosing the meshes in a circuit with a given tree I have to use mesh analysis to write down the independent mesh equations. I already did this with the same circuit but with a different tree. Now I have to do it with this tree, and I have no clue how to take the meshes correctly. Can someone give me a hint? AI: The rules are: links = branches not part of the tree (i.e. the cotree) each mesh = closed by taking exactly one link (rest is from the tree) So if you take R1 as link you get the mesh along R1, R2, Uq2. Then if you take R3 as link you get R3, R2, Uq2, Uq1. Finally, if you take Uq3 as link, you get your last mesh which goes around the outer perimeter.
H: Does a boost converter affect the life span of the source battery? Will using a 3 to 5V booster IC affect the power capacity of the battery I use in my circuit? as in, will it consume more power? AI: No, not directly, the battery capacity is a property of the battery. The boost converter is just a device that changes the voltage. What you have to consider is POWER ! Unfortunately battery capacity is often mentioned in Amp-hour, for example 1 Ah means that the battery can deliver 1 Ampere for 1 hour. But it depends on the battery VOLTAGE how much energy that represents ! Obviously a 1 V, 1 Ah battery contains less energy than a 10 V 1 Ah battery. The first is 1 Watt-hour (1 Wh), the second 10 Wh, or 10 times as much energy. But back to your question, note that a boost converter boosts the voltage. Suppose the output of the boost converter provides 5 V and you load it with 0.1 A, so that is: 5 V x 0.1 A = 0.5 W Now let's assume your battery is 4 V Will it be loaded also by 0.1 A ? 4 V x 0.1 A = 0.4 W which is less than 0.5 W, so no this is not correct ! What happens is that the power that goes into the boost converter is about the same as that which comes out (for simplicity I assume the boost converter is 100 % efficient, in practice 90% efficiency is achievable) so there is also 0.5 W going into the boost converter. So your battery is also loaded by 0.5 W so how much current is that ? 0.5 W / 4 V = 0.125 A. Aha ! That current is higher than the current at the output of the boost converter ! So compare the situation that you draw 0.1 A at 4 V from the battery or use a boost converter and draw 0.1 A at 5 V via a boost converter. Both cases 0.1 A BUT more power is consumed in the 5 V case. So that decreases the battery life since you discharge it more quickly ! Battery capacity (how much energy you can extract) also depends on how you load the battery, if you do not load the battery very much you can extract more energy out of it than when you discharge it as quickly as is safe. But this is probably not the effect you were asking about.
H: Conditioning current pulse signals There is an instrument outputting pwm-like current pulse trains proportional to its rotation speed. I convert the output current pulses to voltage pulses by a shunt resistor to be read by a DAQ hardware. Pulses are sampled with 12kHz. The software detects the rising edges and calculates the frequency for each pulse. Above on the left figure is what I see from the output of the instrument. P is the period, T is the pulse duration. Whatever the rotational speed the pulse duration T remains the same around 80us-120us(between 80 and 120 microseconds). Period P can be between 330us up to 2000us. I have two questions: 1- As shown in the right side of the above figure, I want to convert these pwm-like pulses to sharper ones. What kind of op-amp configuration would you suggest for this application. 2- Since the frequency is counted between the rising edges what should be the sampling rate? My guess is 2*(1000000/80) = 25kHz. Would you agree? 3- If I cannot reach up to that sampling rate is there work around for lower sampling rates? AI: To add to Rodions answer, here is a circuit that uses a comparator instead of an opamp. It's built around the very cheap and popular LM311: R1 and R2 form a voltage divider which set the threshold voltage. R5 gives a bit of hysteresis by providing positive feedback. That makes sure that even if there is a bit of noise riding on your input signal you'll get clean rising and falling edges. V+ is your supply voltage. Can be anything between 5V and 15V. Vio is the voltage expected at your DAQ hardware or micro-controller. Can by anything between 3V and Vio. This circuit is good enough for frequencies up to 500khz or so.
H: Should a Computer Science student learn FPGA I'm a Computer Science student, I know CS is more about algorithms, Theory of computing, Data structures, Artificial intelligence, etc. But I think CS student must also have a basic understanding of Hardware design. Recently I'm taking VLSI course and I got some interest in Hardware design. So, I was thinking to learn about FGPA's so that I can have a more better understanding of hardware. Can anybody guide me here ... Should I learn or it is for students belonging to Electronics major. AI: If you find the area interesting I would encourage you to go ahead. I don't think it will hurt to have an understanding of how hardware works and if you enjoy it you may even be able to make a career out of taking algorithms and turning them into synthisisable VHDL/verilog code.
H: What happens if the primary and secondary side of a transformer are short circuited mistakenly? I have described the condition in the transformer picture I have attached. Will the transformer still function in this condition? AI: If the primary and secondary turns are identical (i.e. a 1:1 turns ratio) then the transformer will continue to function but of course it won't isolate any more because you've bypassed the isolation. Consider taking two long wires and wrapping them round a transformer core many times. As a pair they can be shorted together at the ends and this just forms a single winding. If they are open circuited the AC on one winding produces exactly the same AC voltage on the other and so clearly they can be connected together as per your diagram. Any other turns ratio and the thing will smoke.