text
stringlengths
83
79.5k
H: Radioshack 555 Timers So I went to RadioShack recently because they were having a 40-80% off liquidation/closing sale. I picked up quite a few things, and one was a 555 timer for a decent discount from its already low price. Now, I'm about to make an online purchase and I don't know which one it was. It was either the tlc555cp or the ne555p. So, two questions arise: What are the differences in pinout/internal circuitry the would make them different, and are there any such differences? Thanks! EDIT I'm home now. I see it's a TLC555CP. What are the differences between that and the NE555? AI: The TLC is a newer version using a different type of semiconductor technology. The NE is a TTL chip while the TLC is a CMOS chip. It has different VIL/VIH/VOL/VOH and VDD levels, as well as IOL and IOH. As such, the TLC version cannot accept as high a voltage as the NE version, and it cannot drive as large a load directly. But the benefit is a much lower IQ, or standby current. There is some other differences in timing and other specs, but That's the main difference for hobbyists on general projects. This can all be learned from the datasheets for each chip.
H: Transformer vs Inductor for lighting a bulb or any other appliance There was a question in my school physics exam which is as follows: Consider a 100W bulb which operates at 50V dc. John wants to light this bulb by a 200V ac source. What component should he use, also give its specifications. The answer to the question is an inductor, with which I have got no issues. But in the exam, I wrote my answer to be a step-down transformer, which I have myself used for such applications. In the explanation I wrote the following: A step-down transformer shall be used for this purpose. The specifications would be : 200V/50V (rms). The 50V rms voltage will dissipate the same power as 50V dc in one cycle, so irrespective of the current required, supplying the required voltage will achieve the same results. The winding of the primary and the secondary coils will be in the ratio 4:1 (assuming lossless transmission) My teacher didn't accept this answer and neither did she give any explanations for why my answer was wrong. Despite having used it myself for the same purpose (powering my ac motors which operate at lower voltages - 12V), my answer was marked incorrect. Why is it so, or is it incorrect at all (since the question was ambiguous, I chose to write transformer as my answer)? AI: Your answer is a possibility, however if transformers had not been covered it might be considered incorrect. Why not a capacitor, for example. Also it avoided you calculating the reactance at your mains frequency and thus the inductance which was probably the point of the exercise. I would not consider your answer complete in any case, as you did not specify the VA of the transformer.
H: Common Emitter Amplifier Problem (Incredibly lower Gain than input, and Distorted) I'm trying to create a common emitter amplifier to power a medium sized 8 ohm speaker as a learning experience using one NPN transistor specifically the PN2222A. Here's the design schematic in LTspice. The arrow pointing to the 8 ohm resistor is the speaker that I'm using. I put it in the simulator so I can see how much current would be going through it. I run the simulation producing a 400hz sine wave. The results are a clipped sine wave current going from only 1.6mA to 3.2mA. Which is much smaller than what the input of 200mv could produce on its own. I removed the 8 ohm resistor and ground so I can check to see the voltage of Vout. The results are normal. The gain is about 7x of the 200mv input. I then tested this using my breadboard hoping it would yield different results. It did not and what resulted was a quiet speaker that produced a distorted sound. I could push my speaker much louder by just connecting the 200mv input directly into the 8 ohm speaker. Why is it when I add an 8ohm speaker to Vout which has a normal voltage level gain of 7x of the input, that my current is completely distorted and only pushes 3.2mA through the speaker? Shouldn't plugging my 8ohm speaker into Vout give me something around 300mA? How do I fix this problem? Please be as detailed and informative as you can. I am new to circuits and circuit design. Thanks. AI: To start out, you need something that can both push and pull on your speaker. This "something" is called the output stage. (Which implies that there is more than one stage, by the way.) Broadly speaking, for good performance this usually means two active devices, not one. It can even mean four of them, if you set them up in an H-bridge; aka, bridge-tied load (BTL.) You can look at the TDA8551 for an example of a \$1\:\textrm{W}\$ BTL style amplifier. A main reason to consider a BTL is that you can get more power from a single power supply rail. In your case, with \$5\:\textrm{V}\$, this might be a useful advantage. But doing it from scratch and not using an IC comes with complexity. So it's off the table. In all these output stage cases, the voltage gain is usually taken to be about one. The main purpose of the output stage is to match up impedances and deliver power. Power is both voltage and current. But the usual approach here is to get the voltage taken care of first, before it arrives at the output stage, and then just focus on improving the current compliance at the output stage. So a voltage gain of about one is fine. Your amplifier topology is a standard (sub-standard and more bookish teaching form, really) one when voltage gain is desired. It won't drive a speaker well. It's not designed to deliver power into an \$8\:\Omega\$ speaker. And it pretty much won't. It comports more with an earlier stage. Let's hold short of using it, for now. (It might be possible to design a one-BJT amplifier to work with your speaker, but I'm almost certain you'd also need a transformer unless you wanted to run things class-A, with a substantial DC current, limited speaker travel and probably some rather weird distortions from mechanical asymmetries. I'm not going to approach either of these here.) Let's first examine what we do have. You want to use \$5\:\textrm{V}\$ for your power supply. It's a single supply, too. When using a single supply rail, the power available is this: $$P = \frac{V^2}{8 R}=P$$ That's assuming we can use all of the supply voltage and deliver it into the speaker. But we can't. Sadly, you need to suck up close to one volt from each side just to keep the two needed BJTs out of saturation. Now, that's a very bad thing with only \$5\:\textrm{V}\$ to work with. So we need to make some serious compromises. I'm going to set aside only \$\tfrac{1}{2}\:\textrm{V}\$ for each side, leaving an estimated \$4\:\textrm{V}\$ to work with. That should be livable, and given the paltry power supply to work with, not much choice really. This thought process means we cannot expect more than \$63\:\textrm{mW}\$ of output power into an \$8\:\Omega\$ speaker. Since that is way below a very standard rating for cheap speakers, we are in easy territory. The full schematic will look something like this: simulate this circuit – Schematic created using CircuitLab There is a lot to not like about the above schematic. For one thing, I had to give up another volt for the 3rd BJT. Which is a lot considering just how little you've got, anyway. An advantage of losing that voltage, though, is that the driver BJTs almost certainly won't much exceed a peak current of \$100\:\textrm{mA}\$, which is fine for almost any small signal device. So take the good with the bad, I suppose. For another, the circuit is not actually designable. But I tried to keep it down in parts and if you are willing to tweak things a bit I think you can make it work acceptably. I don't want to explain \$R_1\$ and \$R_2\$, for now. Just suffice it that I set them to drop about \$100\:\textrm{mV}\$, each. \$C_1\$ is big. Feel free to make it smaller and see how things go. It's not critical. Given that the BJTs will have collector currents peaking around \$100\:\textrm{mA}\$, I can generally expect the base currents to peak at about \$1\:\textrm{mA}\$. I figure because of wasting some voltage for \$V_{CE}\$ of \$Q_3\$, I'd set the midpoint driving \$C_1\$ to about \$2.8\:\textrm{V}\$ to give the most working range (\$2.8\pm 1.7\:\textrm{V}\$, or about \$45\:\textrm{mW}\$ into the speaker if we are lucky.) So I set \$R_3\$ to provide \$8\:\textrm{mA}\$ of available current, as \$R_3=\tfrac{5\:\textrm{V}-\left(2.8\:\textrm{V}+0.7\:\textrm{V}\right)}{8\:\textrm{mA}}\approx 180\:\Omega\$. (I can do this as \$C_1\$ bootstraps things by maintaining a near-constant voltage across itself.) This current flows down through \$R_4\$, \$D_1\$, and \$D_2\$ before becoming collector current for \$Q_3\$. The bases of \$Q_1\$ and \$Q_2\$ borrow from this current, as needed. \$Q_3\$ picks up whatever is left over. Now here's the rub. You want \$Q_3\$ not only to work to drive the output BJTs, but you also want gain from it, too. Nailing its emitter to ground means lots and lots of gain (too much, really.) But there's negative feedback to the rescue in the form of \$R_5\$. But getting all this right depends on the specific details of \$Q_3\$. And that means this circuit depends on \$Q_3\$ parameters which we ... cannot exactly count on. Like the value of \$\beta\$, for example. So, you get to do some tweaking. First, with no input signal provided, adjust the value of \$R_5\$ until you measure a value of \$2.8\:\textrm{V}\$ at the midpoint between \$R_1\$ and \$R_2\$. Then adjust \$R_4\$ until you see about \$1\:\textrm{mV}\$ across \$R_1\$. If you need to remove one of the two diodes to achieve this, do so, and then increase \$R_4\$ to make that up and continue tweaking to achieve \$1\:\textrm{mV}\$ across \$R_1\$. Go back and double-check the mid-point voltage for \$2.8\:\textrm{V}\$. (And make sure that there is about \$1.4\pm 0.2\:\textrm{V}\$ across \$R_3\$.) Now you see why this circuit isn't so designable. \$Q_3\$'s \$\beta\$ matters. But once you get the quiescent part down about right, you then have the ability with the use of the potentiometer to adjust the gain to just what you want. Part of the reason you need that potentiometer, too, is because your negative feedback in \$R_5\$ is doing dual-purpose: negative feedback and biasing. Still, I think it may work. This is the price of minimal part counts, though. More designable would be something like the following: simulate this circuit Here, \$Q_3\$ still serves its main purpose. But the negative feedback goes to one side of the long tailed pair(\$Q_4\$ and \$Q_5\$) and can be adjusted independently. Biasing of \$Q_3\$ is handled almost automatically by the way I arranged the long tailed pair, too. You can adjust the gain by playing with \$R_9\$ -- making it smaller increases the gain by reducing the negative feedback. If you are actually interested in the design details here, I can add that. There are still many more ways to do this. But now you can see why people just use ICs these days. For example, look at the TDA8551. It's cheap, readily available, includes a volume control you can use by just pulsing it up or down, and uses a bridge-tied load configuration to get the most out of a small power supply voltage. It will put out a LOT more power than the circuits shown above. And you don't even need much of an education to design with one.
H: Finding Poles of an RC Op-Amp Circuit I am not sure how to get started with this practice question: I think to find the poles I need the transfer function, but I'm not sure how to analyse this circuit. Any help would be greatly appreciated. AI: Your assumption is correct - for identifying the poles you need the transfer function. This function can be calculated by yourself using one of the classical methods for analyzing opamp-based feedback amplifiers. In this case, I would propose to use the information that for an ideal opamp with unity feedback the differential input voltage vd=(vp-vn) across the opamp input nodes is zero. Hence vp=vn. Hint: For both voltages you need to apply the superposition rule.
H: How to select series resistor for a Zener Diode I have to simulate the reverse bias curve in Multi Sim with a 1N4681 I understood the equation to work out the series resistor to be: $$R_s = \frac{V_S-V_Z}{I_Z}$$ Which in my case would create a 101 Ohm resistor. However, this doesn't seem to be creating the characteristic curve that I was expecting. Datasheet I am using for reference simulate this circuit – Schematic created using CircuitLab Therefor, am I selecting the correct value for the series resistor? And when you're making the above calculation with the view of performing a DC Sweep what Voltage do you use for the source voltage calculation? Mean voltage? Max Voltage? Arbitrary value? AI: First, you have to consider that every (Zener) diode has a power rating. From this power rating, you can calculate a maximum current for the diode. E.g., if a Zener diode has a maximum power rating of \$ 1~\text{W} \$, and a voltage rating of \$ 2~\text{V} \$, the maximum current through the diode should be \$ 0.5~\text{A} \$. If you want to connect this diode to a voltage supply of \$ 5~\text{V} \$, then you need something (a resistor) that will create a voltage drop of \$ 3~\text{V} \$: $$ R = \frac{5~\text{V} - 2~\text{V}}{0.5~\text{A}} = 6~\Omega $$ Power rating for this resistor should be at least \$ P_R = I^2 R = 1.5~\text{W} \$. Now, you want to place some load in parallel to the Zener diode. This will reduce the current through the diode, which will result in a lower voltage. To calculate exact operating point, i.e., voltage drop at the Zener diode, we need more information on this diode, like its \$U\$-\$I\$ static characteristics. As for the 1N4681 diode datasheet, you can see that its maximum voltage is \$ V_{\max} = 2.52~\text{V} \$, and its minimum voltage is \$ V_{\min} = 2.28~\text{V} \$. The actual operating voltage will depend on the current through the diode, which depends on the series resistor, as well as on the load that is in parallel to the diode. You can also see that the maximum current is \$ I_{\max} = 0.095~\text{A} \$. The maximum voltage would occur for maximum current through the diode. Also take into account that the power rating for \$ 100~\Omega \$ resistor should be at least \$ 1~\text{W} \$. I've looked through your model - everything is fine except for \$ R_S \$ parameter in the diode. Change this parameter to \$ 0~\Omega \$, and everything will be fine. For this particular diode, you may want to set the series resistor to \$ 80~\Omega \$. Voltage drop on the Zener diode at the breakdown voltage region can be approximated using a linear function, as follows: $$ V_D(I_D) = k I_D + c $$ where \$k\$ and \$c\$ are the diode parameters. The voltage equation for the system is as follows: $$V_S = I R + V_D(-I), \quad I_D = -I ,$$ where \$V_S\$ is the voltage source, \$ I\$ is the system current, and \$ R\$ is the series resistor. Combining these two equations, we get the \$U\$-\$I\$ static characteristics of the system: $$V_S = I(R-k) + c$$
H: Right motor for a camera gimbal and what kind of a gimbal motor is this? From information on the Internet I understood several things: Low KV motors are better for gimbals. For lower KV thinner wire is used with more turns. Outrunner motors have more torque than inrunners. More poles give smooter rotation and finer resolution. PMSM motors are driven by sinusoidal signal and therefore are rotating smoother than BLDC. Please correct me if I am wrong. So, now, this is a medium sized (60mm OD) motor from a gimbal which has very high torque. The wire is thick, its inrunner, has low pole count. All these things oppose the information above. What is going on here? AI: largely true. Often true but not universal. Somewhat true but pole shapes and drive waveform also matter. There's not much physical difference in construction betweet PMSM and BLDC. If any, it's likely to be shapes of the pole pieces. Now what's going on with that motor? That's pretty thin wire and quite a high turn count. Moreover with 12 coils arranged as 3 sets of 4, you can get a 4:1 variation in Kv and 16:1 variation in winding resistance by connecting each set of coils either in parallel or series. I expect these are connected in series. Given the same number and size/shape of poles, the same gap, the same magnet strength, and the same winding, you wouldn't expect any difference between inrunner and outrunner. The outrunner version of this motor could be more compact : turn the magnetic circuit inside out and the bulky windings would then be inside and the thin ring of magnets would be outside. However that would leave little or no space inside the motor for an axle and decent bearings. Looks like you could stick your thumb through that space. So I guess they chose the inrunner for mechanical reasons. 12 stator poles and presumably 14 rotor poles is pretty high, it's a common outrunner configuration. For camera gimbals you probably need closed loop positioning anyway, which will compensate for lack of smoothness.
H: Use Teensy 3.2 in breadboard without soldering I bought a Teensy 3.2 board, and the package included some headers: I want to use the Teensy in a breadboard, and so I plugged in the headers and put the entire thing in my breadboard: The little holes in the Teensy and the header pins don't make a good connection, so I have to apply some sideways pressure to make it work. I guess the intention is that I solder those pins to the Teensy, right? I don't have a soldering iron right now though and I would like to keep the Teensy in its current state, so is there another way to connect it to a breadboard? Thanks for the help! AI: Get a set of press-fit headers (e.g. these) instead. The loops press against the sides of the holes in order to make a decent connection. Note that they may come loose when the board is removed from the breadboard though.
H: Thermal relief for thick PCB traces A PCB trace that carries considerable current (~5 Amps) needs to be wide, on the order of 4 mm. I am concerned that this wide and thick (70 mil) trace may cause problems during hand soldering, but cannot figure out a way to make thermal relief for the pads in Kicad. It is easy for copper fills, but that would mean drawing the outline for each trace by hand. Is there a less laborious way? AI: There are two cases: the current needs to run through the pad: you don't want thermal relief the current doesn't need to run through the pad: there is no need to connect the pad directly on top of the trace
H: Setting maximum opamp input voltage by zener diodes with respect to supply voltage When I was about to implement a circuit with a 24V supply voltage I noticed that the comparator's inverting input in the part below receiving 24V with respect to ground when the input signal goes high. I was investigating hysteresis and I also add 2Vpp noise to the input signal which makes the input voltage higher than supply voltage. So the non-inverting input goes at least up to 24V in the circuit below: As a remedy to limit the input voltage less than 24V just after the C1 I added to 15V zener diodes back to back as in the below schematic(I think I have to set R1 R2 again in this case): Is my concern correct? What should be the max input voltage to an opamp comparing to the supply voltage Vcc? I used zeners to limit the voltage which works in simulation. Is that doable? eidt: I just learned opmap input could exceed Vcc depending on the opamp: AI: The LM290x survives differential input swings up to 36Vmax and functions with common modem to gnd, so Zener is not necessary. Are you having switching delay issues? Hysteresis looks like 4V to me.
H: Is setting software flags an effective use of interrupts? I'm currently working on a microcontroller(Arduino) project in which I wish to use interrupts generated by pushbuttons and timers. However, I'm not sure if I'm 'effectively' using the interrupts. Here is my following architecture approach: Let's say I have three interrupt sources: one tied to a digital input, and two tied to internal timers. Upon a hardware interrupt flag being set, the associated ISRs will run. I also implement a 'main loop'. This main loop is untimed in the sense that it will continuously run as fast the processor allows. Within this loop, there is a series of software flags that are checked. These software flags are set in the ISRs. This loop is demonstrated in the pseudo code below: /* main loop */ while(1) { // Check digital input flag if(digi_in_flag) // do some routine //check timer 1 if(timer1_flag) // do something routine //check timer 2 if(timer2_flag) // do something routine } Now the reason I'm doing this is to keep the ISRs short. Essentially, my ISRs only set a software flag that is then checked in main loop. Some of these routines lead to SPI/I2C communications, so I didn't want to place those comms in an ISR. So my question: does this make sense? Does this actually create a more efficient program? I feel like I'm still 'polling' by checking software flags. Alternatively to using interrupts, I could have written a loop that just checks a digital input (as opposed to a software flag set by an interrupt), or I could have just made a function to check time duration (i.e. curr_time - prev_time) instead of relying on a timer interrupt to set a software flag. Any thoughts on this? Also, I'm limited to a single thread in this design. Thanks AI: To talk efficiency you need to identify what it means for you. Your design is all right, but as you guess there're other options available like putting execution into ISR rather than in main loop. Let's consider the following: in your current design when interrupt happens only flag is set; execution, related to the "next" flag will be performed only when main thread finishes processing current flag, and your application will remember that there will be at least one related interrupt (flag is set = related interrupt occur at least once). This is more or less linear approach, which logically and physically separates processing of flags; now consider you put flag/interrupt processing into ISR. Then you should take very precise care about interrupt enable/disable. If new interrupt comes, it may interrupt service of current "flag" and start servicing new "flag". What (external) process, attached to service of first flag, will think about it? Next, if two same interrupts occur while previous servicing did not finish, will processing overlap and external device malfunction? You see - there're a number of choices (we see 2 above), and you must select the strategy which best fits the attached device protocols and their timing. There're no wrong ways of doing things, there're ways which lead you into situations when (a) you just can not implement what you want specific way and (2) solution is not scalable (in time or capacity).
H: How to add bouncing to a switch in LTspice? Is it possible to add bouncing for a switch in LTspice? Below is a reed relay simulated in LTspice. I can set the on and off resistances but is there a workaround to create bouncing as well? With no bouncing, the simulation of the relay outputs the following clean output: By bouncing I mean something similar to this: The reason I'm asking this question I want to see if I can implement an RC debouncing circuit in simulation which works before implementing. AI: Just use another of the VCSW elements and a different voltage source to control it. Place those in parallel to your existing VCSW. Then set the timing so that it delays until it gets close to an edge you want to test. Something like this: I've used .PARAM to set F to 500 Hz. The left side MYSW emulates the 500 Hz period of the reed relay. The right side emulates bounce (I divided by an additional 200 to make the pulses short.) Take note of the .22/F delay. The left side uses a delay of .25/F. By making the bounce switch delay a little less, this gets the pulses to start taking place a little beforehand. I also cap the number of cycles to 6 here. But you can adjust as you want. EDIT: Here are the pictures of the simulator I set up in LTspice, below. You may need to adjust the filter capacitor to reduce the swing to stay within the 4V hysteresis limits. Also, your LED will affect this. Truly, this would be a LOT easier with a micro. Or using a 7555 as a schmitt trigger, I suspect. This is really overly-complex.
H: Design a PCB using Kapton film I am a novice in electronics and wanted to design PCB , as a final year project i am planning to do something related to room heaters so i have decided to use Kapto/polymide material for that. I am planning to build a PCB like mentioned in this link Kapton 12v (4" x 2") Can anyone guide me how to achieve this using a Kapton film like this Any suggestions regarding process or steps for this particular use case would be helpful AI: Don't do that. The kapton tape you linked to has adhesive on one side, which will interfere with whatever you try to do with it. Kapton is available in much more suitable forms, for example these 24 x 24 inch sheets. Kapton is one of the most common materials used as a substrate for flexible printed circuits. You can simply call your favorite flexible circuit fabricator and have them make whatever circuit you want from your gerbers. If you insist on making it yourself, you can buy Kapton pre-clad with copper. Most likely you can process this with the same photoresists and etchants used by hobbyists for rigid PCBs. You probably want some kind of higher-resistance material you can pattern on the kapton to make your heater element. Unfortunately I don't know what your options are here, particularly for materials that can stand up to flexing.
H: Verilog Can't resolve multiple constant drivers for net I've searched for this on google but the answers are not clear to me. Act like I am very stupid please, as I am a freshmen ECE major. My lab wants to me to use Verilog to program a DE0 to display the numbers 0-9 on its displays depending on what switches we flip. We were tasked to to program it in Behavioral, Dataflow, and Structural styles. I have compiled and succesfully programmed the board in Behavioral and Dataflow style. My struggle is with the Structural. I am getting the following errors upon compilation. Error (10028): Can't resolve multiple constant drivers for net "W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z" at Lab_3_b_structural.v(181) Error (10028): Can't resolve multiple constant drivers for net "W_OR_X_OR_Y_OR_NOT_Z" at Lab_3_b_structural.v(176) Error (10029): Constant driver at Lab_3_b_structural.v(142) Error (10029): Constant driver at Lab_3_b_structural.v(157) Error (12152): Can't elaborate user hierarchy "structural:h0" Error (293001): Quartus II Full Compilation was unsuccessful. 7 errors, 10 warnings Error: Quartus II 64-Bit Analysis & Synthesis was unsuccessful. 5 errors, 10 warnings Error: Peak virtual memory: 453 megabytes Error: Processing ended: Sat Oct 08 17:13:54 2016 Error: Elapsed time: 00:00:01 Error: Total CPU time (on all processors): 00:00:00 Error: Peak virtual memory: 453 megabytes Error: Processing ended: Sat Oct 08 17:13:54 2016 Error: Elapsed time: 00:00:01 Error: Total CPU time (on all processors): 00:00:00 /* In this lab we are using Verilog to create the seven segment display on the DE0. We had to perform the lab using behavioral, dataflow, and structural. So, three tests */ module Lab_3_b_structural(SW, HEX0, HEX1, HEX2); input [9:0] SW; output [6:0] HEX0, HEX1, HEX2; wire [6:0] hex0, hex1, hex2; //DE0 is common anode assign HEX0 = ~hex0; assign HEX1 = ~hex1; assign HEX2 = ~hex2; structural h0 (SW[3:0], hex0); structural h1 (SW[7:4], hex1); structural h2 ({2'b00,SW[9:8]}, hex2); endmodule module structural (bcd, hex); input [3:0] bcd; //WXYZ output [6:0] hex; //ABCDEFG wire W,X,Y,Z; assign W = bcd[3]; assign X = bcd[2]; assign Y = bcd[1]; assign Z = bcd[0]; //NOTS (Used By all Segments) wire W_NOT; wire X_NOT; wire Y_NOT; wire Z_NOT; not not1 (W_NOT, W); not not2 (X_NOT, X); not not3 (Y_NOT, Y); not not4 (Z_NOT, Z); //A =(W|X|Y|~Z)&(W|~X|Y|Z) wire W_OR_X_OR_Y_NOT_Z; wire W_OR_NOT_X_OR_Y_OR_Z; or or1A (W_OR_X_OR_Y_NOT_Z, W, X, Y, Z_NOT); or or2A (W_OR_NOT_X_OR_Y_OR_Z, W, NOT_X, Y, Z); and FinalA (hex[0], W_OR_NOT_X_OR_Y_OR_Z, W_OR_X_OR_Y_NOT_Z); //B = (W|~X|Y|~Z)&(W|~X|~Y|Z) wire W_OR_NOT_X_OR_Y_OR_NOT_Z; wire W_OR_NOT_X_OR_NOT_Y_OR_Z; or or1B (W_OR_NOT_X_OR_Y_OR_NOT_Z, W, NOT_X, Y, NOT_Z); or or2B (W_OR_NOT_X_OR_NOT_Y_OR_Z, W, NOT_X, NOT_Y, Z); and FinalB (hex[1], W_OR_NOT_X_OR_Y_OR_NOT_Z, W_OR_NOT_X_OR_NOT_Y_OR_Z); //C = (W|X|~Y|Z) wire W_OR_X_OR_NOT_Y_OR_Z; or FinalC (hex[2], W_OR_X_OR_NOT_Y_OR_Z); //D = (~X&Y)|(~X&~Z)|(X&~Y&Z)|(Y&~Z)|W wire NOT_X_AND_Y; wire NOT_X_AND_NOT_Z; wire X_AND_NOT_Y_AND_Z; and and1D (NOT_X_AND_Y, NOT_X, Y); and and2D (NOT_X_AND_NOT_Z, NOT_X, NOT_Z); and and3D (X_AND_NOT_Y_AND_Z, X, NOT_Y, Z); or finalD (hex[3], NOT_X_AND_Y, NOT_X_AND_NOT_Z, X_AND_NOT_Y_AND_Z, W); //E = (~W&~X&~Y&~Z)|~W&~X&Y&~Z)|(~W&X&Y&~Z)|(W&~X&~Y&~Z) wire NOT_W_AND_NOT_X_AND_NOT_Y_AND_NOT_Z; wire NOT_W_AND_NOT_X_AND_Y_AND_NOT_Z; wire NOT_W_AND_X_AND_Y_AND_NOT_Z; wire W_AND_NOT_X_AND_NOT_Y_AND_NOT_Z; and and1E (NOT_W_AND_NOT_X_AND_NOT_Y_AND_NOT_Z, NOT_W, NOT_X, NOT_Y, NOT_Z); and and2E (NOT_W_AND_NOT_X_AND_Y_AND_NOT_Z, NOT_W, NOT_X, Y, NOT_Z); and and3E (NOT_W_AND_X_AND_Y_AND_NOT_Z, NOT_W, X, Y, NOT_Z); and and4E (W_AND_NOT_X_AND_NOT_Y_AND_NOT_Z, W, NOT_X, NOT_Y, NOT_Z); or finalE (hex[4], NOT_W_AND_NOT_X_AND_NOT_Y_AND_NOT_Z, NOT_W_AND_NOT_X_AND_Y_AND_NOT_Z, NOT_W_AND_X_AND_Y_AND_NOT_Z, W_AND_NOT_X_AND_NOT_Y_AND_NOT_Z); //F = (W|X|Y|~Z)&(W|X|~Y|Z)&(W|X|~Y|~Z)&(W|~X|~Y|~Z) wire W_OR_X_OR_Y_OR_NOT_Z; wire W_OR_X_OR_NOT_Y_OR_NOT_Z; wire W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z; or or1F (W_OR_X_OR_Y_OR_NOT_Z, W, X, Y, NOT_Z); or or2F (W_OR_X_OR_NOT_Y_OR_Z, W, X, NOT_Y, Z); or or3F (W_OR_X_OR_NOT_Y_OR_NOT_Z, W, X, NOT_Y, NOT_Z); or or4F (W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z, W, NOT_X, NOT_Y, NOT_Z); and finalF (hex[5], W_OR_X_OR_Y_OR_NOT_Z, W_OR_X_OR_NOT_Y_OR_Z, W_OR_X_OR_NOT_Y_OR_NOT_Z, W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z); //G = (W|X|Y|Z)&(W|X|Y|~Z)&(W|~X|~Y|~Z) wire W_OR_X_OR_Y_OR_Z; or or1G (W_OR_X_OR_Y_OR_Z, W, X, Y, Z); or or2G (W_OR_X_OR_Y_OR_NOT_Z, W, X, Y, NOT_Z); or or3G (W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z, W, NOT_X, NOT_Y, NOT_Z); and finalG (hex[6], W_OR_X_OR_Y_OR_Z, W_OR_X_OR_Y_OR_NOT_Z, W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z); endmodule AI: It means that you have several outputs which drive one input. or or4F (W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z, W, NOT_X, NOT_Y, NOT_Z); or or3G (W_OR_NOT_X_OR_NOT_Y_OR_NOT_Z, W, NOT_X, NOT_Y, NOT_Z); Both are having same name as output, thus you connect two outputs together, and it is not allowed.
H: What kind of circuit is required to increase amperage with variable input voltage? I am new here and will try to be as specific as possible. I started doing all kinds of stuff in my car, and wanted to add some led stripes in the interior. I want however that the led stripes are dimming with the rest of the interior lights. I have found the dimmer line, the voltage varies from 0V (lights out) to 10V -> lights at 100%. I have tested this with simple LEDs and 4.7 kOhm resistors and everything works correctly. However a whole led stripe will consume considerable more power and I want to make sure that the dimmer doesn't overload / burn. So I thought I'd build a current amplifier connected to the main 12V of the car (battery line) which takes whatever input voltage the dimmer gives, routes that to the output but with increased current. I've measured the LED stripes at 12 V (10 A should be more than enough to ensure good operation at all voltage levels). My question is : How is this circuit called? Can you give me the correct search terms? Searching for 12V DC amplifier points me to audio amplifier which isn't what I need. AI: 10 A is rather a lot in a car. It's = 12 V x 10 A = 120 W which will be the same as your headlamps. What you are looking for is a voltage controlled constant current power supply. Specifications: Voltage: 12 V. Control voltage: 0 to 10 V. Current output: 0 to 10 A (or, if you can split the load, 2 x 0 - 5 A, etc.) Alternatively you could use a PWM (pulse-width modulation) controller with the full 12 V switched rapidly (faster than the eye can discern) as shown in Figure 1. Figure 1. PWM signal varying from 80% to 20% to 80% to 0. Specification: Voltage: 12 V. Output current: 10 V. PWM control: 0 - 10 V. (You could use 0 - 5 V if you divide down your control voltage with a pair of resistors.)
H: How does this latch relay work? What is the function of the two diodes and the resistor? Why does not the SET coil have resistor? AI: The diagram shown is for an AC-coil (or AC-DC) latching relay. The series diodes are there to rectify the AC. They're typically rated at something like 1kV PIV. The resistor is for "ampere-turn compensation". Generally the reset coil needs much less current than the set coil. For higher voltage relays (>50VAC) it may be present inside the relay. For lower coil voltage relays it may not be present (just a coil). It's more of a problem with high voltage relays because the wire would have to be very fine to get the optimal resistance so it's easier to just throw away some of the power in a resistor.
H: Wiring Motor to DPDT Polarity Switch I am trying to wire my motor (US Motors, Model: C55JXKNL-5041) to a polarity reverse switch. The diagram printed on the motor is as follows: BLU ____L1 BRN ____INS BLK ____INS ORG _^ WHT _^ YEL ____L2 RED _^ There is also a note printed on the motor saying "To reverse rotation interchange RED & BLK Leads." I am able to wire up the motor and it works properly but only in one direction. I can't figure out how to wire it so that my 6-pin polarity switch will flip the red and black leads as indicated while still properly tying together the other leads. Here are images of the Motor and Switch that I'm using. Hopefully this will be helpful. Any help would be appreciated. Let me know if more information is necessary. AI: It is unlikely that the motor is designed to be reversed without first shutting it off and waiting for it to coast to a stop. You need two switches. You need a simple on/off switch to connect and disconnect the power. The second switch is used to reverse the motor by interchanging the red and black lead connections to the "INS" and "L2" groups of wires. That requires a switch similar to the one that you have except that is does not need a center "off" position. You should probably download the instructions for this motor if you don't have them.
H: Using an optical switch with 5 terminals as a sensor I am currently working on using a slottet optical switch like this OPB4xx one as a sensor for my project. The sensor going to send its output to my Arduino which then will process the data. According the to the data sheet it has 4 input wires and 1 output wire. Here's a portion of the datasheet: The wires being VCC, ground, output, anode and cathode. VCC seems obvious it will probably go to the 5v pin on the Arduino, ground goes to ground on the board. Output goes one the pins on the board. But how should the anode and cathode be connected to the board? AI: The anode and cathode are the terminals of the IR LED, which produces the IR light that the detector portion of the device detects. The Electrical Characteristics table on page 4 of the datasheet gives the characteristics of the IR LED. The LED has a typical forward voltage of 1.7 volts, at 20 mA. As with any other LED, the IR LED must be connected to a suitable power supply, with a series resistor to limit current. For a 5 volt power supply and 20 mA LED current, you require a resistor of about 165 Ohms - the value is not highly critical - 160 or 180 Ohms would be fine.
H: Differences in the rs232 series Another question on chips. I want to program my esp8266 chip, and I need to know what to use. I've ordered a rs232rl 3.3/5v selectable board, but I want to know if this will work with an arduino, picaxe, or any similar thing. What's the difference between the rs232, the rs232r, and the rs232rl? Thanks! AI: I've ordered a rs232rl 3.3/5v selectable board You have, in all probability, made a mistake. There is no such thing as "a RS232RL". This name is a mishmash of "RS232" -- a serial signalling standard which is probably not actually supported by this board -- and "FT232RL" -- the name of a USB-to-serial chip produced by FTDI. There is a significant chance that the part on the board you receive will not be a genuine FTDI part. Counterfeit FT232RL chips are quite common, especially on inexpensive eBay/Alibaba hardware. The seller's use of an improper name for the part gives me very little confidence in their product. For what it's worth, the names "FT232", "FT232R", and "FT232RL" are all closely related, and will typically all refer to the same part: FT232RL is the part name for the FT232 in the SSOP28 package. The FT232 is also available in QFN32 (as FT232RQ), but the SSOP28 package is far more common. (And is the package typically used by counterfeiters…) The FT232R is the most commonly used part in the FT232 family. The only other parts with similar names are the FT232H and FT232B; the former is significantly more expensive, and the latter has been obsolete for many years.
H: Can I use the center tapped transformer as a non-center tapped transformer? I am building a single DC power supply from scratch. I use the transformer to step down the 120 volts wall line. I want to use a non center tapped transformer. I found a center tapped transformer (one that has 3 connectors on the secondary side). I just want to ignore the middle one and treat it as a non center tapped transformer. Is this possible to do? just simply ignore the middle connector? What are the "product-wise" consequences of being me ignoring this middle connector? I mean, in my schematic, it will appear as a non tapped transformer, but in reality, the product may behave in an unexpectable and unacceptable way? I am worried about this. AI: simulate this circuit – Schematic created using CircuitLab Figure 1. The schematic symbols for the regular transformer and centre-tapped version hint that they are the same except for the tap. One could tap off in multiple places on the secondary coil without affecting the end to end voltage. Is this possible to do - just simply ignore the middle connector? Certainly.
H: Is it viable to power a circuit board featuring an SD card using a coin cell battery? I'm currently working on an electronics project implementing an SD card. It is also required that this device be portable and small, thus I'm attempting to use a coin cell to power the board. However, I'm finding out that this is more difficult than I had originally assumed. In my testing, I've been using this Panasonic BSG CR2032. Doing some research, it states that the maximum SD card current is spec'd at 100 mA (which is a lot), however, I am expecting on average that those read/writes only be 30 mA. Furthermore, that will not be a constant 30 mA, but only when doing a read/write. Now the obvious problem is that even though the coincell is rated at 225 mAh capacity, that's spec'd at the continuous drain current of 0.2 mA. Referring to the data sheet, even if I were to only run continuously at 2 mA, my capacity would drop down to ~175 mAh. The relationship between current draw and capacity does not appear to be linear, thus doing the math at say a continuous current of ~15 mA would be even more drastic than the linear extrapolation... My tests confirm this that I am only able to interface with an SD card for about 3 minutes before the coin cell does not have enough power to continue communications. So my question: Is it viable/realistic for me to think I can power a circuit board featuring an SD card using a coin cell? Do they have coin cells rated for higher continuous current drains (in the mA range)? I'm not well versed in the battery types out there, thus I'd appreciate any recommendations! Also, it is very important that this circuit board be small and compact, thus I'm trying to avoid stepping up to a bigger 'box shaped' battery. AI: I gather you need to power a circuit board and you need that board to also support an SD-card interface and you need to do this with a coin cell (or something the size of one.) You don't mention your supply rail. This is kind of important. The SD specification says: However, the coin cells are all rated down to something like \$2.0\:\textrm{V}\$. They are almost useless, if you expect them to deliver in excess of \$2.7\:\textrm{V}\$. Here's a chart for the CR2477 (taken from a sheet from "POWER GLORY BATTERY TECH (HK) CO., LTD."): That doesn't make me feel good about relying entirely on the coin cell to operate a \$2.7-3.6\:\textrm{V}\$ SD card mode. And you have to support that mode even if you want to get into the \$1.7-1.95\:\textrm{V}\$ SD card modes, because you have to start operating at \$2.7-3.6\:\textrm{V}\$ and request a change to get into \$1.7-1.95\:\textrm{V}\$ operation. There's no getting around that detail. What are you supporting, exactly? That's one question you should have already answered in your question. But it's not there. Is it viable/realistic for me to think I can power a circuit board featuring an SD card using a coin cell? Maybe. It depends on what you want to achieve. You don't say how many writes or how many reads you need to do. You don't say how often you need to do them. Again, a near blank from you about what you need to achieve. It would go a very long way in giving you more definitive answers if you'd provide more definitive questions. Do they have coin cells rated for higher continuous current drains (in the mA range)? Coin cells are, by definition, low drain. many are rated for pulsed currents, though. Up to \$10\:\textrm{mA}\$ for the CR2032 and up to \$15\:\textrm{mA}\$ for the CR2477. But you can see what they are rated for, in broad strokes, from the graph above. Not much. Perhaps as much as \$1\:\textrm{mA}\$ might be considered as a continuous drain. Of course, you can do anything you want to them. But then you won't get much energy out of them if you abuse them. Now, let's take a closer look at the SD card spec: I see here where you got the \$100\:\textrm{mA}\$ figure. But notice elsewhere when it says that while \$XPC=0\$ means \$360\:\textrm{mW}\$, then the speed classes aren't supported. So the performance is essentially up to the device, I suppose. When \$XPC=1\$, or \$540\:\textrm{mW}\$ and up to \$150\:\textrm{mA}\$, the speed class of the device is then supported. Just a note. While we are at it, keep in mind that we are talking about watts or hundreds of milliwatts! Not microwatts. You might be able to figure out, though effort and testing and validation work, exactly how much energy is required to get a task done. You haven't said what tasks need doing. But let me just pose one example case to make a point and you can figure things out from there. To make these results consistent, let's assume for a moment that you have a magical buck/boost converter that sports 100% efficiency, regardless of load, with voltage source inputs from the coin cell all the way down to \$2.0\:\textrm{V}\$ and that it will provide a constant \$2.8\:\textrm{V}\$ on its output (to help minimize total energy required.) We'll also assume you cannot and do not want to support the fancier \$1.7-1.95\:\textrm{V}\$ modes. This converter will not excessively load your coin cell, since it must treat it well. So, you will not be able to draw too much current from it. Instead, you will use a capacitor to store energy for the high-current moments and you will use this perfect converter to supply a trickle current into the capacitor. And you will have to pace your operations, too. A CR2032, treated delicately and well, might give you \$2000\:\textrm{J}\$ over its lifetime. (You can compute this by eye-balling the continuous discharge characteristics curves and doing a piece-wise integration.) A CR2477 might give you four times that, or \$8000\:\textrm{J}\$. I'm actually kind of surprised by that because a AA alkaline battery, delicately treated as well, provides \$12000\:\textrm{J}\$, or so. It just does that while providing more current compliance. But it is a lot bigger, too. ADDED ZINC-AIR SIDEBAR: I just did a quick check on Zn-Air button cells. I don't know a lot about these and the largest I readily found is the 675 size. It is small (\$\tfrac{1}{2}\:\textrm{cm}^3\$) and is rated for a higher loading; around \$5\:\textrm{mA}\$. The CR2032 is a full \$1\:\textrm{cm}^3\$ and the CR2477 is \$2.4\:\textrm{cm}^3\$. So it may be possible to stack some of these Zn-air batteries into your volume requirements. The energy available in the 675 appears to be about \$2500\:\textrm{J}\$. Which is decent, considering. You might lay them out flat and get perhaps four of them into your requirements. You'd have to check that out, though. (They are about \$5\:\textrm{mm}\$ thick, as well.) If so, this might be about \$10000\:\textrm{J}\$ at a higher load capability, vs \$8000\:\textrm{J}\$ for the CR2477, in about the same area on the board. Less convenient, as it requires four separate mountings, you have to make room for human fingers, and there would be four replacements vs one replacement when you needed to change out the supply. Personally? I'd consider one of these as a replacement for the CR2032. But I'd not mess around with three or four of them as a replacement for the CR2477. It's just not worth the extra hassle. Keep in mind that having a higher current rating doesn't mean you get to do more SD card operations per battery replacement. The energy available is in the same ballpark. What you do get is faster times between operations! So I really do think that the 675, in lieu of a CR2032, makes a lot of sense. You get about the same available energy -- perhaps a little bit more -- and you get much higher current capability, which reduces the time between operations. It's also smaller and since board space is at a premium, this also argues for using the 675. But you won't get more operations. If you do go this route, then you are talking about a boost converter that can accept about \$1.2\:\textrm{V}\$ at its input and produce your required \$2.7-3.6\:\textrm{V}\$ output. This is both easier and harder than the really low trickle case for the CR2032. With inductive boost converters, it's easier because you can operate with higher peak currents and probably find more converters available because of that fact. It's harder because you have a lot less headroom to work with and this puts constraints on the boost converters. (It may also be easier because I think you may need a buck-boost for the CR2032, though you could pick a rail that is higher so that it is only a boost mode operation.) I think Texas Instruments has some fancy switched capacitor voltage converters. But I don't know if they have a tripler. But that might be another option to consider researching. A note that Russel McMahon brought up, and I'd forgotten about, is that Zn-air devices only last about a week (sometimes two) after opening them to the air. I have to replace my hearing aide batteries all the time, because of this limitation (I use them only occasionally, so if I open up some batteries it's more likely that they will die on their own than I will use them up in usage.) The Lithium coin cell will last almost forever, by comparison. So this is a very important consideration when comparing the two technologies, as well. Good catch, Russel! Suppose a specific write operation, in non-speed supported \$XPC=0\$ mode, requires \$10\:\textrm{ms}\$ to complete and that it will draw \$100\:\textrm{mA}\$ from your \$2.8\:\textrm{V}\$ supply rail. This works out to \$2800\:\mu\textrm{J}\$. At first blush, this doesn't sound bad because it would seem you can get over a half-million of these out of a well-treated CR2032. But you have to treat the battery well, which means something like \$400-500\:\mu\textrm{A}\$ current draw, at best. Half that would be better. At \$200\:\mu\textrm{A}\$, this means \$5\:\textrm{s}\$ of time. And at \$500\:\mu\textrm{A}\$, \$2\:\textrm{s}\$ of time. So, all you have to do is pace your operations! You can do this with a nice capacitor somewhere, which you trickle-charge from your coin cell using your perfect buck-boost converter. Let's say we cannot allow more than \$100\:\textrm{mV}\$ droop from the capacitor during this write operation (\$100\:\textrm{mA}\$ and \$10\:\textrm{ms}\$.) This means a capacitor of \$10\:\textrm{mF}\$. It doesn't need to support much voltage, luckily. So, broadly speaking... yes, you can do this with coin cells. If you can live with carefully characterizing your SD card support, design your capacitor storage correctly for the worst case transaction, get a very efficient converter at the required trickle currents needed to take good care of your coin cell, and pace your operations, accordingly. Now, you need to add in inefficiencies of a practical converter and you need to add in additional requirements from your circuit board. But luckily there are a lot of newly minted micro-power systems designed for energy harvesting devices, these days. There is another "cost" you need to factor in, as well -- the capacitor itself needs to be charged up and when you turn off the device this charge is thrown away, and lost. With a \$10\:\textrm{mF}\$ capacitor (from above example) and \$2.8\:\textrm{V}\$ supply rail, this is about \$40\:\textrm{mJ}\$. So you will need to work out how often that happens, too. It's a real cost and needs to be accounted. (Also, there is leakage.) If you were bent on the idea of preserving the stored energy on that capacitor, there are even some quite specialized hybridized capacitor/battery devices for energy storage (though I don't think they are appropriate here, preferring to use a capacitor instead for temporary pulse currents.) These have been designed and fielded for energy harvesting usage, which is in the vicinity of where your coin cells are at, I think. (I have one or two of them here.) These can act both as a capacitor, but also can carry energy for a while, as well. Some of them are designed to handle transmitters and receivers, which are in the load area you also are at, as well. So that might also be an option to consider.
H: What makes a led blow up? If I connect a LED to a 1.5V battery without a resistor and it blows up, is that because of the voltage or the amperage? I think amperage, but I'm a beginner at this. AI: It's because of the power. Power can be calculated by \$ P = VI \$ (volts x amps) and the answer is in watts. The power will be dissipated as heat. Heat will increase temperature until equilibrium is reached (heat lost to surroundings = power input) or the device fails. A typical small LED can take about 50 mA for a while and a red LED will have a forward voltage drop of about 1.8 V. We can calculate the power as \$ P = VI = 1.8 \times 50m = 90~\mathrm mW \$. LEDs normally use a series resistor to limit the current to a safe value of 5 - 20 mA for this reason. An LED is unlikely to "blow up" (whatever that means) at 1.5 V. I suspect that the actual voltage was higher which it could be for a fresh alkaline battery.
H: Driving dots (periods) next to digits on Terasic DE1 I have a Terasic DE1, and have imported the maker's pinout file, which contains pin assignments for HEX digits. However, I noticed that each HEX digit has a dot next to it and I cannot find any pin assignments for those dots. I'm wondering if they are disabled or I can somehow map them myself. Can you help? AI: From the "Using the 7-segment Displays" section of the user's manual for the DE1: Note that the dot in each display is unconnected and cannot be used.
H: simple circuit review I'm building a DIY project with a Rapberry Pi. I tried to cut down the connections to the ones I think might be involved in a certain behavior I'd like to understand. What I have: a 12V power supply a UBEC that is powering the RPi a small DIY board with connection for some sensors, an LCD and some fans The 12V arrives on the board through a TIP120, switched with a GPIO pin from the RPi. From the RPi itself, I'm using a VGA cable to bring many GPIO pins (for various purposes) and the 5V up to the DIY board; but not the RPi's GND: since it should be the same GND "shared" between the power supply and the UBEC through the RPi, I thought I could save a wire and use the GND from the 12V wire. This had the advantage of shutting down also all the other 5V stuff attached to the board when I cut the 12V off from the TIP120. pdf download The behavior I don't clearly understand is this: when the GPIO pin in the schematic is LOW, and no current flows through the TIP120, the 5V part of the DIY board is also shut down, but the fans continue to spin at a very low speed, and in fact probing with a meter, there are ~6V across them. I think that the circuit is being closed via the 5V wire through the RPi, thus having the 6V across the fans (12V are slightly lower, about 11V; and 11V - 5V = 6V). Is this correct? Then, if I disconnect the "common GND" and bring a wire from the RPi's GND to the 5V section of the board (connecting the two "X" in the schematic) it clearly stays always ON and also I'm able to completely shut down the 12V fans (in addition, I'm surprised that all PWM signals from the RPi to the fans, regulating their speed, continue to work). (Sorry for the simple circuit diagram, I hope there are not too many mistakes, especially about notations - I do this for fun and I'm not an expert) AI: Yes, I think your problem is that when the TIP is not conducting, there is a current path from the 12V through the fan and the custom board / LCD to the 5V of the Pi. The custom board / LCD is reverse powered, and the Pi might receive more than 5V (in which case the 5V has more than 5V at its output). Not good! A simple solution would be a diode in the line from the Pi to the custom board, but note that your are switching the 5V with the TIP, which will already cause a significant drop in the voltage. This might be a problem for your custom board / LCD. It is less likely to be a problem for the fan. Adding another diode drop might not be a good idea. Another solution would be to use two separate TIP's to switch the fan and the LCD. IMO the only real solution is to switch in the power line(s) instead of the in the ground. Assuming your custom board / LCD draws little power from the 5V I would add a 5V linear reguator and power both that regulator and the fan from a switched 12V. Two quick grabs from searching "high side switch":
H: getting infinite output impedance in Ltspice but not by manual analysis I am a beginner to LTSpice, I make this simple netlist: *#destroy all *#run *#print all .TF I(vmeas) vin vin vin 0 DC 1 R1 vin vout 1k R2 vout vmeas 2k vmeas vmeas 0 DC 0 .end I am using a test voltage source( 0 volts source) to calculate current through R2. When I run this simulation I get output Impedance as infinite. I dont get this, If its calculating the ipedance across vmeas then it should be zero since then it will be 0|| 3k and if its calculating output impadnce across vout then it should be 3k because while calculating impedance we zero out the independent sources so it means vmeas will become 0 volts , a plain wire. AI: .TF just doesn't seem to work in the expected way for the output impedance calculation when current is measured. If you take that same circuit and change the .TF line to .TF V(vout) vin, it calculates the output impedance correctly. The book CMOS Circuit Design, Layout, and Simulation, from whence your example originated, it appears, has a cryptic 'explanation' that makes little sense to me: For example, if you put resistors across the voltage sources, the output impedance is still open. This problem has come up before on this stackexchange and on Dave's eevblog, where it received some attention but no definitive result. Whatever it is, it is baked into Berkeley SPICE and not an artifact of LTspice.
H: Can RFI be radiated by connector wire even if shunted at opening? Imagine a metal enclosure with an XLR connector. My understanding is that it is vitally important for pin 1 of the XLR (the shield) to be connected to the chassis with a very short conductor to make the shield (and connector shell) part of the chassis and shield everything from RFI. For just this reason, Neutrik connectors (like NC3FAV1) often have a little metal spike in one of the screw holes to make contact with the chassis. This is connected to pin 1 so that RFI is shunted into the chassis over what is only maybe 1-2 cm of metal. The question is, if there is something connected to pin 1 like a long PCB trace, even if RF is shunted into the chassis as described above, can the presence of this trace still emit RF noise? Similarly, if pin 1 was not shunted by said spike, and there was an unterminated PCB trace, could it emit EMI? (Not that I would do this, I'm just trying to understand how HF noise is radiated). AI: It depends in a fairly subtle way on exactly where that trace connects relative to where the chassis bond is connected. If things connect in a 'T' configuration then there is a common impedance due to the length of one of the Ts arms, and that will develop a voltage when RF flows which will appear between your internal trace and the chassis. 2cm is a quarter wavelength at ~3.7Ghz and will appear as a high impedance at this frequency, it will still have significant reactance down into the cell phone and wifi bands. If on the other hand the connection is physically Pin1--Chassis bond--internal net then there is no problem. Your floating trace looks like a ground plane antenna at some frequency and will couple rf picked up on the cable screen outside the box to the inside of the box. Best practise is to tie pin 1 very directly to the chassis, use a common mode choke and caps on the signal pair and connect your internal single ended reference plane to chassis at one point ensuring no common impedance coupling. Jim Brown wrote the book on this stuff, see http://audiosystemsgroup.com/AES-RFMicrophonesASGWeb.pdf for a paper including some pictures of how not to do it.
H: Chinese power supply schematics/components I have a chinese power supply which i brought from a garage sale which has some problems. I opened the case and I concluded that some resistors and capacitors are burned. I would like to repair this power supply to use it for small electronic projects at home (60W, 12V, 5A - these are the written ratings). I would be very happy if somebody could help me somehow to solve this. I just need to know the values of the resistors (for capacitors is easy) and, of course, some guidelines and tips for replacing them. I attached some photos, to see what I'm talking about. Have a nice day ! :) AI: To give a complete correct answer to this is difficult. The best you can do is look for the UC2384AN application note and find out and understand how such a system is configured. Then try also to unsolder the burned parts carefully and measure them if possible. Most probably the component (transistor) under te heatsink has a short circuit. Next you have BD1 four diodes in a bridge, This is the incomming rectifier after the filter. After taking out the switching transistor and verifying the big capacitors (they seem to bulge and need replacement. Any bulging capacitor need to repaced anyhow) you should be able to connect the mains. (Carefull for you health) You should then measure mains voltage *1.4. over the capacitors. Further help is difficult without a schematic. So I suggest you make one and mention the parts and values found and go from there. If things become really difficult show the schematic and we might be able to help more. Here is the link: http://www.ti.com/lit/an/slua143/slua143.pdf
H: Question about combined ac/DC signals Would anyone care to provide a simple explanation about the interaction between an audio signal and a DC bias current in regards to voltage/current calculations? For instance, an audio signal with 1v peak to peak interacts with a transistor base voltage divider at 3v. I am new to audio signal calculations. Does the positive waveform voltage (and current I assume) add to the DC bias and negative waveform subtract? Forgive me if I'm completely wrong. Trying to get a mental model before I delve into complex equations. Thanks for any help. AI: The voltages simply add. To find the currents, consider any of the possible instantaneous voltages. For example, let's say you have a 1 V peak audio signal with 3 V DC bias. That means that the actual voltage can be anywhere from 2 V to 4 V. To see what your circuit does with that, consider each of the voltages in the range separately. At the least, consider what happens at the limiting conditions of 2 V and 4 V. For audio, you want to ensure that the subsequent circuit doesn't clip to either rail, or become non-linear for some other reason. If the circuit behaves proportionally (to the AC component), then you don't have to analyze all the in-between states.
H: Why use a Zener in a regulator as opposed to a regular diode? If you had a regular diode with a turn-on voltage of 5V (hypothetically), and a Zener diode with a reverse-bias of 5V, would the Zener diode still be preferred in a voltage regulator? I'm trying to understand why a Zener diode would be used instead of a regular diode if you could achieve the same regulation with both. Do Zener diodes have a more constant breakdown voltage over a wide range of currents compared to the turn-on voltage of regular diodes? AI: You could make a 5.6 volt diode with 8 forward connected diodes that each have a forward voltage of 0.7 volts at 1 mA. Ok that's one point on the graph and at room temperature with 5.6 volts applied you would get 1 mA. If you lowered the voltage to 0.6 volts across each diode (4.8 volts in total), the current would reduce approximately ten times to about 0.1 mA. And this is where the comparison breaks down. The same percent reduction in applied voltage across a zener would result in a significantly lower current being taken. In other words, a zener has a much sharper knee characteristic. Same story if increasing the voltage; the diodes wouldn't conduct as much as the zener. So, the zener has a much sharper knee characteristic compared to a bunch of series connected diodes. Zener can also be made to have a fairly neutral temperature stability whereas diodes have a recognized voltage-temperature gradient that is almost etched in stone (all due respect to Moses).
H: Repluggable connectors of Project ARA Looking at various ARA prototype pictures I noticed they all seem to feature pluggable connectors. Sadly I could not find out which ones. Can anyone make heads or tails of this picture? AI: Those are SMA connectors, perhaps the most common 50 ohm coaxial rf connector these days. Two variants exist: SMA and RP-SMA. The former has the center pin on the cable, while the latter has it on the PCB/chassis end: The FCC wanted to prevent consumers from using third party antennas on WiFi equipment, so they designed a functionally identical yet incompatible connector (RP-SMA) so that consumers wouldn't have a choice. This of course backfired immediately (China exists), and both types are readily available.
H: What happens when I suddenly stop the axis of an electric motor? Suppose I have a simple circuit with a 9V battery that is connected to a DC motor, causing it to spin. Then I suddenly squeeze the motor shaft between my thumb and fore fingers, and bring it to a sudden stop. How can understand what happens to circuit voltages and currents immediately after this event, as well as longer term? For instance, if I hold the motor for a long time, will the battery continue to feed power into the system? If so, will the power be more or less than when the motor was spinning? Would the difference in power between the two scenarios be completely different magnitudes (i.e would something start burning? if so, would it be the battery or the motor)? Immediately after I stop the motor, will there be a large spike in something (current?)? How would I calculate the magnitude of the spike based on the current prior to the event, number of windings, physical dimensions, time scale of the event, etc. I just don't have a good mental model of how to think about motor behavior when they are in a "failure" mode. Thank you! AI: When you stall a dc motor you get stall current and this is usually several times full rated load current. Because the motor is no longer spinning, the natural back-emf isn't present and the full 9 volts is applied across the armature coil resistance. This resistance is undesirable (it represents a loss) when normally spinning hence it has a low value and stall current can be high. If the battery is regarded as a source of voltage then power into the armature resistance is stall current squared multiplied by R. It can easily burn a motor but, for a feeble little 9 volt battery, there's usually not a problem . When you release the armature the current flow tries to maintain itself because of the armature coil inductance and this can generate a voltage spike. You can calculate this if you know the value of rotor inductance and snubber values. I'm not going to extend my answer into AC machines because this would take too much time.
H: Half-wave rectifier with diode connected nMOS and pMOS I am reading about half-wave rectifier and there are two questions below. Hope anyone could help me out. Q1: the text said that the diode-connected PMOS body is tied to source. However, in the figure, body is tied to the drain. Is this a mistake? Q2: Why connect the PMOS transistor in parallel with NMOS transistor improve the circuit performance? AI: Q1: In this circuit the transistor is sometimes reversed, i.e. source becomes drain and vice versa. Still, I would say it is a mistake. The circuit however looks OK. Q2: This question is already answered in the text. The PMOS does not suffer from a threshold increase due to body effect. Moreover, the terminal with the arrow ("source") is P+ and the well connected to the other terminal is N doped, so you get a body diode for free, which helps as well.
H: Should I buy a power supply for the input or nominal voltage of a DC device? I'm looking to purchase a power supply/wall-wart for a small pump. The pump is listed to operate at 12VDC input upto 3A. I'd like a 12VDC/4A power supply so that I may power a second low-current device (mA order) from the supply, but then I noticed the nominal voltage rating of the pump: 9-14VDC. The nominal voltage rating is confusing me and I'm no longer certain if the 12VDC supply will be sufficient for the general operation of the pump. I think the nominal rating means that depending on the load, the voltage may fluctuate during operation. In this case, a higher voltage demand may draw more current, which the power supply should provide. Maybe -- I'm not sure anymore. Is my concern warranted, or am I just thinking about this too hard? Here is a picture of the "style" of the supply. I'm not sure if it is regulated, but it looks like a typical supply that powers household electronics such as printers, speakers, and small form-factor computers. AI: Assuming you are talking about a air pump, which often have a simple dc motor and often designed to accept car "12V" unregulated input, then you have a wide latitude of voltage you could supply. As mentioned in the comments, a typical auto supply is from 11 to 14.5V depending on the age and state of the battery, alternator, etc. The pump itself should not vary much in current or voltage draw, until it hits a point where it is stalling out. Like you stick a finger in the blower motor, or leave it running when the bag is full. Even then, the current draw will increase but your voltage source will stay the same and try to compensate by delivering more current until a safety feature kicks in. Current overload protection most likely, or a fuse if wired to a car outlet. In short, go with the 12V supply, as directed.
H: Current through heating element lower than resistance suggests The fuser lamp (the heating element) in my laser printer broke from one of the ends. I measured the resistance of the, almost full length, wire which was 6 ohms. I tried to fix it by connecting the wire to the printer but the wire kept breaking after a couple seconds at the connection (it was exposed to air + mechanical stresses caused by my tinkering). So, I decided to make my own heating element from nichrome, 7 ohms to be safe. Now comes the strange part: this 7 ohm element causes the fuse of the printer to burn almost instantly. Confused, I measured the current through and the voltage over the original broken element and they were 5A and 230V, I assume 50Hz AC, even though 6 ohms and 230V should give 40A (which, I know, is way too high with the 6.3A fuse). I came up with two explanations: 1) I didn't measure the reactance of the original element (it's a coil). 2) The original element's resistance goes up a lot when it heats up (I don't know the material). But neither of them seems to be significant enough to raise the impedance high enough. So, my question is: What could cause the low current? AI: The lamp in the fuser is most probably a halogen lamp. The resistance of such a lamp in a cold condition is low. However the moment the lamps starts to glow the resistance goes up very steeply. The 5A of the lamp corresponds to 1150 W. The resistance of the fuser lamp in a hot condition is therefore 46 ohms. If you want to make your own fuser heater then you would need a 46 ohm resistance in the hot condition. But I do not consider this a good idea even if it works. First of all the mass of your heater is much more so it will take much more time to warm up. Secondly I doubt whether your own solution can be made safe enough for the environment you are working with. In theory an impedance changes due to AC. However with the frequency involved you can ignore that. It is simply the fuser lamp resistance that has such a steep rise in resistance. This lamp has also a high current during start up like all incandecent lamps. It is also the reason that lamps mostly fail during switching on.
H: How to slow down an 12V electromotor/fan I just bought a cheapo fan like this on Ebay, and it's intended to be used in a costume for Halloween: http://www.ebay.com/itm/Computer-VGA-Video-Card-Heatsink-Cooler-Cooling-Transparent-Fan-40mm-12V-2pin-x-/181701435335?hash=item2a4e3fdfc7:g:mqQAAOSwPYZU-H39 1) It's 12V, which is fine, but I'd like it to go slower. Is this possible, or is it simply a matter of on/off? 2) If the answer above is yes, would a slower fan draw less power from the batteries? AI: There are multiple ways of slowing it down, which would all result in the fan drawing less power. 3 options I can think of Add a potentiometer in series with the power cable. This would allow you to change the speed quite easily. This is the simplest method but in terms of power quite wasteful because you lose power over the potentiometer. control the fan using pwm. This could be with a microcontroller or just a 555 oscillator through a transistor. This adds a bit of complexity but is more efficient powerwise. Have a constant current circuit. This would be done with analog electronics, also more power efficient.
H: Question about power drawn from a current limited supply when it is short circuited Consider the schematic below: When the switch is open, the 10 ohm resistor will draw 0.5 amps of current and dissipate 2.5 watts of power. No issue there. When the switch closes: We know the power supply output current is limited to 1 amp. So when the switch closes, the resistor is bypassed and the entire 1 amp of current from the power supply will flow through the short to ground. What is the power being drawn from the power supply? The short circuit current is 1 amp. Power is \$P = {I_{short}}^2 \cdot R_{short}\$. \$I_{short}\$ will be limited to 1 amp, and \$R_{short}\$ (the resistance of the short) is essentially 0 ohms. So is the power drawn from the supply \$P = 1^2 \cdot 0 = 0\$? AI: I think this is a sort of brain teaser. The trick is in definitions, what does it mean "drawn power", versus "power delivered to a user's load"? The paradox resolution is yes, the power delivered to the user load is ZERO (assuming ideal short with zero resistance). However, the power drawn from this power source is 5W, which will be all dissipated inside, on internal current-limiting circuitry. In reality this power supply will be pretty hot. You can try this with any AA battery to see the effect. CORRECTION: As Chris Stratton pedantically commented, the dissipated power can be different from 5W if the power supply, say, has switching topology, such that it can dynamically change internal effective EMF and effective internal output impedance.
H: What kind of jumper wires are used with a breadboard? What kind of jumper wires should I get for electronics and a breadboard? There are female to female, male to female, female to female with headers. I don't know what to get. Just hookup wire? AI: From my experience, you should get all three types. Most of the time you will be using male-to-male and male-to-female. Since using wires for breadboard connections can create quite a mess on the breadboard, I would also suggest getting these:
H: Do a diode and a resistor in parallel have the same voltage across them? Example attached. My intuition is telling me that they're the same because of Kirchhoff's laws. I know that a constant voltage model exists but I was worried about the nonlinearity of the diode disqualifying basic KVL. simulate this circuit – Schematic created using CircuitLab AI: Yes, it always applies. It applies with inductors where \$V=L\tfrac{\textrm{d}I}{\textrm{d}t}\$, capacitors where \$V=\tfrac{1}{C}\int I\textrm{d}t\$, and of course diodes where \$V\approx \tfrac{n k T}{q}\textrm{ln}\left(\tfrac{I}{I_s}\right)\$. It's physics. In your case, consider the bottom node as ground, or \$0\:\textrm{V}\$. Then the top node voltage will be determined by: $$\frac{V}{R}+I_s\left(e^{\left[\cfrac{V q}{n k T}\right]}-1\right) = \frac{0\:\textrm{V}}{R} + 1\:\textrm{A}$$ Solving this requires the product log function. If we set \$V_T=\tfrac{n k T}{q}\$, the adjusted thermal voltage for the diode, then it works out to something like: $$V=R\cdot \left(1\:\textrm{A}+I_s\right)-V_T\cdot \textrm{ProdLog}\left(\frac{I_s R}{V_T}\cdot e^{\left[\cfrac{R\cdot \left(1\:\textrm{A}+I_s\right)}{V_T}\right]}\right) $$ Annoyingly bad, eh? But it does solve. Suppose the diode has \$n=2\$ and \$I_s=10^{-10}\:\textrm{A}\$ as its model parameters. Let's assume a diode temperature that works out to \$V_T=52\:\textrm{mV}\$. Then this solves out to \$V=1.19672\:\textrm{V}\$ for the node and yields an estimate of \$I_D=988\:\textrm{mA}\$ for the diode and \$I_{R}=\tfrac{1.19672\:\textrm{V}}{100\:\Omega}\approx 12\:\textrm{mA}\$ for the resistor. Physics just works. The only problem with fancy, non-linear and/or differential and integral equations is that solving them with closed solutions can be difficult. But you can usually do what any Spice simulator does, and that is to "linearize" each equation over short times and operating conditions, take a small step from there using simple linear equation solution methods, then re-linearize things again, repeat, etc. In this case, you might have just avoided all the garbage I did above. The voltage across this modeled diode (parameters as above), if it took up all the current, would be: $$V\approx \tfrac{n k T}{q}\textrm{ln}\left(\tfrac{I}{I_s}\right) = 52\:\textrm{mV}\cdot\textrm{ln}\left(\tfrac{1\:\textrm{A}}{10^{-10}\:\textrm{A}}\right) \approx 1.19734\:\textrm{V}$$ This would then have suggested about \$I_{R}=\tfrac{1.19734\:\textrm{V}}{100\:\Omega}\approx 12\:\textrm{mA}\$. In short, no real difference at all. So we'd still have concluded that \$I_D=1\:\textrm{A}-I_R = 988\:\textrm{mA}\$ for the diode. And saved ourselves a lot of mathematical grief. If we were serious about nailing down the last few decimal points of the voltage, \$V\$, then we could have just re-applied our new value for \$I_D\$ (which is only slightly different from the earlier assumption that the diode took all of the current) and recomputed: $$V\approx \tfrac{n k T}{q}\textrm{ln}\left(\tfrac{I}{I_s}\right) = 52\:\textrm{mV}\cdot\textrm{ln}\left(\tfrac{988\:\textrm{mA}}{10^{-10}\:\textrm{A}}\right) \approx 1.19672\:\textrm{V}$$ And have completely nailed it. This last approach is more how an engineer does this, when roughing out a design approach to something. They don't usually go off into mathematical never-never land to nail down the last decimal. Partly, this is because electronic parts are real, physical devices with variations and dwelling too much on exact numbers wastes time on minutia. Partly, this is because it's rarely necessary. You do need to know, for example, that in the case you showed it is likely the diode will pick up most of the current. This is easily tested by imagining instead that all the current goes through the resistor (counter-case.) If that happened, you'd have \$100\:\textrm{V}\$ across the diode. So an engineer would go think oppositely, assuming all the current goes through the diode, and see what that looks like. Recognizing these patterns and quickly applying the more important ideas and rules to them in order to get a 1st order approximation of what is going on is the mark of an experienced engineer. The only cases where tiny details matter are for physicists who are at the limits of current knowledge and trying to extend that knowledge and use devices in arcane and rarely considered ways; and are willing to invest years of their time to characterize details in order to pursue singular goals. For practical circuits made by the bucket loads, instead of carefully crafted one-off systems with thousands of man-hours invested in tweaking them, this kind of nuance just isn't in the cards.
H: Speed up charging Is there a way to create changing magnetic field that goes from positive to zero and then back to positive, regarding a sinusoidal wave. The purpose of this is to induce a coil of wire to move in only one direction. Such as, when charging you phone, you want to speed up the current. All you do is put this special coil of wire around it and voila, you have a faster charging cable. Is this theory right? AI: You seem to be a describing a sort of free-form transformer. It is indeed possible to drive a coil with a signal having a DC bias, such that the field varies between zero and a strength in one polarity without ever passing through zero to the opposite polarity. However, this will not couple to the secondary of a transformer. Magnetic coupling relies on the change in the field, and change is an incremental value - mathematically a derivative. So the signal induced in the secondary has lost the DC offset of that driven through the primary. But as transformer core saturation (which drives core size selection) is sensitive to the offset, driving transformers with unipolar sources having DC offset is generally avoided, since it requires a larger core for no difference in accomplished result. It would also be very hard to transfer meaningful power with such a loosely surrounding coil with no core or multi-turn secondary to couple to, unless you used really insane drive levels in your primary. Look to existing inductive charging setups to get a sense of what would be required on the receiving side for a practical system. But even if you could overdrive the charging in this or some other way, that would be a truly terrible idea. Modern USB-connector phones utilize internal charge controllers which are supposed to be carefully engineered to not exceed what the battery can safely handle, so trying to defeat those protections and charge faster than designed is not something you should do by any means. If you want the maximum designed charging rate of your phone, use it with a good power source of rated voltage, capable of high current, and implementing whatever resistors, USB-C signalling or vendor-unique scheme the phone looks for to know that the power source can source more than a legacy USB level of power. The charge controller should then decide what of that available power it is appropriate to use at any point in the charging process.
H: Can a 9v battery or AA batteries be used instead of a bench power supply? Do I have to get a bench power supply to work on electronics on a breadboard? I know I can power an LED from a Raspberry Pi, but once you get more stuff on the board you need external power. I don't want to spend money on a power supply yet. Can I use a battery? These would be small projects for learning. I also saw a kit with the that will connect to the wall for cheap, but that looks dangerous. Edit: The kits I've seen use the LM317, but again, it's a screw down block for wires from the wall (I think). I'm not sure that's good. AI: Yes, batteries can be used instead of a bench supply. Keep in mind that batteries change voltage as they are drain, and cannot supply the same amount of current as any given bench supply. Plenty of examples online. As suggested, you can get a breadboard regulator for batteries. Or for a wall wart to screw terminals (pretty safe as long as you tighten it down and don't trip over it). There are also modules that have barrel connectors or even usb connectors. With a usb power supply, you get a regulated five volt supply.
H: How do I find the UTP and LTP of an Oscillator? I am trying to figure out how to find the UTP (upper trigger point) and LTP (lower trigger point) in this circuit: This is an ideal op-amp being used as an oscillator. My understanding of trigger points is that they occur when e+ = e- (the op-amp inputs are equal). However this example confuses me as there is no Vin and I'm not sure how to handle the capacitor. If I put the capacitor in the frequency domain, then everything in the circuit will be treated as a resistor and nothing will ever change, so how can there be any trigger points? I think I need to analyse this circuit in the time domain but I'm not sure how. Any hints on how I should go about solving this problem would be a big help. AI: The Thevenin to the (+) input is: $$\begin{align*} V_+ &= \frac{V_o\cdot 6.8k\:\Omega\cdot 10k\:\Omega+16\:\textrm{V}\cdot 6.8k\:\Omega\cdot 5.6k\:\Omega}{6.8k\:\Omega\cdot 10k\:\Omega + 6.8k\:\Omega\cdot 5.6k\:\Omega+5.6k\:\Omega\cdot 10k\:\Omega} \\ \\ &= 0.419545903\cdot V_o + 3.75913129\:\textrm{V} \end{align*}$$ Assuming your opamp is rail to rail output and is acting as a comparator, then this means that \$V_+\approx +11.3\:\textrm{V}\$ or \$V_+\approx-3.8\:\textrm{V}\$, depending on the value of \$V_o\$. Let's call these two different voltages, \$V_H = +11.3\:\textrm{V}\$ and \$V_L= -3.8\:\textrm{V}\$. So the capacitor voltage (and \$V_-\$) will be bouncing between these two values. When it is at \$V_L\$ the output will switch to \$+18\:\textrm{V}\$ and the voltage will start to rise. When it is at \$V_H\$ the output will switch to \$-18\:\textrm{V}\$ and the voltage will start to sink. There will be two such timing equations: $$\begin{align*} V_{RISE(t)} &= V_L+\left(18\:\textrm{V} - V_L\right)\cdot\left(1-e^{\frac{-t}{R C}}\right) \\ \\ V_{FALL(t)} &= V_H+\left(-18\:\textrm{V} - V_H\right)\cdot\left(1-e^{\frac{-t}{R C}}\right) \\ \end{align*}$$ Setting \$V_{RISE(t)}=V_H\$ and \$V_{FALL(t)}=V_L\$, these are easily solved for time as: $$\begin{align*} t_{RISE} &= -R C\cdot\textrm{ln}\left(1-\frac{V_H-V_L}{18\:\textrm{V} - V_L}\right) \approx 449\:\mu\textrm{s} \\ \\ t_{FALL} &= -R C\cdot\textrm{ln}\left(1-\frac{V_L-V_H}{-18\:\textrm{V} - V_H}\right) \approx 276\:\mu\textrm{s} \end{align*}$$ The frequency is then about \$\tfrac{1}{449\:\mu\textrm{s}+276\:\mu\textrm{s}}\approx 1380\:\textrm{Hz}\$ With an opamp that doesn't support rail to rail outputs, the thresholds will be different and so will the timing. Also, opamps have slew rate limitations and current limitations, too. But your opamp is ideal.
H: USB OTG port in slave mode, possible to use USB-A ports in host mode simultaneously? I have been researching USB OTG for a little while and was not able to find an answer to my question. I'm seeking for the conditions, if it's even possible, under which I can have one USB OTG port work in slave mode and at least one USB-A port act as host simultaneously. It is definitely not possible when the two ports are connected to the same USB Hub (e.g. like it is the case with a RPi Zero + Zero4U), but how about when the two ports are entirely separate? Here you can find a 'USB Map' of the Orange PI Plus2: Could I use the USB OTG port, which originates from USB0, as slave port while, at the same time, using one of the Hub ports connected to USB1 in host mode? AI: If they are distinct USB peripherals at least one of which supports mode switch functionality then yes. This is in fact fairly common on dual USB microcontrollers and tablet-type SoC's. Your diagram seems to show such a situation, with one OTG capable dual-role port directly accessible, and a second port setup for host use with a built in hub. A USB hub tends to be entirely incompatible with usage of any of its ports as a USB device, as operating the USB engine in device mode would be incompatible with operating it in host mode to talk to the hub. Probably the closest you could come to that would be using a USB data interchange cable plugged into one port of an onboard hub. A data interchange cable is a sort of dual-ended USB device - but one that is generally limited to a particular scheme of data transfer. Of course once you have that pipe supported at both ends, you can push fairy arbitrary data down it. Theoretically it might be possible to design a hub chip with a single "passthrough" port that could be (while disabling all other ports) reversed to operate as a device and forward data to the SoC's USB interface operating in device mode, but this seems unlikely as a product, as most of the devices where operation as a device is supported don't have space for the connectors from an internal hub anyway. Ultimately in most embedded/dev board settings, the dual USB peripheral on chip approach is preferable to a single port permanently connected to an on-board hub. Of course in the end USB is not just about hardware, but also about driver stacks and system services, user-mode APIs, etc. There has definitely been hardware that shipped with capabilities not reflect in the software, and it is theoretically possible that a software stack could enforce some kind of limit where both ports would have to be in the same mode. But that doesn't seem too common. An inability to switch modes at all though often is - the mode determination is usually ultimately made by software, which may or may not consider or honor a hardware mode detect input pin.
H: Will Open Collector Output of 0~12V damage 0~5V input DAQ? In my lab configuration, I am using open-collector with 2K Ohm pull-up resistor to 12V. The data aquisition card I am using is from national instrument. If I look at the Low and High voltage of open collector output when not connected to input of DAQ, i get 0.2 ~ 12V. However, If I connect to the input of DAQ, the voltage becomes 0.2~5.6V. Will DAQ input be safe from over voltage since 12V is not directly connected to the input, but through 2K Ohm resistor? AI: ESD diodes are designed to be small and fast but are limited to 5mA DC Thus 7V above 5V into 5k may draw 1.4mA which meets this criteria. However 12V must never be applied before 5V to avoid SCR latchup, thus an R divider is safer.
H: How is IEEE 802.11(Wifi) made robust to interference? I was curious to know how wifi is made robust to interference.How there is almost no interference between wifi signals from two nearby routers? AI: It depends what you mean by interference. If you mean data passing through router A 'appears' on router B's clients, then no, this doesn't happen. Each router <-> client link is encoded to label it so that it only gets delivered to the right destinations, even for unencrypted links. If you mean that RF from router A degrades the signal to noise ratio (SNR) at router B, trashing the throughput, then yes, this is the big problem with closely physically located WiFi links. There are only 11 RF channels defined (around 2.4GHz), and they overlap, so there are only really 3 clean channels 1, 6, and 11. If you have multiple routers operating in the same channel, then numerous data packets will be corrupted and have to be resent. Microwave ovens, bluetooth devices and cordless telephones also share the same spectrum, and create interference. A case in point. I have an 'n' router and client, that should be capable of 150Mb/s. When operating on the same channel as three of my neighbours, it drops to 1Mb/s. Move channels and the data rate restriction becomes my LAN or WAN connections. Use linSSID if you're on linux to have a look at your local WiFi environment.
H: Converting sub-microsecond opto-isolated 3nC charge pulse into a 250us low-impedance square pulse I have a problem with short current-pulse widths through the diode of an opto-isolator -- with widths less than \$1\:\mu\$s. The charge in each pulse is approximately 3 nC. The current height of the pulse is adjustable, as I have a series resistor available for setting the peak current. The pulse shape starts at the peak value and then follows the usual RC decay for the trailing edge. So the current pulse takes on a sharp onset followed by an RC decay. Roughly speaking, that can be taken as a triangle shape, where the following relationship exists: $$3\:\textrm{nC} = \frac{1}{2}I_{peak}\cdot t_{width}$$ If I set \$I_{peak}=10\:\textrm{mA}\$ then \$t_{width}=600\:\textrm{ns}\$. I can increase \$I_{peak}\$, but only at the expense of \$t_{width}\$. And visa versa. So that's the problem. I need to convert this narrow, optically isolated current pulse into a low-impedance square-wave output with a pulse width of \$250\:\mu\textrm{s}\$, or so (in order to accommodate the \$1600\:\textrm{Hz}\$ mentioned earlier.) Eventually, a \$75\:\Omega\$ output would be perfect, but ten times that would be okay. The 6N136/HCPL4502 isn't spec'd with fast enough rise and fall times. The IL610 (see: datasheet) is fast enough. But those things are expensive and I've no experience with them, or their availability. I am going to buy some of the 6N136 and IL610 parts to play with. I'm not excluding them. But in the meantime I'm interested in ideas about using more pedestrian methods using parts like the 4N25. Here is a schematic I'm considering: simulate this circuit – Schematic created using CircuitLab That's in broad-strokes. \$R_2\$ and \$C_1\$ form a time constant that is very much larger than the rise and fall time of the 4N25A -- on the order of tens of microseconds. But this also creates a \$\frac{\textrm{d}V}{\textrm{d}t}\$ through \$C_1\$ for a short time with a peak of about \$40\:\mu\$A, which pulls out any stored charge in \$Q_2\$, turning it quickly off. The compensated current source provides a meager \$1\:\mu\$A drive for \$Q_2\$. (I could just replace the whole thing with a single resistor that I tweak in, I suppose.) The pulse width will be on the order of \$3.3\:\textrm{M}\Omega\cdot 390\:\textrm{pF}\$ or \$1-2\:\textrm{ms}\$. A bit long for my needs, but I'm trapped between the CTR of the 4N25A and how little of my narrow pulse will drive across the optocoupler. I just started thinking about this problem, today. And I may already be way off-base (still need to lower the output impedance.) I may also be guilty of not yet spending enough of my own time thinking about this, but I'm interested in any obvious difficulties I missed or preliminary thoughts about different directions to point in regarding the use of a 4N25A for something like this. I have those laying about and nothing else, yet. (Yes, I will be getting those fancier devices and trying them out.) For now, are there any ideas about how to flog a 4N25A into a predictable circuit for something like this? (The CTR is spec'd given enough time, time I don't have. So I'm assuming very little of the pulse gets through and that I have to set up a sensitive circuit.) If interested, this is driven by a microwatt VFC I've designed, which develops periodic \$3\:\textrm{nC}\$ discharges through the optocoupler. The VFC is attached to an arbitrary, different supply under observation and must present a \$25\:\textrm{M}\Omega\$ load to a \$15\:\textrm{V}\$ source, delivering a pulse frequency of \$200\:\textrm{Hz}\$. It's easy to compute the allowable discharge per pulse here: $$\frac{15\:\textrm{V}}{25\:\textrm{M}\Omega\cdot 200\:\textrm{Hz}}=3\:\textrm{nC}$$ The allowed target supply variation is \$4-120\:\textrm{V}\$. (Think of this like powering a circuit from an old POTS phone line service in the US, where each on-hook phone is only permitted to load the line by \$5\:\textrm{M}\Omega\$.) This means the frequency can reach about \$1600\:\textrm{Hz}\$. (It goes a little bit non-linear as you approach the lower voltage limit, of course, and the frequency drops to perhaps \$10\:\textrm{Hz}\$.) In case it helps, here's the VFC sketch: simulate this circuit (Those \$4.5\:\textrm{M}\Omega\$ resistors are as big as they get and still be cheap and widely available.) I'm also thinking about smearing things out with a \$100\:\mu\$H inductor in series with the LED. Makes a nice round bump out of the pulse. Might make things a lot easier with the 4N25A. However, there may be a cost with the SCR circuit, dragging things out like that. I need to worry over that bit, as well. (Particularly the positive feedback aspect through \$C_2\$.) AI: Vishay's application note Faster Switching from Standard Couplers says: PUSHING THE “SPEED ENVELOPE” If less than 1 μs toff is required, there are some additional measures that can be taken to further increase the switching time of a standard coupler. […] PHOTODIODE OPERATION One possibility is to give up current gain for the sake of speed in the extreme, and operate a standard transistor coupler in photodiode mode by only using the base collector pins of a 6 pin coupler. This will vastly increase the switching response of the device but will require an output buffering stage to produce a practical signal level. Also, it is possible to further increase the switching speed of this type of coupler by applying an increasingly large reverse bias voltage on the photodiode detector. The effect is to reduce the junction area and capacitance and increase the frequency response. […] Figure 30 illustrates a photodiode configuration which makes use of a trans-impedance amplifier to provide better gain and noise performance. The key principle of this design is that one can now take advantage of the lower junction capacitance of a simple reverse biased diode rather than the large capacitance of a phototransistor to drastically improve transient performance. But don't bother with all this complexity; it also says: At this point, however, economics come into the equation, and a designer needs to consider whether the increased complexity of the design is justified. The other option is to consider one of various parts that are specifically designed for high-speed operation. For example, the common 6N137 requires 5 mA to switch on, and has a propagation delay of 100 ns, or the TLP2361, 1.3 mA, and 80 ns. This results in a nice digital signal; you then still need a circuit to make the pulse longer.
H: Confusion in +v -v and ground in amplifier circuit I have an amplifier kit, in which it requires a power supply with +24v -24v and ground, the input is and audio jack which is +v and ground , i.e. both of these grounds are connected, i would be using a laptop charger to test the circuit as it needs minimum 19v but the charger has a pin in which i believe there is a + and a ground or - I dont know how to connect the power supply to the circuit as the cirxuit has 3 inputs(+,-,ground) and my power supply has just 2 outputs(+,- or ground) Im pretty new to the +,-,and ground concept and i am confused if i need to connect the - to the ground or not This question is reposted from sound.stackexchange which was off-topic AI: The word "ground" in an electrical circuit is always a relative term: in fact, it's the "reference" from which every other voltage is measured. * So, if you have +24V, Gnd and -24V, that means that if you were to measure the voltage between -24V and +24V you would measure 48V. In fact, if you were to go through all of the documentation and add 24 to all of the voltages, you'd get exactly the same circuit, with 0V, 24V and 48V everywhere. That would make the novice happier - but confuse the professional no end! A usual audio signal rises and falls above and below some reference point (usually called "Ground"), so you'll get positive and negative voltages. Your laptop power supply, that has 0V and 19V, fits inside the Gnd and +24V band. It doesn't work with the Gnd and -24V band at all. So you're going to need some kind of adapter or converter to get that to work. * Note that some circuits distinguish between "analog" ground and "digital" ground. That just means that analog signals reference against one ground, while digital signals reference against a different ground. The two grounds, if you measure the voltage between them, may not have any difference at all - but that's not guaranteed, and connecting the two may introduce interference, especially digital intereference on analog signals.
H: How to use Slave Select on SPI Transceiver I'm an absolute idiot when it comes to wireless technologies, but I'm kinda familiar with protocols over cables. Because of that, I know about the SS on SPI busses and that there is a separate cable for every signle device. When it comes to Wireless, is there a address inserted at the beginning like in I2C or how is it implemented? I might be totally asking the wrong question here, but I need a starting point to continue my own research. Notes: I'll be using an avr Arduino, so any software implementation to use the SPI interface in a I2C fashion is also suitable. Also, this is for a project of Home Automation, so there will be many devices, but I will try to keep the communication to a minimum and in bursts. This is the transceiver I'm looking at right now AI: The format of data transmitted over SPI is completely device dependent. Typically there is no address byte as per I2C as this functionality is provided through the slave select pin (i.e. selecting the slave to talk to through hardware vs software). Part of the draw of SPI is that it is an inherently synchronous protocol meaning that you can operate over a very wide range of frequencies (from virtually DC operating with buttons, all the way up to tens of Megahertz). The key parameters to pay attention to when getting started with SPI and checking device compatibility. Clock Phase - Transfer data on the rising or falling edge of the clock Clock Polarity - What is the state of the clock when inactive (read not selected) Enable Polarity - Does slave select high or low enable the slave. Maximum Clock Frequency - The maximum clock frequency the slave can tolerate. Edit: I somehow missed the part about wireless Wireless devices can operate with many different protocols and is a very wide field (just like sending signals over cables is). The best way to get started with wireless for a home automation project is to use a module that will take care of the wireless protocol for you, you then command this module through an interface like SPI or I2C. The particular transceiver you listed is more bare bones and you will have to come up with and implement your own protocol. I believe Jeff over at JeeLabs uses modules similar to these and has done extensive work using them for home automation purposes. Alternately Ebay can be a good source of cheap modules that also manage the firmware. I have had good experience with the below in home automation related projects. HC-05 Modules, these are a Bluetooth device that can be used as a transparent link (feed ttl level async serial into the module, and get characters out on a Bluetooth console on your master device (phone, laptop etc)) ESP8266 Modules, these come in many flavors and variety and can even be programmed directly using the Arduino development environment. These can connect to regular wifi access points or even broadcast a network. High level librarys are also available allowing use as a micro webserver or to connect to use internet of things protocols such as MQTT.
H: Using DC voltage instead of AC to supply SMPS Situation: You have a battery pack with voltage of 300V. You have some appliances designed for 250V AC. These appliances have SMPS inside. Claim: Instead of using DC to AC inverter, you can use DC voltage to supply SMPS inside your devices. Reasoning: 250V AC has peak voltage around 350V. First stage of SMPS rectifies 250V AC to maybe around 300V DC. This voltage is then used to supply another stage of SMPS, but that's not important for this question. So basically from 2 stage of SMPS onwards, SMPS knows no difference between AC and DC supply voltage. Advantage: 0 cost of inverter, 0% losses on DC to AC inverter Disadvantage: You can use this method strictly just for appliances with SMPS in them. Question: Is there something I missed? Is there reason why this would not work? AI: I have practical experience with PC power supplies. Pretty much any modern ATX PSU contains a main section (that delivers full horsepower when the PSU is on) and a tiny section to deliver +5VSB. In a decent PSU, both are SMPS, i.e. do not contain a classic iron-core AC-only transformer (which would surely blow if fed by DC mains). There are still some cheap ATX power supplies on the market, that do not contain a proper SMPS-based PFC stage, or use a so-called "passive" PFC, which is essentially an inductor in series... PSU's with a passive PFC typically have a switch to be configured for 120 vs. 240 V AC, or (here in Europe) are "240 V only", with a modest margin of tolerance. For the purposes of DC operation, I do not like the cheap variety very much - not exactly sure what to expect from the hefty inductor at the input on transient events (power on/off - probably not much risk but you'd better watch out) and also because my customers typically have a DC mains rail that's "somewhere inbetween", such as 250 V DC. As you have mentioned, the direct-rectified peak voltages are about 340 V DC derived from 240V AC, or 170 V DC derived from 120 V AC (the ratio being a square root of 2). Thus, 250V DC is probably too low for a PSU specified at 240 V AC (= 340 V DC). The PSU would either refuse to run, or might risk heat overload of the primary (due to too much current flowing in, to compensate for the lower voltage). This latter risk depends a lot on actual load attached to the secondary side. PSU's with active PFC typically have a wide input range specified, such as 100 - 240 V AC (140 to 340 V sinewave peak). This is because the SMPS PFC stage actually works as a boost converter, with a relatively small capacitor on its input, following the sinewave, and upconverting any voltage you give it to some 400 V DC in the PSU's main primary capacitor - for the main down-converting stage to have a "nice level playground". The 140V DC minimum at the PFC stage's input is actually debatable. The PFC stage uses a special circuit, regulating its current draft to follow the input "rectified sinewave" waveform. I guess it's called a "current mirror", which sounds more like something from the "op-amp internals" nomenclature (see also "long-tailed pair"), rather than a term specific to PFC controllers... either way, this circuit modulates the PWM to make the current draft fluctuate in sync with input voltage, to mimick a resistive load... and if the input voltage is perfectly constant, this should result in a perfectly constant current draft, right? Back to the 140 V DC minimum (for 100 V AC): consider, that at 100 V AC, the PFC "current mirror" still strives to follow the sinewave, so it actually works from much lower voltages. And, at 100 V AC (140 V peak) = at the corresponding current (some sinusoidal Ief) it still has bearable losses = heat dissipation. Arguably, if fed by DC voltage, a similar level of loss and heat can be obtained at 100 V DC, rather than 140 V DC, agreed? The one point you may be somewhat doubtful about, is the input Graetz bridge, which will be stressed in a half of the diodes only - but this is typically no problem. One somewhat subtle issue remains: inrush limiting. AFAICT, even the modern PFC-equipped PSU's actually suffer from the power-on inrush when the big primary cap is getting charged (= with an ATX PSU, this happens when you plug the mains cable in, rather then when you push the PC's power-on button). The PFC stage's boost topology alone doesn't contain any inrush limiting device (except maybe for the choke, but that's relatively small). If the PSU is equipped with an NTC for inrush limit, it will probably work fine for DC as well. If the PSU contains a thyristor-based (PWM-based) inrush soft-starter, that would be a problem, as the PSU would either not work at all, or the thyristors would not switch off, and there would be a hell of an inrush :-) You are probably not likely to meet thyristors in the input Graetz in a PSU on the order of 400 W or thereabouts. Inrush pulse limiting is a pain even at lower-volt (< 50 V) DC mains rails - a problem that hardly anyone cares to address, until it comes back to bite them... As for overcurrent safety: people working with higher-volt DC in their automation gear (some railway and substation folks) typically use special models of circuit breakers that are specified for DC operation at the desired voltage. They look very much like your normal AC circuit breakers on the DIN rail, except that they have the special property that they can disconnect a DC current. Up to a certain level of current and voltage, anyway. See also "circuit breaker selectivity". Overall, I myself would be very afraid of the DC voltage, should you ever touch a bare wire by mistake. Once you get caught, it won't let you go. Not very good for household use.
H: How to discern earth from neutral? I have a three cable circuit in the kitchen1, I know that one is live, one neutral and one is ground. However, there is no colour2 matching between the standard and the real cables, so I can't use the usual easy way, furthermore, from my brief research on the topic I've found that: "...Typically Neutral is connected to earth ground at some point, usually at the breaker box. This pretty much makes earth and neutral very close in voltage. And Hot is always 220V (or the nominal line voltage) measured with reference to Neutral (and earth for that matter)..." thus, a voltmeter would measure the same values between "hot" and neutral , and "hot" and ground. How to figure out which is ground and which is neutral? 1. EU - Greece - 220V, 50Hz 2. Real cables colours: grey, brown, white. AI: If you have proper protection in your house, connecting a small load (e.g. a light bulb) between earth and live will trip the circuit breaker, while a load placed between live and neutral will stay powered. If the load stays powered no matter which wire you pick, then the wiring in your apartment is really screwed, to the point your insurance company may decline your claim in case of electricity-related accident.
H: Some questions regarding the resistors and capacitors around an opamp I have been dealing with the following part of a circuit for a while: But for the sake of curiosity I have some more questions left not specifically about this particular circuit but for all similar ones. I couldn't find satisfactory information anywhere yet. In the above circuit to filter a very noisy pulse input or to obtain debouncing, as you see an RC low-pass filter is used before the inverting input (R9 C1). In the simulation results just after the RC filter the signal's rising edge loses its shape dramatically due to the RC time constant. Here is the plots: Green plot is the noisy voltage signal seen before the inverting input just before the RC filter(just before R9). Blue plot is the voltage seen at the inverting input just after the RC filter. Red plot is the voltage at the non-inverting input.: 1-) Do you think the loss of sharpness of the input pulse is a problem? Would the sharpness of the signal at the inverting input has any effect on the error between the input and output frequency? Here is the ouput vs input: 2-) When we set the hysteresis of a comparator or gain for an opamp the "resistor ratios" matter. I can understand why very low resistors are not used since they would drive more current. But why most of the time kOhm level resistors are chosen why not MegOhm? I mean in above circuit the resistors could be 680k instead of 68k, 1500k instead of 150k so forth and so on. Is that something related to opamp's inner resistors? 3-) I found some guides to set the caps around R1 and R2(in the below example) in a Schmitt trigger. Here is an example from a source: According to these sources RC time constant should be equal. The sources doesn't explain the reason behind it in detail. Is this something similar when we compensate the scope probes? But I rarely see these capacitors on examples. Is there a good reason to use them or how important are they? AI: Main effect of that loss of sharpness is to delay the sliced output pulse. Whether or not that's a problem depends on context we don't have. Secondary effect, IF the waveform doesn't reach its steady state value before the next edge, is to change the observed duty cycle. Again, we don't have the context to know if that matters. You'll observe this at about 3-4x the signal frequency you're using now. Ultimately, as you increase frequency, the signal won't reach the slicing point and will disappear altogether, which is a problem if it occurs at frequencies of interest. You can mitigate these by reducing the R-C time constant if necessary. Increase the resistances too far and op-amp input bias and offset currents start to matter, and so do stray capacitances including the opamp input capacitances. These currents and capacitances will be in the IC's datasheet. Use Ohm's Law and calculate R-C time constants to decide for yourself if you can increase these resistances without compromising accuracy or performance. The idea is that when the output switches, the positive feedback capacitor C1 should give a big enough kick to the input to cross the hysteresis. Otherwise there's a time window when input noise can still cause glitches as C2 charges to the new limit via R1. Do the math, (note R2 = 34k of course) and you'll see C1 is too small.
H: Use of umbilicals with Vacuum Circuit Breakers I am a trainee systems engineer and have been tasked with drawing up symbols for mimics for a SCADA system. One of the symbols I have been asked to draw up is for a vacuum circuit breaker. When it is isolated an umbilical cable is supposed to be attached. I tried reading up on what the umbilical is supposed to do but couldn't find anything useful. Maybe I am just searching with the wrong keywords. Can anyone on here explain what umbilicals are supposed to do in this context? AI: Some misunderstanding but finally the question is clear I hope. Before the vacuum breaker is isolated (disconnected from the rails) it must be deactivated. (Remote or locally). When thereafter the breaker is isolated (disconnected from the rails) all power connections are disconnected. The remote station is still able to communicate with the breaker with SCADA. This to prevent the situation that the breaker is pushed back in an active state.(Could be very dangerous) both SCADA and mechanical measures are in place to make this impossible. Therefore the SCADA system must be able to communicate with the breaker as long as it is on the rails in the cubicle. This is realised with the umbilical (a flexible data cable) connected to the breaker. When the breaker is racked out for further inspection or replacement (Removed from the cubicle) the umbilical needs to be disconnected and communication with SCADA is lost. After the same or an replacement breaker is put back on the rails for service the umbilical needs to be connected before any further action. This way the remote station is informed about the status and the actions with the breaker. When information from SCADA and the additional mechanical protections are released the breaker can be pushed back into the cubicle (breaker is still open). Thereafter the breaker can be activated locally or remote. The expression umbilical comes from the possibility that the cable set can be plugged in and out.
H: Incomplete Astable 555 Circuit Triggering I am using a DSO138 oscilloscope for learning electronics. It is not much, but it is very helpful for me at present. I was setting up a 555 astable circuit. I noticed that it was triggering even though the circuit was not complete. I have included a picture of the circuit as well as the oscilloscope trace. The oscilloscope ground is connected to ground, and the oscilloscope positive is connected to pin 3 of the 555 (output). The funny thing is that it does not trigger if my fingers are far from the white wire (which is connected to pin 2 of the 555, but nowhere else), but if they are close, I get the trace I included. If my fingers get really close to the white wire, the duty cycle goes to near 50%. I am not sure what is going on. Can anyone help explain this? I have also included a trace for when the oscilloscope ground is connected but the oscilloscope positive lead is not: I assume this is noise in the power supply. I also assume it is related to the issue described above. Any help would be much appreciated. Thanks in advance. Here is a schematic: AI: From your oscilloscope, the frequency of the output seems to be around 50Hz (or could be 60Hz if you're in the US or other countries - it's not that easy to see the exact period). When you put your hand near to the white wire, you could be coupling mains electromagnetic radiation into the circuit. The 555 timer can be used as a schmitt trigger in certain conditions - generally with the trigger (pin 2) and threshold (pin 6) pins together. If the threshold pin isn't actually connected to anything, it might be capacitively coupling to the trigger pin. In a sentence, your body acts as an antenna for mains, bringing your body near to a circuit with floating inputs will couple some noise into the circuit, potentially producing an effect like this.
H: USB male android to audio output I was curious if I could possibly strip the end of a USB cable, and direct audio traffic from the phone through the USB to a 5volt in p/n speaker, sub, or a tweeter. I haven't seen this done anywhere else online and I'm just curious if I could direct the audio out of the USB female port, vs using auxillery, considering I'm trying to make portable speakers, the auxillery output is just a wee too weak, and I can't always bring an amp with me wherever I go. AI: Maybe. Most phones do not have audio over usb. Some do, but it's rare. My phone, a Samsung Avant, has a dock cable that allows usb charging and audio and video out over USB. It would be more likely that your phone supports USB OTG. It would allow you to use a usb audio card, and provide five volt out as allowed by your phone. All you need is a usb OTG adapter. Or there is many usb OTG sound cards already available, with a male usb micro connector. Same as usb OTG headphones.
H: How does a computer deal with subtraction of 2 values that are in two's complement? I'm confused how the computer calculates if there are two values A and B, both are in two's complement. Now we want do the operation D=A-B. How is this done? Let's say A=0100110 and B=0000111 What we do now? I would do: 0100110+0000111 but I'm really not sure. Or maybe: 0100110+1111000? So basically A+NegationOfB Any ideas? Please let me know as this is very confusing for me... Edit: jonk I made table for your answer but I don't know how to make in table visible that we have cin0=1 because we have subtraction... you know? is table correct to your description? AI: In twos-complement, the negation of a number is the same as inverting all the bits and then adding one. So to negate '0100110' just invert the bits to '1011001' and then add '1', giving '1011010'. That's all there is to negation. (I think you know that \$\overline{1}=0\$ and \$\overline{0}=1\$, yes?) Once you know how to negate a value, it's easy to subtract B from A. You just negate B and then add to A. So most computers don't include a separate bunch of logic for subtraction (which would take up space and cost money) but just keep the same ADD capability. You need to know one more thing. How a basic ripple-carry adder works. Such an adder is built up of a bunch of one-bit adders chained to together. Each one-bit adder accepts one bit from A, a similar bit from B, and a carry-in that comes in from the carry-out of the next-lower-order one-bit adder. Each one bit adder provides a one-bit sum and a carry-out. So there are three bits into the adder (\$A_i\$, \$B_i\$, and \$Cin_i\$) and two bits out (\$Sum_i\$ and \$Cout_i\$.) Each \$Cin_i\$ is connected to the prior \$Cout_{i-1}\$, so that the carry from the previous sum can be taken into account in the next bit. This is the exact same process you'd do by hand-adding the bits, very similarly to what you learn when adding in decimal. Now, this fact leaves out what happens for the lowest order bit. What does its \$Cin_0\$ get? Well, with normal addition where there hasn't been a carry from a previous addition operation, the value for it is '0'. This is what a normal ADD instruction does. There is also a special ADDC instruction, which "adds with carry", so that a carry from a previous ADD can be used in the sum of multiple-word answers. In the ADDC case, \$Cin_0 = C\$, where 'C' is the carry bit result from the previous ADD instruction. Now you are set up to understand how subtraction takes place. The ALU usually also has access to both the \$Q\$ and \$\overline{Q}\$ outputs for the bits of the inputs to the second parameter for an operation. (Flip Flops have both outputs available, readily.) So there is a MUX (something that can either select from either \$B\$ or \$\overline{B}\$.) For subtraction, the \$\overline{B}\$ is chosen instead of \$B\$. Then, also in order to perform the +1 needed to finish the negation, the ALU selects '1' as the carry-in by setting \$Cin_0=1\$. Then it just performs the same old ADD that it always does. Saves a lot of hardware that way. A real implementation of an ALU adder will probably not use a ripple-carry adder. Not because they don't work. They do. But because they are kind of slow. You have to wait for all those carry values to ripple over. So there are special "look ahead" methods for making the carry values work faster (more than just one of these ideas.) But the basic idea is all the same, regardless of the exact arrangements used. And the SUB instruction does the same kind of trick in order to avoid having to build up completely different subtractor logic, when the adder can so easily be bent to do the same work. Consistent with EE.SE, a behavioral schematic would be something like this: simulate this circuit – Schematic created using CircuitLab The above schematic could be simplified a little by simply placing the ADD/SUB operation control bit (0 or 1) directly into the \$C_{in}\$ of the adder in order to avoid using the mux. But in general ALUs are a little more complex and there actually is an even wider mux before the \$C_{in}\$ of the ALU (selecting at least from one of the following four: 0, 1, \$C\$, and \$\overline{C}\$.) EDIT: Your table isn't correct for single-bit addition. I've circled the incorrect parts below: But if the table is for subtracting B from A, then I need some clarification about Cin because subtractors aren't usually built from single-bit subtractors. So I can't give you a direct answer for your table, since I'm not sure about your intent with it. FINAL NOTE: Work through three or four samples. To do that, make up any A value of 4 bits. Then make up any B value of 4 bits. Take B, invert ALL the bits to their opposite to make \$\overline{B}\$. Now add \$A\$ to \$\overline{B}\$ in the normal way and compute result \$R\$, tossing away any carry in the result. Now just add '0001' to R. You have your answer now, for A-B.
H: What does a reverse phase dimmer circuit look like? I'm familiar with simple forward phase dimming using a triac. The circuit is stupid easy with only a handful of components. Of course this simple example can be improved upon to make it safer or improve performance and efficiency. But the basic principles remain the same. What I'm having trouble finding is useful information on reverse phase dimmers. Everything I can find describes the difference between forward phase and reverse phase in principle and how they each affect different kinds of loads, but I'm unable to find any technical information on how to actually accomplish reverse phase dimming. How do you make a reverse phase dimmer and what would a simple example circuit look like? Note: I'm guessing that reverse phase dimming has to be digitally controlled. I don't need any code for an MCU, but I would like to know what kind of signal goes into an MCU that it can recognize when the phase begins and what kind of signal it sends out to cut the phase at the right time (presumably using a MOSFET?). If there's a simple way to make a reverse phase dimmer without digital control, that could be useful too. Some additional information that might be useful. I'm researching this because I want to build a home-made wifi controlled light switch dimmer. I've got a 3.3v power supply and a wifi MCU with a dozen GPIO pins and a handful of PWM pins (a PADI IoT stamp based on the Realtek RTL8710AF). AI: A reverse phase dimmer does not have a triac but an IGBT or MOSFET. Such a dimmer contains also the electronics needed to modulate this device. These electronics can be simple or very complex. The principle is simple. The mains AC is fed into a bridge rectifier with in the centre the IGBT or MOSFET. The IGBT or MOSFET can be switched on and off at any moment. The AC can be triggered on the leading edge, The trailing edge or somewhere in between and for the duration needed. This makes such a dimmer suitable for: Halogen lamps Standard incandescent lamps Electronic mains LED lamps of different kind. etc. If the dimmer needs with different kind of lamps then the control system has several settings to make that possible. In case of remote control the dimmer can become expensive. Using the principle with the bridge rectifier and the IGBT or MOSFET it would be possible to make yourself but I did not work that out. Maybe the schematic included helps. The dimmers are very sensitive to overload but since only the IGBT or MOSFET is destroyed also simple to repair. Remark: The previous picture had some wrong earth connections so I have changed it. The incomming PWM circuit is isolated from the mains side. Thanks to Elektor.
H: Proper way of connecting a molex connector to a breadboard So I'm trying to mount a keypad that requires a molex connector to a breadboard. The datasheet says it mates with Molex 2695 series or equivalent. So I thought I could just get away with a 10 position female mating connector, which one end would go to the keypad and the other end would go to something like a male breakaway header. I was pretty surprised when I actually got the connector. One end looks like this, which fits nicely into my keypad But the other end looks like this: That hole is way too big for a typical breakaway male header pin. What's the proper way of connecting something like this keypad to the breadboard? AI: You've only bought the housing. You have to buy the contacts, too. These are sold separately because there are multiple housing types with the same contacts. You also need the matching crimp tool.
H: How can I drag-select components in a room in Altium? I have a PcbDoc in Altium Designer with several components in a room. I want to select some components by dragging a box around them. I can select them if I start dragging in the gray or black areas. But if I start in the red room, I reposition the whole room. So I double-clicked the room and locked it. Still, I can't start a selection box inside the red area. What's the trick? AI: You cannot start a selection box above a primitive (component, text, room), as Altium will assume you want to drag that primitive. What you can do, is enter a selection mode. Altium's hot-key system makes this very easy, just hit s and then choose whatever mode you want (e.g. i for selecting items inside a rectangle). But as Araho said, most of the time, rooms are just cluttering your design. I would only use them for multi-channel designs, where I have many identical circuits and want to copy the layout of one room to the rest.
H: Can a 24.0VDC/3.0A Power Supply be used with a breadboard? I came across a DZ075 power supply. It says it is +24.0V/3.0A. Can that be used with a breadboard? Or do I have to get it to 3.3V or 5V before I plug into the breadboard. In other words, can it be plugged into the board then make it 5volts or before? I took the cover off and found there are 8 pins. The last three are +24V, the middle three say ground, GND, and the first two are not connected, but the pins available and say +5v. I do not wish to be electrocuted or destroy stuff. Edit: Here is a picture: Edit: Could I move the connector all the way over to the left? It would be connecting two 5V, three GND, and one 24V (the connector is only six connections). Edit: I'm not sure I should use it. The amps are high. From this calculator, http://circuitcalculator.com/wordpress/2007/09/20/wire-parameter-calculator/ it looks like my 23AWG wire is too small. AI: The breadboard itself (assuming the usual plastic boards full of holes) doesn't care what voltages you use on it - however, the circuit you are building DOES care. If you are working with common digital ICs, then you need a 5 volt (or possibly 3.3 volt) power supply. If you are working with other types of circuits - an audio power amplifier, for example, you may need 24 volts, or +/- 15 volts, or something else. If your circuit wants 5 volts, you could build a votlage regulator on the breadboard to reduce the 24 volts from your supply to the 5 volts your circuit requires, but it may be easier (and safer) to buy a 5 volt "wall wart" supply.
H: Repairing 'burnt' solder points I recently came across a pcb. This is the picture of the aforementioned PCB. As you can see, some solder points seem burnt. The copper trace has been removed. Does this mean the PCB is dead? If I solder the component on the solder points, will it work? Maybe I should do prework, like remove pieces of solder with solder wick? AI: This horrific butchering 'repair job' can be repaired with time and patience, assuming the reasonable skills are there. The person who did this can be immediately disqualified by virtue of the latter requirement. Presumably the part removed is known- maybe a SIP audio amplifier IC or a switch. The part needs to be replaced with a good one (hopefully that's all that is wrong). The pads are all lifted, including the ones that were for primarily mechanical reasons. For the latter perhaps epoxy to provide the mechanical support, but that can wait until it is working. First, clean the board with a mild solvent such as 99% isopropanol and one of those manual toothbrushes that the dentists give you at every visit (obviously it should be new, clean and not used for teeth afterward). Then inspect the damage. I would run a thin (eg. AWG30-AWG24) insulated wire back to the nearest pad that used to be connected to those missing pads- follow the traces to where they went. This is a single-side paper-based phenolic board, so all the circuit is visible. The pads are also very weakly attached to the substrate. Make absolutely sure you get the connections to the right place- a mistake at this point could greatly compound the disaster. You can see that some traces are peeled back by the ham-fisted thug that worked on it. Use a sharp Xacto knife or similar fine blade to trim off the loose ends of the ripped traces so they can't get into trouble. Make sure that the big pins or tabs are connected to the proper places in the same way (with wires) as the copper around those pads is missing or compromised (lifted). Looks like they were connected together and to a ground (?) pour via a thermal relief(s). If you get the device working, make sure you provide mechanical support with something like epoxy. Some of the unrelated component leads look a bit like cold solder joints, it might not hurt to carefully touch them up. If the device was intermittent that might have been the root cause.
H: Using single LED as bipolar DC detector It would be very handy for me to have an XLR plug with an LED on the end to check for DC at the output of balanced audio gear. The challenge is two fold. First is that this gear can fail with a positive or a negative voltage on it's output pins 2 and 3 in reference to pin 1. I am using regular old red LED's. Second challenge is I would like to check pins 2 and 3 with a single LED. This brings up the issue of what happens when pin 2 is +VDC and pin 3 is -VDC, it will not light. I feel that a diode OR arrangement might get me close to the functionality I'm after but my design experience falters here. AI: simulate this circuit – Schematic created using CircuitLab Figure 1. Single and dual-channel checkers. Figure 1a shows how to use a bridge rectifier for a single-channel. Figure 1b extends the design to include a second channel. If the 1b circuit could be exposed to both a positive and negative simultaneously then size R2 to suit the maximum voltage difference. How it works simulate this circuit Figure 2. Fault condition: XLR 2 faulted to V+; XLR 3 faulted to V-. Figure 2 shows the circuit with a certain fault condition and the reverse-biased diodes removed for clarity. R2 has to be selected to limit the current to a safe value when the maximum difference in fault voltages appears on 2 and 3.
H: Why does the race hazard theorem work? So for those who don't know, the race hazard theorem (RHT) states that: A x B + A' x C = A x B + A' x C + B x C I understand the other part of the RHT, about time delays and such, but I don't understand why the logic statement above should be true, can someone help me understand this? AI: As others have pointed out, mathematically the statements are exactly the same, and the additional term is "redundant". It would also be "redundant" for me to copy their mathematical proofs here. You can also easily verify the statements are equivalent by making a 8 row truth table for the three inputs combinations. A B C A*B + A'*C A*B + A'*C + B*C 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 ** hazard b/w states 1 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 ** hazard b/w states 1 The purpose of the extra term is to prevent A from causing any toggling whenever both B and C are high. As an example, suppose there is a finite time delay between A and A' (reasonable). Now also consider that both B and C are '1'. As you can see in the waveforms below, there is a glitch at the output. Assuming the logic is static CMOS, the glitch is recoverable. But, if it were some forms of dynamic logic it could propagate the error. The addition of the redundant term is a solution to cover the glitch.
H: How to perform correct MCU interface analysis based on VIH,VIL,IIH,IIL? So I had interfaced a microcontroller (TI CC3200) with a keypad, using a 5V power supply with maximum current rated at 225mA. Everything worked fine, until I replaced the 5V power supply with a new one that has a bigger maximum current rating of 2A (Same 5V). This immediately burned my chip. To investigate why this happened, I looked at the datasheet and realized I've made a very simple mistake that I've pulled the input pins to 5V (PORTX[4]-PORTX[7]) on a 3.3v rated microcontroller. VIH and VIL are rated at 0.65 × VDD and VDD + 0.5 V, so no wonder they would burn out. However, what I don't understand is why the chip didn't burn out on my first power supply, where it was also 5V. Is it because the power supply had a lower maximum current rating? If this is the case, on top of worrying about the VIH and VOH level, do I also need to calculate exactly how much current I need to pull the input pins with based on the value of IIH and IIL? But then if you look at the datasheet, it only shows the nominal values for IIH and IIL, not min/max. What is the proper way of doing an interface analysis on voltage/current level? AI: I'm surprised that any 5V supply would burn out a 3.3V chip through 10k pull-ups. That would be less than 2mA through the input protection diodes. (I'm assuming the CC3200 has protection diodes -- it would be weird not to.) If the 3.3V supply can't sink current, maybe the voltage on its output capacitor could build up, but I'd expect the regulator to compensate for that. Perhaps the 2A supply behaves differently at power-up. Regardless, the solution is the same -- don't put 5V on a 3.3V pin! As you can see from the datasheet, digital input currents are in the nanoamp range, so you should (almost) never have to worry about them. All you should have to do is: Make sure the pull-up voltage is within the VIH range. Normally, you want the pull-up voltage to be the same as the IO voltage (or VDD if they're the same). If the current's low enough, you can use the same supply. Make sure the pull-up supply can provide enough current when the pulled-up lines are driven low. In your case, that's: $$I_{supply} = \frac {3.3 \mathrm V} {10 \mathrm{k\Omega} || 10 \mathrm{k\Omega} || 10 \mathrm{k\Omega} || 10 \mathrm{k\Omega}} = \frac {3.3 \mathrm V} {2.5 \mathrm {k\Omega}} = 1.32 \mathrm {mA}$$ Make sure the output pins (PORTx[0-3]) can sink enough current to pull their lines low. This is the \$I_{OL}\$ spec. According to the datasheet, \$I_{OL}\$ is configurable, and the lowest value is 2mA. Each IO only has to handle one pull-up, so: $$I_{PU} = \frac {3.3 \mathrm V} {10 \mathrm {k\Omega}} = 0.33 \mathrm {mA}$$ $$I_{OL} >= 2 \mathrm{mA}$$ $$I_{PU} < I_{OL}$$
H: Circuit schematic in Eagle seems to connected in series in board layout I am very new to Eagle. I was drawing a schematic that would connect my AVR Dragon to my Atmega32A. I drew this up and switched to board layout. The problem is in board layout. It seems to me that VCC is connected in series from the square pad -> 10k resistor, pin30 -> pin10, C1 (0.1uf) -> C2 (0.1uF) The square pad (for VCC) is outside the drawing board to the left. I was certain that these are supposed to be connected in parallel. I apologize if I am missing something here but I do not see any thing wrong with my schematic. Please correct me. AI: All the pins in your schematic that are connected to the same named net need to end up connected to each other in the layout. For example, the IC's pin 10, the mounting pad, and the one pin of the 10 kohm resistor need to all end up connected to each other. The ratsnest lines (or whatever Eagle calls them) don't mean you have to connect from IC pin 10 to the pad to the resistor. If you connect from the IC directly to the resistor, Eagle will sort it out and remove one ratsnest line. And probably re-adjust the remaining one to be as short as possible and still indicate the required connection.
H: epoxy for keying box headers? Edit: after a lot of trial and error I discovered that JB Weld works amazingly well for this. You want the original two-part epoxy that comes in two completely separate tubes (not the newer stuff that comes in a single double-plunger tube) since it has a ~4 hour set time. If you mix the two parts and then load it into a syringe and hook it up to an air compressor driven solderpaste dispenser (called a "glue dropper") you can plug holes really really fast and the results are great. Dries rock-hard. Keep in mind that JB Weld is ferrous (dried epoxy will stick to magnets, but that doesn't matter for my application. Also JB Weld is electrically conductive, so if you're plugging more than one hold you can't use this for hot-pluggable devices since an incorrect insertion would make electrical contact on the pair of plugged holes, by way of the JB Weld. Otherwise it's ideal. You'll have to throw away the syringe and tip but they only cost a dollar or so. Everybody's familiar with the ubiquitous 2.54mm box header (image below). One common way of preventing reversed or misaligned insertion is to get the male header with a shroud and the female header with a corresponding key (second image below). However this isn't always mechanically practical. It also requires buying the headers in exactly the size you need instead of cutting them down from larger sizes. An alternative way to prevent flipped/offset insertion is to omit one of the male pins (they can be pulled out of the header with pliers pretty easily prior to soldering; only pressure holds them in place) and plugging the corresponding hole of the female header. However the plugging has to be done with a glue or epoxy that dries VERY hard, otherwise you can mis-insert the connector by pushing a bit too hard and deforming the glue. I've been looking at electronics epoxies and there seem to be a dizzying array of them! Question: Can anybody recommend an epoxy that dries very hard, hard enough to prevent a pin being driven through it? Preferably a one-part, air-dry (not bake-dry), pneumatic-needle-dispensable epoxy if possible. A pneumatic-needle dispenser (like the kind used for solder paste) would make it really easy to key a whole bunch of headers at a time; just stick the needle in the correct female header position, press the footswitch, move on. Unfortunately I've found a lot of these headers use plastic that can't withstand reflow ovens, so an epoxy that doesn't require oven drying would be preferred (although even the heat-dried epoxies use much lower temperatures than reflow). Thanks AI: Industrial solution to the keying problem is not an epoxy, but a special product called "Male Keying Plug" made of thermoplastic.
H: Is it OK that I accidentally swapped TX and RX on a UART bus? I accidentally swapped the TX and RX pins on a UART bus when hooking up a to a 3.3V bus with this 3.3V cable: https://www.sparkfun.com/products/12977. Did I cause any permanent damage to this board as I debug it? Can we all agree to use TXO, RXI? AI: It's quite unlikely that there'll have been any permanent damage. Typical LVCMOS output stages can survive contention with each other - they will source/sink 20 mA or so, which is usually below their damage limit. But the details do depend on the ICs involved, you could check the datasheets if you're thinking of building these particular parts into a high reliability system and are concerned about latent failures.
H: What happens to resistor when it "breaks" due to over-current or over voltage? What happens to resistor when it "breaks" due to over-voltage or over-current? Does it short or Open? or it merely ends up outside of specification? AI: Anything can happen, but most seem to go open circuit. You can buy 'fusible resistors' that are guarranteed to fail open circuit.
H: About capacitor If i have 20uF capacitor with charging 3V . Now i m gonna attach 1 ohm resistor and 2 V led in series with capacitor . Now current will flow through the led is 1Amp max For a while , but if 1 Amp current will flow through the led it must be burn out theoretically so why it will not burn out practically ? AI: You may not know this but a 5mm LED rated for 75mW has an internal ESR of about 15 Ω so adding 1 Ω is not significant. ( but at 3V ESR is probably closer to 10 Ω then rises above 20 Ω below 1.9V ) Recalulating without 1 OHm Assuming Vf=2.1 (Red) Vi= 3V on 20uF cap Imax= (3-2.1V)/15Ω =60mA calculating light pulse Decay time to 1.8V (dim) If T = 20uF * 15 Ω = 300 µs decay time to < 40% of 3V even though LED turns off below 1.8V this will not be visible Try again
H: Why can't I connect a std_logic_vector signal to a port of type signed or unsigned The numeric_std.vhdl says this: type UNSIGNED is array (NATURAL range <>) of STD_LOGIC; type SIGNED is array (NATURAL range <>) of STD_LOGIC; Does this means that the unsigned and signed have std_logic as their subtypes? Why then is it that when I have an entity with a port of signed or unsigned type and I connect a std_logic_vector(3 downto 0) to it, I get an error? e.g component dummy is port( a: in std_logic_vector(3 downto 0); b: in signed(3 downto 0); c: in unsigned(3 downto 0); d: out std_logic ); end component; If I port map a std_logic_vector to b or c I get errors: Signal "b" is type ieee.std_logic_1164.STD_LOGIC_VECTOR; expecting type ieee.NUMERIC_STD.SIGNED. Why? AI: Although in your example unsigned and signed are both arrays of the same element type std_logic, this is not the same as a subtype. A subtype is when one type is a limited subset of another type, for example: subtype my_type is std_logic_vector(3 downto 0); subtype eight_bit_int is integer range 0 to 255; A feature of a subtype is that it can be automatically converted to and from the parent type, so I can do: signal a : std_logic_vector(3 downto 0); signal b : my_type; signal c : integer; signal d : eight_bit_int_type; ... -- These should both work fine b <= a; c <= d; If you want to connect differing types in a port map, you might have to use type casts or type conversions, or both. Using your example entity, you might write something like this: signal a_actual : std_logic_vector(3 downto 0); signal b_actual : std_logic_vector(3 downto 0); signal c_actual : std_logic_vector(3 downto 0); signal d_actual : std_logic; ... -- Converting from std_logic_vector to signed or unsigned only requires a cast dummy_inst : dummy port map( a => a_actual, b => std_logic_vector(b_actual), c => std_logic_vector(c_actual), d => actual ); If you wanted to connect an input, for example b to an integer, you would have to use a type conversion and a cast, and the line would look like this: b => std_logic_vector(to_signed(b_integer, 4)), -- 4 is the length of the port
H: Amplify sinusoïdal signal with op-amp with V- = 0V I have a small sinusoidal signal, with an amplitude of 10 mV (the signal goes from -5mV to 5mV) that I'd like to amplify. I'd like to use an op amp, but my problem is that I only have +3V and GND voltages to supply the op amp. Which means the classical amplifying circuit would not work: Any idea how I could amplify my input signal? AI: The basic circuit just needs a few extra components. Adding C2 gives it a DC gain of 1 but keeps the AC gain set by Rf,Rg (G= 1+ Rf/Rg) Adding R1,R2 creates the mid point DC offset at the non inverting input. Adding R3 and C4 creates a smoothed supply (low pass filter) for this offset. Adding C1 decouples the input. Adding C3 decouples the output Additional edit R3 and C4 ensure that the voltage to the potential divider (R1,R2) is as noise free as possible. Any noise on the potential divider would appear at the (non-inverting) input and be amplified. With regard to values: R3 was chosen to be less than 1% of R1,R2 so that it would not drop too much voltage before the potential divider. C4 value was chosen because it is a commonly used value and gives a low break frequency . These values are not particularly critical and others could be substituted if needed
H: Steps for testing external flash memory I have a blackfin 533 and I connect it with external flash memory. I have a software driver that erases a block, fills data, write to flash memory. I'm using the following chip ST M29W800D. How would I test and verify the flash that's working ? Should I earse it, fill it with data and read it ? but how would I erase it, and I'm running the software that is checking the correctness of the flash eeprom ? AI: We are again on the same question as in your previous question - what are you going to test? That flash is there? If it was soldered onto the board, then flash has to be there physically. If it is operational or not? You will not know if it is operational or not without knowing something which should be in specific places of flash, or have checksum as @st2000 proposed. You have answered your question by saying I have a software driver that erases a block, fills data, write to flash memory. Do it, then read data you filled with to compare with original. For that you need some distinguishable data to write, first which comes to mind you should not write FFs if you have data line pullups and 00s if you have data line pulldowns. But in general flash is usually needed to hold some information. When application updates the flash chip, it must check that update is done properly by comparing sector written with content being read after programming. If you need algorithm how to perform erase/program/read, you should refer to datasheet of the chip or application note for it. Hope it helps. I suspect that question you ask may not describe your main problem; you try to gather some side data to solve issue yourself. ADD #1: (I removed comment, putting addition here) my problem is, how would I erase block, fills the data, and I'm running the software on the flash itself. Ah, this is for sure different problem. If you run code which is located in flash chip, then: you must ensure that you do not erase/rewrite sector with code you are running. This is first thing. then check datasheet if, during erase/write cycles, flash chip is readable for external device for the page which was not erased; it may happen that during erase/write cycles chip will be only outputting state of the erase/write operation, then processor will not be able to get proper instruction to run and malfunction; if you need to erase everything, you will need to copy code you execute to some other physical location - e.g. in SRAM, and run it from there. After you update flash chip device will anyway need a hard reset to ensure new code within flash chip is in effect. There're several issues with approach reading data from flash which is being erased and programmed. I would simply copy code somewhere else and run it from there - this way you will be 100% safe from malfunction of flash during erase and programming. ADD #2 sorry I didn't understand, how would I copy the flash software into SRAM ? should I read the whole data and save it in a buffer for example ? but what should I do with this data ? how to verify it is correct ? so the steps is to read the whole flash and save it in a buffer, then what to do else This is software technique, which must be allowed at hardware level. Processor must be able to "see" flash and SRAM in its addressing space. Flash chip programming code must be relocatable to SRAM addressing space, and after you copy this code to SRAM from flash, you just jump to it, and execution continues in SRAM. Contents you are going to write to flash of course should not be located in flash because you are going to erase it. Thus SRAM (or some other source emulating RAM) needs to be used as source for data you are going to write to flash (as well as for instruction fetch for executing during flashing). Some processors/MCUs may have small flash inside them, if this one is having such, you can put you flash chip flashing code in there. The task actually is not an easy one, and results of implementation will much depend on architecture of your device. I took a brief look into application note, it says During the Program/Erase mode of the M29F800 a read cycle will output the Status Register of the P/E.C. The Status Register contains valuable information about the program or erase operation which is happening or has finished. If it means that during program/erase cycles it can not give instruction code to CPU to run from flash, then you can not flash the chip executing flashing code from it. am using blackfin 533 Looking to datasheet I see Up to 148K bytes of on-chip memory Thus there's a place to put flashing code inside the processor. Maybe you can use scratchpad RAM, or data bank SRAMs (I am not sure, not so much familiar with this chip) External memory controller with glueless support for SDRAM, SRAM, flash, and ROM And you can also connect external SRAM, SDRAM :)
H: Distance problems with I2C connection for multiple devices I'm considering using the I2C bus protocol to connect up to 100 devices (worst case scenario) to a motherboard to avoid using serial-port connection with each one. The problems I face are: I need them to be at a distance as far as 3-5 m The maximum voltage should be 5V I've tried to find an answer to the problem and I've come across a couple of solutions such as setting pull-up resistors to counter the increase in capacitance, but I've found mixed opinions and articles and I can't reach a solution. Do you think this is viable? What other options do I have? AI: IIC is fairly high impedance due to being passively pulled up and that the pulldown current must be rather small. The pullups are usually a few kΩ minimum, which is the impedance of the lines when idle. This is usually fine on a single board above a consistent ground plane, but extending such lines 5 meters is asking for trouble. If you really have to do this, make the data rate low and encapsulate every packet with a checksum. Ultimately you end up trading data rate with reliability. You can probably get away with 100 kBit/s or so (just guessing). That would give the lines 5 µs to settle after each edge before they should be looked at. A probably better option would be to use CAN. 100 devices is getting near the limit but is still within spec. The common MCP2551 is specified to support 112 devices, for example. CAN is a differential bus with 120 Ω pull-together resistors at each end. The differential nature and much lower impedance (60 Ω) make is suitable for going off board. It was initially designed for use in cars, which are notorious for being electrically noisy. 5 meters is short for CAN. If you use the right twisted pair, daisy chain topology, and properly terminate the bus at each end, you should be able to do 1 MBit/s without problems. Another advantage of CAN is that silicon to implement the low levels of the protocol is built into many microcontrollers. The lowest level firmware sends and receives whole packets. The hardware takes care of encoding the data onto the wire, collision detection with backoff and retry, and checksum generation and validation.
H: Installation of an AC Drive on a Mixer - Help We have a 30hp 1440rpm AC motor installed on a mixer. Motor Pulley: 6" Machine Pulley: 20" According to my calculations, the mixer runs at 432rpm. Operating Procedure: The mixer is loaded with approximately 200kg of raw material feed, along with water and several mixing compounds. The motor is then started by a "Star Delta" Starter. Due to the high load in the mixer, the motor is unable to move in the "Star" Phase. The connected ammeter's needle touches the roof, so the current consumption is higher than 80amps (the max that the ammeter can measure). When the Starter puts the motor in "Delta", it starts with a jerk and the ammeter reads about 60amps. After the initial 2-3 minutes, the mixer settles down and the motor's current consumption hovers between 30 and 40amps. Considering that we install an AC Drive for the above motor, I have the following questions: Would an AC Drive be able to maintain the necessary torque at extremely low motor RPMs? I intend to have the AC drive slowly accelerate the mixer to the desired rpm, thereby giving the mixture enough time to settle down and reduce the need for high current consumption. Would a V/F control type AC Drive suffice for the above application? I am specifically looking at Siemens Sinamics V20. What kind of energy savings would an AC Drive bring for the above application? Other Details about Connected Power Supply: V: 440V F: 50Hz I would greatly appreciate any and all assistance. Please excuse me if any assumptions are wrong, I'm not well versed with this field. Thank You. AI: Adding a V/F control system could be an approach. However with only V/F control the regulator can not see if the motor is acctually turning. One step further is adding an encoder to the system so the regulator can see that the motor is turning. In both situations the available starting torque will be more or less 150% at low frequencies (3Hz) A different approach could be OLV (Open loop vector control). Here the motor can realise a torque of about 200% of their rated torque at very low frequencies. Also here an encoder is possible turning the system into an CLV closed loop vector control. Here a torque control mode is possible. Thereby the motor is controlled at torque rather then motor speed. Try to understand the principles first and then look at your situation.The Closed loop vector control would have my preference for your mixer. For this approach you can look at the SINAMICS G120. For your specific questions. CLV can work in a standstill condition and would deliver enough torque during startup. You can compare this with a DC motor. V/F might be enough but is not sure. For the other possibilties see above. I do not think that energy savings can be achieved. The motor has to deliver its energy whatever the situation is.
H: How hot can a lithium ion battery safely get while charging? How hot can a lithium ion battery safely get while charging? I've found some references to 113F, but I know a lot of batteries used in cell phones get a lot hotter than 113F. I measured 140F on my Galaxy S4 while it was charging up from a fully discharged battery. On the other hand, Samsung is currently exploding batteries with their Note 7, so cell phone manufactures may not be the best reference. Is 113F the max ambient temperature for charging lithium ion batteries? In that case, what's the recommended max temperature for a battery pack itself? AI: There is not good/bad, probably that 113 F (45 C) is probably on the conservative and safe side. Being able to charge a phone quickly is a selling point so Samsung probably deliberately allows for a higher temperature before the charging rate is decreased. A higher temperature decreases the lifetime of the battery. Samsung choose their optimum balance between battery charging time, safety and lifetime. Your choice might be different dependent on the application. If a long charging time is not an issue then that 113 F is probably fine. And as mentioned in the comments: read the datasheet
H: Rounding a Square Wave I am using a 555 IC to produce a sound in a small 8 ohm speaker. It works just fine, but the square wave sounds rather harsh. I am wondering if there is a simple way to round out the corners to make it sound better. All the circuits I have found online are rather complex. It seems to me that a simple RC circuit should do the trick, but I have not been able to figure out how to position it. Any help would be greatly appreciated. AI: Simple, something like this: simulate this circuit – Schematic created using CircuitLab You will have to experiment with the values of R1 and C1, their optimum will depend on the frequency you're making with the NE555. This will make the signal less loud
H: Circuit analysis with two loops, resistors, and independent/dependent sources I am working on this sample circuit problem, which knowledge of KCL, KVL, and how resistors in series or parallel add up in terms of resistance. However, in this circuit there is a voltage controlled current source that supplies 29 times greater current than the current I somewhere else in the circuit. I am supposed to find the voltage drop across this VCCS, labeled Vy. I think it's this element that is throwing me off. I am not sure how to go about analyzing this. Here is my work so far, hopefully the picture is clear enough. I have these equations written down from KVL. I know that there should only be two loops, I am just not sure whether which loop to analyze would be better. Although either one should give me the same result, I believe, if I do it right. But I am stuck on finding Vy, as well as the voltage drops across the other resistors, because of that VCCS in the circuit. How should I go about analyzing this circuit? AI: It's a CCCS, not a VCCS. \$I_B\$ is not equal to \$V_T/R_T\$, since the current through \$R_2\$ is not \$I_B\$. So what is the current through \$R_2\$? You can get this simply by inspection. When you've got the expression for that current, do KVL on the left mesh and you have \$I_B\$ (1 mA). And the rest is plain sailing.
H: LMR16030 voltage regulator pin configuration I just bought a HSOIC-8 LMR16030 and have tried to plugged it in my circuit but didn't manage to make it work. I'm thinking this might be due to me misunderstanding the pin configuration. What are the pin numbers in this picture? Updated: Zoomed image (2x original dimensions on each side) AI: What are the pin numbers in this picture? In that image, pin 1 is bottom left, pin 8 is top left Although your physical IC is missing the "dot" shown in some parts of the datasheet, the thick white line seen in your photo, is another standard marking for the "pin 1 end". Also this drawing from the datasheet shows another indicator: Based on the industry standard JEDEC MS-012, there can be an optional "chamfer" along the "pin 1 to pin 4" edge of this package - I have highlighted the relevant details in red on the drawing. I think I can see a darker line on your photo along that edge, which could indicate that the chamfer is present on your IC.
H: How to increase the lifespan of an Arduino. I have made a device with arduino MEGA with 50+ one wire sensors, 4-6 shift registers, SIM800l module, ethernet module, wifi module, RTC, SD card module, OLED, buttons, thermal printer, LM2596 buck converter etc.. All modules are soldered on my new board powered with external power supply through LM2596. My board with modules fits to arduino like a shield with male header pins. I want to make this device to work for years continuously (if possible) how can I increase the lifespan? Arduino Mega Description: The Mega 2560 is an update for the Arduino Mega, which it replaces. The board is a microcontroller board based on the ATmega2560-16AU . It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila. Product Summary: CH340G replace the Atmega 8U2/16U2 CH340G Driver Download link, please copy the link and paste in browser: http://www.5v.ru/ch340g.htm Microcontroller:ATmega2560 Clock Speed:16 MHz EEPROM:4 KB SRAM:8 KB Flash Memory:256 KB of which 8 KB used by bootloader Operating Voltage:5V Input Voltage (recommended):7-12V Analog Input Pins:16 Digital I/O Pins:54 (of which 14 provide PWM output) DC Current for 3.3V Pin:50 mA DC Current per I/O Pin:40 mA Package Included: 1 x ATmega2560-16AU CH340G Board AI: You can't. All you can do is prevent damage from the elements or self induced damage from heat. Don't overdrive the regulator. Maybe add a fan if needed. Ensure water tight if you can for out door projects. The parts have a finite life based on their component quality. As you are likely buying cheap Chinese products, expect to get what you pay for. Any bargain bin capacitors are the most likely to go first. RTC crystal next, and probably the thermal printer after that. The SD Card based on how often you write to it. Expect, in best conditions, five years.
H: Can the 0V reference output of a switching power supply be connected to the neutral conductor? Like the title says, I would like to know if it is possible to connect the 0V reference output of any switching power supply to the neutral conductor. Here is an image of what the connection should look like: What would happen if I place this connection? Is it safe? If that isn't such a good idea, is there another way to reference de 0V output to the neutral? Regards. AI: Don't do that Depending which country you live in and what type of plugs and sockets you use, touching the DC output side becomes "less safe than it should be", "outright dangerous", or "just as bad as touching mains". If you have a separate earth pin on your mains plugs, and all sockets in your jurisdiction have an earth connection, you could consider connecting to that instead of neutral. Alternatively, if you're trying to get rid of high frequency noise, you could connect a capacitor across there. Use a capacitor which is designed for it - look into Y rated parts. The only time it would be acceptable to do what you're proposing is if the DC side is treated like mains from a safety point of view. With e.g. double insulation. If this is what you are doing, you may be better off with a transformerless AC to DC power supply.
H: How to calculate the gain of the op amp in this circuit? This op amp operates as a difference amplifier and VR2 is for feedback, But I can't figure out how to calculate the gain of this circuit, Any ideas? AI: This isn't an amplifier but a Schmitt trigger, because the feedback resistor VR2 is between the output and the positive input. So as soon the output becomes positive, the positive input becomes more positive and following, the output becomes even more positive. https://en.wikipedia.org/wiki/Schmitt_trigger#Op-amp_implementations
H: Adding Controlled Noise to Signal I want to add noise to some signal. I have the option to add the noise via the software API of the system. But I also have the option to add the noise in the hardware circuit itself so there is no need to manipulate the software layer. What would be the pros and cons of each approach? The noise is meant to hide some information that I dont want people to easily see in the signal. AI: Definitely need more details about the type of information, and how it might be vulnerable to uninvited observability. Assuming it's some type of n-bit bus, my first thought is that you should encrypt the data, using a secret key code, so only someone with the key code can decrypt and recover the original data. Noise, as an engineering term, is random and unpredictable, requiring a denoising filter/algorithm to obtain something close to the original data. Rarely can you recover all of the original data.
H: Can I shield noise inside an FPGA with a ground plane? I am routing some external signals through an Altera FPGA and noise is coupling into the signals from something else in the FPGA. I have an idea to physically distance the signal route from the rest of the hardware and then have a ground separating the two sections of the FPGA. Is this possible? Has anyone ever done this? AI: What IO standard are you using? 3ns would be a big ask for say CMOS33, but should be doable for LVDS depending on the FPGA speed grade and how you have constrained the timing (You have constrained the timing haven't you?). Altera are a little notorious for sometimes making mixed IO within a bank a complete pain, mixing single ended and differential IO in particular is something that you pretty much need to verify with Quartus before you can actually know if it will work, the rules are obscure and device specific. Power decoupling is certainly a possible problem, and at these rates you need to be doing impedance controlled layout if the net is more then a few cm long (And termination is a good thing).
H: When is a common emitter amplifier a good idea? In the datasheet for the LT1789 they have this application circuit. This TIP127 appears to be a voltage controlled by that opamp and placed in a common emitter configuration so it has an exponential dependence on it's base voltage. Why is this stable/a good idea? How is this opamp capable of stabilizing this? Is there some back of the envelope calculation/intuition for when designing a circuit like this is okay? AI: The TIP127 is there to lend some grunt brute force so that currents greater than about 50 mA can easily be created at the output. Because the lower op amp "measures" that current and is in a negative feedback loop with the op amp that drives the transistor, the non linearities of the transistor are of no great consequence. Stability can be a significant problem on circuits like this but, C1 reduces the loop gain at high frequencies ensuring phase margin never drops close to the oscillation point.
H: Dual power supply gives higher voltage as soon as load is connected I have a +5V/+12V dual output power supply. They share a common ground. When no load is connected to 5V, both outputs read 5V/12V by multimeter. As soon as I connect a load (LCD) to 5V line, the multimeter still reads 5V fine, but suddenly starts reading 14V instead of 12V on the other output. The voltage also visibly fluctuates between 14.1V ~ 14.5V. The 5V line does not fluctuate at all. The LCD connected to 5V probably draws less than 300mA at best, which is way below the 3A maximum given from the specification. Is this behavior normal? Why does the 12V power supply suddenly jump to 14V? AI: It's because you are ignoring the datasheet and not attaching a minimum load to the outputs.
H: ROM - COMBINATIONAL MEMORY? A combinational circuit only depends on present input values. Why ROM is considered as combinational memory? AI: Since you cannot change the contents of a true ROM, it should be clear that the output depends only on the inputs, ie, which memory cell is selected by the address inputs, if the output is enabled, etc. This would not, however be true for a synchronous ROM with registered inputs or pipelining. And it is not true for any sort of RAM, PROM with still alterable state, EPROM, EEPROM, etc as in those cases inputs can establish state which will affect the future relationship between inputs and outputs. However it may be true if certain inputs (write enable, erase enable, or a voltage needed for that) are prohibited.
H: Transistors Circuit Analysis In terms of the load, what is the significance of the following circuit? AI: Name the transistor's base resistor that goes up to the INPUT as \$R_1\$ and the base resistor going to ground as \$R_2\$ and the emitter resistor as \$R_e\$. Then assuming the INPUT allows the BJT, in which it is the collector load, to be in the active region and also allows the emitter to be significantly above ground, the circuit will produce a current in the load of: $$I_{LOAD}=\frac{\beta\cdot\left(V_{INPUT}\frac{R_2}{R_1+R_2}-V_{BE}\right)}{R_1\vert\vert R_2 +\left(\beta+1\right)\cdot R_e}$$ As everyone can see, as well, the rest of the circuit is there to distract.
H: Nixie tube multiplexer circuit problem I am working on a nixie tube clock design using IN8 tubes and a combination of MPSA42 and MPSA92 transistors to implement a multiplexed design of four tubes. The issue I'm running into now is that when I power the system on and drive one of the tubes' numerals, I get a slight glow out of the other tubes on the same numeral. My anode circuit consists of a mpsa42 connected to the base of a mpsa92 to enable my microcontroller to multiplex between tubes (see anode circuit attachment). The cathode side of the tube has each of the corresponding numeral cathode pins connected to an mpsa42 which is also controlled by the same microcontroller. My plan is to multiplex through the anode of each tube while simultaneously enabling the correct numeral with the cathode side mpsa42. This all seems to work fine for a single tube, but once I install the other tubes I see that even though I'm driving the anode selects for the unused tubes to zero (IE driving only one of the anode's mpsa42), I'm measuring a voltage across the active numeral of the theoretically undriven tubes. I'm struggling to understand how this is happening, as from what I can tell when probing around, the PNP should not be on so no current should be flowing through it... I have noticed that when I apply a voltage to a tube's anode (with a series resistor) and ground the cathode that all of the other cathode pins appear to have a voltage on them even though they clearly should be floating. Could it be possible that when I have multiple tubes in parallel and apply a voltage to one of their anodes that the common cathode pins are actually allowing enough voltage to flow back from an inactive cathode to the tubes anode and then back through the "active" cathode (I've tried to diagram this possible current path in the last attachment)? Is this possible with the fundamental nature of nixie tubes? I'm admittedly a bit stumped here as I believe I have seen other circuits of a similar design to mine for controlling nixie tubes, and when modeled in SPICE the circuit works fine (with the caveat that the simulation uses a purely resistive load). Any help would be appreciated, or any feedback on my circuits since clearly I'm doing something (or understanding something) wrong! AI: Your approach is based on the model to drive led matrix or 7 segment displays with all the cathodes combined. However a nixie is in principle a neon lamp. As soon as the voltage over the elements (single or in series) becomes high enough the digit(s) will be activated. This makes separating the tubes from each other absolute necessary. There is a more simple and straight forward way by driving each nixie with a 74141. Then the multiplexing is done at a TTL level. This way is a proven methode and should work without any problem.
H: Help identify this IC (voltage regulator?) While reversing an old made in Russia power supply I had found these ICs. Here I am attach the circuit I had drawn and the components. The VCC and other power symbols are my assumptions. 16-pin SOIC is 26A14, maybe a transistor array? AI: Producer of 26A14 is TEF in Tomilino, of 26A22 is Kremniy from Bryansk. I am afraid it is military design, and you may not be able to find datasheets for the devices. However you can try registering on TEF's site and see if it will give you access to its library.
H: Are asymmetrically split transformers made (not equal voltages)? I'm building an Arduino based coffee roaster, and I'm looking to power it by mains voltage in the U.S. (~120VAC, 60Hz). What would be ideal would be a single transformer with a total of 18-20V AC secondary with a non-center split, something more like a 8V / 12V split. Is this asymmetric splitting even possible electrically? If so, is it sold at reasonable volume? Single Output (6V - 8V): would power the Arduino, bluetooth module, thermocouple breakout board, solid state relay, 4x DC Relay coils and two ~6V vibration motors to the tune of ~2A maximum. Both Outputs (18V - 20V): would power the fan motor to the tune of ~3A maximum. Since I was unable to find anything asymmetrically split, I went with a 100VA Toroidal below, with two 9V outputs @ 5.5A maximum, but I'll have to drop ~4V to get to the Arduino's 5V logic level, and since that's so far I'll be using a switch mode power supply to drop it to ~6.5V before the Arduino for the current demands, which wouldn't be necessary if the transformer output was closer to 6V. Are there transformers made with two different coil values, something closer to 6V/12V or 8V/12V for around these power requirements? AI: Yes, split-voltage transformers exist. The 12-0-12 and 5-0-5 transformers use a center tap, but there are other "unbalanced" transformers that are expressed differently. Instead of being called 5-0-12 transformers (or whatever), they're simply referred to as 0-5-12V ones. I have used both of the following commercially-available transformers to do much what you describe - with a caveat. Although this is an Australian company (thus the input voltage is 240V), I can well imagine that their equivalent would be available in the US: http://www.soanar.com/store/category/367/product/mm2015.aspx http://www.soanar.com/store/product/mm2011.aspx The caveat is that the 15V device (powered from the 0-15V pins) didn't communicate with the 5V device (powered from the (12-18V pins). They don't share a common ground, so you'd have to do something extra to get them to communicate.
H: How does Option ROM work? (Excuse me if this is not the appropriate place for such question. I just moved it from StackOverflow.) I just read the wiki article about Option ROM. A few questions I'd like to ask: Is Option ROM a special read-only chip on some peripheral devices? The Option ROM contains device BIOS software which is meant to help the system BIOS to interact with specific device. Right? When system boots, CPU will load the device BIOS from ROM into specific RAM address. And it is CPU that executes such device BIOS rather than the device itself. Right? Thanks for response. AI: Wikipedia article is not much of useful information. Look here, it has good answer. IMHO option ROM is the code located in some storage device (ROM, EEPROM, flash chip) on the card inserted with "drivers" which allow using capabilities of this card. It may appear in fixed addressing space, or may be dynamically relocated according to system architecture, or be buried in RAM space switching architecture (e.g. using slotting mechanism). Is Option ROM a special read-only chip on some peripheral devices? I guess it can be anything which can provide code and data to CPU(s) to use the device. It can be FPGA chip with internal flash. You are to invent new ways doing it :) The Option ROM contains device BIOS software which is meant to help the system BIOS to interact with specific device. Right? You can say this way. This BIOS, or drivers, or whatever you call it within specific architecture - prepare system to usage of the hardware, provide APIs, hooks, calls, functions, etc. When system boots, CPU will load the device BIOS from ROM into specific RAM address. And it is CPU that executes such device BIOS rather than the device itself. Right? In overall you are right, but it is not necessary to copy to RAM, unless there's a kind of shadowing function is implemented which will boost code execution (RAM may be faster than ROM in access time). But there could be more than one CPU, the're could be architectures more complex that just CPU and memory (involving other controllers and intermediate devices.
H: how to deal with the EMI issues in the 16X2 LCD display? I'm designing a product with 16X2 LCD display and it shows the junk characters when i switch the 3-phase contactor ON/OFF through the relay.How to solve this issue through software or hardware redesign? AI: You solve this with better design, of course. Look particularly at the ground. Make sure the large power currents of the motor are not running thru the low power part of the circuit, like the LCD and the microcontroller driving it. A snubber across the motor might help. Make sure the power to the logic part is clean. Go back and add those bypass caps all those EE weenies are always on about. They have a purpose, and now you've found it. You may need a Schottky diode in series followed by a cap to ground at the immediate power input. That protects your circuit from short negative glitches on the power. Make sure the micro's reset input is not floating. All in all, follow normal proper design practices, which of course you should have been doing in the first place. You got sloppy and got caught. Learn from this and pay attention to these details from now on. A better answer requires a better question.
H: What options are there for good Low DC Voltage, High Amperage Alligator Clip connections? I have a 12V DC, 20A compressor for my offroad vehicle to inflate its tyres after driving on the beach. I also have high current jumper leads with large alligator clips at each end for starting cars with a flat battery. The compressor has flying leads with bare copper ends. What options are there for a solid connection (without the risk of a short circuit) if I want to power my compressor from the car battery using the jumper leads? Here is a diagram of the setup: One option is some high-current jumper terminals, but these are quite costly. I could possibly make my own out of a block of wood, and two bolts. Does anyone have any other ideas or advice? AI: Check your cigarette lighter fuse. It might be 20A-rated, in which case, that is an appropriate connection. If that's not an option, any connector of the kind you'd find on starter cables will do; you can buy those with a screw terminal to attach your compressors' cables.
H: detect optical transceiver transmit wavelength Let's say there is a no-name SFP transceiver without a label and without DDM(allows to see manufacturer programmed wavelength data on EEPROM from network device) support. Is it technically possible to detect on what wavelength this SFP transmits? I have used JDSU light-meters previously and they ask user to select wavelength(for example 1310nm, 1550nm), but regardless of the selected wavelength, they will show optical Rx power. AI: While Marcus Miller's answer is entirely correct, if you are driven to answer your question the instrument you want is an OSA (Optical Spectrum Analyzer). These are extremely high-resolution spectrometers, usually employing FTIR spectroscopy. Wavelength accuracies of about 1 ppm are available, but the best units will cost in the 5 figures. eBay is a good place to start looking, although you can start with companies such as HP (now Agilent Oops, now Keysight), Advantest, and Yokogawa. Or, if you're feeling really masochistic, Thorlabs has a very nice selection.
H: Where can I get the specifications regarding utility pole erection such as depth, muffing etc.? I believe that there will be a engineering body who publishes specifications of various engineering work. Particularly, I'm looking for specifications for pole erections such as depth of the pole below ground, height at which cross-arm is fixed, minimum clearance, sag etc. AI: Not only are these requirements country-specific they are also urban/rural They are also HV level specific e.g. high density and traffic intersections require greater safety margins. UHV towers require stiffer requirements than HV poles. Here is a rural USDA agriculture spec. www.rd.usda.gov/files/UEP_Bulletin_1728F-810.pdf To provide general construction requirements for representative wood pole structures and assemblies for 34.5 through 69 kV transmission lines.
H: calibration of the BNO055 - how does it occurs? The 'internal calibration' in the Bosch IMU BNO055 (datasheet), says that the sensor will be calibrated everytime 'Power on Reset'. What does Power on Reset means? Does it calibrates itself every time the device and the bn055 is turned on or will it need to be in special mode? Meaning that every time i turn on my sensor, if i want a proper accelerometer calibration value, i will need to turn the sensor to 6 different faces? AI: It means calibration data is volatile and you need to follow directions so that your device can find its way. https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/device-calibration To generate valid calibration data, the following criteria should be met: Gyroscope: The device must be standing still in any position Magnetometer: In the past 'figure 8' motions were required in 3 dimensions, but with recent devices fast magnetic compensation takes place with sufficient normal movement of the device Accelerometer: The BNO055 must be placed in 6 standing positions for +X, -X, +Y, -Y, +Z and -Z. This is the most onerous sensor to calibrate, but the best solution to generate the calibration data is to find a block of wood or similar object, and place the sensor on each of the 6 'faces' of the block, which will help to maintain sensor alignment during the calibration process. You should still be able to get reasonable quality data from the BNO055, however, even if the accelerometer isn't entirely or perfectly calibrated. Persisting Calibration Data Once the device is calibrated, the calibration data will be kept until the BNO is powered off. The BNO doesn't contain any internal EEPROM, though, so you will need to perform a new calibration every time the device starts up, or manually restore previous calibration values yourself.
H: Plotting amplifier transfer characteristics Attempting to plot the transfer characteristics of a simple demonstration-kit amp. I reasoned if I extend from roughly equidistant points on both in/out signal, they should meet to represent a fairly correct result. And since the out-signal is not symmetrical, there must be different response on a falling and rising signal, hence the two. Would these plots be fairly correct, or am I missing something? AI: This plot looks like a reasonable way to estimate transfer function. Power Amps tend NOT to run in Class A unless they are RF, so the transfer function of each polarity signal is different with crossover design to merge and least amount of negative feedback to reduce distortion and extend bandwidth But to design for better linearity, we need circuit details to ensure; bias current sink/source exceeds load current and output swing stays 2V away from saturation. analyze non-linear loads
H: Are Hard Drive Motors Stepper Motors? Can a hard drive motor been controlled by a stepper motor? Like the one shown below? Thanks! AI: I guess you are actually asking Can I control a hard drive spindle motor with a stepper motor driver? And I guess that the linked image is of some cheap infrared remote controlled stepper driver thing you found on aliexpress, eBay or dealExtreme? If that is the case, no. The spindle motor which spins the platters is a three phase brushless DC motor, while the stepper driver is for driving two phase stepper motors.
H: Analog signal amplification before ADC reading I'm working on a system with a distance sensor. As the distance increase, the output voltage decrease. ( Fig. 2 Page 5 : http://www.farnell.com/datasheets/1657845.pdf?_ga=1.97138143.1773643066.1472611965) Is it better to let the ADC "read" the raw voltage or should I amplify it when the output voltage is too low? (and consider the amplification in software) Edit : How is it possible to know the distance when the output is 1v? (Both 2cm and 27cm match with this voltage) Any idea? Or should I avoid the scenario of a under 10cm distance object? AI: You have to tell us how the device is to be used before anyone can answer this meaningfully. You've got 0.5V of change over the range of the device. This is a significant amount for a 10-bit A/D, so you wouldn't need to amplify if you were trying to tell the difference between the low end and the high end of the distance range. Assuming the output is linear with distance, if you were trying to resolve 1mm of motion, the voltage change would be 0.5/700, or 0.7mV. This is a bit much to expect a 10/bit A/D to handle, and you would need amplification. Assuming a 5V reference, 1 LSB on a 10bit A/d is a bit under 5mV. A 1cm change in your device would cause a change of about 7mV. So if you're trying to resolve 1cm, this is still pushing it. I'd recommend amplification of about a factor of 4 (more than that risks saturation). You'd need to remove offsets, obviously, to put your signal in the 0-5V range. If you're trying to resolve 10cm, you probably don't need amplification
H: Powering a ESP8226 via supplied breakout board I have brought a couple of ESP8226s from ebay to have a go at making some fancy wi-fi controlled projects and i'm having some trouble, i cant get anything out of them! With the chips I got breakout boards, (see pictures), i have dutifully soldered them up so i can put everything on a breadboard. When i plug it into my 3.3v power supply i don't get anything (the onboard LED does nothing and i don't get any response via serial). Putting a meter on it I don't have any connection between the VCC of the breakout and the VCC of the chip. Has anyone use one of these boards before? There are 3 small holes that could be needing a component/jumper in them but i have no idea what and don't want to start soldering stuff willy-nilly. What do i need to do to get my chips powered? Thanks AI: These breakout boards are meant to be used with a 3v3 linear LDO regulator, for which there is a place at the backside of the PCB. This makes it possible to power the board with 5V (from for instance USB). If you have 3.3V available (note: with sufficient current: the 3.3V output of for instance a usb-serial converter won't work!) you can replace the regulator by a short of the two copper fields at the back nearest to the Vcc side (the 3d copper field is conected to the GND).
H: DC-DC converter PCB Layout (TPS54202H ) In the datasheet for TPS54202H as an example the manufacturer recommends this layout. What about the white area on the picture, is it necessary to pour it with ground? Top and bottom? Where to place the terminals for GND-IN and GND-OUT wires? AI: It isn't necessary to pour GND everywhere on the top layer, although there will be a large copper pour for GND. Have a look at the TI's evaluation board for TPS54202. p.s. Когда мне нужно делать switcher, я стараюсь копировать разводку evaluation board "как можно ближе к тексту".
H: Passive low-pass filtering question for a transducer output I'm having ringing-noise from a pressure transducer analog output. Here is the only information about the instrument: http://www.trescal.be/pdf/PPC500_GB_SI.pdf Let me briefly explain the device and the issue: This device has an internal analog to digital conversion at some stage and outputs that information on its display. The output from digital data displayed on the screen can be sent via RS-232 directly or as an analog output which is created using digital to analog conversion. The both RS-232 and analogue output sends the averaged voltages from the transducer at a rate of around three times per second. For some reason I have to use the analog output. I record the readings from the analog output by a data-acquisition device which has 1GigaOhm input impedance. The DAQ device has many analog inputs and one of the analog inputs comes from this pressure transducer via a BNC cable which is between 10 up-to 15 meters long. All the analog inputs share the same ground and only at this transducer's channel I'm observing ringing-like noise. Same noise is observed if I hook the BNC up to an oscilloscope. Below is an example of the transducer's analog signal in question. It shows the signal in time series for 60 seconds which is sampled at 8000 Hertz and plotted in LTspice: Here below if I zoom the signal, please see the three steps of discrete voltage sent by the transducer’s analog output per second: It seems like there is no reconstruction filter on the output of the transducer’s DAC. But actually it doesn’t matter in my case. What bothers is mostly those crazy jumps/ringings on the edges which sometimes exceeds one volt. And here below I'm directly zooming to the crazy ringing-edge and by using LTspice's cursors I find out that the ringing-noise is around 1kHz: So I decided to use a RC passive low-pass filter but only checked in LTspice and the simulation results are below (V1 is the output from the traducer; C1 and R2 represents the low-pass filter; R1 is the input impedance of the data acquisition channel; green plot shows after filtering): And for a better comparison before(blue) and after the filter(green) here: Here are my concerns and questions: 1-) I found the solution by filtering. It seems to me the loading is negligible due to the huge input impedance of the DAQ channel here. So do you agree in this case to use these R2 C1 values are optimum for a passive low-pass filter to eliminate 1kHz? 2-) Do you think this passive filter enough here? Is active filter necessary(I haven’t built any yet)? 3-) What could be the reason for this ringing? Could it be length of BNC or inductive effect? (It seems like we have an DAC outputting 3Hz discrete signal sent via a BNC coax cable) AI: 1). Confirm output impedance of Analog sensor output by load test for ~50% drop complementary emitter followers used in Op Amps or discrete are notorious for resonance with capacitive loads from 100pF/m cables and current limiting causes low out followed by overshoot followed by ringing at loop gain BW of Op Amp This may be what is happening this is where current mode converters work better 4-20mA with separate return wire, shielded or twisted pair and CM ferrite sleeve. add 100-300 R series at source to verify reduction in edge pulse then load destination with 1k to reduce stray noise coupling and verify voltage drop if any. You may need a power op amp buffer with 120 Ohm source and low impedance load to reject stray coupling or whatever cable Z you are using. check with proper high speed measurements for RF noise and LPF as required to rule out RF aliasing noise at 8kHz sampling rate consider 10mH CM choke and RF cap across output for 50/60Hz and up noise example of your CM 50Hz noise showing up as a differential mode (DM) signal due to unbalanced source and load Z on 50 Ohm coax. Is a shame to degrade an instrument with > 60dB SNR down to 20 dB with improper analog cable maybe 30~40dB SNR with filter
H: Reading temperature value I'm using that sensor http://www.analog.com/media/en/technical-documentation/data-sheets/AD7814.pdf but after reading the datasheet, there is a table for temperature conversion. I can not understand it. Would someone please tell me how to convert the temperature from that table to float point ? AI: You already have your answer. But I'll add the following: This is a "10-Bit Digital Temperature Sensor." Note: Digital. It doesn't produce floating point values, at all. You are supposed to understand what a 10-bit binary value is and, more, you are supposed to understand signed twos-complement notation. If you haven't ever studied any of that, NOW is the time to start. It's an absolute MUST for anyone doing embedded programming work. Since they provide 10 bits, and since they don't need more than 8 bits for the whole number portion they support, they've placed the integer, whole number part in the upper 8 bits and used the least significant 2 bits for the fractional part. I've taken the liberty to insert that implied binary radix point in column three below. However, the floating point value is already in the first column. If that is all you wanted, they already provided that. But I think you don't want just that. I think you want a formula so that you can accept the \$DB_9 \dots DB_0\$ value and convert it to a floating point value. That's different. In the meantime, here's the amended table: $$\begin{array}{rcl} Temperature & DB_9 \dots DB_0 & Fixed~Point \\ –128^{\circ}\textrm{C} & 10 0000 0000 & 10 0000 00.00 \\ –125^{\circ}\textrm{C} & 10 0000 1100 & 10 0000 11.00 \\ –100^{\circ}\textrm{C} & 10 0111 0000 & 10 0111 00.00 \\ –75^{\circ}\textrm{C} & 10 1101 0100 & 10 1101 01.00 \\ –50^{\circ}\textrm{C} & 11 0011 1000 & 11 0011 10.00 \\ –25^{\circ}\textrm{C} & 11 1001 1100 & 11 1001 11.00 \\ –0.25^{\circ}\textrm{C} & 11 1111 1111 & 11 1111 11.11 \\ 0^{\circ}\textrm{C} & 00 0000 0000 & 00 0000 00.00 \\ +0.25^{\circ}\textrm{C} & 00 0000 0001 & 00 0000 00.01 \\ +10^{\circ}\textrm{C} & 00 0010 1000 & 00 0010 10.00 \\ +25^{\circ}\textrm{C} & 00 0110 0100 & 00 0110 01.00 \\ +50^{\circ}\textrm{C} & 00 1100 1000 & 00 1100 10.00 \\ +75^{\circ}\textrm{C} & 01 0010 1100 & 01 0010 11.00 \\ +100^{\circ}\textrm{C} & 01 1001 0000 & 01 1001 00.00 \\ +125^{\circ}\textrm{C} & 01 1111 0100 & 01 1111 01.00 \\ +127^{\circ}\textrm{C} & 01 1111 1100 & 01 1111 11.00 \\ \end{array} $$ NOTE: I rarely convert things to floating point in embedded work. Data comes into the software in binary formats. Data goes out of the software also in binary formats. There is rarely a need to convert to floating point, in between. Doing so uses mathematics where the constants are truncated and the operations truncate the results and the usual rules in math don't always apply well. Plus, it costs a lot of TIME and SPACE overhead, too. So I have to have a very good reason to use floating point -- other than mere convenience. You face a problem with 10-bit twos-complement in embedded programming. It's rare that you actually have a 10-bit processor. More common is 8, 16, and 32 bit. Since the result is 10 bits in size, let's go with a 16 assumption about a word size you can use. I don't know how you actually clock in this 10-bit value into memory, but it's likely that it will either be in the upper 10 bits of a 16 bit result or else in the lower 10 bits. Either way, it's likely that the remaining 6 bits are all zero. I'm pretty much going to have to assume a programming language for the following code example because the details matter here. I'll use C since it is commonly used. So here are two functions that will do the job. Which one to use depends on where the value is at (upper 10 or lower 10.) I'll use a special value type of "uint16_t" to indicate an unsigned 16-bit value and "int16_t" to represent a signed 16-bit value. /* 10-bit value is in upper 10 bits of the 16-bit value 'v' Since the value is in the upper 10 bits, just tell C that it is signed instead of unsigned, then tell C to cast that into a float. C will preserve the signed value during that conversion. However, C still considered it to be an integer so there are no decimal parts and the value will be 256 times the actual value, intended. This is because there are 2 decimal bits in the value itself and another 6 unused '0' bits, totaling 8 bits (256) that need to be accounted for. So it finally divides by 256.0 in order to achieve that final adjustment. */ float cvtupper10( uint16_t v ) { return ((float) ((int16_t) v)) / 256.0; } /* 10-bit value is in lower 10 bits of the 16-bit value 'v' This code replicates the logic indicated in the above function, except that the 10-bit value here starts out in the lower 10 bits. Therefore, a 6-bit upward shift is made before performing the rest of the operations discussed above. */ float cvtlower10( uint16_t v ) { return ((float) ((int16_t) (v << 6))) / 256.0; } You only should use ONE of the above functions, not both. Which one depends upon what kind of 16-bit result you have from clocking in your 10-bit value.