text
stringlengths
83
79.5k
H: MOSFET started to smoke when switching a 12V bulb - how can I troubleshoot the cause? This is the case: 12V bench power supply (current limited to 3A) wired to a 30W LED bulb (H7 bulb for vehicles), controlled by an Arduino via the gate of the 2SK1363. The signal from the Arduino was sent to the gate by a pushbutton, it was a simple sequence of flashing the LED on and off quickly, 20 times in a 2 seconds or so. Also, the default initial state of the LED was controlled by the code as well, with digitalWrite high or low. This would put the bulb in a "solid state", on or off, and then the pushbutton would initiate fast flashing for 2 seconds. I used INPUT_PULLUP on the pushbutton pin and everything worked fine but the MOSFET got very hot, and after running the pushbutton flashing on the LED for couple of times in a row, it started to smoke. I'm a newbie and the only rating I asked for when buying this mosfet was "N-type" and "gate threshold 5V" because of the Arduino. I later discovered that my particular MOSFET has an Rds rating of 1.4 ohm. When working with my 2.5A bulb it rounds up to 9W, but on the spec sheet I see that "Maximum Power Dissipation" (Pd) is 90 W. Can someone enlighten me and point me in the correct direction for me to learn proper way of working with MOSFETs? Why did my MOSFET smoke? How can I pick a proper one for my application? What things should I consider? AI: The 2SK1363 is a fairly inappropriate choice for this application. Look at \$R_{DS(ON)}\$ for instance: - You have a 30 watt 12 volt lamp and it will try and take 2.5 amps. That current through a fully-activated 2SK1363 means a power dissipation in the MOSFET of 6.875 watts (this is based on typical \$R_{DS(ON)}\$ = 1.1 Ω). That would need a heatsink for sure. But it's going to be worse than this because to adequately turn on the MOSFET you need a gate drive of at least 10 volts: - Pick a MOSFET that has a much lower \$R_{DS(ON)}\$ that can be achieved with logic level signals appropriate to the Arduino you are using. For instance, the IRFZ44 (a long-standing favourite of mine) has this useful graph in its data sheet: - With a gate-source drive level of 4.5 volts and a load current of 2.5 amps, the IRFZ44 will "drop" about 170 mV. That's a power dissipation of 2.5 x 0.17 = 0.425 watts and more appropriate for something like this however, I'd still try and find something that is a tad better because these are typical values.
H: Are BLDC motors permanent magnet motors also? I have to buy a BLDC motor and I was expecting it to be a permanent magnet motor and also when I read on internet link Where it was mentioned that BLDC motor are permanent magnet motor. But when I contacted the seller if it is a permanent magnet motor or not they said it is BLDC motor not a permanent magnet motor. I would like to know which between the two is correct. AI: BLDC motors have permanent magnets, but they are usually not called permanent magnet motors to avoid confusion with permanent magnet motors that have brushes and commutators. You should ask the question of the seller in a different way. Ask the seller what kind of magnets it has.
H: How to fix this VHDL error I am getting an error in my VHDL code. It says "[Synth 8-27] else clause after check for clock not supported". Why is this? Below is the code: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use work.Data_Sizes_Package.ALL; entity Encoder_Counter is Port (Count_Input_A, Count_Input_B : in std_logic; Reset_Counter : in std_logic; Counter_Value : out std_logic_vector(Data_width-1 downto 0) ); end Encoder_Counter; architecture Behavioral of Encoder_Counter is signal Counter_Value_Temp : std_logic_vector(Data_width-1 downto 0) := (others => '0'); begin Counter_Value <= Counter_Value_Temp; Process (Count_Input_A, Count_Input_B, Reset_Counter) begin if(rising_edge(Reset_Counter)) then Counter_Value_Temp <= (others => '0'); elsif(rising_edge(Count_Input_A)) then Counter_Value_Temp <= Counter_Value_Temp + 1; elsif(rising_edge(Count_Input_B)) then Counter_Value_Temp <= Counter_Value_Temp + 1; end if; end Process; end Behavioral; AI: Your synthesis tool does not support multiple-clock registers. Your code describes multiple clock registers. That can't work.
H: How can a ring oscillator work without burning? I built this ring oscillator and it works fine. After a while I wondered how can it work without breaking. I am powering it with 5 volts so at start let's say capacitor is charged with 0 volts and a blue node is at 0V. So capacitor starts to charge via R1. When it reaches Vih min (~3.2 V) for IC2A the voltage level is flipped (so voltage at blue node will become high) and now is a red node at Voh + Vih (5 + 3.2 = 8.2 V) which is much higher than allowed from datasheet. This voltage is connected via R2 to input pin. I've used this oscillator for maybe a year now and it's working fine. The IC is an SN74HC00N. What I am missing? AI: red node at Voh + Vih (5 + 3.2 = 8.2 V) which is much higher than allowed from datasheet. Resistors R1 and R2 restrict the current that can flow into the TTL output and input nodes. It won't burn. Input current is limited to much lower than the 1 mA limit specified in the data sheet. It can't happen. I mean, why else would R2 be present. The internal protection diodes are perfectly adequate with such a small current injection.
H: Why would you protect a 120-277 LED driver with a fuse that is 600V rated Sorry about the silly question but is there a reason why you would want to protect a 120-277V LED driver with a fuse that is 600V rated? Does that really protect the device/driver? AI: The voltage rating is only a maximum rating for the fusing device. It has no effect on the functionality of the circuit. The fusing device can operate as specified up to 600 volts but may be used at any voltage lower than that. The relevant rating on the fuse for device protection is the Amperage.
H: Placeholder capacitor I've seen in many reference designs capacitors that were referred to as "placeholder" capacitors. what are these capacitors exactly needed for? for example, in DDR4 SODIMM Design: AI: Sometimes it is cheaper to draw a place for a capacitor and not mount it, so it can be populated later if necessary. It can be far more expensive to not draw a place for a capacitor and find out later that is is necessary.
H: Autodesk EAGLE: PCB layout lost when copying from schematic On one panel, I'd like to have 4x4 'boards' that are all the same. When I copy the respective 'group' in EAGLE, I am losing the placement of the components with respect to each other in the PCB layout. How can I fix that? AI: Because each new group you create (by copying), renumbers the parts in the new group, your software will not recognize that the old PCB copper patterns you created for the original parts have any relationship with the new renumbered parts. Net names will also change and basically you can't expect your software to read your mind. If you want to have multiple versions of the same board you should probably edit the Gerber files or use your PCB fabrication house to do this task.
H: Why does LM324 Op-amp send out max voltage when I got 0V at the non inverter input? I have this circuit. The goal is that it going to control the current loop by using the NPN-transistor. My problem here is that 0V results that the output from the Op-amp is near 24V. Why? If I'm increasing the voltage a little bit, then I got this. And even better, If I implement a schottky diode, then I got this. So why does the output goes to near 24V when the non inverting input is 0V? AI: It looks OK in my simulator: - 0 volts in produces near enough 0 volts out (well, 7.847 μV) with a drive level from the LM324 of around 200 mV. If I increase V1 to 100 mV, it all makes sense too: - I suspect that Falstad (is that your sim?) is having problems (after all, it's pretty much a toy when it comes to sim tools) but, importantly, the LM324 will never have problems with inputs or outputs close to 0 volts because it was designed to encompass the negative supply rail, especially so the inputs.
H: Solving nodal analysis equations using matrices- gives a full rank matrix I am trying to solve for node voltages in a circuit using nodal analysis. I am using the fact that the sum of the currents into each node must equal 0. I have a system of equations which can be represented in matrix form as [G][V] = [0] where [G] is the conductance matrix, [V] is a column vector of node voltages and [0] is a column vector of 0s. I already know one of these node voltages since it is the value of the voltage source and I have been able to find a solution by rearranging the equations in terms of this known source voltage so the RHS is no longer 0. However what I do not understand is why I am able to find a unique solution in the first place. The conductance matrix found is full-rank and therefore by the rank-nullity theorem, surely the only solution should be a vector of 0s. Am I misunderstanding something? AI: The schematic: simulate this circuit – Schematic created using CircuitLab The nodal equations: $$\begin{array}{ccccl} V_0\cdot \left(G_0+G_{01}\right)&-V_1\cdot G_{01}&+V_2\cdot 0&=I\\ -V_0\cdot G_{01}&+V_1\cdot \left(G_{01}+G_1+G_{12}\right) &+ V_2\cdot G_{12}&=0\:\text{A}\\ V_0\cdot 0 &-V_1\cdot G_{12} &+V_2\cdot \left(G_{12}+G_2\right) &= 0\:\text{A} \end{array}$$ Their equivalent in matrix form: $$\left[\begin{smallmatrix} G_0+G_{01}&-G_{01}&0\\ -G_{01} &G_{01}+G_1+G_{12}&-G_{12}\\ 0 &-G_{12} & G_{12}+G_2 \end{smallmatrix}\right]\left[\begin{smallmatrix}V_0\\V_1\\V_2\end{smallmatrix}\right]=\left[\begin{smallmatrix}I\\0\:\text{A}\\0\:\text{A}\end{smallmatrix}\right]$$ Since \$V_0=V\$ and is known (or else \$I\$ is known and \$V\$ isn't known), you have a consistent, unique solution. You should be able to easily spot your error.
H: Surprise resistors found in old voltage divider I'm a grad student in physics that hasn't looked at circuits since early in my undergrad. I was recently handed a voltage divider that my group used to bias a micro-channel plate detector stack as I'll need to build a new one for a new system. What I'm confused about is the purpose of some surprise resistors (R1 and R4 on the included schematic) as I don't understand why they would need to be included. Any insight would be much appreciated as the person who built this graduated 8 years ago. As for the bit with the capacitors in the bottom right along with the output labeled 'Sig', that was to read the bias off of the rear micro-channel plate capacitively to provide timing information on a detector event. R1=1Mohm R2=4Mohm R3=470kohm R4=150kohm All capacitors are 4.7uF Vin is a DC voltage that was biased at -2.5kV. A microchannel plate detector is a radiation detector with many small channels typically constructed out of a lead glass that function as an electron multiplier. When an incident ion/electron strikes the wall of a channel, it kicks up secondary electrons. Those electrons then hit the wall further down the channel leading to a multiplicative avalanche of electrons that produces a readable voltage pulse on the anode. The resistance across the plate/plates is in the 10^9 ohm range, so as far as I understand it, the resistance of the load between each node (Vfront> Vback>Vanode) is approximately that much. AI: Looks similar to a PMT (photomultiplier tube) circuit with a series of dynodes attached to a voltage divider. Image from here
H: Will diode be turned on? Assuming we have this circuit: simulate this circuit – Schematic created using CircuitLab Assuming D1 is a silicon diode and D3 is a germanium diode,Will D1 be turned on so the VAB = Vfd1 or not? I know that if we didnt have the resistor D1 would not turn on but now i am unsure.I also know that if we had a resistor ,with a smaller resistance than R1, in series with D1 both would turn on. [] I assumed that D1 conducts and found the current 0.003A.But I assumed D1 conducts it may not what should I do from here? AI: I assumed that D1 conducts and found the current 0.003A.But I assumed D1 conducts it may not what should I do from here? If you are using an "on/off" model of diode conduction (as opposed to an exponential current/voltage relationship) and you have calculated all the voltages and currents in the circuit assuming all the diodes conduct, and for every node in your circuit, the sum of all currents entering that node is equal to the sum of all the currents leaving that node, the (conventional) current through each diode flows from positive to negative then you are done. For example if you have this circuit: simulate this circuit – Schematic created using CircuitLab and you assume that there is 0.7V across D1, and you calculate that the currents through the components are \$I_{R1} = 20\$ mA \$I_{R2} = 7\$ mA \$I_{R3} = 13\$ mA (which is positive) and the voltages across components are \$V_{R1} = 2\$ V \$V_{R2} = 0.7\$ V \$V_{D1} = 0.7\$ V And the sum of voltages around any loop is 0, and the algebraic sum of currents into any node is 0 and the (conventional) current through the diode D1 is from positive to negative. So you are done. However, suppose you are analyzing the following circuit simulate this circuit And you calculate as follows: D1 has a drop of 0.7V R2 is in parallel with D1, so it also has a drop of 0.7V R1 has a voltage drop of V1 - \$V_{D1}\$ = 2.7 - 0.7 = 2V R1 has a current of \$\frac{2V}{440\Omega} = \$ 4.545 mA R2 has a current of \$\frac{0.7V}{100\Omega} = \$ 7 mA D1 has a current of \$I_{R1} - I_{R2} = 4.545-7 = -2.455\$ mA Then you would see that the (conventional) current in D1 is flowing from the negative to the positive. So, the assumption that D1 conducting is invalid, and you need to recalculate the voltages and currents in the circuit using the assumption that D1 is not conducting. Now, it is possible that you calculated the voltages and currents in the circuit in a different way that presented here. Calculating in a different way may result in different values. However, in the end, the signal that the diode is not conducting is one of the following. the algebraic sum of voltages around a loop is not 0 the algebraic sum of currents into a node is not 0 the (conventional) current through the diode is from negative to positive Any of these conditions signify that the assumption about the diode is incorrect.
H: How to feed reference voltage for two op amps inputs with different input signal each one Im building a Stereo Buffer and a Baxandall circuit together. In powering the circuit with a single supply of 9v, and i need to bias each four inputs with 4.5 volts. The question is: If i feed the four inputs with the same reference voltage line will a have problems with the signals that are different. Into the buffer the signal is the IN signal, but in the Baxandall input the signal is the output buffer. But if i used the same voltage reference i suposed that im going to have a mix of both inputs signals in the baxandall, im right? How i can fixed that thing? Thank you for your answer! AI: Let's fix a few other things first. Figure 1. GND symbols should point down to the ground, not to the sky. The upward arrow is often used to signify connection to VCC so it risks confusion. You've AC decoupled in the wrong place move C2 from here to (3). As wired here the pot is pulling your VCC/2 reference to ground. Consider what happens when you move the wiper to the top of the pot. Swap R10 and R11 and your VCC and GND will be the right way up with higher voltages higher on the page and current flowing from top to bottom. See (4). We'll also fix the pot orientation. simulate this circuit – Schematic created using CircuitLab Figure 2. The modified circuit. The pot is the right way up. Moving the wiper up will raise the volume. The pot GND (and all the others) are pointing down. C1 is positioned after the volume control wiper. This prevents the pot wiper affecting the non-inverting bias. If you're worried about DC coming in on the audio signal you can add another capacitor on the input. OA2 provides a "stiff" buffer for the VCC/2 mid-rail supply. C2 keeps the voltage steady even if VCC has some noise on it. R4, 5, 6 & 7 provide the bias to the other four op-amps. OA2's output is stable and low impedance so the audio signals on the other op-amps don't interfere. I realise I've set these resistors to 10k which may load the audio signal a bit too much. 100k or more should be fine. If you're interested in developing your skills have a read of Rules and guidelines for drawing good schematics. Have fun!
H: Phototransistors in parallel We are trying to hook up phototransistors in parallel so we can sum the output currents and put it over a resistor to get an output voltage. When we do this, the first phototransistor (closest to the voltage source) seems to be greatly affecting the output voltage, and the others are negligible We are sending 3.1v to the phototransistors in parallel. What can we change so that each phototransistor will equally affect the output voltage? AI: The problem is that the first transistor to be illuminated brings the output voltage too close to the supply, it is not possible for the output voltage to go higher than that so the second and subsequent transistors cannot raise the voltage any higher. If you reduce the value of the 500k resistor so that a single transistor produces a small voltage much less than the supply (say 500mV) illumination on additional transistors will increase the voltage by the same amount. It could be done more accurately if the combined signal from the photo-transistors is fed into a trans-impedance amplifier instead of using the output directly. The voltage across the photo-transistors would not depend upon the illumination. The output will depend upon the strength of illumination. If you want to avoid that one way would be to separate the four transistors to provide a digital signal then process the signals digitally, maybe using a microcontroller or by adding the digital signals in ana analog fashon.
H: Has anybody used STM32F417IG microcontroller with 1.8V input supply? https://www.st.com/resource/en/datasheet/dm00035129.pdf Currently, I am using STM32F417IG with a 3.3V supply. If I want to use a microcontroller with a 1.8V supply to avoid level translators in the new design. Is there anything I should consider if I change the supply voltage to 1.8V from 3.3V? If anybody has used stm32 with 1.8V as an input supply. Please help me with this. Thank you AI: You should read the datasheet carefully, and consider all elements in your system. Programming flash requires 2.7V min. Some of the analog-ish functions may not work as well or at all. Operation at a restricted temperature range allows a bit more voltage margin on the low side. The core works off an internal regulator that is something like 1.2 so it is not affected. But everything you connect to the I/O will need to work with 1.8V or have a voltage translator. Driving a blue or white LED directly becomes an issue. Not many MOSFETs are characterized for 1.8V drive. GPIO output drive current is not guaranteed for Vdd < 2.7V. Maximum IO frequency such as SPI is reduced. You want guarantees at 1.7V or so to allow some tolerance on 1.8V. USB ... I don't think that part has a Vddusb pin (which would need 2.7V). The 12-bit ADC (and other aspects of analog functions): VDD/VDDA minimum value of 1.7 V is obtained when the device operates in reduced temperature range, and with the use of an external power supply supervisor (refer to Section : Internal reset OFF). If it's only guaranteed to work at 1.8V and your 1.8V nominal regulator happens to output 1.75V then functionality is not guaranteed for some parts of the chip, so the reduced temperature range is probably a must if you're using those functions. None of these things are necessarily show-stoppers, just a fair bit of due diligence is necessary, and only you can do that.
H: 6.6kV digital isolator pad clearance I was wondering about digital isolators. I have some temperature sensors installed inside the windings of a 6.6kV motor. I would like for my system to not be completely destroyed in case of a short. For instance, the Si86xxT isolators from Silicon Labs. They offer 5kVrms isolation for up to 1 second. But how about clearance between the uncoated pads/leads? According to this calculator I have seen used in other answers, about 33mm of clearance between the pins is needed. But the wide body package of the Si86xxT devices do not even offer half that (~7.5mm). How do you protect your device for longer than 1 second? I had thought about fuses on both input lines but this does not sound ideal, you can't be sure the fuses would blow fast enough. How can they claim such a high isolation voltage if the clearance is not large enough? AI: Take a look at UL60950 norm. There's a table that answers your question. Clearance depends also on the pollution class of the environment where your board will work in. There are 3 classes, where 3 is the most polluted environment.
H: AVR Atmel MCUs with 12bit ADC and ArduinoIDE support I am searching for more powerful MCUs than the ATMEGA1284p that I am currently using, in particular I want to have better ADCs and switch from 10 to 12bit resolution. My constraints are the following: 12bit ADC Low-power during sleep Available Arduino bootloader ArduinoIDE support but I guess that is the saame as an available Arduino Bootloader AI: Any of the STM32 Nucleo range should provide exactly what you want. The cheapest option the Nucleo f030r8 blows the atmega1284p out of the water in regards to memory, speed and peripherals. It is supported by the Arduino IDE, supports the majority of shields and has a 12bit ADC.
H: Can I operate 2 electromagnetic locks using the same power supply? I'm using this power supply: Specs: Input Voltage: AC90V-AC260V 50-60HZ Output Voltage: DC12V Momentary Current: 3A/5A Persistent Current: 3.5A To operate my electromagnetic lock situated on the top edge of the door. Specs: Holding force: 180kg(350lbs) Voltage: DC 12V Current: 380-430mA Working temperature: -10 to 55 Celsius degree (14 to 131 Fahrenheit degree) Humidity: 0 to 95% Working mode: power-on to lock Everything works fine except that my door is aluminum and it's flexible. I want to connect a 2nd electromagnetic lock on the side of the door to make sure it's really locked. Can I use the same power line connecting the first lock to also connect the 2nd lock or is it "depleting" the power supply output? Thanks. AI: Two mag-locks wired in parallel will draw a max of 430 × 2 = 860 mA = 0.86 A. Your power supply has a rating of 3 A minimum continuous. You'll be running the power supply at 25% of rated power. It will be fine.
H: Shunt resistor after MOSFET and op amp to amplify voltage I'm trying to figurate out how to measure current in circuit. I have idea to use shunt resistor but after connecting op amp on shunt I have some unpredicted measurements on output of op amp. I want to measure amps of leds. Is this good idea to measure current? I can control led intensity with pwm that works fine and I can measure small voltage on shunt and after using Omh law I got current in circuit and I want to amplify that voltage because MCU need to read voltage. Is voltage on shunt dc or we have there some ripples which can look likes sin(pwm) signals? Here is schematic: Any idea and comment is welcomed AI: Is this good idea to measure current? It's an acceptable way to measure current but remember that the current will be pulsed (due to the PWM) and some form of filtering may be required if you want to measure average current. If you want to measure peak current then that requires some form of synchronous measurement but, the basic front end op-amp circuit remains the same. However, I would suggest a couple of things as per this modified diagram: - The filter capacitor should be used if you want the average current taken by the load: \$C = \frac{1}{2\pi R F_C}\$ where Fc is the cut-off frequency required and R is the red resistor value. Add an op-amp protection resistor in case your MOSFET went short circuit or the peak voltage exceeded 3.3 volts (shunt going open). It should be in the realm of 10 kΩ. Make sure your measurement connections to the shunt resistor are very short (blue wires above). Make sure your op-amp is capable of working with input voltages at 0 volts and that the output from your op-amp can reach close to the 0 volt rail. Current range is 0.2-1.4 Amp and LM358 With 0.2 amps and an 85 mΩ shunt, the voltage is 17 mV and the expected voltage on the op-amp output is 34 mV - this should be OK with the LM358.
H: Registered signal and Fmax in Timing Analyzer from Quartus II I have the following module that is a simple register: module linear_out ( input clock, input resetn, input [31:0] x, output reg [31:0] y ); always @(posedge clock) if (!resetn) y <= 32'h00000000; else y <= x; endmodule When I synthetize it with Quartus II and I check the fmax in Timing Analyzer from Quartus II, the fmax advice that: No paths to report, but the output is registered... If instead of set only one register, I set two, the fmax already shows a value. But, I don't get it: Why is it? Is it neccesary set 2 or more clock cycles to get a syntetyzable design with a known fmax? AI: That isn't a shift register, it's just a register. The only flip-flops are the 32 that implement the register y, and all of their inputs and outputs go directly to I/O pins. Since there are no paths that go from one flip-flop to another, the timing analyzer can't compute the minimum time required for a clock period. If your module had a mode in which it computed, say, y <= {y[30:0], x[0]};, then you'd have a shift register, and such paths would exist, allowing the computation of the minimum clock period and the corresponding \$F_{max}\$.
H: What happens when the motor torque is constant and the load torque suddenly decreases? It is a situation where the load torque (Ta) suddenly decreases while rotating the shaft with a motor(PMSM) at a constant motor torque (Tm). In my opinion, the rotational speed of the shaft (I-moment of inertia) and motor will be instantaneously increased by the torque difference, and then more power is consumed in proportion to the shaft speed, right? Tm - Ta = I*wdot before load decrease : Power = Tm * w After load decrease : Power = Tm * (w + wdot * dt) AI: The rotor will accelerate over a very short period of time but after that it should remain in synchronous speed. In effect, the position of the rotor magnet relative to the rotating magnetic field will reduce by a few degrees of angle. That reduction reduces the forces that rotate the rotor and equilibrium then takes over.
H: Current values after power factor correction I am a student tasked with correcting the power factor of an RC circuit to unity with a parallel inductor... Vrms = 240V, 50Hz R = 12ohm C = 220uF. I have calculated the inductor value by calculating the reactive power. I simulated the circuit and the voltage and current are now in phase so I am happy it is correct. Before the power factor was corrected the current waveform had a peak of 18A and a negative peak of -18A. As can be seen in the image the current waveform now has a peak of 25.42A and a negative peak of 2.37A, with an rms value of 16.07A. I just don't understand how these values are correct for the current. Can anybody explain why they are. AI: Instead of beginning the transient analysis with a sinewave at 0°, try driving it with a cosine wave that begins at 90°. In this way, you automatically cause the inductor current to begin rising through zero and you won't need to wait for the circuit to settle down: - Of course this then puts emphasis on the capacitor conducting current and you might find a happy medium around 45°. Try it and see.
H: Understanding driving a relay with a transistor For an embedded application, I'd like to drive a relay using a transistor. At the moment I'm experimenting with a BC547, but only because I've still got some of them lying around. The transistor I am using is rated at a max of 100mA continuous for the collector (or collector-emitter) current (if I exceed that it gets really hot and would eventually get destroyed, I guess). A typical relay that I'd probably use would have a coil resistance of e.g. 225 Ω and a nominal switching current of 53 mA at 12 V (I'd opt to use a 12 V relay, because I already have 3.3 V and 12 V in my circuit). I'd guess that the nominal switching current simply equates to the voltage devided by the resistance, am I right? Hence I assume that it would be safe driving the relay with the transistor, because the current should not exceed the 53 mV, which is well below the maximum current the transistor can bear. Am I correct? (I am aware that the description only holds for the static state when the relay is shut. I do know that there will be spikes induced by the coil when the relay switches, that have to be buffered using a diode.) AI: Your calculations make sense. You should also calculate the transistor's power dissipation to make sure it doesn't overheat. Note that when the relay is on, the voltage across the transistor is only about 0.2V (this is a typical number for silicon transistors), not the full 12V - the remainder is across the relay. The power dissipation should be about 0.2V x 0.053A = 0.0106W. I would expect that to be just fine without a heatsink, but if you want, you can calculate the temperature the transistor will reach, based on the thermal resistance specified in the datasheet. (Note that the relay only gets 11.8V across it, not 12V, so the current is slightly lower than 53mA, but it's such a small difference, 53mA is good enough for this calculation) This assumes the dissipation from base current (which controls the transistor) is much less than the dissipation from the collector current (which goes through the relay). If your base resistor is way too low, it could dissipate extra power in the base. If your base resistor is way too high, the transistor might not turn fully on, and the voltage across it might be more than 0.2V, which also increases power dissipation in the transistor.
H: Choosing the shunt resistor value and capacitor for op-amp integrator based on input resistance and DC gain I think it's option C based on C = 1/R and the R2 as 10 times R1 but apparently the answer is option A. Please tell me where i'm going wrong. The full question reads The following figure shows opamp-based integrator circuit. If this circuit were to integrate a symmetrical pulse waveform ... AI: The DC gain requirement (ignore the capacitor) requires the shunt resistor to be 1M for a DC gain of -100. The capacitor is found from half the waveform (100us) times a rule of thumb multiplier of 5 to 10, and we will use 10, for a time constant of 1ms= R1*C.
H: PIC18F4550 : How to convert 16 bits integer to two 8 bits chars in C? I'm blocked because of an issue that is causing a lot of time loss. I've created a function to get the LSB and another one to get the MSB. char get_LSB (int n){ unsigned char lsb = (unsigned)n & 0xFF; // mask the lower 8 bits return lsb; } char get_MSB (int n){ unsigned char msb = ((unsigned)n >> 8 );// shift the higher 8 bits return msb; } It doesn't work as when I call the function get_LSB or get_MSB I get a result different from what I expected. Let's check the following example: void main() { TRSISC = 0x00; PORTC = get_LSB(100);// function should return 100 but returns 68 Delay_ms(5000); PORTC = get_MSB(360); // should return 1 but returns 0 } AI: Try these: unsigned char get_LSB (int n) { unsigned char lsb = (unsigned char) (n & 0xFF); // mask the lower 8 bits return lsb; } unsigned char get_MSB (int n) { unsigned char msb = (unsigned char) (n >> 8);// shift the higher 8 bits return msb; }
H: How to make sure my motor will not start spinning on power up in case the throttle (POT) was not at a 0 position? I am trying to make sure my motor which is connected to my controller circuit would not just start spinning when you first apply power to it as if the Potentiometer is left high before the battery is connected it could be dangerous. here is my code.... and it works on power up, so if the POT is if left high when you first power up the circuit the motor does not spin you must turn the pot all the way down to zero and than it will start working which is what I want, however, the issue here is for some reason when I Increase the duty cycle using the pot the motor stops completely and I would have to zero the pot again, this happens over and over again unless I remove the while loop which reads the pot value, how can I fix this? void main(void) { unsigned char start=0; while (1) { while (ADCRead()==0) { start=1; } CCPR5L= ADCRead()>>2; // Function call for PWM if (start && PORTAbits.RA3) { commutation180anti(); } else { start=0; } } } AI: Maybe this: void main(void) { while (ADCRead()!=0) { // think about putting a short sleep here } while (1) { CCPR5L= ADCRead()>>2; // Function call for PWM if (PORTAbits.RA3) { commutation180anti(); } } } This code is supposed to wait for the ADC result to go to zero before doing anything else.
H: use MOSFET as a switch in saturation region According to this data sheet at 6v GATE voltage , the saturation drain current is about 1.25A. now I want to switch a device (say a tiny motor) which demands 1.25 A at 2volts , Indicating the resistance 1.6 ohms. now I am supplying the drain source voltage 4 volts.(as usual the motor and the MOSFET is in series) which means the mosfet is saturated , and capable of supplying 1.25A , now the question is , usually we are advised to use ohmic region to switch, but how about this? won't this switch work? the schematic is here : AI: but how about this? won't this switch work? It will work (for a short period of time) but, the MOSFET will be dissipating about 3.2 volts x 1.25 amps = 4 watts. You'll need a heatsink and this is quite wasteful of power. However, the MOSFET you linked is a 2N7000 and, a heatsink is out of the question hence it will burn in a few seconds: - What you should be doing is choosing a MOSFET with much much lower on resistance and providing a supply of 2 volts.
H: Dual Power Supply for single 10m LED Strip Run This is my first time here so sorry for any wrong formatting. I am currently creating a project where I will run my wall with 10 meters of addressable LED strip (Made up of 2 x 5 meters rolls). I have two 20 amp, 5 V power supply for the project. After calculating 60 LEDs/meter at 5 V it would consume around 18.8 W/meter meaning that at 10 meters it would be 188 W, 5 V = 37.6 amps. I searched a lot but don't have the necessary understanding of electrical engineering to safely conclude what I am going to do. Below I made up two different scenarios which I could wire up, my two questions are: Are my scenarios safe? / Would they work? Is there any recommendations or changes to my schematic? To control the addressable LEDs I am using a microcontroller board called NodeMCU, which would acquire 5 V from the power supply and send the data signal through the LEDs. Case 1 For the first case I would have each power supply connecting at one end of the strip and both strips connected together in the middle for power and data, meaning I would not have any voltage drops. The NodeMCU would acquire 5V from the first power supply and send data through one end. Case 2 Case 2 is similar to Case 1 but the only difference is that there wouldn't be a connection between both strips and the NodeMCU would transmit data at both ends otherwise one strip wouldn't receive data. I appreciate any opinions and suggestions to my schematic, thank you! AI: Are my scenarios safe? / Would they work? No the first one is not safe Yes the could work under ideal conditions, if the supplies were balanced and the strip were balanced and the cables were balanced then this could work. This balancing is probably not possible in real world conditions. What is more likely to happen is this: Any difference in voltage will manafest itself as large currents, lets say the led strip was 1Ω across the strip, an 0.1V difference would generate 1Ω/0.1V = 100mA of current that would be wasted as heat in the cable. Many supplies are not matched and are less than 0.1V (especially cheap ones). An 0.5 difference could be 500mA and so on. The current could be so large it could burn out a cable or the traces on the LED strip. Case 2 is probably OK, but you will also need to ground both supplies together, otherwise the digital of the 2nd supply will have no reference and no way for the return current to get back to the NodeMCU. You may also want to consider a buffer IC to digitally buffer the digital from the NodeMCU, check the fanout on the LED strips. If they pull too much current on the digital pins than the NodeMCU GPIO's can source then you will need a buffer.
H: Why do some motors have both 50Hz and 60Hz on their nameplate, and some do not? I have seen some induction motors have information on their nameplate listed for 50hz and 60hz. While I've read a requirement that the Voltage/Frequency ratio be consistent, using these nameplate numbers you can come up with examples like 380V/50Hz = 7.6, and 440V/60Hz = 7.33. These are not the same. Are they close enough that it doesn't matter? Does this mean all induction motors can be run in either frequency? All 3 phase induction motors can be run at either frequency? Only motors designed used in at both frequencies? Edit: I see the nameplates. I'd just like to have an idea of why - I'll take any direction you can point me in. Did marketing de-rate these motors so they can run slow enough or cool enough at either frequency? Did accounting let them use better materials? Do I need to take a graduate level FEM course in order to understand, and I'm asking the equivalent of how to measure the current across and the voltage through? AI: The volts/hertz ratio must be constant within some limit. Only the manufacturer can state that limit. Some manufacturers mark something on the nameplate like 380/440 V 50/60 Hz. That is 7.67/7.33 V/Hz or 7.5 V/Hz +/-1.7%. Marking it on the nameplate is essentially the manufacturer's guarantee that is ok for that particular motor. It is likely that you can operate motors marked only with one frequency or the other at something within a couple of percent of the same V/Hz. There is probably not much risk in doing that, particularly if the motor is not running at rated torque 24/7. With constant V/Hz, an induction motor should be capable of operating at rated torque over a range of speeds while drawing rated current.
H: Two stage amplifier, low gain at high frequencies When I simulate one stage amplifier it is capable of amplifying to a much higher frequency than a two stage amplifier. I added a 100 ohm resistor to reduce the gain of the two stage amplifier so both the gain curves could fit in one graph, but you get my point. The two stage amplifier is dying much earlier than the single stage. Why is that? Can I prevent this? AI: Your first stage has a comparatively high output impedance (approximately 470 Ohms) relative to your 1V AC source resistance, which is presumably quite small. This resistance is seen as an effective source resistance to your second stage. The 470 Ohm resistance acts together with the capacitance of Q8 between the base and the collector to form a low-pass filter at the input of Q8. Due to the Miller Effect, this capacitance is effectively amplified by the gain of your second stage....which is around 90 or so. That is, the capacitance looks like a capacitor about 90 times larger than the actual base-collector capacitance, connected between the Q8 base and ground (the Miller Effect). According to the BC817-40 datasheet, this capacitance is about 10pF. The effective capacitance seen at the input of Q8 is therefore around 900pF, so your 3dB rolloff will occur around \$f_{3dB} =\frac{1}{2\pi RC} = \frac{1}{2\pi\cdot 470 \cdot 900 \cdot 10^{-12}} = 380 \text{kHz}\$. From your graph, this looks about right. A good solution is to use a Cascode configuration on your second stage to keep the Q8 collector at a steady voltage, circumventing the Miller Effect.
H: Build a circuit to modify a printer's power supply Can I in anyway build a simple circuit that would change the printers power supply to be able to power the printer in the photo? I want to convert a 22V 455mA power supply output to 16V 500mA output to power the printer. How can I do it, and what components will I be needing? AI: Its appeaars that the printer requires two power supplies - 32 V at up to 375 mA, and 16 V at up to 500 mA, for a maximum power consumption of 20 Watts. The HP supply you show is only rated for 10 Watts, so would be insufficent to power the printer. It would also be impractical to modify it to provide the two voltages the printer requires, even if it could produce the required power.
H: minimum C rate of battery cells What is the minimum C rating for li-ion battery cells? I am trying to charge 3.7V 10Ah battery pack with small 0.3W solar cell. I used LTC3105 DC/DC boost converter to boost voltage of solar cell to 4.2V. I could not find any online documentation or thread for this. I know it is safe to charge with lower C rating. My question is will my battery even gets charged with such small current? AI: Assuming perfect charge efficiency, that battery needs to be supplied \$3.7V \times 10A \times 3600s = 133.2kJ\$ to charge. At the maximum solar cell output of 0.3W and assuming all of it goes to the battery, it would take \$\frac{133.2kJ}{0.3W}=444,000 seconds = 123 hours\$ to supply that. Since that faster than it takes for the battery to self-discharge, yes it will charge. You might not want to wait around though.
H: What to do with the /RST pin? I'm using this gate driver IC. My question is, do I have to externally pull up the /RST pin? Because it can't be left floating, but I don't get the part that says "pulled down internally". In the datasheet this is mentioned, So is this correct to be connected like this? AI: Pulled down internally means there is a pull-down resistor inside the chip. If it was an internal pull-up then you don't technically need an external pull-up resistor but may want one anyways for noise immunity. Since it is a pull-down internally, you most definitely need an external pull-up resistor. The internal pull-down is probably a very high resistance so if you pull-up with a lower resistance it form a voltage divider where the voltage is still high enough to keep it out of reset.
H: Push button with auto off How to make push button switch with auto off after about 5 seconds. Output circuit is high (active) for max 5 seconds when I keep pressing push button. Output will be low after this time or when I release push button. To reactivate, I have to release push button and press again. I think that it's using a capacitor charging with some transistors. But how to make it work? AI: This is the basic idea (functional), but it may need to be tuned like R5/C2 time constant, switching spikes on transistors (add little capacity to slow it), width of trigger pulse, etc... Edit: You get better result with R3,R8=1k , and C2= 68uF (almost exact 5sec) (green is button press, blue is output voltage)
H: Transformer Harmonics A typical installation is Load - 400 V net - Transformer 1:25 - 10 kV net If the load is for example a SPS, the 400 V net can contain harmonic currents and thus have a considerable THDi. How can the transmission of harmonics or disturbance from 400 V net via Transformer til 10 kV net be described? Some thoughts: The Transformer is a galvanic isolation, so no direct current can pass Via induction and magnetic fields, effect is transmitted, i.e. also disturbances Turns ratio needs to be considered The transformer will heat up due to harmonics if not it is a specially designed "K-factor" transformer. This affects the transmission behaviour? Dependance on "stiffness" of HV net. If a power producer sits right next to the installation, it is hard to insert harmonics. Can this be described via the nets impedance? Power Quality AI: As mentioned in the link you posted, the voltage harmonics occur due to the voltage drop in series resistances of the circuit. The current harmonic components (caused by non-linear loads) generate these voltage drops. The voltage at the transformer terminals then becomes the original voltage added to these voltage drops (which contains harmonics), becoming a "distorted signal", so to speak. About your thoughts: The Transformer is a galvanic isolation, so no direct current can pass Exactly. Via induction and magnetic fields, effect is transmitted, i.e. also disturbances Yes. Thinking of the periodic signal in terms of FT (Fourier Transform), each component of the signal is transmitted by voltage induction. For three-phase transformers with delta connection or arrangements of several connection groups (12 pulse transformers, for example) some harmonic components cancel each other and this is often used to reduce the harmonic content generated by non-linear loads (rectifying bridges, in general). Turns ratio needs to be considered Yes. The voltage induction for each component follows the transformation ratio. The transformer will heat up due to harmonics if not it is a specially designed "K-factor" transformer. This affects the transmission behaviour? Even a "K-factor" transformer will heat up, but this transformer is designed to withstand this heating without exceeding the maximum temperature allowed by the insulating materials. Part of the losses generated by the load current depend on the frequency squared, so components of high harmonic order have can greatly increase these losses, manufacturers usually take some action in the design to reduce that part of the losses that increase with frequency, for example, using conductors with smaller dimensions (of course this implies using more conductors in parallel). The voltage harmonics do not affect the transformer so strongly, in general they flow through the core, but their impact is inversely proportional to the square of the frequency. Dependance on "stiffness" of HV net. If a power producer sits right next to the installation, it is hard to insert harmonics. Can this be described via the nets impedance? That's right. The lower the series impedance of the grid, the lower will be the voltage drops caused by current harmonic components. Edit---- Finally, answering the question: Each harmonic pass to the other side according with the transformer ratio. So, if you have 10% of 3rd harmonic in LV, you will have it in HV too. If 10% is significant, then you have a problem. In single phase transformers, there is no cancelling of harmonic components, it occurs only in three phase arrangements. The common practice is to filter it in LV side
H: I would like to know what this circuit is I'm a engineer of embedded systems and I'm studying a 4G modem. The circuit has a component that I want to identify but the reference is apparently wrong. The reference printed in the circuit is H51RFA but I couldn't find this in any place. You can see a picture below. AI: The device is a 4g cellular modem/router, and the chip is very likely an RF switch to allow selection between the internal antenna (visible on the PCB) and an external antenna jack (visible at the lower right corner of the photo). Being a switch external to the modem, its purpose is to support basic "diversity" reception. The modem can compare signal strength and quality between the internal and external antenna and choose the one providing the best signal. The 4G standard also supports "MIMO" antenna configurations which are more advanced, using the two antennas simultaneously to increase data throughput. However, I believe this requires connecting both antennas directly to the modem, not switching between them externally, so I don't think your unit has true MIMO. Identifying the chip remains "an exercise for the reader". At a major distributor (e.g. Digikey) website, you'll find the RF Switches category. Choose a manufacturer (there will be less than a dozen), look for a chip that's physically similar, pull up the datasheet, and look at the product coding. Usually the first set of digits is a short form of their product number (H51 in your case) and the second is a manufacturing lot (RFA). Good luck!
H: How to calculate how much current is available from Buck regulated Solar Panel I'm trying to work out how much current my solar circuit could sustain under normal conditions. I have an monocrystalline solar panel claiming 5W @ 12V (17.8V Vmp, 5Wp) based on their data sheet. The data gathered by CEDA from MIDAS near to where I am suggests that the average (incl. night) for the whole year was 470KJ/m2 per hour or ~130.55W/m2 given \$P_{(W)} = \frac{1000\times470_{KJ}}{3600_{s}}\$ The data provided by MIDAS gives "solar irradiation amount" measured in "KJ/m2" in hourly increments for a given recording station. Based on this information and the power curve in the data sheet, I would expect on average I would be able to draw around 150-200mA @ 12V. The Buck/Boost module I use contains an LM2596 which advertises ~80% efficiency when the input is 12V with a 5V 3A load. Does this mean I could expect ~80% of the current from the solar panel to be available at the output side of the Buck? To this end, do I potentially have at least 120mA @ 5V given input of 150mA @ 12v available on average? AI: The first part of this answer is to show that the OP misrepresented the numbers from his data by suggesting that the daily energy average was 470 kJ/m2: - ...suggests that the average (incl. night) for the whole year was 470KJ/m2 470 kJ is energy for the whole year per square metre. So divide that by 365 to get energy for 1 day = 1288 joules. Then divide that by 24 to get energy per hour = 53.7 joules. Then divide that by 3600 to get the equivalent average energy per second = 0.015 joules. This is a power of 15 mW per square metre. I think you might be somewhat overestimating what power you will receive. Maybe your numbers are wrong or you are misinterpreting them: - You're right, I've clarified that the 470KJ/m2 was the average per hour. – Adam Leyshon Here are some solar energy numbers from NASA for the Midlands in the UK (about the same for Wales I would imagine): - We can see that a reasonable average daily energy per square metre is around 2.5 kWh for the UK. That's an average daily power of 104 watts per square metre. Image taken from this site and 104 watts per square metre ties in nicely as an average. If we factor in the solar panel's energy efficiency (maybe 20%), it becomes about 21 watts per square metre. Given that the solar panel linked to in the question has dimensions of 185 mm x 250 mm, that's an area of 0.04625 square metres so, the viable average power that could be liberated is 0.963 watts. Given also the efficiency of the converter is 80% then you can only really liberate about 0.77 watts If you are wanting 12 volts, then the average current available will be about 64 mA.
H: Using and maintaining lower end soldering iron tips without destroying them I bought a low end soldering iron of eBay - it was advertised as a "15 in 1 Soldering Iron Kit", and was advertised as temperature adjustable. It has a dial to adjust the temperature with numbers in degrees Celsius. I put a new chisel tip from the kit in it, turned it up to 350 degrees Celsius, tinned the iron, and successfully soldered a couple of joints with lead-free electronics flux-core solder. Then I cleaned it on the damp sponge that came with the kit, and waited for it to heat to a temperature where it would melt the solder again. But by the time it reached that temperature, it had already gone black and the solder just balled and rolled off the tip. Wiping it on the sponge again cooled it, and the same problem was there when it heated back up. I tried adding no-clean electronics flux from a flux pen to some balls of solder, and melted them into a blob, and it stuck to a tiny part of the tip. I tried letting the tip sit in the ball for a little while, and it still kept rolling off and not tinning. I wiped it on the damp sponge again, and repeated the flux treatment a couple of times, but the tip has developed some kind of yellow mineral-like crusty coating that isn't coming off with the sponge or the flux (and I'm wondering if it is possibly even from the sponge) - and now I can also see a reddish colour that I think might be the copper core. This is a magnified view of what the tip looks like now (it is cool - red is not glowing metal): I'm assuming that this one day old tip is completely wrecked now? It was a cheap iron / tip, but I'm getting a more expensive soldering station soon, and I want to make sure I don't ruin the tips the same way. I never used the soldering iron above 350 degrees Celsius, I had the tip on the iron while it was on for less than an hour total, I never scratched it on anything or used much pressure, and I don't think it was exposed to any contaminant (unless it was the flux), and I tried to keep it tinned as soon as it reached a temperature where that was possible - what else could I be doing wrong? Or is it just that the cheap iron is reaching temperatures that are higher than my selection (it does only have two wires from the PCB inside it to the element, despite being sold as temperature adjustable - so I assume it doesn't have a true thermostat and only adjusts the power / current / voltage based on the dial)? Or is it a poor quality tip that was always going to fail after a use or two? AI: The iron you have uses really low quality tips - about like the ones on the cheap irons I had as a kid. The black stuff is burned flux. Your iron is too hot. 350 C is more than you should need for normal 60/40 tin/lead solder. 270 C should be more than enough. I think you have a combination of "set the dial too high" and "the dial is horribly inaccurate." You set it too high, then the regulator lets it get even hotter than what you set it to. Use 60/40 tin/lead solder that has a rosin core. You shouldn't need extra flux for anything you can reasonably do with that iron. Lower the temperature. I'm normally a proponent of "solder hot, work fast," but there's "top end of recommended temperature range" and there's "over the top, too hot, just burning stuff." You are in that second range. "Damp sponge" means "damp," not "wet." It shouldn't make the temperature of the iron drop much at all. Soak the sponge so it is wet all the way through. Squeeze it out, wring it until you think it is dry. That's damp enough for use. The tip as you show it will be difficult to use. You'll have to clean it up and re-tin it. It originally had a thin coat of iron on it. That is gone, and you can't really replace it. I never noticed the iron plating do any good on the cheap tips. It's damaged now, and partially gone - the red stuff you see is the copper core of the tip. File the tip smooth. Remove the black gunk and the silvery colored iron plating. Clean the tip to about 8mm from the point - you want about 8 to 10 mm of bare copper from the tip. Set the temperature to maybe 250 C (270 is what you want, but start low because your iron is probably hotter than the dial says.) Once it is hot, take your 60/40 tin/lead solder with rosin core and rub it up and down the bare copper. Get it to melt and flow on the tip. Rotate the iron so you get solder all around the tip. Tin the whole area you cleaned up - cover all of the bare copper with solder. Once you have that done, you can use the iron to solder again. You'll probably have to repeat that process every few hours. The tip is copper, and it dissolves in the solder. The tip will get pits and holes in it. Clean it up, file it smooth, re-tin it as needed. Use only 60/40 tin/lead solder with a rosin core. Do not use "no clean flux" on it. Do not use plumber's flux or acid core solder. Do not use lead free solder on it. Lead free usually requires a higher temperature, and it also "eats" copper faster. A trick I learned long ago was to file the tips clean and smooth, then hammer them into shape. Hammered copper hardens, and lasts longer in the soldering iron. Not "days longer," but hours - which is still better than the plain copper tip. Alternatively, look into buying a better iron with decent tips. Anything that takes a standard Hakko or Weller tip will be better than the iron you have - and the tips will be better quality. There are some tips on my blog about how to use a soldering iron. I photographed most of the examples while using an iron not much better than the one you have. I spent literally years working with a good soldering iron. The blog posts were written at home using a crummy iron because that's what I had at home. It doesn't take a super duper expensive iron, though you may have to put up with things like making or reforming the tips for a cheap iron.
H: Are there 2D-Transformers? I need to create a PCB with a transformer on it, and in this case, I unfortunately can't solder on a regular one. I was wondering if there was anything akin to a 2d transformer, or just generally a coil I could print onto my PCB. I know that spirals are used in Radio-Applications, but I'm not sure if you could use something like this as a regular coil. AI: They are called "Planar transformers" and they are used in the Telecom industry. https://www.electronicproducts.com/wp-content/uploads/passive-components-magnetics-inductors-transformers-wcjh-1s-jan201618.jpg They need a multi-layer PCB because the windings are PCB traces. In the following picture you can see the multi-layer structure of the PCB. I saw, time ago, a planar transformer printed on a 24-layer PCB. https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Planar_Transformer.jpg/1024px-Planar_Transformer.jpg The soft-ferrite core is than manually added by the worker after the PCB gets populated. Often, they are manufactured and sold as single products. That is, it's very rare that people print planar transformers on the very same PCB of your final product.
H: How to change adc sampling time in STM32 to 20 Hz I want to change the sampling rate of my STM32F303RE to 20 Hz. Is this possible with a ADC clock with 8 MHz and without a HAL_Delay() function? AI: Use a timer to trigger the ADC. Then you can vary the sample time to your heart's content. You really don't want to play around with the ADC clock rate - cranking it down low will adversely affect it's operation as it relies on capacitive charges. The datasheet will tell you how low the adc clock can be set and still perform adequately.
H: WAVGAT Arduino Pro mini I2C pins? I'm trying to hook up an OLED display using I2C communication to my Arduino Pro Mini clone(with ATmega 168, 16MHz) from WAVGAT but I can't figure out where the I2C pins are on the Arduino. AI: The "official" Arduino Pro Mini pinout is: So your I2C pins SHOULD BE at the A4 and A5 positions. There doesn't seem to be any information on the WAVGAT model. But that's common with Chinese knock-offs. You get what you get and may have to improvise.
H: DRL AND gate circuit design I have a guide stating that the following diagram represents a DRL AND gate: Suppose that both A and B have 5-V inputs with a corresponding switch. I tried to simulate it for learning purposes and placed the ammeter right before the LED. The problem is that the current does not change at all. I suspect that the diodes prevent the current from moving through since they are pointing to the left. AI: "Pointing to the left" is correct, the idea is that if one of your inputs is low, that diode is open and the R + D of the branch take the rest of the 5V voltage drop, giving L on your output. Only when both are high, you get an H output. Your issue is that when your inputs are not high, they are floating instead of drawing the current through the diodes. Try connecting the R and S junction to the ground with a large resistance.
H: High potential between ground and neutral wires in wall outlet I would like to test if ground connection works properly in my wall outlet. To do so, I have tried to measure voltage across ground and neutral wires. And here comes the interesting part: U(Live, Neutral) = 198V (220 +/- 10% V AC, fine) U(Neutral, Ground) = 89 V (What?) U(Live, Ground) = 108 V (what?) Yes, I know it's not correct way to test it, but at least this method should give general idea if ground works or not. In reality, resistance should also be measured. But how can it happen that I observe such voltage ratings? AI: You have a ground fault and thus no ground which is defined by 0 V. Neutral should be earth grounded outside at your distribution transformer and your voltage drop permitted is 10% of line on neutral if drawing maximum current in your location. (e.g. 100 or 200A) Check at breaker box and move towards the problem (inside or out) to get it fixed otherwise if you happen to touch an appliance like a 3 pronged device AND the plumbing which ought to be earth grounded, you will see a potential risk voltage but it MAY be high impedance floating so lower current depending on the cable capacitance.
H: Why is there a negative voltage? Can anyone explain why do we have that negative voltage VEE? I know that it's a DC voltage, from its name, but I can't find the explanation for why is it negative. Also, Vi1 and Vi2, from that symbol I know they are DC but shouldn't we have AC as well? AI: In this case the "negative" voltage is just one of the supply rails. Ground is defined as 0V by convention, but signals can go below ground and become negative. In most circuits, they will have to be supported by voltages that are negative, meaning having a negative potential when compared to ground. The voltage sources aren't necessarily DC, even though they have polarity markings. The plus and minus just indicate that, if the voltage source has a negative value, the "+" side has a voltage lower than the "-" side. There's nothing in the symbol that indicates the source doesn't vary with time.
H: Settling time of sixth order denominator transfer function I have a system whose transfer function is as follows $$ \frac{V_o(s)}{V_i(s)}=\frac {\text{numerator}(s)}{a_1 s^6 + a_2 s^5 + a_3 s^4 + a_4 s^3 + a_5 s^2 +a_6 s + a_7}. $$ I am interested in the settling time exhibited by the system, hence the numerator is not in focus (hope I am correct there). I do know that the sixth order polynomial has no analytical solution. Hence I used Matlab to find the numerical solution and settling time. I would like to know which coefficients of the denominator has the most influence on settling time. Any ideas on how to analyze that? On the other hand, for a given set of values for coefficients, if I am able to figure it out the dependence of settling time on coefficients, for example \$ \text{Settling time} = f(\frac{a_1}{a_2})\$ and then if I change the values of \$a_1\$ and/or \$a_2\$, to lower the settling time then will that work? I reckon that the moment I change the coefficents then the settling time will now be dependent on other coefficients, such as, for instance \$\text{Settling time} = f(\frac{a_3}{a_4})\$, am I correct? The aim is to reduce settling time by choosing right values of two variables which appear only in the denominator of the transfer function AI: You cannot find the rule you hope. Assuming the system is stable a long settling time is caused by a pole or conjugate pole pair which has near zero negative real part. You may separate from the denominator factor \$s^2 + 2As + A^2 + B^2\$ if you have complex pole pair \$A+Bj\$ and \$A-Bj\$. Let A be radically closer to zero than the real parts of other poles. When this is multiplied with the other (4th order) part of the denominator, the critical real part \$A\$ affects all but the sixth order term. ADD after more info was inserted to the question: So, you are able to use advanced software like Matlab and you already have made simulation runs. Go on and find a good combination of the 2 variables which you can set. I guess Matlab can be programmed to make the search for you. Unfortunately I'm not a programmer nor have such advanced software. Sorry. BTW. Often people must take into the account also other things than the settling time. The general method is to build a cost function which is tried to be minimized.
H: MOSFET power supply ON with no MCU input I have a MOSFET circuit that a microcontroller manipulates (using its GPIOs) to control power to other devices. I noticed yesterday when I detached the microcontroller from the circuit the LED on the board was still lit up. So this means that 5V on the MOSFET's supply was making it to the drain and hence the R_load. Below is the schematic for the circuit. Is this failure by design or some other failure going on? When should I expect 5V supplied to the R_load (GPIO: 3.3V, GND, open circuit)? AI: You have a P-Type MOSFET. It conducts when its gate is pulled low. That's why it has the pull up on its gate - it is off as long as the gate is high. Your 2N3904 pulls the MOSFET gate down when you supply current to its base - when the GPIO is high, the collector goes low and the MOSFET provides power to your load. The effect you saw occurred when there was no processor installed on the board. The 2N3904 has fairly high gain - a very small current at the base could cause it to pull the gate down enough to power the load. You need to do this to the base of your 2N3904: simulate this circuit – Schematic created using CircuitLab That will pull the base of the the 2N3904 low when there's no other connected input. R2 provides a better path to ground for stray voltages than the base, making sure that the transistor stays off until you want it on. Make sure that R2 is larger than R1. There are pre-biased transistors that have the resistors built in. They are a drop in replacement for many SMD transistors. Swap your 2N3904 for prebiased NPN transisor. Problem solved. I went and ran it through a simulator. The circuit works as described: High on the base of the 2N3904 turns on power to the load. simulate this circuit You are either getting way too much current creeping in somewhere, or else something is broken. Maybe there's some other part of the circuit pulling up the base of the 2N3904. Ground the base completely (short to ground) and see if the LED still lights up.
H: How does current flow in this circuit I'm just trying to visualize how the current flows in the following circuit. It is a follow-on question from here. The circuit is a small-signal model for a common-source MOSFET with source degeneration. In particular it is analysing the output resistance using voltage source Vx and measuring Ix. However, that is irrelevant to this question. I have a few ideas, however I am pretty sure 1 and 2 are just outright wrong. Explanation 1 In this explanation, I was thinking that the VCCS is generating a current in that branch. That current must come from the node that is connected with Vx and ro. That gmvgs current will be sourced from the two branches depending on the impedance that the current 'sees'. Since Vx is an ideal voltage source, it must have 0 input impedance and hence the gmvgs current must all flow through that. This gives Ix = gmvgs. Explanation 2 This explanation is very very flimsy. In this explanation, I am also thinking about current division but from the point of view of the Ix current. Ix is flowing into the with the ro branch and VCCS branch. I thought that the current should divide according to its resistance. However the input resistance of a VCCS is not defined? This explanation seems completely wrong and my conclusion for this was that the current-source will pull that current no matter what, so current division isn't possible? Explanation 3 This explanation seemed the most logical to me. In this explanation, gmvgs flows from node X into node S, so it can be thought that a loop is formed with ro, since the VCCS will want gmvgs flowing into it and flowing out. Now that the VCCS branch is happy, the Ix current must then flow through ro, through Rs and to GND. If someone could just clarify these doubts in my mind that would great. I just would like to know why some of my explanations (or all) are incorrect and what is the correct way to go about thinking of this circuit, particularly when ideal elements are involved. Is current division still valid, since the series resistance of an ideal voltage source is 0? Thanks. In response to comment from Andy Aka: AI: The current \$I_X\$ (flowing from \$V_X\$) is made from two parts: - \$g_m\cdot V_{GS}\$ and the current flowing through \$R_0\$ The current flowing through \$R_0\$ = \$\dfrac{V_D - V_S}{R_0}\$ Also, you have shown the gate grounded in your circuit and that should not be the case.
H: Output impedance of a voltage divider with DC bias I made a circuit simulation of a 200VAC to 0-2VDC for ADC conversion via voltage divider and DC bias with a third resistor connected to a 3.3V supply. What is the output impedance of the divider and how do I calculate it? AI: The output impedance is not affected by the DC bias. Treat the DC supply as a short circuit. The output impedance is all three resistors in parallel - 3.6k//8.3k//1meg. The input resistance is then just the parallel impedance of the 8.3k and 3.6k resistors in series with the 1 megohm input resistor. In practice, the input impedance would normally be considered to be just 1 megohm because the 8.3k//3.6k is significantly less than 1% of the input resistor and unless precision resistors are used will be in error by less than the tolerance of the resistors. Similarly, for the output impedance, you can ignore the 1megohm input resistance as it will have a very minor effect.
H: Is there a way I can convert from USB to LVDS UART (~1Mbps)? I'm working on a spacecraft that requires very low noise levels so it was requested that we pursue LVDS UART. So it's using something similar to RS-422 because it's differential, but instead of a signal that is 0-5V, it is a current loop that produces a differential signal that's about 300 mV. My issue is that for testing purposes we need to be able to talk to that interface from a computer using USB. Normally we would use USB to TTL UART but that won't work for this situation. It would be nice if there was a USB to LVDS UART such that it presented a standard serial interface to the computer but used LVDS to connect to our board for testing. An FPGA on the board is handling the UART. The connection needs ~1 Mbps. So far I've been looking for something like a USB-FTDI TTL cable but that would work with LVDS UART. So far I haven't found anything. Maybe someone with more knowledge than I can help me find a solution. Edit I don't need product recommendations. When I mentioned looking for products I was merely trying to explain what I had been exploring in trying to find a solution. The core of my question is whether or not doing this was possible and if it was, what kind of solutions should I explore. AI: Typically an UART does not include a PHY, and thus any external PHY can be used for implementing the communication bus. So feel free to select any suitable PHY for this, there are a lot of PHYs that implement low EMI by using a differential connection or limiting the slew rate. The PHYs include RS485, CAN, in addition to LVDS of course.
H: How does a Touchstone (s2p) file indicate whether it should pass or block DC? I'm trying to simulate impedance matches for an LDMOS FET amplifier with Touchstone (s2p) files to simulate the device with "real components" before we build it. I have found that "capacitor" s2p files leak DC current and that "inductor" s2p files don't pass as much DC as you would expect for the milliOhm specification. Is there something that specifies the DC charactaristics of the s2p model in the file that I could modify? Are there other ways to solve this? For example, would an ideal parallel-inductor with a 1e9 nH or an ideal series-capacitor with 1e9 uF across the s2p component help with this in the simulator? Other thoughts? AI: The short answer is it doesn't. You can find the Touchstone 2.0 file specification here: http://www.ibis.org/touchstone_ver2.0/touchstone_ver2_0.pdf. There's no provision for specifying DC behaviour. Indeed, at least one simulator I've used that supports using S-parameter files in a transient simulation where DC behaviour is important has a check box to specify whether to consider the component an open or short at DC. I agree that if the software doesn't support that, a large ideal parallel inductor or large ideal series cap should do the trick.
H: Anyone have any idea what type of receiver/transmitter that is I got those from someone and it does not come with any kind of datasheets I’m guessing they are receiver and transmitter as they both have kind of an antenna.. anyone have an idea of the model so I could google the datasheets Thanks! AI: That's a "GWB T400 2.4GHz tranceiver kit" or similar. Chipset is LT89xx.
H: VHDL synthesize std_logic 'H' Can the weak-pullup 'H' assignment of std_logic be synthesized, or is it only allowed in simulation? You're probably wondering why I would want to do this: I'm trying to emulate both the master and slave I2C devices inside the same FPGA (internal bi-directional bus), thus I have no external pull-up resistor. I'm not sure what input logic level the FPGA will see when both master and slave are set to 'Z'. I realize that since both devices are inside the FPGA, I could just avoid using the bi-directional buffer, but I'd like to be able to use the same exact i2c master code, as is, and at a later time route it to real hardware. AI: There won't be a universal answer except "no". But check the synthesis guide for your chosen FPGA in case it is an exception (can synthesise 'H' to an internal pullup). You'd be better treating the output and input aspects separately on your cores (SDAout/SDAin) and combining both/all SDAouts (which are '0' or '1') in logic gates in the top level design, and feeding the result to all SDAins. (Ditto SCL to handle clock stretching). This mimics the strategy of avoiding bidirectional internal buses with Data_Out/Data_In buses and multiplexing in the top level design.
H: Troubleshooting DTL NOT gate circuit design My guide says that the following diagram is a DTL NOT gate. Its output is a LED. For learning purposes, I tested it via a simulator. The measured current is not really significant to power on the LED. Opening and closing the switch does not bring enough difference to perform negation as the reading nearly stays at 0.974nA. My understanding of negation is that when I open the switch, the current must be higher. I first thought to have a junction between the switch and resistor connect to ground, but the expected result is that opening the switch will result in 0 A. AI: Opening and closing the switch There is no switch in the original circuit, and this kind of logic does not work by opening and closing a switch. Rather, the circuit works by bringing the voltage at the input pin "high", or bringing the voltage at the input pin "low". When the switch is opened in your circuit, the input at D1 is "floating". In such a case, it will remain "high". The voltage from V2 will "pass through it". [Or, more accurately, because there is no current through it, by Ohm's law, the voltage on each side will be the same. Now, you may say, "wait a minute, a diode is not a resistor, and no current flows through a diode when it is reverse biased". That is not quite true. A small "leakage current" does flow through a diode that is reverse biased, and a diode does behave like a resistor to the extent that, if there is really no current flowing through it, the voltage drop across it is 0.] If you want to use a switch to provide an input for such circuits, use something like this: simulate this circuit – Schematic created using CircuitLab R1 is called a pull-up resistor, and R2 is called a pull-down resistor. The range of values that are acceptable depends upon the logic family that this circuit is supposed to be an input for. In this particular case, the values of the resistors can be 0. That is, you can omit them, and use wire instead. However, in practice, resistors are used to limit current and power consumption.
H: Do we always take the corner frequency of a filter at exactly -3dB? I'm doing some work on filters, but all the references I can find use a 'perfect' gain characteristic, with the trace starting at 0dB. Is the measurement for corner/cutoff frequency always taken at exactly -3dB? What if the maximum gain isn’t 0dB? For example, see the below figure, where the maximum gain is -3dB. Surely taking the corner frequency at -3dB in this case would not be useful- instead would we take it at -6dB, which is -3dB from the actual maximum gain? Thanks for your help. AI: It's not 3dB absolute, it's 3dB down from the peak, or some sort of nominal attenuation. So in your case, where the passband is -3dB, 3dB down is at -6dB. Note that some filters (e.g. Chebychev) have significant passband ripple; if this exceeds 3dB then the "3dB down" figure loses meaning. In that case, or just if it's what matters to the system designer, a different definition of bandwidth may be chosen.
H: Total resistance across a capacitor in series Why is the total resistance across the capacitor \$R_{\text{sig}} + R_{\text{G}}\$? Why is it not just \$R_{\text{G}}\$? AI: Part of the issue is that you asked for the resistance measured across the capacitor without actually understanding what that means. It means as measured across the two terminals of the capacitor (i.e. you stuck the probes across the capacitor). It's because when you turn off a voltage source to measure things, you set the voltage source to 0V, and 0V is the same as a short-circuit. If it were a current source, you set it to 0A, which is the same as an open circuit. What you seemed to have done instead is just pick the terminal of the capacitor that is convenient, and then used ground as the other terminal, and then just kind of ignored R_sig because the voltage supply was in the way.
H: Circuit to detect in which port sensor inserted I want to build a Counter using a Proximity Sensor. I want to give choice for user to use either PNP or NPN. I will give two ports for the same. I am using PIC16f887 microcontroller. How to detect that which sensor user inserted? I dont want to miss any sample just to detect. I dont want to put burden on user to select type of sensor from the menu. Power supply for sensors is 12V DC. It may be programmatically but automatically it should detect without user intervention. Or it may be electronically , may be using Gate circuit or something. What is confusing me more is some of them come "open collector" type. When sensor detect the object, they pull down. AI: This should be possible to do if you use a window comparator, and detect whether the input is pulled 'high' or 'low' from a known midpoint. We take advantage of the fact that both NPN and PNP type sensors use open-collector outputs. Example (simulate it here): The window comparator is high when the input voltage is between 1/3 and 1/3 of 12V (that is, between 4 and 8V). If it is pulled above that by the PNP, or below that by the NPN, the output goes low. The comparators have open-drain outputs and are wire-OR, so this can tie to your logic with the appropriate logic voltage pull-up. I show 5V here; it can be 3.3V or whatever your system requires. Basically, this looks like an NPN type to your system, so you need only 1 input. If you want to use two, then you can separate the comparator outputs and detect whether you have a PNP or NPN type plugged in. Like this (simulate it here): The upper comparator goes low when NPN is inserted and active, the lower one when PNP is inserted and active. So now you know which kind of sensor is in use, if it matters to you.
H: Why can't KVL be applied here? I was asked to find the Is current I applied KVL in that loop but my ans is wrong. what concept is wrong on my approach?Why kvl cant be applied on that loop please explain AI: Because the current through \$ 1\Omega\$ is not \$2-I_s\$ as you have assumed. It is actually = \$2-(I_s+I_{2\Omega})\$, where \$I_{2\Omega} = 10/2 = 5A\$. You didn't see that there are actually 4 branches at the upper node where you split the current using KCL. Not 3 branches. \$2\Omega\$ is the branch you missed. I think \$2\Omega\$ was deliberately drawn like that to trick students.
H: What was the communication protocol used on board the Apollo moon lander? It seems that the development of TTL was contemporary ~1961 the maiden moon landing of the Apollo vehicle, while the development of one of the oldest digital signalling standards RS232 using the UART hardware was crystallized later, and that of the advent of the USB hardware, transmission standard and related communication protocols occurred much later. What was the communication protocol used on the controllers and processers on board the Apollo lander vehicle? AI: Encoding of characters into digital data streams is rather older than Apollo. Émile Baudot's system was patented in 1874, about the time when Jules Verne was writing of the US sending a ship to the moon in the immediate postbellum period. The USB communication system used for the Apollo mission integrated a bunch of different data and analog streams. Digital commands were encoded with many extra bits so that errors would be detected with a probability of erroneous decoding of \$ \lt 10^{-9}\$. Redundancy and fail-over modes of operation were strong concerns. Here, for example, from this document is the LEM (Lunar Excursion Module) down link summary: Terrestrial communication (to remote base stations) used Western Electric 2400 baud modems. There is quite a bit of fascinating information in that overview document, including a brief description of the console displays which used special data display CRTs with both magnetic and electrostatic deflection (the latter for vector character generation).
H: Do switches induce voltage spikes in the AC power grid? I know that DC inductive loads create back EMF when turned off and that's why we use a freewheeling diode. Does this also true for AC inductive loads and AC loads in general? I know we can't use a diode though. I've noticed when I turn on and off switches around the house, it affects sensitive electronics. Is there any solution? AI: Yes, it's true for AC loads as well. The technique for dealing with the flyback with a coil on AC is a bit different. For lower voltage/lower power AC loads, an RC snubber can be used to catch the flyback. This is an inexpensive solution, but it wastes power. For bigger loads a SIDAC or MOV can also do this function. These devices don't turn on until a threshold is reached, so unlike the snubber no power is wasted. More here: Relay protection when proper TVS at load cannot be implemented The flyback can be avoided altogether if the control uses zero current / zero voltage switching. That is, the 'off' time is phase-aligned when the coil flux is at minimum, so there isn't a flux collapse when the device is disconnected. Likewise, the 'on' time is aligned with the AC crossover point.
H: Voltage multiplier circuit not working I am trying to make a voltage multiplier circuit. When I connect it to mains \$120 \; V\$, the output voltage becomes \$90 \;V \;DC\$, I do not know why this is. Capacitors: \$20 kV \; 1000 \; pF\$ Diodes: \$4 \; 12\;kV \;5\;mA\$ and \$2\; 12\;kV\; 350\;mA\$ Edit forgot to mention the \$90 \;V\$ is DC, so it is being rectified and not multiplied. AI: The output of a voltage multiplier is DC. That is correct and to be expected. As Dan Boschen explained, the problem is the capacitors. They are too small. The impedance of a 1nF capacitor at 60 Hz is over 2 megaohms. What isn't obvious is that the total impedance goes up as the cube of the number of stages. I did some experimenting and research on the internet a while back, and found this equation for the total impedance of a voltage multiplier: $$ Z = \frac {4n^3 + 3n^2 - n}{2 \pi fC}$$ That's impedance in ohms given the frequency of the input and the capacitance. You have 3 stages, so the total impedance comes to something like 280 megaohms. You'll need to use much larger capacitors. Use something like 1 microfarad capacitors. That'll get you enough current to at least be able to measure the voltage with a multimeter. Be careful when using a multiplier with line voltage. The output is low current but high voltage. It can do nasty things to you. The circuit itself is at line voltage. Touching any part of it can expose you to the full line voltage and current. Either the output or the line voltage can kill you. Do not short circuit the output. In normal operation, the output is low current DC. When you short it, all that's between the diodes and the power supply is the first pair of capacitors. That can supply enough current to destroy the diodes and then the capacitors.
H: High current bus bars on PCB controlled with mosfet and Raspberry Pi I need to be able to switch up to 100 amp @ 48v DC with a Raspberry Pi. I came across this video which is what I am trying to emulate: https://www.youtube.com/watch?v=dhIbZa6yg5k at 1:15 in the video it shows how they have the mosfet connected to 2 busbars to control the current flowing through both sides of it. This is what I need with the added twist of having logic level voltage to be able to control the mosfet. Here is a quick and dirty schematic I came up with that I would like to know if this is the correct way to go about this: The 10 V on the logic level switch will come from a voltage regulator connected to the main 48 V battery (same batter that that SCC connects to). My biggest concern here is how to attach the high current mosfet to the bus bars just like in that video posted above (shown at 1:15). Any advice on this would be greatly appreciated! AI: That's not a mosfet on a PCB. That a mosfet bodged on some copper plates bolted to a pcb to demonstrate the low Rdson of the thing. They also bring it right up to max Tjunction with 200A. Normally with these currents you're looking at SEMIPACK or similar which is meant for this. Browse the power modules from IXYS or SEMIKRON and find a suitable module for your use. Over a standard PCB 100 Amps is an expensive challenge. Also note that you may have to take switching noise into account where a raspberry pi may function unexpectedly.
H: How to select LEDs for use as colour selective photodiodes? When selecting LEDs for use as photodiodes, are there general guidelines that one can use to increase the odds that a more suitable LED is selected? For example: Does diffuse or clear impact efficiency as a photodiode? Does a brighter or dimmer LED tend to correlate to better performance as a photodiode? Can the output spectrum of the LED be directly taken as the sensitivity spectrum of the photodiode? Does the LED output field of view correlate with the field of view when used as a photodiode? Are there any characteristics of an LED that would tend to correlate towards larger die-size for increased sensitivity when used as a photodiode? Would a monochrome LED with a transparent, untinted, clear resin package be sensitive to only its output spectrum when used as a photodiode? Or would it be different? Would a monochrome LED with a tinted resin package only be sensitive to its output spectrum when used as a photodiode? Or would it also be sensitive to near-IR that can easily pass through the resin? AI: If you want a color selective photodiode, using LEDs perhaps isn't the best approach. Spectrum, as discussed in the comments, is different, added to that a wavelength transmission of the chip encapsulant, as well as the primary optic. On top of that, the primary optic doesn't have AR coating, which can start to mess things up. Then you have temperature dependencies, silicon impurities, and all sorts of effects that will introduce unknown characteristics besides the basic physics of the junction. You may spend time to find an LED that works for your need, but since they are not designed to work in this mode, the manufacturer can at any time modify the characteristics, while still operating as the datasheet, it may change the behavior as a photodiode. On top of that, the LED chip-making process is more like a kitchen recipe than a set process. They will be differences between wafers, batches, on the silicon level, but also encapsulant, optics, and so forth. Using a device in a way it wasn't meant to be used is always a bit risky. Then also it depends if you intend to make 1 device or 5'000. The correct approach rather would be to use a photodiode and to place optical passband filters on top. Those are quite cheap, can be tuned to specific wavelengths, have known cut-off and thermal behavior and you will have a predictable, and stable result. EDIT More detail on filters: Optical Filters can be made by many different means: Using material properties like different types of glass or polymers that all have specific spectral transmission properties. Chemically colored glass or polymers. Interferential by deposition of thin-film layers. It is possible to create a filter by just stacking a few different polymer or glass materials to achieve the desired spectral sensitivity on the photodiode. Example of colored glass form this Japanese company More detail on low-cost filters: When one searches for optical filters, filters from Thorlabs and such tends to be the only results google provides. Thorlabs and the likes make high-grade optics that are used for research, military, and special scientific devices, and the cost is high. However, there are many companies providing much lower cost optics like Schott in Switzerland, or many many companies in China. The optics may not be as high grade as Thorlabs, but they are way-way sufficient for this type of application. For instance, we had a filter custom made which is RG1000 with additional interferential layers and we pay a few $ a piece for a 20x20mm filter. The cost is directly dependent on the size, for a photodiode a 4x4mm filter is probably enough. One may not forget that interferential filters are everywhere, at a low cost. Most camera lenses have one. Another example is the reflector cups of the old Halogen Lamps, which are glass coated with an interference filter called Dichroic, letting the IR through to reduce heat. Also, a simple colored piece of plastic, like a paper holder, can work. I worked in a company that was stacking pieces of different types of glass to achieve similar things. Trade Show An optics trade show is a great place to go to find a lot of suppliers. Other Methods Reflectors: Depending on the optical needs, it is also possible to use the reflectance, rather than the transmission of the material by placing the photo-diode facing a reflector or in an integration chamber. Then you can paint the surface or use metals and other materials' reflectance properties. You need to be careful of oxidation though. Phosphorus: You can also use phosphor up or down-conversion as well, this is particularly useful if you are trying to detect outside the photodiode sensitivity region.
H: How is the output voltage adjusted on this schematic? This is a schematic of TI's reference design for a 65-W USB Type-C high density active clamp flyback with GaN (PMP21639), which can be found from this reference design page. The page claims that the design has a maximum power rating of 65W at 20V output, but is "adjustable for 20V/15V/9V/5V" output voltage and 3A. How does this circuit adjust the output voltage? For instance, what if I need a fixed 15V/3A output from this design? Thanks in advance. AI: In normal operation, an external circuit would be connected to the CTL pin to handle negotiation. It will add a resistance to ground to increase the voltage. An example of such a device is the TPS25740. You can just add a resistance where R43 (DNP) is shown in order to statically change the output voltage. The ATL431 will have 2.5V from pin 2 to pin 3 when it is in regulation, so with CTL open you get 5.0V out. With CTL shorted to ground you get 20.06V out, because of the internal 24.9K resistor. For intermediate voltages just calculate the required shunt resistance and subtract 24.9K to get the required external resistor. If you want 15.0V then the current through the top 150K resistor R41 is (15-2.5)/150K= 83.33uA. So the bottom resistors must combine R45||(R42+R43) to represent 30.0K. Which means that R42 + R43 must add up to 37.5K, so you would install a 12.6K resistor for R43. simulate this circuit – Schematic created using CircuitLab
H: How to get the unknown variables through voltage division? Given this circuit, how do I find E, Vz, and Vy when Vx is 3V? When I tried solving it, through simplification of circuits, (correct me if I'm wrong) I got a total resistance of 12k while resistance of Vy is 10k. Upon getting the total resistance, I used the voltage division formula to get E, since the formula is Vx = E(Rx/Rt) where E is the voltage source, Rx is the resistance of x and Rt is the total resistance, I manipulated it to get E, which, in my calculations, is 2.4V. Now this is where I'm confused, since E, which is the source, is less than the voltage of a resistor, did I make a mistake in my calculations? Since, from my understanding, a voltage source's voltage is always greater than the voltage of its elements? Also, can I solve it in the manner of finding Vy first, then Vz, then E? If so, how? AI: I manipulated it to get E, which, in my calculations, is 2.4V That's incorrect so, just work from right to left filling out the details as you go: - No need for any extensive analysis other than using ohm's law and writing things down. I'm not providing a full answer, just a partial answer so you can see the method.
H: How is the intensity of sensor noise determined experimentally? Consider a sensor for which we are designing a Kalman filter for improved accuracy or sensor fusion. Let us restrict this discussion to the goal using the filter to improve the accuracy of the aposteriori state estimate and avoid addressing sensor fusion. Further, let us assume the state and output to be identical and one-dimensional for simplicity. The designer of the Kalman filter assumes the knowledge of the system dynamics and output channels including apriori knowledge of the variance (or squared standard deviation or squared intensity) of the Gaussian white noise appearing in the process dynamics and observations. While the well known methods to determine the noise variances are as follows, the standard industry approach to determine the noise intensity is by tuning the value in the Kalman gain computation to improve closed-loop performance, the auto-correlation least squares method which uses closed-loop data, it is not clear in the literature if there are any algorithms which use open-loop data for determining the noise covariance. How is the intensity of the Gaussian white noise model of a sensor determined experimentally using open-loop data? AI: I would think using an FFT or Spectral Density Analyzer is the most common way to measure noise to determine the amplitude and see if it is Gaussian or filtered Gaussian (Brown or Pink or White noise for example) or if there is a DC component... The filtering to obtain maximum SNR ought to be matched to pass the spectral density of the signal and inversely matched or attenuated to spectral distribution of noise to obtain the ideal S/N ratio.
H: What is the transparent border around my Altium trace? I am routing my first ever PCB and half way through the routing process I've noticed my tracks now have this transparent border around it. Any idea what this is ? I must have clicked something? Not sure how to disable it nor what it actually represents. AI: That's the clearance around tracks according to your current design rules. I.e. the space the trace you are currently routing can not enter. The shortcut is Ctrl+W (in Altium 21) and the preferences panel entry is called "Display Clearance Boundaries".
H: STM32 ADC read methods for high voltages I want to read input voltage from a solar array for my circuit. That's not a big deal if the voltage is up to 3.6V. The problem is that I am expecting maximum of 15V and obviously I won't be able to have connection for ADC reading. First solution that came to my mind is creating a voltage divider with buffer op-amp, zener diode and a capacitor filter. This might be an effective way, however, it will make the circuit extra dense and complex, considering I will also read some other voltages on the board. I am open for alternative methods and suggestions. Also, I can also use some IC recommendations, if there is such thing for this purpose. Thanks! AI: Using a voltage divider will bring noise and extra components for sure. But same conclusions stay for external ADC IC's too. Also, external ADC requires voltage reference which at least equals to voltage that is measured. In a conclusion, voltage divider is better for higher voltage measurements.
H: Altium: Component Clearance constraint won't go away after setting rule I am using Altium 18. I ran a DRC check and got the following error: This is saying i don't have clearance between J2 and MH2. This can be seen in the PCB: However, i have set the following rule: Surely this should get rid of this error? What am i missing? AI: You have another rule defined. From your first image you can see the violated rule has the name "ComponentClearance" which I guess is set to match all objects. Check your rules again for duplicated rules with different names, I also would suggest checking your rule priorities. Remove/edit the rule with the name "ComponentClearance" or set it to a lower priority, and you should be fine.
H: How to stop ESP32 resetting when motor starts? This is my first post here and I'm new to electronics. I am trying to control a motor using an ESP32 Cam. See attached image for a rather crude schematic. The power supply is rated for 2.4A. I am using a 12v DC 5rpm worm gear motor like this DC 12V Worm Gear Motor . When the motor starts, the ESP32 resets (I figured this out by making the ESP blink on startup). Meanwhile the motor continues spinning without interrupt (I have ESPHome on the ESP32 and treat 2 GPIO pins as interlocking switches [only one can be on at a time]). From reading online, it seems like the surge on motor startup may be causing a voltage drop on the ESP32 (potentially called "brownout") causing a reset. How can I prevent this in a simple way? I found that if I put the motor on a different power supply, the issue is fixed, but I'd rather not use two power supplies. References of similar issues: How to prevent a battery powered microcontroller(ESP32) from reseting when motors start running? Arduino restarts when DC motors are turned on Fast DC motor resets Arduino?! Possible solutions Different PSU for motor. I've tried this and it works, but I'd rather not have to use a second PSU. I think the ESP32 draws ~250mA and the motor ~100mA, so I think I'm well within spec of the 2.4A PSU. Schottky diode - I don't have one of these and don't want to wait for an order "Decoupling capacitors". I have a bag of assorted electrolytic capacitors. Which should I use and where do I put them? PWM - gradually apply pwm to bring motor up to speed. Would this work with my circuit, with pwm before the boost converter? Will the boost converter just boost it to 12v anyways, either just using capacitors or using PWM? Note The DRV8833 is rated to 10v, which is why I set boost converter to 10v and not 12v. The motor still seems to run fine on 10v. Edit Many thanks to the people who have posted here, @winny, @vir, @bobflux, and @thebusybee. I've implemented the PWM acceleration method, which works. There's a loud high pitched whining sound, at the mid-range PWM values that goes away once the motor comes up to speed. Audio available here: https://streamable.com/3xgxy0 AI: These solderless breadboards have pretty high contact resistance, so if you run any serious current through that, voltage will drop. So you should really be using wires for your high current power supply, and solder them to the boards. For the ESP32 it doesn't matter, but for the motor it does. Different PSU for motor. Using boost for a motor is asking for trouble. It would be more logical to have a 10V supply for the high current stuff, and a buck converter to power the Pi from that. Also if your 10V drops a few volts under load, it started from 10V so there's still enough to run the Pi. With 5V, less margin. I think the ESP32 draws ~250mA and the motor ~100mA The motor will draw 10x that when starting, and multiply by 2 since you're boosting from 5V. If the boost outputs 10V 1A, it will consume 2A from 5V. Output power comes from input power, and power=VxI, so if you want 2x more Volts on the output, you get 2x more Amps on the input. For a buck, same rule applies, output power comes from input power, but output voltage is the lower one, which means input current is lower than input current. "Decoupling capacitors". I have a bag of assorted electrolytic capacitors. Which should I use and where do I put them? There are plenty of small decoupling caps on your board, but you can put a large electrolytic on the power supply. PWM - gradually apply pwm to bring motor up to speed. Yes. Would this work with my circuit, with pwm before the boost converter? Nope The boost should be always on, powering the DRV8833 board which controls the motor. DRV8833 has a PWM input, this is the one you should use to gently start your motor.
H: What could be generating this waveform in an EMC Compliance test? We are having trouble with a CISPR-11 (EN55011) Radiated Emissions Class B compliance test in one of our solutions. The troubling part of it is basically an industrial motherboard (with a commercial SSD and commercial RAM) within a well grounded metal enclousure, sharing space with an industrial switch, a switching 12V industrial power supply and a industrial touch panel and monitor. Every single one of these industrial components have its corresponding compliance certificate for CISPR-11. The antenna picks up the following waveform (Vertical orientation, 3mts distance, 30 to 200 MHz bandwidth). Crosses above the threshold are non-compliant peaks. The main offender is a 60MHz peak that looks like a strong square wave in frequency domain. That is new to me in these tests; I am more used to specific harmonics in the spectrum. If we turn off the motherboard (and thus also the RAM and SSD), the 60MHz and also those crests at ~80MHz dissapear. Turning of the rest of the components (except the 12V PSU) has no effect. I have the motherboard's compliance test and procedures, and their peaks are nowhere near in power or frequency. They also used commercial RAM and a mechanical commercial hard drive. Has anyone seen this waveform before for radiated emissions and/or has any idea, given the description of our system, what could be generating it? EDIT: Based on comments and answers, I will clarify some things. First, I have 1 Ethernet cable (unshielded) inside the case, connected to the switch, also inside, but then 3 Ethernet SSTP cables going out from the switch to 3 ethernet Basler cameras. These 3 do have a ferrite clamp on each, but I haven't fiddled with the one inside. I'll note that down. The SMPS was our main target for the whole ordeal but I still need to try ferrite beads on its outputs and maybe enhance the shielding around it. Unfortunately we do not have our own spectrum analyser and our scopes are up to 60MHz. We do not develop high frequency custom electronics, so they were not neccesary. Given the circumstances, we may adquire one and do our own pre-compliance testings, as many of you suggested. I will keep this updated. EDIT2: So I tried making a makeshift antenna out of the scope probe, and we identified a single spot in the LCD screen using FFT, which is directly in front of the motherboard, with a peak exactly at 60Mhz. I am quite sure we found the place where the signal is originating, though still couldn't find the culprit. I tried everything suggested here, and altough they didn't quite fix this particular emission, all suggestions are greatly appreciated as the will surely enhance compatibility. We identified, however that the screen enclousure is plastic and in some spots (including the one with the 60MHz peak), there's no conductor material between the interior and exterior of the whole enclousure, so next step is to place a metal sheet between back of the screen and everything else. I will post the results for anyone interested. AI: I would suspect the power supply - specifically, ringing of the SMPS switching waveform and / or harmonics of that sneaking back into the conducted path. Try using CM filters (clamp-on beads) on the PSU's input and output feeds. Also, try applying an R-C snubber to the PSU switch side. Also, try shielding the PSU's inductor. There's a poor-person's way to sniff out these kinds of problems: if you have a scope with FFT capability, make a near-field antenna by attaching the ground lead to the scope probe. You now have a cheesy RF probe. Then, go hunting for that mystery 60MHz. My guess is it'll be coming from the PSU's inductor. Want something fancier? Make your own probe: https://www.eng.mu.edu/~richiej/seminar/aidi.pdf Or buy a set: https://beehive-electronics.com/probes.html Considering what lab time costs, this is a prudent investment.
H: Dotstar Light Strip Low Update Frequency I've built the start of a persistence of vision display. The rotation platform itself is built and I have just mounted the LEDs. After doing some testing, I can only get very slow update speeds of the lights themselves. I am using a very simple for loop in Python3 on a Raspberrypi 3B+ using GPIO 10 and 11 to control the strip. The strip is managed by the Adafruit Dotstar library and is controlled by the SPI bus. I choose this Light Strip as it is a clone of the APA102c and is ideal for Persistence of Vision displays. The code below works as design it will travel down the strip and update each LED but quite slowly. Could this be a limitation of the Pi's speed? I feel as if it would have more than enough power for a list update of this nature. import board import time import adafruit_dotstar as dotstar #Reversed Order dots = dotstar.DotStar(board.MOSI, board.SCK, 72, brightness=.2) #Default From Adafruit #dots = dotstar.DotStar(board.SCK, board.MOSI, 72, brightness=.2) n_dots = len(dots) for dot in range(n_dots): dots[dot] = (0, 0, 0) #time.sleep(1) start = time.time() for dot in range(n_dots): dots[dot] = (255, 255, 255) end = time.time() timetoloop = end-start print ('Finished %.2f'%timetoloop + " Seconds") AI: I note your pins SCK and MOSI are the other way around from the adafruit examples which say dots = dotstar.DotStar(board.SCK, board.MOSI, 30, brightness=0.2) So it's possible that although you're using the SPI pins, the clock and data can't take advantage of the hardware transceiver. You might be forcing it to send the bits in software, which in Python, won't be very fast. Try swapping the pins in hardware, and in your code, see if that's faster.
H: How does reading from a peripheral device at a specific address using SPI work? This question is about trying to understand how the communication is implemented on a typical peripheral device such as an accelerometer, or flash chip. More specifically, I'd like to understand how a peripheral device is able to start shifting out data from the correct address immediately after receiving that same address without any handshaking/clock-stretching required. For example, this is the SPI-read timing diagram from an FRAM device. It shows the requested data being sent by the peripheral the very next clock after the address is received. Bonus: What prompted this question is wanting to emulate this behavior for comms between two MCUs. For example, the main MCU would be able to read from the peripheral MCU at different addresses and the peripheral would be able to send data from one of multiple buffers via DMA transfer. The idea behind it is to enable multiple, high-throughput data streams between the devices with minimal overhead of handshaking. AI: The simple answer is hardware. The spi flash and peripheral chips have specific hardware that can work bit by bit and utilise the time a spi clock takes to read the data in time for the next clock to send it out. On a microcontroller you have a generic spi peripheral that usually works at the byte level - you have to wait until the master spi has clocked 8 bits into the slave. The slave then probably interrupts the cpu. You ‘ve then got interrupt latency and other delays until your spi code runs, figures out what it needs to do and prepare the response to reply. If you have a fast microcontroller and a relatively slow spi clock then you may be able to do everything in time for an ‘immediate’ response to the master. This is usually not the case, so you need to use some form of handshake or a difference method of access whereby you send a command and that primes the next response so you can load up the dma controller to respond immediately to the next command. In short, implementing a spi slave on a microcontroller is tricky. Having it emulate a serial flash/ram/fram is even trickier. An fpga comes in handy here.
H: Solving for electromotive force constant in motor armature circuit I have a motor with the following parameters. The motor has gear ratio of 19:1 all values are shown at 12V. According to the electric circuit of the motor armature, this holds: Circuit: how to solve for the k_e constant? I tried to solve for R_a by noting that in the stall condition, ̇w_g=0 and at steady-state di/dt= 0. but can't continue from that point to solve for k_e Motor datasheet : https://www.pololu.com/file/0J1706/pololu-37d-metal-gearmotors.pdf AI: If you are using SI units, the Ke constant is both the back EMF constant (describes how many volts per rad/s ) as well as the torque constant of the motor, ie how many N-m of torque you get per Amp of armature current. So you can solve for it with the stall current and stall torque given in the data sheet: Ke = 0.5932N-m / 5A = 0.119 N-m/A. It's a good exercise to convince yourself that the units are actually the same as V/s^-1.
H: Why does Moore Finite State Machine need more states than Mealy Finite State Machine? I was reading about finite state machines. I read about Moore and Mealy machine and also the state representation. I read that in the Moore machine the output depends on the present state only and in the Mealy machine the output depends on input and present state. But I don't understand how this could vary the number of states? AI: If you're in state A and input X happens, how do you output Y? A Moore machine must transition to state B whose sole purpose is to output Y, then back to A. A Mealy machine can simply transition back to A whilst outputting Y Thus a Moore machine requires more states. You need at least one state for every combination of outputs your machine requires.
H: What are the 9V battery terminal size specifications? I'm trying to find the dimensions of a 9V (PP3?) battery (no specific chemistry). For some reason it's giving me a lot of trouble. I've been able to find most of the information (I checked a bunch of sources and they've all got these same values): However, I can't figure out the allowable range for the terminal diameters and depths. So my question is, what are the min/max values of these dimensions: Where: M = min/max outer diameter of positive male terminal F = min/max inner diameter of negative female terminal H = min/max depth of negative female terminal The min/max height of the positive male terminal I assume is linked to the female depth and also the 0.1mm - 2.1mm minimum range implied (A - D) by the first image above. Also, there's the lip on the terminals to provide the snap action, so, that too. AI: They're specified in the relevant standards, such as IEC 60086-1, which are not free. Fortunately, our friends at the Kenyan Bureau of Standards published a public review copy of the standard: The relevant size for the 9V battery is the "Minature". The male post is of specified dimensions, the female merely has to fit the male (OC render). And, for completeness, here are the overall battery dimensions If you are going to be signing off on tooling to make 1,000,000 snaps, it might be wise to double check against the actual latest standards, but as this battery design is >60 years old probably not much has changed other than conversion to metric.
H: Which USB spec actually defines support for Dual Role Device? Type-C or USB 3.1? I'm trying to get a concrete answer on what determines DRD support... the port type (USB-C) or the protocol type (USB 3.1). Besides the poor naming scheme with USB 3.0/3.1/3.2, there's a lot of lacking communication about the DRD device support (being able to act as a device or host). According to https://blogs.synopsys.com/tousbornottousb/2018/05/03/usb-dual-role-replaces-usb-on-the-go it is any USB spec at or above 3.1, but it also confusingly talks about being Type-C This Intel page talks about having DRD with USB 3.2 Gen 1x1 (5 Gb/s) with no mention of Type-C. Wikipedia mentions DRD on their USB Type-C page, but not on their USB 3.1 page. I'm trying to find some kind of authoritative answer on this question, if possible AI: Dual-role USB ports were introduced in so-called "On-The-Go" (OTG) supplement to USB specifications. (still cannot figure out what OTG means). The role swap came at the expense of introducing one extra pin - ID pin. Therefore originally only mini- and micro-USB ports can provide the swap function, and Type-A can't provide the swap. Additional function of source-sink swap was provided at DC level, called "accessory charging". Type-C Cable and Connector Specification is the next step in providing flexibility to USB. Type-C specifies new CONNECTOR, which can carry various data protocols, although originally it was supposed to be only USB. Thus the Type-C is the standart nearly independent from USB (or anything else), and USB2, 3.x or 4 don't matter. Keep in mind that there are two basic roles of a port - power role, and data role. Since USB is a host-centric protocol, this distinction is quite important. So four combination of roles are possible. Type-C basic (DC-based) communication functionality (over CC pulls up-down) defines only the default swap function - either a host (and a power source), or a device (and a power sink). To provide two other configurations (host-sink and device-source), a negotiation over additional protocol is required. It is implemented within Power Delivery protocol over the same CC wire using serial communication messages.
H: Voltage across open in this diode circuit with two batteries Trying to understand how voltage \$ V_{D1} \$ is found. Here's the original circuit with solution: Here's how I think it can be redrawn, basically the grounds are just one node: So to find voltage \$ V_{d1} \$ one first considers what's voltage at point 1, positive side of \$V_{d1}\$ right? Well, at point 1, voltage is what? \$ -10K \times 1.33mA? \$ How about voltage across 5k resistor? Point 1 is between 10k and 5k resistors... For point 2 it's 0, since the node of that point is connected to ground, right? AI: For \$V_{D1}\$ you can consider two KVL loops—they should both give you the same answer. At point 1, you could start from the leftmost source (start from the ground) and say: $$ \text{10V}-i_{D2}(10\text{k})-V_{D1}=0$$ simulate this circuit – Schematic created using CircuitLab You already have the current then solving for \$V_{D1}\$ results in \$V_{D1}=-3.3\text{V}\$ You may also use another KVL loop: simulate this circuit $$ V_{D1}-i_{D2}(5\text{k})-(-10\text{V})=0$$ And solving for \$V_{D1}\$ will result in the same.
H: What is a ‘dense integrated circuit’ or ‘integrated function’ and how does it relates to Area in Moore’s law? I am very comfortable with the usage of the Moore's law and its impact on microelectronics. However I had always associated Moore's law to the gate length scaling as a factor of square root of 2 every two year. (This then leads to a related performance increase which is of our interest) Only recently I came to realize Moore's law is about number of transistor per area which, I known, was very tightly linked but not anymore (For instance the 14nm technology does not have devices with 14 nm gate length but rather 14nm width finfets). Still in most official definitions they do not use the term ‘number of transistor per area’ they would rather use the terms: "number of transistor per dense integrated circuit" (Wikipedia) "Number of component per integrated function" (Original graph from the paper 1965) “components per chip” (IEEE, IEDM 1975 paper) And thus my question: What is the definition of a ‘dense integrated circuit’ or ‘integrated function’ and how does it relates to Area in Moore’s law? AI: A "dense integrated circuit" simply means that the transistors are as small as possible and as close together as possible. If you designed an integrated circuit where the transistors take more space than strictly needed the it is not "dense" meaning, it could have been made smaller. What Moore writes relates to designs that are as small as possible. His statements simply do not apply to designs that are not "dense" as such designs do not have maximum functionality for a given chip area. An "integrated function" is a function implemented on a chip. For example a 32 bit multiplier is a function and needs a certain amount of logic gates meaning it needs a certain size on a chip. By comparing technologies on the function the comparison is fair and not comparing apples against pears. Comparing more complex designs like a microcontroller quickly becomes unfair as the functionality of different products (realized in different IC manufacturing processes) is seldom identical.
H: Atmega2560 AVCC decoupling We have designed a custom prototype board based on the Arduino Mega (ATmega2560). Our knowledge on electronics are limited so we assigned someone else to design the board. On his design he used the following circuit for noise filtering and decoupling the Voltage on the AVCC and AREF pins of the 2560: My problem is that on the Arduino Mega R3 reference design the decoupling is done this way: So there is a difference that on the AVCC there is no coil filtering (L4) and that they are using 3 100nF decoupling capacitors, while hs is using 1 100nF and 1 10nF Also on the AREF decoupling is done with 1 100nF on the Reference design, while he is using 100nF and 1nF When asked he said that his approach is better, but since my knowledge is limited on the field, I wanted to make sure we are definitely doing this correctly. Here is the Reset circuit AI: Well in theory, with decoupling, more is usually better (although at some point you get diminishing returns). This actually involves two different issues, Decoupling and Bypassing. You can find out more about them here, but basically Bypassing is about getting rid of noise from the supply, and Decoupling is about being able to provide short bursts of current. Technically L4, C10 and C13 are more dealing with Bypassing, while C12 and C11 are Decoupling. In the reference design, those capacitors are more meant for Decoupling, although of course it has an effect on Bypassing as well. The type of capacitor isn't specified, but it should typically be ceramic. The decoupling for the two designs is basically the same, so the difference is the Bypassing. Using a 10uF capacitor instead of a 100nF capacitor will definitely be a bit better, but using an inductor as well will be much better. It turns the RC filter formed by the trace and the capacitor into an LC filter, which is a second order filter and has much higher attenuation at higher frequencies. I don't think theres a question of whether your design is higher performance (it is higher performance), but there is a question of whether it's worth the extra cost and board space, and only you can really answer this as it depends on how precise you need your ADC readings, and what environment your board is in etc.
H: SMPS (LM2678) what transformer to use and why? I have made a few power supplies in the last year (only linear ones using voltage regulators). I have always used a big simple step down transformer, from 230v down to 12/24v (depends on the supply i need). There are a lot of circuits out there on how to make the power supply for the LM2678 but from what I've seen no one writes about the transformer. From what i know, since SMPS operates at a high frequency i can use a smaller transformer? I have a lot of small yellow ones that looks like this: But since i don't know much about smps transformer, and i really don't want to play around with the 230v ac to find out where the primary/secondary of the transformer is. I wanted to ask you guys if you could tell me a little more about what transformer i should use and why. I first thought of using a step down transformer from 230v down to 6v ac, and then use a resistor to limit the current to like 10mA and use that to find the primary of the smps transformer because that would be safer right? Any tips are appricated! Thank you. PDF to the LM2678: http://www.ti.com/lit/ds/symlink/lm2678.pdf AI: You are confusing a mains powered SMPS with a Buck converter. The LM2678 is a buck converter, it uses an inductor but no transformer. This is a typical implementation of a DCDC converter using the LM2678: Note that there is no transformer. The inductor is the component marked "220" (for 22 uH). For the LM2678 to operate you need a DC voltage up to 40 V. You can make that 40 V (or lower) form 240 V AC Mains voltage using a bulky 50 Hz transformer like you have done sofar. Or you can use a Switched Mode Power Supply (SMPS) which could look like this: Note that this has a (small) transformer like the one from your question.
H: Why do we use closed-loop feedback in buck converters? My power electronics professor spent most of his life in the time domain and in application-specific theory (SMPS-only vocabulary). For me, a buck converter is basically a square wave (generated by a switch) passed through an LC filter. The square wave's fundamental frequency and its harmonics are filtered out, and all that's left is the DC component. I understand that closed-loop feedback is necessary if the Vin changes - because you'll need to increase or decrease your duty cycle since your square wave's amplitude (ergo DC component) has changed. Is that it? I also understand that the load impedance might affect the corner frequency of the filter. Is that why we need closed loop feedback? How is this issue mitigated? Which other components of the (supposedly) DC signal does the control loop eliminate? Ripple? (Isn't this just a matter of filter quality?) AI: The main thing you are missing is that what is put into the LC filter is not necessarily always a square wave. It is when the buck converter is in continuous mode, but unless you know that to always be the case, you can't assume the square wave input to the filter as you are. In continuous mode, the output voltage is ideally the input voltage times the duty cycle. However, it's not that simple in the real world. Even if the input voltage stays constant, there is the DC resistance of the inductor to consider, the voltage across the switch, and the voltage across the diode from ground during the pulse low time. The latter can be mitigated by synchronous rectification, but that isn't perfect either. At the least, there is the voltage drop across whatever is being used as the synchronous rectifier switch. Synchronous rectification timing is also usually made conservative, meaning it errs on the side of staying on a little too short rather than too long. The cost of turning off a little early is more voltage drop at the end of the flyback part of the pulse. However, the cost of turning on too late is shoot thru, which rapidly decreases efficiency, and risks damaging parts. I have seen pre-regulation power supplies which were fixed duty cycle buck switchers. In one case, it was used to drop a 48 V distribution voltage down to a rough 12 V, which was distributed locally and dropped to the final regulated voltages by other power supplies. It didn't matter if the 12 V varied a bit. A general purpose power supply has to be designed to handle low load too. Below some load for any switching frequency, a buck switcher can't maintain continuous mode. Some OEM supplies simply state a minimum load is required. More general purpose supplies fall back to discontinuous mode. In that case your fixed square wave assumption fails. Now there are really 3 parts to the cycle. At the start, the input to the LC filter is actively driven high. When that stops, the flyback part begins, which drives the input actively low. Then there is the third phase in discontinuous mode where you consider the input effectively high impedance. The function of duty cycle to output voltage is not longer linear.
H: How to transmit data over a long distance at a affordable price Please do keep in mind that I have no background in electronic communication. The idea is to receive data from electronics at long distances. The distance I will be looking at to read data from electronics is around 10 km (6 miles) and possibly at a later stage longer distances and I would like to keep cost as low as possible. The route that seems to be low cost is getting a raspberry pi zero, connect the electronic device to it and then transmit the data received from the device over radio. The user will have a app on his or her phone/device which will receive these radio signals and then decode it into an app which the user in return can understand. The problem, if I am not mistaken, with this route is security won't be that great as anybody with the same frequency will be able to receive the data and also, again if not mistaken, it is illegal the transmit radio signals over great distances. The questions I have is Is this theory even possible ? Is there a better way of achieving this goal ? What topics do I have to research to understand how electronic devices can communicate with a pie as well as sending and receiving radio signals and decoding it ? A simple example is that if a switch is flipped on or off the pi is notified the signal is broadcasted the user's phone receives it and then the user is notified through his or her phone. EDITED I see a lot of people mention GSM but this uses a cellular network, sadly this option won't suffice as there is no cellular network in the area the pi will be used. AI: If you do not want to customize hardware on the smartphone side your choices are limited to, largest range on top: Iridium network. (satellite internet) LoraWAN. (long range 433 Mhz Internet of Things) Text messages. Cellular internet. WiFi. If you do want to create custom hardware on the smartphone side, you could see if any of the amateur radio bands suffice, or possible the semi-unlicensed 400/800 MHz ISM bands. Or maybe microwave beam connections. Like Mikrotik RBLHG or Ubiquity. Your question right now is quite broad and does not show much research. Maybe start googling with the above.
H: 7405 TTL Chip outputting nothing when given low input I’m struggling learning how to use some of these components for a lab. One thing I noticed is that when giving the 7405 hex inverter a low input, the output when checked by my logic probe shows there’s no voltage coming to the output. I’ve ensured my chip is powered and grounded. Any ideas? AI: 74xx05 ICs have open collector outputs. Therefore, when the input is high, the output is pulled down, but when the input is low, the output is in high impedance. To get an high level output, you should connect a pull-up resistor between the output and VCC (5V). Or, use the push-pull (totem pole) output version, i.e. 7404. simulate this circuit – Schematic created using CircuitLab The value of the pull-up resistor R1 mainly depends on: The speed you need to achieve (the 74LS05 datasheet of one supplier indicates that with a \$2\ k\Omega\$ resistor you achieve a 32-ns low-to-high propagation time, if the loading capacitance is 15 pF). The current that R1 must provide to "what you are connecting to the output of the gate" (e.g. another logic gate), while maintaining the correct high-level value. If you are connecting another gate (or an input of a digital IC), then you must check its high level voltage and its input current. The high level voltage and the input current (input load) depend on the particular logic family you are using. For instance, let's assume you will connect the circuit above (74LS05+R1) to another 74LS05. The 74LS05 datasheet indicates that at 2.7V, the input current is \$20\ \mu A\$. This means1 a maxmimum resistor value of \$(V_{CC}-V_{IH})/I_{IH}=(5\ V-2.7\ V)/20\ \mu A = 115\ k\Omega\$. (NOTE! A standard TTL - i.e. not Low-power Schottky "LS" - has a high-level input current which is \$40\ \mu A\$. There the maximum pull-up resistor value is half the value previously calculated!) Furthermore, the output of the 74LS05 is not ideal, therefore it has no infinite impedance, when the input is low: some current might leak into the output. In the datasheet this is indicated as \$I_{OH}\$ - which is positive for the 74xx05, indicating that this is a sink current. The 74LS05 has a \$I_{OH,max} = 100\ \mu A\$ (see note 2). This drastically reduces the \$115\ k\Omega\$ value calculated above! In case you want to connect the output of the circuit above to another 74LS05, the upper value is now \$(V_{CC}-V_{IH})/(I_{IH}+I_{OH,max})=(5\ V-2.7\ V)/120\ \mu A = 19\ k\Omega\$. In practice, what dominates is the first constraint. The considerations above set the upper bound resistor value. The lower bound is determined by: The maximum current consumption you can accept. The output drive capability of your logic gate (i.e. the maximum current it can provide, while maintaining a low level voltage compatible with your load - e.g. another gate). For instance, the 74LS05 has a \$I_{OL}=8\ mA\ @V_{OL}=0.5\ V\$, which results in a minimum pull-up value of \$560\ \Omega\$. Typically unless you want to go at "high speed" (> 1 MHz) and unless you must connect this output to many inputs (high fanout), a classic \$10\ k\Omega\$ is enough. Bonus fact You can create a "wired-nor" gate, by connecting the outputs of two or more inverters of the 7405! Take a look at the circuit below: when A="1" OR B="1", the output is pulled low. When A="0" and B="0", then the output is pulled high by R1. simulate this circuit Don't do this with regular 7404 gates! Notes: Actually the high level input voltage \$V_{IH}\$ is 2.0V, but the datasheet indicates only the value of the maximum input current \$I_{IH}\$ when it's at 2.7V. This adds some safety margin. \$I_{OH,max} = 100\ \mu A\$ is shown with \$V_{OH}=max\$ (5.5 V). It will be smaller at lower output voltages. Using this value, also adds some safety margins.
H: How can I make contact with the material if soldering is not possible? Sorry for the title, I have problems putting it to words in English. I ordered some small and cheap Chinese solar panels. I thought it was fun to tinker with them and learn about electricity. After my horrible soldering I found out I want them in series, not parallel and during the resoldering I ruined two of them. Too much heat... and no skills. Please take a look at the picture. I was wondering is there any way to make a contact again with these empty holes? If I stick my multimeter in the hole, I still get voltage. Probably I didn't break them for good. I tried to Google the problem, but haven't found answers. Is there some kind of paste or liguid? I cant just stick a wire inside the whole, it doesn't stick. AI: There are all kinds of things that you can try. Usually there's a trade-off between ease of use, and reliability. How about conductive epoxy? Perhaps too expensive. Press-fit pin-in-board technology (pressing pins into PCB, and they 'swage' into place). from: https://en.wikipedia.org/wiki/Swaging#Electronics "In printed circuit board assembly individual connector pins are sometimes pressed/swaged into place using an arbor press. Some pins have a hollow end that is pressed over by the arbor's tool to form a mushroom-shaped retaining head. Typical pin diameter range from 0.017 to 0.093 inches or larger. The swaging is an alternative or supplement to soldering." However, the pin and pcb need to be purposefully engineered for this. Sometimes a solution for this type of problem is to locate another access point on the pcb that you can take advantage of, and solder a wire onto that location. Ultimately the solution is to practice soldering, especially managing heat. Learn how to use heat-sinks to control heat flow while soldering. Use the proper iron temperature and flux for the solder and materials in use. Good luck, Chris
H: Can I ground a digital pin on an Arduino to provide input? I want to monitor whether a fan is turned on or off. No RPM, no voltage levels... simply just is it on or off. The fan is 12V and is controlled by a relay. The relay is closed when a thermocoupler reaches a certain temperature and grounds the internal coil, closing the contacts and providing power to the fan. I was going to go through the hassle (actually I already did, just haven't installed it yet) of building a small circuit to convert the 12V down to 5V. Then I had a thought... what if I use the internal pull-up pin on the Arduino to set it "HIGH", and when the thermocoupler grounds, let that ground pull the Arduino pin "LOW," signaling that the fan is on? I expect I will need to put some sort of safety measure inbetween the Arduino and the thermocoupler to guard against over-drawing the Arduino... but that should work right? EDIT: A "proper" schematic simulate this circuit – Schematic created using CircuitLab AI: A simple diode to the relay should work for you if you use the pull-up on the Arduino input. The diode prevents the fan power from driving into the pull-up. If you are using a 3.3V Arduino you may need to use a germanium diode. simulate this circuit – Schematic created using CircuitLab A small series resistor would not hurt too just in case you happen to drive the pin with the relay closed.
H: TTL to RS232 logic translation Preface: I don't have any MAX232 ICs handy, and only need unidirectional communication (from TTL to RS232). It's just a quick test to see if an old GPS OEM board still works. I don't have any MOSFETs on hand either - just some basic BJTs, as shown in the schematic. I'm using a dual supply instead of parasitic voltages from the serial port. Here's the translation I was after: TTL_Tx --> RS232_Rx     0V         ~ +12V     5V         ~ -12V simulate this circuit – Schematic created using CircuitLab I thought this would work (and it does in LTSpice). Q1 - Turns Q2 on when the TTL input is high, providing a path for current to flow Q2 - Provides a translation of 5V->12V and 0V->-12V at its collector Q3 - Inverts Q2's collector signal for the final output It works perfectly in LTSpice, but on my oscilloscope I see that the output is not being pulled down to the negative rail: Of course, this actually works fine. The serial port is happy and the values are in spec. But I'm still trying to figure out why the circuit doesn't behave as I expected. AI: You probably have some load connected to the output when you measured it with the 'scope. If the equivalent resistance of the load is less than maybe 50 kohms, and it's pulling toward ground, your 10 k pull-down (R3) isn't going to be able pull the output close to -12.
H: How to wire this transformer? I am not clear on what these wire colors mean and where they go I read several color coding guides but I am not sure which wire goes where... My guess is that the black is the L wire, which stands for Live, and the white wire is the N, which stands for Neutral, and that I should ignore the blue wire: So Black on L, White on N, blue stays disconnected. Is that correct? Thank you! AI: Typically the ground is green, not blue, but you do have the colors correct in the general sense (L black and N white). If the transformer doesn't have an input for the ground that will likely need to go somewhere else for safety so although the hook up is neglected for the transformer it is very likely still required elsewhere. As for the voltage of the wire. If you are in the USA and that wire is in a standard plug, you should go to the 110V setting If you are not sure of the voltage, you will want to use a multimeter to check the value of the voltage, and that will give you confidence in the value. You can stick the leads directly into the socket or on the wires themselves, just be sure to be safe.
H: Arduino Uno microcontroller pin broke off The lowest left pin in my arduino uno microcontroller (ATMega328p) broke off. That would be pin PB0 (pin 14). I am wondering, would this have any effect on the microcontroller's functionality, or can I continue to use it if I just ignore this broken pin? Thanks. AI: The functionality of the micro-controller will not be compromised, assuming you didn't do anything else to the micro-controller. You won't be able to use that GPIO pin.
H: 50Ω Impedance Matching with Signals Through Vias I'm working on an IoT board and it is all laid out (LTE, GPS, BLE, WIFI - 30mm x 30mm -- VERY TIGHT). As a design concession, I have to use vias to route some of the RF signals. There's no other way to keep the board that small. I've impedance matched and tuned several RF boards. I'm using the same PCB material, so I am confident the 50Ω traces will be correct. And I have a VNA to tune the matching network to the antenna. However, what happens when the 50Ω traces hit a via? Is there an known equation for impedance matching through vias? Should I even worry about it if the traces are 50Ω? I have a matching network from signal out on the IC to the antenna, so is it a moot point? Just use whatever via you want, and correct the impedance at the matching network? AI: However, what happens when the 50Ω traces hit a via? The via can act as a capacitive or inductive discontinuity in the transmission line. It will make at least a small reflection. Below 1 GHz, this discontinuity is usually too small to worry about unless you're doing something like precision radar work. Above 5 GHz, you'd generally want to carefully design your via to maintain impedance matching as well as possible. 1-2 GHz is kind of a messy middle ground where you might get away with an unmatched via and you might not. So you probably at least ought to make a best effort at designing a matched via. First, you want to minimize any via stub. If you can, route from the top to the bottom layer, not from layer 1 to layer 3, for example. If you can't, expect a capacitive discontinuity from the stub. It's possible to "back-drill" the via to eliminate most of the stub, but that's probably not justified at 2.5 GHz. Second, if you aren't routing between layers that share a ground plane (for example layer 1 and layer 3 might both use layer 2 as their ground plane, but layer 1 and layer 8 don't), then make sure there is a nearby path for return currents to move between the ground planes of the two signal layers. One nearby ground via is okay. Two or three is even better. If one layer uses a power plane as its reference, then place a bypass capacitor for that power net near your via. Third, you can use a tool like the Saturn PCB tool (google it) to design the via diameter and antipad diameter around it as it goes through power and ground planes, to give the via a characteristic impedance matching your line. Is there an known equation for impedance matching through vias? There are at least heuristic formulas. Tools like Polar or the Saturn PCB tool can be used to find the via's characteristic impedance, which depends mainly on the via diameter and the antipad diameter. Should I even worry about it if the traces are 50Ω? At 15 mm trace length and 2.5 GHz, you're over 1/10 wavelength in trace length. It's probably a good idea to make controlled impedance traces, but it will probably not be too critical to get everything exactly right.
H: Control color of Bi-Color LED using Arduino I have this push-button switch which has two solder lugs for 12 VDC power and will illuminate red or green depending on the polarity of the wiring. It may not actually use a bi-color LED, but it seems to be a good representation for how it works. I can't find a schematic for the switch, though I expect it may be something like this: I'm providing the 12V using an LM7812C voltage regulator but I'm struggling to figure out how I could control the polarity of the applied voltage using an Arduino. My idea is to have an Arduino control a MOSFET to switch power to the LED, though I get lost trying to find a way to flip polarity. Is there a way I could control the LED to be red, green, or off using outputs from the Arduino? Or alternatively, just have the switch default to one color and switch to the other when triggered by an output from the Arduino? Thank you! AI: You could also do it with minimal components with a suitable dual op-amp configured as two comparators driven by two outputs from the micro. High on one low on the other would turn on a particular color. Both high or both low would turn it off entirely. simulate this circuit – Schematic created using CircuitLab NOTE: R1 here is assumed to be built into the switch so your LEDs don't fry at 12V. But you need to verify what that illumination method really is. ALTERNATIVE APPROACH: You can also hook the amps up as simple amplifiers with enough gain to drive the outputs to the rails like below. It requires four more resistors but gets rid of some issues with driving op-amps as comparators. simulate this circuit
H: Op amplifier ad8232 Does anybody know how this op amp is working? And what the output signal is - avL, avR or avF. I don.t find similarities compared to a real ecg. **** Edit I don.t understand how this amplifier returns this particular waveform if we connect those 3 electrodes. Does single-lead means that it records the signal from one electrode? AI: Instrumentation amplifiers are used in order to amplify signals coming from particular part of body. They have differential amplifier inside. Diff. Amp. substracts the signals coming from inputs therefore it is very good at eliminating noise. Then the signal is processed by filters. This is how you get the signal in the picture, basically. Please go ahead and make some research about amplifiers.
H: Do stator windings on a permanent-magnet synchronous three-phase ac motor have sinusoidal distributions? In motor-drives textbooks (e.g Ned Mohan's Electric Motor Drives), the text states that the stator windings on ac machines (e.g. PMAC three-phase motors and induction machines) are, in theory, sinusoidally distributed in the air gap. That is, the conductor density as a function of the mechanical angle (for a two-pole motor) can be written $$ n_s(\theta)=\frac{N_s}{2} \sin(\theta) $$ where \$N_s\$ is the number of turns. This is not possible in practice due to the slots, but it is approximated. Is this true for modern PMAC motors ? If we consider one of the three phases, are there more conductors per angle at 90 and 270 degree angles from the magnetic axis than there are at f.ex 60 and 120 degrees ? I tried to find photos, but could not so easily see this... AI: Yes: A PMAC motor has an (approximately) sinusoidally distributed stator winding to produce sinusoidal back EMF waveforms. (Similarly a 3-phase AC induction motor does as well). A "brushless DC" motor intended for six-step commutation may have trapazoidally distributed windings. A good summary is Here An interesting graphical representation with animation is Here
H: Whats wrong with this design I was looking at what goes into driving an LED strip from a microcontroller and i found this https://electronics.stackexchange.com/a/67780/41661 which has this schematic In the question the op states the PWM 3.3v is coming from a MCU but he never states what kind of MCU he is using. I can see that R1 and R2 form a voltage divider that does almost nothing due to the massive difference in resistance and R1 should pull the line down when PWM isnt on and most of the discussion on the answer is focused on that but i dont understand how they came up with that value for R2. According to ohms law 3.3v through a 27R resistor will flow 122ma which seems a lot of current, Arduinos for example can only supply 40ma to any one pin max and its recommended to stay below 20ma when possible according to this link. Now its entirely possible that the OP could be using a much hardier MCU than an Arduino but doesnt this seem like a strange assumption to make given that the MCU isnt specified. I read the datasheet for the IRLML2502 supplied in the linked question and i couldnt find anything about how much current was needed to saturate the gate of the mosfet, though datasheets are still mostly greek to me. Assuming the OP was using an MCU with similar limitations to an Arduino, wouldnt it make more sense to use a 180R resistor value for R2, allowing 18ma to flow at 3.3v or have i misunderstood something? AI: At steady state, the gate of a MOSFET draws no current. (Actually, there may be a few hundred nanoamps of leakage.) It instead acts more like a capacitor. The purpose of R2 is to form a low-pass filter with this gate capacitance, slowing down the rise and fall time of the gate voltage.
H: 3.3V interface on arduino is only giving 0.23V I just received an Arduino ATmega2560 (GEEKCREIT). The 5V interface is giving exactly 5V as expected. But on the 3.3V interface I could only measure 0.23V. What could be wrong? AI: The first thing to verify is the 3v3 regulator, you could start measuring voltages at the IC6 pins (3v3 regulator). Connect the negative probe of a multimeter to ground. Put the positive (red) probe in the IC6 pins. There should read 0V at pin 2, 5V at pin 1 and pin 3, and 3v3 at pin 5.
H: Derivation of ripple factor equation for a full-wave rectifier with filter I'm trying to derive the ripple factor for a full wave rectifier with a filter. This parameter is defined as the ratio of the root mean square (rms) value of the ripple voltage (Vr_rms) to the absolute value of the DC component of the output voltage: γ = Vr_rms / Vdc I use the following plot with an assumption of |AB| = T/2. First I want to write an expression for ripple rms voltage Vr_rms. The ripple amplitude as seen in the plot is Vr. This can be approximated(using Taylor series expansion's first term for exponential decay) and given for full wave rectifier with a filter as: Vr = |XY| = t/τ * Vm, and in this case t = T/2 and τ = R*C Vr = Vm / (2*CRf) and rms value of a triangle wave is given as Vp/sqrt(3) so: Vr_rms = Vm / (2*sqrt(3)xCRf) Now I want to find the average DC voltage Vdc. This can be approximated as: Vdc = Vm - (Vr/2) This yields the ripple factor: γ = Vr_rms / Vdc γ = [Vm / (2*sqrt(3)xCRf) ] / [Vm - (Vr/2)] γ = [1 / (2*sqrt(3)xCRf) ] / [1 - (Vr/(2*Vm))] and since Vr/Vm = 1/(2*CRf) γ = [1 / (2*sqrt(3)xCRf) ] / [1 - (1/(4*CRf))] I'm stuck at this point I cannot progress and the texts give this factor as: How is this derived? I cannot reach this.. AI: The RMS value of a triangle wave is its peak value/sqrt(3). In your case the peak value of the triangle wave is Vr/2, not Vr which is the peak-to-peak value. This correction will produce a factor of 4 in your final result instead of 2. If you then make the approximation that RC>>T, then CRf>>1. With that approximation, the denominator in your final equation can be approximated as 1 since 1/(4CRf)<<1. The result is that your final equation reduces to the desired result.
H: 4n25/35 optocoupler detect led on/off Hey all i am just wondering if my drawing below is correct in order to have an arduino detect an on or off led on another board using a optocoupler? My thoughts of the above drawing is that when the led is on it will trigger the relay inside and send 5v to the arduino digital pin to read. 0v if the relay inside is not connected. I also would possibly need to tell the arduino digital pin that its an input pullup like this: pinMode(pin, INPUT_PULLUP); please advise if this is correct or not. Im looking to connect the 4n25 to a HM-10 bluetooth module led: AI: simulate this circuit – Schematic created using CircuitLab Figure 1. A typical opto-isolator configuration. My thoughts of the above drawing is that when the led is on it will trigger the relay inside and send 5v to the arduino digital pin to read. 0v if the relay inside is not connected. Close, but not quite right. It's not a relay; it's a transistor. It will send 5 V to the micro if wired as in (a) and zero if wired as (b). I also would possibly need to tell the Arduino digital pin that its an input pullup like this: pinMode(pin, INPUT_PULLUP); That is correct for (b). For (a) you need to pull down. The idea of the pull-up / down is that when the opto-isolator is turned off you want to pull the input to the opposite rail that the opto-transistor is wired to.
H: Are present state and next state equal between two clocks? I know things that happen every time clock ticks. Present state and inputs are delivered to the combinational circuits and it produces the outputs and the next state information and sends the next state to the memory elements. Then memory elements(e.g A SR flip flop) read the S and R signals and lock the Q on a new value based on them. The thing that I don't understand is what happens until the next clock? It seems that there's no apparent obstacle/isolation between the next state and the current(present) state in this time interval... Are they equal until the next clock? Of course still everything else make sense to me and this is not contradictory to anything I knew about memory elements and flip flops and etc... , because actually, at every clock-tick moment, information from memory elements are read from one epsilon moment before, and the combinational circuits have a delay too, so for a special moment the present state and the next state are different and are really what their names suggests, but in the middle of two clocks, my defective understanding says they should be equal... . AI: In a topology like this, the present state is read from memory and passed through combinational logic to compute a new state. Until the clock ticks, that new state is sitting at the write port of the memory waiting to be written. As soon as the clock ticks, the new state is written to the memory, and for a brief instant the present state and next state are equal. This brief instant is the propagation delay of the memory (time from clock edge to availability on read port) plus the propagation delay of the combinational logic. After this time, the NEW new state is sitting at the output waiting to be written, and the cycle continues.
H: Superposition problem with \$\Delta\$-Y conversion I'm trying to use superposition to solve the following linear circuit: Step I step I considered each active component as: But results are always wrong. Same procedure on many other circuits give me right answers, but not this one, for some obscure reason. For example calculating I5 Step 1 Calculate parallel $$RP=\frac{(R5+R4)\cdot R6}{(R5+R4)+R6}=\frac{2\cdot 1}{2+1}=\frac{2}{3}$$ Calculate serie $$R_{tot}=R1+R3+RP=3+\frac{2}{3}=\frac{11}{3}$$ Current for the equivalent circuit (R1 and R3 current) $$I_{tot}=\frac{E1}{R_{tot}}=\frac{10}{\frac{11}{3}}=\frac{30}{11}A$$ Current for R5 $$I_{R5}=I_{tot}\cdot\frac{R6}{(R5+R4)+R6}=\frac{30}{11}\cdot\frac{1}{3}=\frac{10}{11}A$$ Step 2 Quite the same as Step 1 but with half of voltage and opposite sign $$I_{tot}=\frac{E3}{R_{tot}}=\frac{5}{\frac{11}{3}}=\frac{15}{11}A$$ Current for R5 $$I_{R5}=I_{tot}\cdot\frac{R6}{(R5+R4)+R6}=\frac{15}{11}\cdot\frac{1}{3}=\frac{5}{11}A$$ Step 3 Calculate parallel $$RP=\frac{(R5+R4)\cdot (R3+R1)}{(R5+R4)+(R3+R1)}=\frac{2\cdot 3}{2+3}=\frac{6}{5}$$ Calculate serie $$R_{tot}=R6+RP=1+\frac{6}{5}=\frac{11}{5}$$ Current for the equivalent circuit (R6 current) $$I_{tot}=\frac{E6}{R_{tot}}=\frac{10}{\frac{11}{5}}=\frac{50}{11}A$$ Current for R5 $$I_{R5}=-I_{tot}\cdot\frac{(R3+R1)}{(R5+R4)+(R3+R1)}=-\frac{50}{11}\cdot\frac{3}{5}=-\frac{30}{11}A$$ Step 4 \$\Delta\$-Y conversion In circuit 3 resistors have the same value so the equivalent Y have 3 resistors of value $$\frac{1}{3}$$ Calculate parallel $$RP=\frac{(R1+RA)\cdot (R3+RB)}{(R1+RA)+(R3+RB)}=\frac{\frac{4}{3}\cdot \frac{7}{3}}{\frac{4}{3}+\frac{7}{3}}=\frac{28}{33}$$ Calculate serie $$R_{tot}=RC+RP=1+\frac{28}{33}=\frac{13}{11}$$ Current for branch RA $$I_{tot}=A5\cdot\frac{(R3+RB)}{(R1+RA)+(R3+RB)}=10\cdot\frac{\frac{7}{3}}{\frac{4}{3}+\frac{7}{3}}=\frac{70}{11}A$$ So I5 should be $$I5=\frac{10}{11}-\frac{5}{11}+\frac{30}{11}+\frac{70}{11}=\frac{105}{11}A$$ Which is wrong because of the result must be $$\frac{85}{11}A$$ The same if I consider RB branch instead of RA. What's wrong with my procedure? AI: I'm going to assume you were able to handle the currents correctly in all of your circuits except for the last one. I think you laid them out correctly and I'm fairly confident in your ability to work out the magnitude and direction, in those cases. So here is the final circuit case where I think you messed up by mushing up \$R_5\$ into your \$\Delta\$-Y conversion. You need to do that conversion differently, as shown here: simulate this circuit – Schematic created using CircuitLab Note that I didn't destroy \$R_5\$ with a \$\Delta\$-Y conversion. I chose, instead, to convert the other \$\Delta\$ so that \$R_5\$ was left intact. At this point we don't care at all about \$R_A\$. All the current flows through it. We only care about how it splits, after that. Here, you can see that the two branches are \$1.25\:\Omega\$ and \$1.5\:\Omega\$. This means a \$5:6\$ ratio. In other words, \$\frac{5}{11}\$ths of the current is going to flow through the branch containing \$R_5\$. So the current in \$R_5\$ here is \$\frac{5}{11}\cdot 10\:\textrm{A}=4.\overline{54}\:\textrm{A}\$.
H: Rogowski coil response factor frequency dependence I am creating a high current (kA) pulse (<1 ms) by discharging a supercapacitor into a low resistance (<1mOhm) circuit. The switching is done by paralleled power-MOSFETs. To measure the current I use a rogowski coil (RCT16-50000 from Accuenergy, no data sheet provided). According to Wikipedia, the output from the coil is: This output is integrated by the math function of my PicoScope's software to deliver a function proportional to the measured current. This function must be multiplied with a (coil dependent) response factor to get the current. According to Accuenergy, my coil's response factor is 2.0 mV/kA @ 50 Hz and 2.4 mV/kA @ 60 Hz. They don't provide the full specs (A, N and l) of the coil (companies support is not responding). I don't understand why the response factor is frequency depended, even though frequency is not a factor in the equation above. Also, I don't know the frequency of my current pulse. Any ideas how to calculate the proper response factor of my coil for my pulse? AI: $$v(t)={\frac {-AN\mu _{0}}{l}}{\frac {dI(t)}{dt}}$$ From Curd's answer you get the response of a sinewave: $$v(t)={\frac {-AN\mu _{0}}{l}}{I_0\omega \cos(\omega t)}$$ Let we introduce a constant \$K_a\$ as from your example: $$K_a={\frac {-AN\mu _{0}}{l}}{\omega}$$ Now this is the output voltage from Rogowski coil with your constant: $$v(t)={K_a}{I_0\cos(\omega t)}$$ But we could go in different way: $${\frac {-AN\mu _{0}}{l}}=\frac{K_{a_{50Hz}}}{\omega_{50Hz}}$$ At the output of the Rogowski coil, put the integrator as this is the normal practice. $${V_{\text{out}}=\int v\,dt={\frac {-AN\mu _{0}}{l}}I(t)+C_{\text{integration}}}$$ $${V_{\text{out}}=\int v\,dt=\frac{K_{a_{50Hz}}}{\omega_{50Hz}}I(t)+C_{\text{integration}}}$$ For \$C_{\text{integration}}\$ you can put a PI controller, that is subtracting the output voltage drift. If the mean value of the current is zero over long period of time, you can use the PI controller to compensate the the drift of the integrator output. simulate this circuit – Schematic created using CircuitLab
H: Relay output from MCU with enhanced safety level I want to do a relays output with enhanced safety level (redundancy and EDM). For that, I plan to use two force-guided relays driven each by N-channel MOSFETs. However, I'm wondering if I can use only one MCU outputs to drive these two MOSFETs or if I should use one MCU output by MOSFET. Can I assume the MCU transistor output will never be shorted when used to drive MOSFET ? Or should I use two MCU outputs (one per MOSFET). Here is my schematics : Relay1 is the MCU output Relay_1_EDM is connected to MCU input and is used for External Device Monitoring START_STOP_COM and START_STOP are the relay output with enhanced safety level EDIT : This device is intended to be used on a crane. Currently, this crane works with a button box without any safety at all (except limit switches). It has a power line contactor driven by a start button with self-maintain and a stop button Each motor has its contactor. There is any E-stop, external monitoring on contactor or safety device. Crane schematic can be viewed below : My work is to replace the button box by a radio remote. In order to have a safe communication between RF remote and station, the station MCU will send a heartbeat with nonce (autoincrement byte) and the remote MCU should reply to this heartbeat with the right nonce value within a timeout delay. In case of problem, the station MCU will stop the crane by acting on the power line contactor (On the schematic above, START_STOP will be connected to terminal 3 and START_STOP_COM to terminal 1 which is connected to P power line contactor coil). This is why I need this output with enhanced safety level. For now, I think the redundant force-guided relays output with EDM and, as proposed by Dan, driven with two charge pump (one for each relay) and two MCU outputs would be a good solution. I would also include the crane power line contactor monitoring into the EDM. AI: I would never assume any such thing in a safety critical application, and in fact would probably be getting rather more serious about my stuck relay detection as well (You want to be able to detect if any relay is not in the expected position, not just that BOTH have failed). Further, I would be very nervous about a situation where a micro pin in a steady state could cause a dangerous condition, far better to use a charge pump to drive the mosfet gate so that to engage a relay the processor must keep a pin (or better, two) toggling at a few kHz (And do the toggling from within the main loop), this means that a failed program will probably cause the relays to drop out. One further thought, remember that testing a non trivial program for "If A and B and not C then D within 100ms" is straight forward, what is much harder is proving that D ONLY occurs if A and B and not C.... The state space for that is MUCH larger. I hope your software development process (And requirements process) is suitably robust for this sort of safety critical work. Editing to add a charge pump example... simulate this circuit – Schematic created using CircuitLab In reality I would probably use a dual diode in a SOT23 or such and the cap values will need tuning to taste, but it gives the basic idea. The resistor discharges C2 making the relay turn off shortly after the pulsing goes away on the micro pin.
H: Won't get 5v on input of Arduino with power bank I don't know why but i'm not getting 5v on the input of the Arduino, the only thing I've done is to add a switch in order to interrupt the circuit. Here it's my schematic: I have another issue with the battery charger, I don't know why but in order to output tension it needs to be plugged to the main power supply (220v AC) so that it leaves the "stand by" mode. Is there any way to bypass this? Or how can I simulate this behavior without doing so? I'll leave a picture of the controller too. AI: The big component marked 2R2 is an inductor. That's a tell tale sign of a boost (or buck) converter. This allows the power bank to output higher voltage (or more current in case of a buckconverter) than the batteries are able to provide. Boost converters work by shorting the inductor to ground and then using the stored energy to boost the voltage. Most power banks using such a boost circuit will have a sensing circuit to turn it off if there is no load. The simplest method of keeping the circuit enabled is by adding more load to increase the current.