text
stringlengths
83
79.5k
H: How can I determine if this computer fan is dead? Desktop computer fan started making noise then stopped. We noticed it requires 12V and will run at 200mA. I wasn't sure about that at first. Does that mean it has an internal resistance of : 12V / 200mA = 60 Ohms? If so that means I could supply it with 12V and it would consume 200mA and spin. Question: Is that what I should assume from reading those details on the fan? I decided to try it out with a bench power supply, but first I decided to measure how much resistance I could read. Check Fan Resistance When I hooked up my meter to read resistance I read 20 KOhms of resistance. Hmmm...?? Well, wasn't sure about that because if it were true then 12V would only supply it with only 0.6mA (600uA) and I knew that wouldn't work properly. Applied 12V I applied 12V to it figuring nothing lost here since it wasn't working. The the fan just barely moved then stopped. I'm assuming the fan is dead, but I have a couple of questions. What are the "normal" reasons these fans die? Dirt? What generally makes these fans die? There really aren't any parts touching anything to wear out are there? Is there any way to bring it back? (extreme cleaning of some sort? - blowing out dust or is it carbon build-up or something?) Does the high resistance (20 KOhms) indicate that the fan is dead or would a working fan read that amount also? One Last Interesting Point After I was done testing it I put it back in the desktop case and hooked the computer's power to it again and it started spinning slowly 20-30 rpm or so (guessing). Why would it do that? AI: We noticed it requires 12 V and will run at 200 mA. I wasn't sure about that at first. Does that mean it has an internal resistance of : 12 V / 200 mA = 60 ohms? No, but when running it behaves like one. A motor isn't a resistor. If so that means I could supply it with 12 V and it would consume 200 mA and spin. It may draw a higher current when starting but that depends on the internal electronics. They may have a "soft start" to prevent hogging the power supply on startup. When I hooked up my meter to read resistance I read 20 k-ohms of resistance. Hmmm...?? Well, wasn't sure about that because if it were true then 12 V would only supply it with only 0.6 mA (600 uA) and I knew that wouldn't work properly. Again, a fan motor is not a resistor. In this case there is an electronic circuit running a three-phase motor. The electronics will present a high resistance until powered up and operating properly. I applied 12 V to it figuring nothing lost here since it wasn't working. The the fan just barely moved then stopped. It could be a mechanical failure, an electronics failure or a coil failure. Is there any way to bring it back? (extreme cleaning of some sort? - blowing out dust or is it carbon build-up or something?) If you can find the fault and fix it then maybe. Does the high resistance (20 KOhms) indicate that the fan is dead or would a working fan read that amount also? No. See above. After I was done testing it I put it back in the desktop case and hooked the computer's power to it again and it started spinning slowly 20-30 rpm or so (guessing). Why would it do that? Maybe your bench PSU hadn't enough power to drive it when it is nearly stalled. Check if the voltage is collapsing when powered on the bench. The computer PSU may be more powerful.
H: Testing spice model for common mode rejection ratio? I've been trying to create a circuit to simulate common mode rejection ratio of an op amp to test the spice model's accuracy. While I've seen online that being able to use exact resistors only a simulator could use can be very helpful in determining CMRR, I can't seem to get a circuit to work. Anything I try either doesn't converge in simulation or doesn't give an accurate results. Any help would be appreciated. EDIT: simulate this circuit – Schematic created using CircuitLab I included a circuit schematic of my most recent iteration. I figured that I would extract the AC RMS voltage from the input vs output and calculate the common mode gain from the circuit. I first had the R2 resistor grounded but thought after that it should be ground w.r.t the AC common mode signal, so I attached it to my common mode signal generator. I think it might be worth mentioning that at first I tried to connect a sine wave into the input rails via two 1k resistors and measured the open loop gain but it didn't converge. AI: Use this circuit (and equation) instead: Source: https://www.analog.com/media/en/training-seminars/tutorials/MT-042.pdf It should be easy to come up with resistors in spice that are matched (in real life not so much and so you should use the other circuit in the application note). This has worked for me, if it doesn't work the model may not be that realistic. Another note: While the diagram shown in the OP has no ground on the 18V supplies, I hope that there was a ground between the supplies in the spice netlist. Otherwise spice would have a very difficult time finding the DC operating point and simulating, as al the voltages of that portion of the circuit would be floating, and the simulation wouldn't function very well. Supplies need to be referenced from ground, which I hope was done.
H: The relationship between power, heat and efficiency I've been thinking about this conundrum. Given we use joules to move a metal block over a surface, we do work. So imagine a motor, that spins and pulls a string, moving said metal block over one meter toward itself. We supply it with 1 volt, 1 amp and it needs 5 seconds of time to do the work of pulling the block for 1 meter. Given volts are J/C and amps are C/s, we can say volts are how much work, certain amount of electrons will do, over time. And volts * amps are work over time or J/s. So, 1 V × 1 A × 5 s = 5 Ws = 5 J Now the question is: How much energy of 5 J was used to move the block, and what amount was spent on heating up the wires? Am I right to think, that since 99% of resistance is taken by the motor, it leads to firstly meaning 1% of all energy spend goes to heating up the wires, and secondly (imagining a 80% efficiency motor) ~80% of those 5 joules are spend on moving the block and ~20% of those 5 J are heating up the motor's insides? In retrospect, we can ponder about how much energy gets spent on friction between the block and it's supporting surface, but I digress. Your input on this, is greatly appreciated. Thank you. AI: If the motor is 80% efficient, 20% of the electrical input is used to heat up the motor (internal wire and iron) and 80% is used to supply mechanical energy to whatever is connected to the shaft. That is mostly correct. A small amount of the lost energy is used to move air through the motor to carry the heat away. An even smaller amount is used to make the humming noise that you hear. A certain amount of energy is lost in the wire between the power supply and the motor. That could be very little if the supply is close and the wires are large. The losses between a power generation station and motors in a factory average on the order of 7%.
H: Edge-lit LED panel best materials? I'm trying to replicate the effect of this LED panel I found at Home Depot with a different set of LEDs and use a differently sized panel. It's basically just a diffused light that mimics a window or skylight. It's 2x2ft and produces 4250 lumens and has selectable color temps (daylight white, bright white, soft white) with a switch-based color temp selector. Upon inspection, I realize that it uses some type of edge lit material, but I'm not sure what. My goal is to diffuse light through the panel uniformly using an RGBW strip, maybe something like Philips Hue. I'm not sure if the panel should be clear with a backing or frosted. What are the best materials to use for this? Edit: I found a teardown of the panel on youtube. No identification of where the material is from exactly, but maybe will aid the answerers. AI: What are the best materials to use for this? These panels are built in the same way as LCD monitors with LED backlight. Well, monitors have a LCD in front of the backlight panel, but you get the idea. Here's a monitor teardown. The important part is a thick transparent acrylic plate which acts as a light guide via total internal reflection. It is lit through its edges. And... there is a pattern etched on it which breaks the total internal reflection in order to allow the light to get out through the front side. Without this, the light would only get out of the plate through the edges, and that would be useless. The acrylic plate is the center of a sandwich, with a white reflector on the back, and one or more sheets of diffuser material in front. A LCD monitor will also have polarizers and, of course, a LCD. All this is not DIY friendly, but you can get the whole kit for free if you find a busted LCD TV or LCD monitor. Thus... try dumpster diving. Get rid of the LCD and polarizer, and keep only the backlight plate and reflector/diffuser films.
H: How to Size Line Reactors and Understanding Reactor Specifications I've got a 600 VAC, 75 HP VFD that I want to place line and load reactors in series with. Usually, I find charts like this that give me a horsepower table to follow as they are the easiest to use. However, today I googled sizing electrical reactors I've found sites have varying information and suggest different sizings. I've never challenged suppliers on why these are sized the way they are. When I've purchased them it was simply by using the voltage and horsepower ratings of the VFD/motor but now I'm curious as to the rationale behind all these numbers. With respect to the guidelines linked above and the following reactors: RL-08002, RL-08003. Why is 3% on the line side and 5% on the load side recommended? What does the 3% and 5% relate to? How is this percentage used to calculate the equivalent mH rating (0.4 and 0.7 mH)? If I wanted to calculate a required reactor size without the use of an equivalent horsepower table, what would be the proper starting point? How can I determine an unbiased value? AI: Why is 3% on the line side and 5% on the load side recommended? 3% is recommended for the line side because a 3% voltage drop in addition to the "typical" voltage drop that would be seen without the reactors is estimated to be the maximum that is tolerable. 5% is recommended for the load side because that is the maximum that is estimated to be tolerable considering the combination of input line voltage drop, the capability for voltage adjustment by the modulation and the impact of reduced voltage on motor performance. In both cases, it is assumed that any added impedance will provide significant benefit. What does the 3% and 5% relate to? The percentage refers to the voltage drop as a percent of rated voltage at rated current due to the reactive impedance inserted. How is this percentage used to calculate the equivalent mH rating (0.4 and 0.7 mH)? Percentage = 100 x current x 2 x Pi x f x L / line-to-neutral voltage If I wanted to calculate a required reactor size without the use of an equivalent horsepower table, what would be the proper starting point? How can I determine an unbiased value? You can use the equation above to calculate percentage based on current and voltage. The "bias" involved in the tables are estimates concerning what are the typical distribution system characteristics and what is typically tolerable. Individual VFD manufacturers may "tune" their recommendations based on the input or DC link reactance built into the VFD, output dv/dt characteristics of the design and their own tolerance data. Addendum Is it good practice to install reactors for every VFD? It is difficult to determine the need for harmonic current mitigation or the amount of mitigation provided by reactors without a detailed analysis of the facility power distribution system. Such an analysis would estimate the harmonic currents drawn by VFDs and the effect of those harmonics at points of common coupling with sensitive equipment of other utility customers. Similarly, it is difficult to determine the need for dv/dt filtering at the VFD output and the effectiveness of reactors as dv/dt filters. Experience may suggest to many engineers that the client’s money is better spent on reactors than on studying a power system that will probably change over time. However that comes down to advising the client where to place a bet. Installing 18-pulse drives in sizes that are widely available as 6-pulse drives is a better bet but a larger one. From the standpoint of the individual engineer, the best bet is to do what the supervising engineer says is good practice. Voltage drop Although the percent reactance refers to the percent of rated line to neutral voltage at rated current that is the voltage drop across the reactor, the voltage drop seen at the VFD input or at the motor is less because the impedance of the reactors is almost entirely reactive while the effective full-load impedances of the VFD and the motor are almost completely resistive. References Anyone who is dealing with the possibility of harmonic current in power distribution systems should read 519-2014 - IEEE Recommended Practice and Requirements for Harmonic Control in Electric Power Systems. Also consider reading some of the many IEEE papers that discuss that standard and make recommendations related to it. There are also a lot of IEEE papers dealing with motor insulation stress and partial discharge due to VFD waveforms. Also the related problem of motor bearing currents has been covered extensively by IEEE papers.
H: increasing output voltage of a schmitt trigger op amp I have the Schmitt trigger circuit below that I read the output as 1.6V for the logic High. I wonder how can I increase the output voltage of the comparator below without changing the threshold of the Schmitt trigger? AI: This might not be exactly right, but because the comparator has an open-drain output, you have to think of it as being something resembling the device surrounded by the dashed box: simulate this circuit – Schematic created using CircuitLab When M1 is off (high output), the voltage at OUT is determined by the R1/R2 voltage divider. An open drain output does not drive a high voltage. Instead, it shuts off to a high impedance state, and the high voltage is created by a pull-up resistor (either supplied by you, or perhaps one that is provided in internally ("weak pullup" type feature)). If you look at the hysteresis example in the datasheet, it works differently. The output is bootstrapped from the input. If we draw it with our explicit open drain model, it looks like this: simulate this circuit So here, if OA1 cuts off the output transistor, then OUT is at the same voltage as IN. It is pulled up to IN by the two resistors. And of course if the transistor is fully on, then OUT is pulled to ground.
H: Is this arduino motor driving circuit correct? I got an Arduino Pro Micro and some parts to play with. I want to control a little 5v motor from an external power supply by using the Arduino to trigger a transistor. Like this: Is that at all correct? Will it work? I want to experiment but I don't want to break my new toy in the process. The transistor I am using is an NPN, 2N3904. AI: You want to use your transistor as a switch. I found a nice site about that which gives this circuit: Now forget about all the garbage and strip the design down to this: simulate this circuit – Schematic created using CircuitLab Your circuit is correct, except that it's missing the base resistor (R1) and the pull-down resistor (R2). Also, the load (your motor) has to be on the collector of the transistor, not on the emitter. At last, use a flyback or flywheel diode with the cathode to Vcc, like in the first image, to avoid high voltages. So in the end, your schematic would look like: simulate this circuit Explanation of the circuit: R1 is required to limit the current on the base of the resistor and thereby the current drawn from the Arduino. If you do not use the base resistor, your Arduino might break. R2 is a pull-down resistor which makes sure the voltage on the base of the transistor is low enough to not conduct whenever there is no input signal from the Arduino. So this resistor makes sure you know in what state the circuit is when the Arduino is disconnected. This resistor is not required, but recommended. D1 is a flyback diode which eliminates the voltage spike when the motor stops or starts working. It goes too far to explain why, but whenever you let a current flow through a coil or when you stop letting the current flow, a voltage spike may occur. With the flyback diode, you make sure that spike is eliminated immediately. Usage of this diode is highly recommended. One last thing to explain: why the motor has to be on the collector side and not on the emitter side of the transistor. Wouter explains this in his answer, in short: with the load on the collector side you are in charge of what voltage the motor gets; with the load on the emitter side, this voltage cannot be higher than the voltage on the base (minus something).
H: A phototransistor with LED and resistance in emitter Earlier I used a simple phototransistor arrangement to detect an on/off signal via a laser pulse. I connected the collector to Vcc(5V), and emitter was grounded through a resistance. The base was unconnected. As soon as the laser would bias the transistor, I would be able to observe about 4V at the emitter. Without the laser biasing (and in the normal room lightening condition) the transistor would not bias and I will get 0 reading at emitter. However for debugging purposes I connected a LED in the emitter circuit as well. But got very strange results. Now the transistor was being biased in the normal light conditions. I am getting about 1-2V at emitter without laser biasing. I understand that a resistance in emitter causes feedback, and think that LED might be giving a non-linear feedback or something. Is this the reason or am I missing something completely? Also the transistor starts to work normally as soon as the LED is removed. Once the transistor is biased with laser the LED glows normally, but even without the laser biasing, the LED does glow although very dimly. AI: The transistor's collector emitter leakage current is enough to build up a voltage across the LED. You can solve the situation by connecting a large'ish resistor in parallel to the LED. That way the leakage current has a path to ground again. When the photo transistor gets biased by the laser, the current should be large enough for a voltage build up across the resistor to light the LED. You probably need a series resistor for the LED too, you didn't mention that in your question. simulate this circuit – Schematic created using CircuitLab The mentioned 2k is just an guesstimate (\$2\text{k}\Omega × 100\mu\text{A} = 200\text{mV}\$) which sounds acceptable and in practice may be better than that). Best is to measure the current through the transistor when not being lit and calculate an acceptable resistor value for that current. The series resistor should limit the current through the LED to maybe 10 or 20mA (\$\dfrac{V^+-V_{LED}}{10\text{mA}} = \dfrac{V^+-2\text{V}}{10\text{mA}}\$). Also check the optocoupler's maximum current to be sure it can handle 10mA.
H: What is the function of a capacitor in a motor circuit? I read a manual of how to connect a speed controller to a motor. I see there is a capacitor as shown below. My question is what the function of the capacitor is? Thanks AI: I think the speed controller is built to control a three-phase motor from a single phase power line. In short a three phase motor creates a rotating magnetic field in its stator (the part that does not rotate, the housing), and the rotor is dragged along with this rotating field (at a slightly lower rate called 'slip'). To change the direction for a three phase motor, it is sufficient to exchange two of the phases (hence the CW [clockwise] and CCW [counter clockwise] terminals). The real trick is to create three phases that are about 120° apart and that is where the capacitor comes in. By putting a capacitor in series with one of the windings, the phase angle will be sufficiently shifted to create a rotating magnetic field in the stator and as such you don't need a full three phase controller. Of course the size of the capacitor depends on the current drawn by the motor. Advantage: price of the controller is lower than a full three phase controller; disadvantage: output power of the motor is lower than its three-phase maximum. The image and more background information is found here.
H: Why does the led turn dim gradually and then turn off when attached to a capacitor in series? I connected an LED in series with the capacitor (any type of capacitor. I used one of 10 μF) and connected them with the 9V DC battery. I connected the positive pin of the capacitor directly to the positive side of the battery and attached the positive pin of the LED with the negative pin of the capacitor (as the LED and the capacitor are in series combination) and connected the negative pin of the LED to the negative side of the battery. So, The bulb should gradually turn dim and then turn off and it did. I followed a diagram of the circuit but I cant attach it with the question due to the lack of population. My question is, why does this happen? Why does the light turn dim when attached to a capacitor in series? I am quite new in electronics. Therefore I am not quite familiar with the complex detailed descriptions but still I am trying to give as much details as possible. Pardon me if there has been any mistakes in my question. AI: Short answer: Current stops when the capacitor gets charged up to the battery voltage. When current flows through the circuit, the bulb lights up. In this case you can consider the bulb as a 'current detector'. Current in this case is flow of charge, and the charge carriers are electrons. They are pushed around because the battery pushes them with an electric field. Now look at the capacitor symbol. It indicates that there is a gap between the plates. Electrons normally don't jump this gap. But you know there is current because the bulb initially turns on. So what is happening? Electrons are effectively being accumulated at one of the plates of the capacitor, while the opposite plate has electrons being removed, "charging it". But they can't accumulate indefinitely, because the more they accumulate, the more the repel each other. It basically takes energy/work to do this, and you can consider that the capacitor is storing this energy, and can effectively be released later on. As the capacitor gets charged, the voltage accross it augments, until the battery cannot push more electrons. At this point the capacitor voltage has equalized the battery voltage. No more electrons flow, the bulb finally turns off. To release the energy stored in the capacitor, remove the battery from the circuit and connect the wires together. You should see the same effect (bulb turning on, then dimming until off), because the battery no longer keeps those electrons pushed and they return to neutrality via the bulb.
H: Looking to get started with ARM microcontroller development on Linux I am looking to get started in developing for ARM microcontrollers on Linux. Keep in mind I really enjoy the low level. Right now I have some experience with PIC16F series and 8 bit AVR. This is on the assembler level. I much prefer the PIC over AVR right now because it has rock solid debug and hardware dongle support for Linux everything with AVR feels like a hack. Anyone have any suggestions on development boards and tools that will work well for Linux that will not cost huge amount of money as I am just a hobby guy. If you need any more info I would be happy to give it just ask. AI: Look here man http://www.ti.com/lsds/ti/microcontroller/tiva_arm_cortex/c_series/tm4c_arm_cortex-m4/overview.page?DCMP=tivac-series&HQS=tivac-series-b Read up on that, it gives a good amount of background info EDIT : Erm, I guess credit to Jippie too on the comment, I didn't see that before I posted but yeah. Sorry :S.
H: Ideas for a cheap, simple, common temperature sensing component? I'm looking to make a device to regulate a heater to maintain 100-110 degrees Fahrenheit in a small, moderately insulated container. Specifically, I'm wondering what I might have in my parts drawer that would make a suitable temperature sensing device. It need not be especially accurate or precise. I thought if this device is also in a TO-220 package or similar, maybe it could also be the heating element. Any suggestions or experience on sensing temperature with a common component I already have in my parts bins? AI: You can use a normal silicon junction diode to measure the temperature. Even inexpensive ones like the proverbial 1N4148 will work. The trick is to bias the diode with a constant current source of one milliampere. You need to make sure that the constant currrent source itself is pretty stable with temperature or it will affect the accuracy of the diode temperature sensor. Once biased in this manner the sensor diode will produce a forward voltage drop that is amazingly linear over a large range. Applications that I have designed worked over the range of -55C to +135C. The forward voltage drop decreases with increased temperature and so is what we call inversely proportional with temperature. The rate of change of the diode voltage is about 2.2mV per 1C. It is generally necessary to provide for amplification of the diode voltage drop and provide some offset so that the range of temperatures involved can be read via an MCU's A/D converter. An opamp can work nicely for this part of the circuit. If it is necessary to calibrate the sensor circuit it can be done with two trimpots in the opamp circuit to adjust the gain and offset of the amplifier. Calibration can also be done in software of the MCU as well if you provide a straightforward way to save the scale and offset values of the calibration in something like an EEPROM of part of the MCU Flash memory. The above approach can be a fun learning experience and should work well for you. The diode is fairly easy to mount at the temperature sensing location requiring just two active wires plus possibly a shield if it is an electrically noisy environment. An alternative you may want to consider instead could be to acquire a low cost IC temperature sensor. The old standard LM75A is available in easy to wire SO-8 package and can be connected on a remote cable of just four wires. You would connect the I2C bus connections of the IC to an MCU control board. There is a slight challenge that needs to be dealt with for the remote mounting of a temperature sensor. The connecting wires can act as a thermally conductive heat sink on the temp sensor thus offset the temperature reading some. For a simple control system this can usually be "adjusted out" by setting the control setpoint down by an equivalent amount.
H: Transistor Delay I'm attempting to make an alarm for a freezer so that if the door gets left open, after 1 minute or so, an alarm will sound. I've got something similar to the schematic below. When the switch is open the capacitor starts to discharge through the base of the transistor but I have the LED in parallel with the transistor so that when the capacitor is discharged, the LED turns on. This is working fine, however I cant make the delay long enough. If I increase the capacitor value or the transistors base resistor, the delay time is longer, however because the capacitor is discharging slower the LED/Alarm is gradually faded on which I don't really want. I would like the alarm/LED to come on as suddenly as possible. Is there a way for me to increase the delay but keep the alarm turning on relatively suddenly? As a footnote, I do not want to use any ICs (i.e. the 555 timer) AI: You're charging the capacitor directly from the battery. So the charging time is related to the product RC, where R is just the internal resistance of the battery. Try something like this: simulate this circuit – Schematic created using CircuitLab Here, I have split the base resistance so that the capacitor is charged through a large portion of it. This not only achieves the goal of slowing down the charging of the resistor, but it has another side benefit. When the switch is released, C1 discharges into the base of the transistor through only a 1K resistance, resulting in a discharge which is much faster than the charge. We can't make that resistor too small, because we need to protect the transistor's BE junction from the discharge current. In simulation, the LED current starts to build at around 1.5 seconds and reaches a maximum at around 1.8. So that is not a sudden turn-on, obviously. But the turn-on increases with faster delays. For a faster turn on, we need to add another transistor stage. The following circuit has a similar time delay to the above one, but the LED current ramps up more quickly, over a spread of 70 ms or so. simulate this circuit For longer times with fast turn-on, we need more gain. One way to do that is to replace the load resistor with an active load. According to an LTSpice simulation of this circuit, it generates a 55s delay, at which point the LED ramps up over an interval of about a quarter second. This graph shows the charging of the capacitor (blue) versus LED current (green): However, it is getting more complicated than some IC based solutions. This approach is good for gratifying the hobbyist ego. ("I did it with discrete components, none of these easy to use op-amp or timer IC's, and look, there is even a current mirror and stuff!"). simulate this circuit Can we make some small changes so that we don't need the huge charging resistor, and can use a smaller capacitor? Yes! Here is one way. We can raise the transitor Q1 so that there is a higher turn-on voltage at the base, by putting a Zener diode in the emitter, say 8.2V. Then a 100K charging resistor, and a 470uF capacitor give us a bit over a minute. By raising the voltage that the capacitor must develop, we can obtain a larger delay for the same RC values. simulate this circuit
H: how many resistance do i need to safe the LED of PC814? if i have a input of 5v (arduino HIGH) on the LED of a PC814, how is the value of the resistance that i must use before that, so i don't burn the led? http://www.datasheetcatalog.org/datasheet/Sharp/mXtzyru.pdf i couldn't find the voltage that it supports on the datasheet, maybe i just don't know how to read it, help! AI: The forward voltage is listed as 1.2V (typical) at a forward current of 20mA. This means that from a 5V drive voltage you need to have a resistor that "drops" 3.8V when conducting 20mA. This means it's resistance is 3.8/0.02 = 190 ohm Considering that the peak forward current is 50mA, you should be OK with a 180 ohm resistor
H: How can a simple operation such as moving data from one register to another can be encoded into an instruction and executed in a single clock cycle.? The simple point I'm trying to make for an essay Im writing. I'm completely at a loss as to how to answer this. Any help available? Sorry, I know this is not a well formed question but I've got no other places I know of to ask left. AI: von Neumann's cycle, fetching, decoding and executing (sometimes a separate writeback) cannot be done in a single clock cycle. That is probably what you are referring to. What is happening is a technique called 'pipelining'. While one instruction is executed, a second one is decoded and a third one is fetched from memory. All three in parallel during the same clock cycle. A single instruction still takes 3 clock cycles, but the parallel mechanism averages to 1 cycle per instruction. Some instructions like branches/jumps take disproportionate many clock cycles (3 or 3) because they break the pipeline. The instructions being decoded and fetched have to be flushed and the pipeline has to reload. Some modern processors are even more optimized than this. They can predict what will happen and hence the technique is called 'branch prediction'.
H: Add a Tunable delay to a TTL pulse? How can you add a tunable delay to a TTL pulse? My understanding is that this is the job of a PPL. I am not sure if a digital PLL delays a square wave or if it can also delay a single rising edge (which is desired). I am hoping to tune the delay from 0ms to 10ms with accuracy in the microseconds. ________Rising_Edge_At_ Input__: 0,12,84,98,109,130 Output_: 10,22,94,108,119,140 AI: A phase-locked-loop doesn't do what you think it does. It doesn't help. I'm assuming you need to have the delay accurate on both leading and trailing edges... Use a micro like a PIC is the easy answer but, if you can't face programming it (this is not a dig at PICs - Olin take note!) then you can use a garage full of D type flip-flops. It works like this - you input your TTL input to a 74AC74 (you can get octal devices but I can't remember the number) and you feed a 1MHz squarewave to the clock. The output from the d type feeds the next d type's input and so on and so forth. About ten thousand d types later you can get the 10millisecond delayed output - it will retain the same shape timewise but aligned to a boundary of the 1usec clock i.e. a 1usec accuracy/resolution. If you want to reduce the 10ms delay turn the clock up to 10MHz and the delay drops to about 1millisecond. I can't remember what the limit is on 74ACxx devices is, but with a 100MHz it would delay 100usecs. Something in the back of my mind reminds me that 80MHz is the clock limit on AC devices!! You could use a 100kHz clock then only a thousand d types will be needed and you'll have a time accuracy/resolution of 10usecs. I think I'd use a PIC or similar
H: Solving for RC circuit transfer function How do I calculate the transfer function of this circuit? \$H(s) = \dfrac{V_o}{V_i}\$ I apply the Kirchhoff's law at the node \$V_x\$ but I still have \$V_x\$ as unknown : \$\dfrac{V_x - V_i}{R1}+\dfrac{V_x - V_o}{R2}+(V_x - 0)sC = 0\$ simulate this circuit – Schematic created using CircuitLab AI: Since the current through R2 is zero, Vo = Vx. You can calculate Vo (and Vx) just using the known expression of a voltage divider: $$ V_o = V_x = \frac{\frac{1}{sC}}{\frac{1}{sC} + R_1} V_i= \frac{1}{R_1Cs + 1} V_i. $$
H: Why UPS for sensitive SMD development? My friend suggests me UPS for SMD development. I already have a a surge protector over all devices. He recommended the UPS that transmit all energy through its battery and he recommend to find some silent UPS: some UPSs have a spinning coil or something like that. Why UPS? Power continuity. -No, not the main reason. "Line conditioning"? More here. AI: I don't think you need any special kind of UPS, unless you have particularly power sensitive equipment. Nearly any modern switching power supply will handle the transition from mains power to battery of a typical line interactive UPS. This type of UPS will protect you from both power surges and power sags, switching to battery when the mains voltage is out of range. More expensive UPS's (like the APC Smart-UPS series) will have a better sine-wave output versus the stepped sine-wave cheaper UPS's have (like the APC Back-UPS series) which can cause problems with particularly sensitive equipment. Even cheaper UPS's have a square wave output, which you should probably avoid since it can be hard on power supplies. If you really want a UPS that always filters the input power, look for an online UPS (like the APC Smart-UPS Online series). This type of UPS will convert AC to DC to charger the batteries and power the inverter to create AC output. However, unless you have particularly bad mains power (like if you're powered from a small generator or have large industrial loads creating noise or power sags), this is overkill in most situations. Most UPS's will be completely silent in normal operation, only running the fan when running on battery power or while charging the batteries. However, an online UPS under heavy load may run the fan continuously. I'm not sure what the "spinning coil" UPS you're referring to is. There is a Ferroresonant type of UPS that uses a special type of transformer that uses the magnetic field of the transformer to ensure a smoother cutover from mains power to UPS power (and the transformer can help filter the power). Or maybe you're referring to a motor-generator UPS that uses a spinning motor to drive a generator that powers your loads. The mechanical energy in the flywheel stores energy that eases the transition from mains power to battery and/or diesel power. I think this type of UPS is only used for large loads. (I used APC equipment as examples only because I'm most familiar with their product line)
H: Total Harmonic Distortion If a specific project specification says "...amplifier must be linear such that the harmonic distortions are maintained below -40dB...", does that mean that a THD of -30dB would meet the requirements or would something like -50dB be correct? I ask this because I know with gain, \$ A_v \$, we usually take absolute values so it's a little hard to understand which one is correct. Any ideas? AI: A temperature of -50C is below -40C. Likewise for dB; -50dB is below, or less than, -40dB. For power, -40dB is a ratio of \$\frac{1}{10,000}\$ while -50dB is a ratio of \$\frac{1}{100,000}\$.
H: Do I have to keep an AGM battery on float charge 24x7? I have a 50 Ah AGM battery that I use rarely (lighting during power failures, off grid camping, etc) - I use it a few times/year. To prolong the life of the battery, do I need to keep it on a float charger all the time, or is it sufficient to use a timer to turn on the charger for a few hours every month (week?) to top off the charge? The charger I'm using is designed for AGM batteries and is is able to supply a float charge indefinitely. I'm diligent about minimizing vampire loads by using a hard power switch to turn off unused devices and appliances so would rather not keep the battery charger on 24x7 unless it will make a significant difference in the lifetime of the battery. AI: The short answer is: No, you don't have to keep a charger connected constantly to keep your battery healthy. The longer answer is: A naiive timer on the charger may or may not work, depending on a lot of factors. AGM batteries can have a self-discharge of as low as 10% per year (which is quite good). For such cells, a full charge every few months should be adequate to keep your battery charged when you need it. The catch is that you want to make sure that your battery is really fully charged each timer cycle. If the timer turned the charger off prematurely, the battery state of charge could get lower and lower each cycle, leaving you without power when you need it. For a simple solution (and assuming your charger is appropriately sized), try turning your charger on for several days every 2 or 3 months. This should ensure that the battery is fully charged each cycle, while still allowing you to leave the charger disconnected the majority of the time. For an EE-centric solution, look for a lead acid battery charge management IC that can give you a reliable indication of the transition from bulk (constant current) to polish (constant voltage) charging, and ideally provide a timer for the duration of constant voltage charging to indicate when the battery can be considered fully charged.
H: Error while trying to program my ATmega16A with extreme burner Whenever I want to burn the hex file on my chip, the following error message always appears: Power On Failed Cannot communicate with target chip The programmer I am using is AVR USB programmer, from ABLab Solutions. The software I am using for program burn is extreme Burner AVR. I don't think this is a problem with the driver because it says it has found an USBasp on USB port. There was an option to select the chip model, where I selected ATmega16 (because 16A) was not there. How can I solve my problem? EDIT: The picture of the circuit: I used Zener for just-in-case voltage fluctuation. simulate this circuit – Schematic created using CircuitLab AI: AVR chips must be powered during programming. They are NOT powered from the programmer. I would recommend reading the following Application Notes AVR910: In System Programming AVR042: Hardware Design Considerations
H: Ethernet communication between 2 controllers I'm working on establishing communication via ethernet between 2 microcontrollers. Its a stand alone system. Controller1 will interface with the user via a keypad. Controller2 will be interface with a couple of motors(via drivers). When Controller1 receives keypad presses it will request controller2 to carry out certain motion tasks. The block diagram will be(standard circuit): Controller(with an in built MAC) --- PHY --- transformer -- RJ45 and the same repeated on the other controller board. What I'm trying to understand(from the firmware perspective) is whether I really need to get into all the abstraction layers (upto http), will my controllers need an i/p assigned, etc. Assume that these are the only 2 devices interacting. Is it sufficient to have the code working up to only the data link layer. i.e I configure the MAC registers, each controller having its own MAC address and the communication is done via the ethernet frames with no higher level layers involved. Working with ethernet for the first time so apologies if there are any basic errors in the query. All the forums mention using tcp/ip stacks, ip addresses but its not clear to me why that is needed. AI: The basic answer is that you can do whatever communication you want to do. Every chip which has an ethernet component to it can do simple phy-to-phy communication (i.e. layer 1 if we're talking about the OSI model), and unless your chip has a built-in IP stack or AX.25 layer or some other type of level-2/3 (i.e. data/network abstraction) layer baked into the silicon, this is what you will have to use. The hardware is capable of doing some part of the ethernet protocol, whether this is 10BASE-T, 100BASE-T or whatever, and if you add an IP-layer your software stack will utilize that functionality. You can use that functionality directly! Most people choose to put some sort of IP layer with TCP or UDP communications because this helps hide some of the complexity, and makes the code work the same way on their computer as it does on the chip. It also means that things like putting an ethernet switch in the middle of multiple circuits will work, and many other niceties that comes with using a professionally developed standard that a lot of people have thought about and tested. You don't have to do this if you don't want to, and it will save you a lot of complexity and processing power if all you're doing is sending simpled sequential messages from one circuit to another though. I agree with @Spoon though, in that I think you should pick a different protocol if you're using simple point-to-point communication. If there a reason you're not using RS-485, RS-232, I²C, or some similar simple serial protocol? A lot of those will likely be easier than using ethernet. Good luck!
H: Tuning an electric organ keyboard I have an old (1960's) Whippany Dart combo organ. Each set of three keys has a tuning pot that raises and lowers the pitch of those three notes (turning clockwise lowers the pitch, and counterclockwise raises the pitch). I'm not sure what determines the pitch of the three distinct notes within each group. For one particular set, turning the pot as far as it wil go counterclockwise still leave each note in the set about a half note below the desired pitch. My question: Is there an obvious way to raise the collective pitch of one of these sets? Perhaps adding or changing one of the resistors in the group? (I do not have a schematic.) AI: Without a schematic, here's what you can try... Judging from the picture, your organ uses RC oscillators. When the pitch is too low, you need to use smaller capacitors or smaller resistor values. When the group of three notes is good in itself, just offset with regard to the neighboring groups, I would try to leave the capacitors untouched, and see what happens when you add resistors in parallel to the existing ones. Let's say an existing resistor has 10 kΩ. A good way to start is paralleling another resistor with 10...50 times the value of the original one, i.e. something like 220 kΩ. It is very unlikely that you break something as long as your additional resistors are > 4.7 kΩ. Trial and error might eventually lead to success... Don't expect an organ like this to be or remain perfectly stable and expect some dirtyness even when you try your best using the pots - but that's the cool part about old instruments anyway, isn't it?
H: Do engineers still design for volume using discrete through-hole bipolar transistors? As a hobbyist who likes plugging BJTs and discrete components into solderless breadboard for entertainment and education, I recognise that people like me are an insufficient market to make it worthwhile for manufacturers to continue production. I've noticed that on this website a lot of questions about BJTs are answered with recommendations to use a purpose specific IC or a PIC instead. I also enjoyed reading 555 best IC ever or obsolete anachronism I note 555s and through-hole BJTs are available and pushed by hobbyist shops online. I have some cheap solar powered LED lamps to mark the edge of a path, recently one was broken so I opened it up and found this board with three through-hole BJTs and a bunch of other discrete through-hole components on a single-layer board. So why do some large-volume manufacturers still use this sort of technology? The only reasons I can come up with are Its a really old design and not worth redesigning? The educational market is bigger than I imagine? Maybe old BJT production machinery can be shipped to low-wage economies and kept running for years at minimal cost? Wages are still low enough in China to sustain this kind of technology? There are a lot of old engineers around leveraging accumulated wisdom with 555s & BJTs? Discrete through-hole BJTs are still the best solution for something (what?) Do engineers still design for volume production using through-hole BJTs? AI: Low low low cost is the aim. A small volume maker with no expertise in anything other than manual soldering (if that) can make these. They can be even made at home by workers if desired. Single side phenolic board. Cheap. Not only manual assembly but component size and hole spacings not well matched and leads are hand bent and nobody cares. A design like this does not have to be efficient or long life - it just has to work well enough to persuade a western company's "buyer" that they can sell it to the eg US public at an adequate profit. The parts on that board plus the board cost probably 10 to 20 cents. (Junk resistors under 0.1C, inductor 1 or 2 cents maybe, transistors about 1.3 cents say, LED a few cents, PCB under 5 cents, wire 1 cent. Labour costs need to be low to match. That's for quality components that I am accustomed to :-) - presumably even less if quality matters nowt. Even 10 cents plus labour is getting costly as you have to add battery, housing, lenses, box etc and sell it out the factory door at about 20% to 25% of eg US selling price. Chinese minimum official labour rate is now about 2000 RMB/month AFAIK (maybe more by now) but you may work 6 days/ week and 10 hour days for that. Say 6 x 10 x 4.333 = 260 hours. An RMB is worth $US0.16 at present so per hour that's 2000/260 *0.16 ~~= $US1.23/hour. Some workers will get that for a 5 day, 40 hour week = 50% more per hour. Others will work longer and get half that. And be pleased enough in many cases ! :-(. Worst case I saw was 10 hours per day x 365 days/year except leap years. Really. (US owned/managed. NOT mainstream. No names). At many such places you get free lunch. That added 25% to the labour cost at the 3650 hours pa place. Which may explain why your PCBA looks as it does :-(. 5 year old photo. Tasteful precision blanking by me. Factory has long passed on to other things. This is typical enough "cottage industry" level manufacture. Not much equipment needed. Entirely reasonable quality can be attained when done well. Or you can get things like in your picture if not.
H: How step-down voltage regulators behave when their input drops below their output voltage? How do the common low-dropout LP2950 and buck LM2596 regulators behave when their input voltage drops below their output voltage? I'm driving a micro-controller board rated for 3.7-5.5 V with a 4.8V battery pack built from four 1.2V NiMH cells. 1.2V NiMH cells range from 1.45V freshly charged to slightly below 1V, or whenever you wish to start worrying about polarity reversal. As I understand it, one should usually use a buck like the LM2596 for efficiency reasons. LM2596 boards all claim the input voltage must exceed the output voltage by at least 1.5V or even specify a minimum input voltage of 4V. I'll want the device running while the pack still exceeds 4V though, but 2.5V = 4V - 1.5V sounds too low, although not necessarily. What actually happens when an LM2596's input voltage drops below output plus 1.5V? Does it stop working or become unpredictable? Or does it supply the input voltage minus 1.5V? Are there LM2596 that bypass themselves or switch to an internal LDO when the voltage drop gets too low? Also, I imagine an LDO like the LP2950 would continue dropping the voltage by it's minimum drop. Is that correct? AI: The LM2596 is probably a bit better than what you think. If you look at figure 8 in the data sheet: - It tells you that for a 1A load (at 25ºC) the drop-out is about 0.9V. Also note that the output is now just slightly out of regulation (Vout = Vreg - 50mV). If you are running less than 1A this figure will improve. However, take note of figure 11: - It is telling you that at 25ºC the minimum operating supply voltage is about 3.6V (and this id for producing a miserly 1.23V on the output). There are better devices than this I suspect and you need to consider what your maximum load current is when selecting one. The LP2950 is a linear regulator and if you look at figure 10 it tells you that for a 50 ohm load and 4V inputted you will get about 3.6V coming out. Also look at figure 12 because this gives a different viewpoint in terms of output current.
H: Can Transmission gates be used to implement 3 State Logic? In my application, I need to use a common line shared between two peripherals, I have to indicate to the devices whenever the bus is free or not, hence I can't have push-pull output where the output is either 0 or 1 , as these states are generally used for data transmission. Instead, I would prefer to have an open-drain scenario, where the output "floats", to indicate to the device that the bus is free. Now to achieve this, I want to use a transmission gate, where the third state(open) is used by controlling the enable pin if enable is on (the normal 2- state logic, 0 or 1 where input flows to output), else the output pin floats. Now my question is if this setup is similar to the way 3 state logic is used in microcontrollers/microprocessors, where an internal pull-up resistor controls the logic of the output pin if it is different then in what way does it differ? Also, have I missed something? Do I have to read anything more to complete my understanding? The Line is driven by a totem pole output, where only logic 1 (5 V), and Logic 0 (0V), signals are driven. AI: The question seems rather confused in several respects... 1) It is unclear whether you want to implement 3-state logic or an open-drain interconnection. In the former, the driving device DOES use a push-pull output, driving 0 or 1 onto the bus. The other devices, meanwhile, must abstain from driving until some separate system signals that it is their turn. In the latter, the bus is always pulled to '1' by a resistor, and any device may pull it to '0'. In this case, there is no harm done if several devices drive the bus simultaneously, though any messages may be corrupted. 2) You say you want a "floating" bus to indicate that the bus is free. In neither case is this normally possible (there is no logic primitive that can detect that a bus is floating). This is why in tri-state logic there must be another system (bus arbitration logic) to keep track of who has the bus, and give each device a turn. Now as to the specific question of transmission gates : either of these systems can be trivially implemented using transmission gates, though there are other and sometimes better ways. Tri-state logic can be implemented using a normal push-pull (totem-pole) output, and a transmission gate between the push-pull output and the bus. The bus arbiter simply switches the transmission gate on or off. It is often more economical to turn off both transistors in the push-pull output instead. Open drain logic can be implemented with a transmission gate by simply connecting one side of it to ground, and the other to the bus. Now simply turn it on to pull the bus low.
H: How to know which element replaces which for a cache? If I assume that the first element of the matrix that is fetched to the D-cache is a[0][0], for associativity 4, please tell me which element in which matrix that will write over a[0][0] in the D-cache. Since the formula for set associativity is In a set-associative cache, the set containing a memory block is given by (Block number) modulo (Number of sets in the cache) How can I know from this code, compiled and run as MIPS assembly in a MIPS simulator, which element that will write over a[0][0]? /* matris.c */ #include <stdio.h> #include <idt_entrypt.h> #define MATRIXSIZE 16 #define MATRIXSIZE_ROWS 16 #define MATRIXSIZE_COLS 16 /* * addera two matriser */ void matrisadd( int res[MATRIXSIZE_ROWS][MATRIXSIZE_COLS], int a[MATRIXSIZE_ROWS][MATRIXSIZE_COLS], int b[MATRIXSIZE_ROWS][MATRIXSIZE_COLS] ) { int i,j; for(i=0; i < MATRIXSIZE; ++i) /* variera rad-index */ for(j=0; j < MATRIXSIZE; ++j) /* variera kolumn-index */ res[i][j] = a[i][j] + b[i][j]; } int main() { static int a[MATRIXSIZE_ROWS][MATRIXSIZE_COLS]; static int b[MATRIXSIZE_ROWS][MATRIXSIZE_COLS]; static int res[MATRIXSIZE_ROWS][MATRIXSIZE_COLS]; int i,j, Time; /* * initiera matris a och b */ for( i=0; i<MATRIXSIZE; ++i) for( j=0; j<MATRIXSIZE; ++j) { a[i][j] = i+j; b[i][j] = i-j; } flush_cache(); /* toem cachen */ timer_start(); /* nollstall tidmatning */ matrisadd( res, a, b); Time = timer_stop(); /* las av tiden */ printf("Time: %d\n",Time); } AI: I think ANSI C dictates that multi-dimensional arrays are allocated to memory in row-major order. That means elements in a row are contiguous in memory, which is to say a[0][0] is adjacent to a[0][1] in memory. The way associative caches work is that some of the address bits tell you which line of the cache the item is on, and some other bits of the address tell you which set the item goes in. You need to know the line-width to know how many bytes are on a line, and you need to know how many lines each set contains. Lets say you didn't have an associative cache (i.e. you had associativity = 1). Lets also say you had 32 bytes per line, and 16 lines. So your total cache size would be 16 * 32 = 512 bytes. If your a[0][0] was allocated to memory such that it was on a cache line boundary (i.e. it's address was divisible by 32), then the line it brought in would contain a[0][0] through a[0][31] assuming the cardinality of the second dimension was that big. If on the other hand the cardinality of the second dimension was say 16, the a[0][0] row would contain a[0][0] ... a[0][15], a[1][0] ... a[1][15]. And so on. However your array is dimensinoed, after 512 bytes, you're going to be full and the 513th byte offset from a[0][0] is going to blow away the row containing a[0][0]. Unless your cache is associative. In that case, your 513th entry is going to go into the next set, and that's going to keep happening for as many ways associative your cache is. Only after exhausting the sets will you wrap back around and blow away a[0][0]. Now, obviously for the same size cache, increasing associativity will effectively reduce the number of lines per set. So the access pattern determines whether it's helpful or not. Mileage may vary.
H: Arduino IR practice vs. application circuit on 1838 datasheets There is an explanation of wiring up IR remote controllers for beginners at arduino-info.wikispaces.com/IR-RemoteControl, which suggests wiring the output pin directly into an Arduino pin. I've tried this, works fine. The application circuits given in the datasheets for the VS1838B (Chinese) and AX-1838HS have a capacitor between VCC and GND and 10k or 20k ohm pull-up resistor between VCC and OUT. If I understand the internal wiring diagram though, these 1838 units already have an internal pull-up resistor between VCC and OUT, so this external resistor merely changes that pull-up. Why are the capacitor and other component there? Are they filtering out noise? AI: The capacitor is definitely helpful for these sensors. Its absence manifests in rather devious ways, as I learned when working from a tutorial that didn’t have a capacitor: When testing the IR decoding in isolation, it might very well work. Once you add other elements to the circuit (in my case, an RGB LED), the IR decoder suddenly starts generating nonsense readings.
H: BJT Amplifier Input/Output In a CB Amplifier, the Base is common to both Input and Output. Why is Input applied at the Collector and Output at the Emitter? Could it have been the opposite? Similarly, for CC and CE amplifiers why are the chosen Input and Output terminals selected? AI: Radio Frequency amplifiers quite often use common base circuits and I believe the main reason is because "miller capacitance" does not have the same detrimental effect. On a normal common-emitter configuration, the input is fed to the base and the output is at the collector but, internally the capacitance between collector and base acts as negative feedback and can reduce gain. To combat this, if the base is held at a fixed potential to ground (as per in its normally biased state), and this is supplemented by decent capacitance to ground, the miller capacitance is effectively shunted to ground. The down-side is that feeding an input to the emitter requires a stronger drive voltage because the emitter input impedance is lower. It is lower because the emitter fed input has to also "handle" collector currents as well as the little bit of emitter-to-base current normally needed for amplification. Consider also the differential amplifier: - This is another circuit that uses the emitter as an input. On this occasion the input to the emitter comes from the emitter (outputting) of the other BJT. In fact, both emitters are simultaneously inputs and outputs.
H: How do I calculate battery life allowing for duty cycle? I have a battery rated at 2610mAh. The device it's powering transmits to the network for 35ms during this time it uses 1.95mA of power. the rest of the time the device draws 0mA. I want to workout how long the battery would last in seconds. Here's what I've done to calculate this. I'm not too sure if I've done it right. First I converted the 2610mAh (battery rating) into mA seconds: $$2610 \cdot 60 \cdot 60 = 9396000\ mA \cdot s$$ Then I calculated how many mA the device uses each second: $$\frac{1.95}{35} = 0.055714 mA/ms \cdot 1000 = 55.714 mA/s$$ Now I use the formula \$t=\frac{C}{I}\$: $$\frac{9396000}{55.714} = 168647s$$ Is this the correct way to do this? AI: If it's a duty cycle of 4%, then the average load is 4% of 1.95mA, or 78 uA. The battery should last 2610 / 0.078 hours, or 33461 hours. Over 3 years. Battery capacity changes with temperature, time, and discharge rate (and the 2610 mAh rating isn't too precise either, in my experience.) These calculations are probably within ±20% of the real answer.
H: SM8 package orientation I've received chips PCA9306DCTR (from Texas Instruments) but they don't have any dot or notch to define it's orientation (i.e. where is the pin 1). In the datasheet there is a picture of this chip (in SM8 package) and it has a notch. However chips I've received has only strip of different color (please see the picture) and I've not found any information about it's meaning. So, is this strip mark pins GND and EN (i.e. the same as dot or notch) or it marks SDA1 and SDA2? AI: The stripe marks the Pin 1 end. With Pin 1 to the left, the rest of the text is right way up, as further confirmation - as has been the convention on all DIP ICs (and SOIC) I have ever seen.
H: Inductor equivalent of capacitor's charge Because inductors share similar equations in their charging/discharging cycles, I am wondering if inductors have something like charge. Capacitors have capacitance and charge while an inductor has inductance and _? Is there a V = Q/C function for inductors? AI: Magnetic flux is the complement of charge. Just as a capacitor is defined by the relationship \$Q = CV\$, an inductor is defined by the relationship \$\varphi=LI\$, where \$\varphi\$ is the magnetic flux. Just as the capacitor formula becomes \$I = \dfrac{dQ}{dt} = C\dfrac{dV}{dt}\$ when we look at time variation, the inductor formula becomes \$V = \dfrac{d\varphi}{dt} = L\dfrac{dI}{dt}\$. Just as we can generalize the idea of a capacitor to the nonlinear case with the relationship \$f(Q,V)=0\$ we can generalize the idea of an inductor with the relationship \$f(\varphi,I)=0\$.
H: Motor Driver, increase output voltage I have a sabertooth motor controller and it is rated max 33v input. I need (at max) almost double that on the output. Can I hook up one of these to the output port, between the sabertooth and the motor and get up to 60 volts? If so, What happens if the input voltage is less than 10 (it says that's the minimum) All my amps are in range. Motor draws 5 amps max, and sabertooth can handle up to 25A. Power supply can handle up to 30A. AI: The short answer here is, probably not like you would like. Here are some general points as to why not. First, the boost converter you linked to is a switching supply(so is the motor controller really, but probably this is not the time to discuss that). Due to this fact, it will have a settling time for a given change in input voltage. Because it is designed for voltage stability and not response time, this will likely be very slow compared to the motor controller. Depending on your application (especially if feedback loops are involved) this could quite possibly be a deal breaker. Also keep in mind that if you are upping the voltage by two, the input current(at say 30 volts) would be twice the output current (at say 60 volts). So a motor drawing 5 amps max at 60 volts would actually be drawing over 10 amps off your 30 volt supply(over due to converter efficiency). Another problem is when the voltage drops below the minimum on the boost converter. Depending on the design, it will either just pass the input or possibly open circuit the output to deliver 0 volts. If it passes the input, you might be ok here. There are probably some other things I am not thinking of, but the critiques will come...I just thought this would get the ball rolling for you. Edit: I forgot what I started out to say. The output of the boost will be independent of the input voltage (within the design range of the boost converter input). You have to set the boost converter up for the output you want. This seems like the best reason this won't work as you would like.
H: Max switch current I am in the process of designing my first PCB and I need to include some switches to open or close a circuit with a max current of 500mA at 5v. I have found a DIP switch that I want to include on the PCB but I am not sure if the switch can support the current of my circuit. The specification of the switch say: Contact Rating: Switch: 25mA @ 24V DC Carry: 100mA @ 50V DC Insulation Resistance: 100 MΩ Min. @ 500V DC Contact Resistance: Initial:50 mΩ typical @ 2-4V DC @ 100mA After Life: 100mΩ typical @ 2-4 DC @ 100mA The PDF file is also here So here is the question: When the circuit is closed, is this switch going to support the circuit current? How can I calculate that? Should I take care when the circuit is open? AI: I would say no. The specification does not mention anything higher than 100mA. Although these figures are accompanied by a voltage (for instance 50 mΩ at -2-4V) that does not mean that 4V is directly applied to the switch, because then the current would be 4V/50 mΩ = 80A! The voltages matter in a switch too because the switch experiences the voltage when it is open, and it comes into play at the moment when the contact is being made or broken. Voltage causes arcing of switch contacts. It also plays a role in breaking through the thin film of oxidation. Note how conservative the 24V switch rating is. The current must be only up to 25 mA if you want to open and close the switch at 24V. Even if you don't plan on changing the switches while current is flowing, the data sheet does not mention anything about carrying more than 100mA. Idea: use the switches to control transistors to deliver the current.
H: Does a photo-coupled SSR need a series resistor for the internal LED? I am trying to control an LCA710 SSR with an Arduino digital output. The data sheet says the control inputs are "CMOS and TTL compatible". It also has a schematic of the internals of the chip, showing an internal LED and photo-sensitive something-or-other (switch, basically). Do I need to put a resistor in series between the digital out pin of my Arduino and the control pin of this IC? AI: It varies depending on the SSR. Really, every photo-coupled device will need some sort of current-limiting device, the question is just whether there is a resistor or some similar part built-into the SSR, or whether it needs an external resistor. In this situation, the LCA710 is probably less accurately described as a SSR, and better described as a photo-activated MOSFET. You will need to provide your own current limiting. In the datasheet, you can see they explicitly specify a maximum Input Control Current, as well as the Input Voltage Drop. If this were a traditional SSR, they would just provide minimum and maximum voltages. What the datasheet means when it says TTL/CMOS Compatible is simply that the current required to turn the FET on fully is within the sourcing capabilities of most common TTL/CMOS devices. Some optos can require upwards of 20-30 mA to turn on fully, which would prohibit them from being used with most common logic devices without an additional high-current buffer. It's also worth noting that this is pretty much spelled out explicitly: the datasheet says Low Drive Power Requirements (TTL/CMOS Compatible). The critical part here is the "low drive power" bit.
H: Invert a 555 Astable Output Signal I can't believe how much trouble I've had figuring out how to do such a simple thing. I have a variable frequency, variably duty cycle 555 configuration in astable mode. I'm using a set of pots to get a wide range of control. It works beautifully. The output is great, but I have a problem. I am driving a couple mosfets directly from the output. But I want to have a third mosfet that turns on and off opposite to the timing of the first two. So if I'm running 25% duty cycle, the first two are ON for 25% of the cycle while the third one is OFF during that portion and then reverse this for the OFF period of the cycle. I've seen some diagrams that talk about using one extra mosfet or one extra transistor along with a resistor to invert a signal, but they don't create hard/fast rise and fall times. The resistor causes slow rise times. I want a nearly perfect inversion of the square signal. Right at the moment that the first two mosfets flip off, the third mosfet needs to flip full on. It's critical that I get this to be as accurate as is feasible without getting into overly complex circuitry. Anything more than two or three 555s and/or two or three extra transistors (possibly needed to invert the signal) is more than I'm bargaining for. Can anyone offer a simple solution to this? I have both CMOS and non-CMOS 555's on-hand. I have a reasonable collection of other components as well. I can order what is needed. PFET is not an option. I'm working with extremely high demands and my selection of NFETs is already highly limited. I wish it was as simple as a PFET. I'm not posting this as an answer yet, because I'm waiting to hear a response from the other answerer. But apaprently you can run a 555 as a 200mA signal inverter. This is really simple for a person who already has 555s on hand, and the best part is that the 200mA current is WAY higher than a typical logic unit inverter (often topping out at least than 10 or 20mA). Here's a page with a circuit at the bottom explaining Inverter mode: http://electronicsclub.info/555timer.htm AI: Without knowing what your power supply configuration is, I can offer a few suggestions with reasonable caveats. If you need to ensure that there is no overlap between your current two transistors and the third, then your circuit will be more complicated than a few more 555's. You're then looking for something called a "dead time generator" and you probably would need to define your minimum dead time requirements. If you are driving MOSFETs directly, and VDD for the 555 is the same as the load you are switching, you can use a PFET instead of an NFET, and that will work reasonably well. This will not work if your 555 is powered separately from your load. This is the simplest option and requires no additional parts. See schematic below: simulate this circuit – Schematic created using CircuitLab If you need to use all the same type of transistor (all NFETs or all PFETs) then the next best thing would probably be to use an inverter (or other integrated logic gate) that comes in a small package. This makes for a small circuit and easy to troubleshoot. If you're set on through-hole or breadboard-able parts, then there are a lot of chips with 6 inverters on them that will work great. Tons of options exist if you can live with some flavor of surface mount (you can have as few as 1 inverters in a package). This also has the advantage of working if your load is switched from a different VDD than your 555. simulate this circuit You could also use 555's to synthesize any logic function, such as an inverter. simulate this circuit
H: Why do capacitors lose capacitance in series? Unlike rechargeable batteries, capacitors have a lower capacitance in series. Why is this and if I charge each cap separately and then put them in series, will it still be a lower capacitance? AI: The answer to this comes from considering what is capacitance: it is the number of coulombs (C) of charge that we can store if we put a voltage (V) across the capacitor. Effect 1: If we connect capacitors in series, we are making it harder to develop a voltage across the capacitors. For instance if we connect two capacitors in series to a 5V source, then each capacitor can only charge to about 2.5V. According to this effect alone, the charge (and thus capacitance) should be the same: we connect two capacitors in series, each one charges to just half the voltage, but we have twice the capacity since there are two: so break even, right? Wrong! Effect 2: The charges on the near plates of the two capacitors cancel each other. Only the outer-most plates carry charge. This effect cuts the storage in half. Consider the following diagram. In the parallel branch on the right, we have a single capacitor which is charged. Now imagine that if we add another one in series, to form the branch on the left. Since the connection between the capacitors is conductive, bringing the two plates to the same potential, the ----- charges on the bottom plate of the top capacitor will annihilate the +++++ charges on the top plate of the bottom capacitor. So effectively we just have two plates providing the charge storage. Yet, the voltage has been cut in half. Another way to understand this is that the two plates being charged are farther apart. In free space, if we move plates farther apart, the capacitance is reduced, because the field strength is reduced. By connecting capacitors in series, we are virtually moving plates apart. Of course we can place the capacitors closer or farther on the circuit board, but we have now have two gaps instead of one between the top-most plate and the bottom-most plate. This reduces capacitance. 2024 Update A water analogy also readily explains why series capacitors have less capacitance. I'm adding this for the benefit of people who find the water analogies useful. Using water pipes, we can model capacitance as a rubber dam stretched across the cross-section of a pipe. The rubber dam stops "DC" (continuous flow of water). It passes "AC" (limited to-and-fro movements of water). It shows other properties of capacitance. If we put a flexible barrier into a branch pipe (or make the walls of the pipe elastic), it is like a shunt capacitance. It can smooth pulsations in the water pressure, similarly to a filter capacitor, which results in the Windkessel effect. A rubber dam's capacitance is determined by how much it moves to accommodate a volume of water, in response to a given pressure. Just like electronic capacitance is how much charge goes into the capacitor for a given applied voltage. A thinner, more pliable dam will show more capacitance than a thick, stiff dam, because it stretches more easily in response to a given level of water pressure. When we put two dams in series, they can never have more capacitance than just one dam. Here is why: the capacity between the dams cancels. Whatever volume of water is absorbed by the first dam, that dam pushes out an equal volume of water on the other side. That volume of water has to be accommodated by the second dam. So the second dam doesn't contribute new capacity. The capacity is determined purely by how much the water has moved in the entire pipe as a whole, in response to pressure. This is very similar to the observation about charges canceling in the existing explanation above. The convex protrusion of one dam displaces water which fills the concave space formed in the other dam. Here is the key insight we need: When we put two rubber dams in series, they effectively behave as if they were a single, thicker, less pliable rubber dam. They move together, since water is incompressible, and they move less in response to the same pressure as a single rubber dam.
H: TLP280-4 Optocoupler on 12/24V inputs There is a STM32 device which has to detect several signals from other devices. The voltage of these signals can be 12V or 24V. Also these signals can be positive (i.e. 12/24V) or negative (connected to GND). simulate this circuit – Schematic created using CircuitLab First question: Does it possible to allow TLP280-4 optocoupler work with 12V and 24V input signals? Or I should use voltage divider wit unique resistor values for each case? Second question: On some board I see the R2 resistor. What does it do there? Third question: What is the right scheme to connect STM32 controller to an optocoupler output to allow the controller to detect signals? Is mine good? AI: It should be possible to drive this kind of opto with ±12 to ±24 V. Since it has two back to back LEDs (going only from your diagram), polarity doesn't matter. R2 forms a voltage divider with R1 to attenuate the voltage to the LEDs when the LEDs are not on. This in effect raises the threshold voltage where the LEDs start to turn on. You didn't say anything about the minimum voltage the opto should react to, so R2 is not needed. To determine R1, first make sure the maximum LED current is not exceeded at the maximum input voltage. You didn't provide a link to the opto datasheet, so I'll make up example values. You will have to substitute with the real values yourself. Let's say the opto LEDs can take up to 20 mA and have a forward drop of 1.4 V when they do. With 24 V in, R1 would then drop 22.6 V. By Ohm's law, we now calculate the lowest allowed R1.   R1 = 22.6V / 20mA = 1.13 kΩ Using no less than the standard value of 1.2 kΩ keeps the LED current nicely within spec. Quite likely you don't need to drive the LEDs that hard, but again, without a datasheet it is hard to make reasonable tradeoffs. Now we have to look at what happens at the minimum input voltage you want to detect, which is 12 V. That will put 10.6 V accross R1. If R1 is 1.2 kΩ, then that will put 10.6V / 1.2kΩ = 8.8 mA thru one of the LEDs. Let's say we can count on 8 mA to leave a little margin. To size R3, you look at the current transfer ratio, which again is a important parameter that will be specified in the datasheet. This is the ratio of current that Q1 can support relative to the current the LEDs are driven with. To pick a value for example, let's say the current transfer ratio is 1.5. With 8 mA thru the LEDs, that means Q1 can support up to 12 mA and stay saturated. Let's say Q1 drops 200 mV in saturation. That leaves 3.1 V accross R3. The absolute minimum R3 is therefore 3.1V / 12mA = 258 Ω. Any less than that, and Q1 may not be able to pull the output down to its saturation level. If this is driving a CMOS digital input, there is no need for such a stiff pullup resistor. 1 kΩ should still respond fast enough but require well below the minimum guaranteed current Q1 can sink (with our example numbers). There is no need to push the limit, and it's good to make sure Q1 is well into saturation to make sure the voltage will be low. Another issue to look at is the power dissipation of R1. 22.6 V accross 1.2 kΩ will dissipate almost 430 mW. That would require a "1/2 Watt" resistor at the least. A better alternative may be to drive the LEDs with lower current. Of course that ripples thru all the other calculations. Without a datasheet all we can do is make up example numbers, so you'll have to go thru the above calculations anyway with the real numbers.
H: Making a K type thermocouple It has been said that a K type thermocouple is just 2 wires of different types twisted together (basically). If this is so then can such a thermocouple be made with a copper and steel wire twisted together? What about copper and nichrome? AI: A thermocouple is made from two different conductors in contact - frequently welded, but twisting together will work too. A type K thermocouple is made with chromel and alumel conductors. There are many types of thermocouple, designated by different letters, and using different metals. See the Wikipedia article on thermocouples, or do a web search for "thermocouple types" for more information.
H: Difference between Ethernet and USART? As i made literal study about protocols, I came across lot of protocols and there differences but i'm not sure of what is the major merits of Ethernet over USART. lots of websites explained about all the serial protocols such as I2C, UART, USART, SPI, CAN, RS-232 and there's merits and demerits. but none of them between Ethernet over USART. please tel me major features of Ethernet over USART. AI: USART is a lot simpler. Its a point to point connection where the data sent by one thing gets received by the other thing. The data just shows up when the serial port is read. You need a transceiver chip like a MAX232 to convert levels properly if going to a standard serial port on a computer. There are cables / adapters available to connect to "ttl" levels directly to a microcontroller. They must both be the correct voltage for the STM32 (3.3 or 5 volts). For ethernet you need hardware for the interface, plus a "protocol stack" which is a bunch of code that handles ip address and the tcp/ip protocol. Usually to interface via ethernet, there will be a whole interface chip or an entire sheild like in the Arduino world. Ethernet devices can talk to any other device on the network. (Or the world, if connected to the internet)
H: Eagle: How do I make a component from a board? I recently discovered the fantastic Arduino shield components in LadyAda's latest Eagle library. Now of course I'd like to make my own, using the mechanical layer from an existing Eagle board file. But the Google has been unhelpful on this topic. And my fumbling around has not unearthed any obvious affordances for copying a drawing from a board editing window to a component editing window. (I have made some simple components starting from the pads of an existing component, following one of the many tutorials that explain THAT process.) How do I make a component footprint from an existing board drawing? AI: I've used 2 different methods for scavenging components out of Eagle projects. Automated method. Run exp-project-lbr.ulp, then sort through the automatically generated library. Manual method. Originally from here. Select the parts you want to copy with the group select tool. Use the scissors button on the toolbar. Right-click the group or hit the GO button after clicking the cut button. Eagle wants to know what it is you wish to "cut", which is really more like the "copy" command in most apps. Open the new file and do a paste, it should copy the info.
H: Does heat affect the magnetic field of an electromagnet? I know that heat destroys perm magnets, but how about electromagnetics? Does heat affect the strength of an electromagnetic field? AI: No, heat has no influence on the strength of a magnetic field produced by current flowing around a coil of wire. The strength of that magnetic field is strictly the result of the ampere-turns of current going around. However, heat can effect the magnetic permeability of various materials. If the electromagnet has anything other than a air core, then how the field resulting from the ampere-turns is concentrated and shaped can differ with temperature. This concentration and channeling of the magnetic field can make a electromagnet appear to have a stronger field, and can make it act "stronger" in many applications. For example, let's say you wrap 100 turns of wire around a wooden rod and put 1 A thru it. The magnetic field strength is strictly a function of the 100 ampere-turns of current going around. However, this magnet will be able to pick up heavier objects if the wooden rod is replaced by a iron rod of the same shape and size. This is because the iron is a much better conductor of magnetism than air and wood are, so the magnetic field lines will be concentrated at the ends of the iron rod. This more concentrated field is able to pick up heavier magnetic objects as a result of this concentration, even though the overall magnetic field has the same average strength in both cases. In the example above, the apparent strength of the electromagnet with a iron core depends on material properties of the iron, which can vary with temperature. The magnetic permeability of free space is not effected by temperature, so the same coil without a core would make a magnet that does not vary with temperature. Of course extreme tempertures change the wire and will eventually melt it so that you don't have a electromagnet anymore at all. That obviously changes things, but I'm assuming that's not the kind of effect you are asking about.
H: Circuit analysis of mono audio preamp (K1803 Velleman) For a school project I have a question about the first part of the circuit below (amplifies at 20*log(220k/2.2k)=40dB). I know that U2A is the amplifying part of the circuit. The problem is U1A and what is the role of this? I think in many ways it resembles an active low pass filter but it lacks a capacitor on the feedback. Isn't the RC on the input a low pass filter and how can I tell what the role of the first op-amp is? EDIT: I will not use a lm324 but a lm358n (ST), the battery is just a symbol for 12V DC input. AI: Pins 2 of both U1A and U2A are both so called 'virtual ground'. Due to the amplifier architecture, the opamp tries to keep the non-inverting input and the inverting input at the same potential: the voltage at the voltage divider R3/R4. C2 makes this potential coupled to ground for AC. We are talking AC and pin 2 is 'virtual ground'. This means that the input impedance of the left stage is fully defined by R2 and the input impedance of the right stage is defined by R7. Due to the high amplification of the right stage with the given ratio R10/R7 and the requirement for practical resistor values R7 will be relatively low. Thus the right stage has a relatively low input impedance equal to R7 (2k2). The left stage however has a low amplification R5/R2 = 1 and again for practical resistor values are chosen. The advantage here however is that both resistors can be relatively high (100k). So the role of the left amplifier stage is a high input impedance for the source voltage. The source voltage is probably a microphone, low voltage and only able to deliver very low current. Only with a high input impedance that source will deliver a signal with a low distortion. The actual input impedance is R1//R2 = 50k.
H: Does this device which claims to reduce reactive energy from a house work? I've opened a device that states that it can reduce the reactive energy from a house, by plugin it directly to the power outlet/wall socket. I think it is a con, so I've opened it and I saw this black box. Inside this box that I've opened bare handed is this very wierd brown glued sand or silicon, I dont know. Can someone tell me what this box is and what kind of brown stuff is that? AI: This is mostly a con. The circuit is probably only to light the LED so that it looks like it's doing something. Most power grid loads, like your house, are inductive. Inductive power factor (current lagging voltage) can be offset by adding capacitive power factor (current leading voltage). If you get it just right, then the result looks resistive, which is the ideal. At best the box is a capacitor. At worst, it is a outright scam. Even if the small box is a genuine capacitor, it doesn't do anything for you. You are billed by the real power you use, regardless of the reactive component. At best adding a capacitor on your line is doing the power company a slight favor, but such a small box will have a tiny effect even if it is a real capacitor. Adding a fixed capacitance to the line blindly offsets some amount of inductance. That is probably more useful than not to the power company, because on average the load on the power line looks inductive. It will cancel a tiny amount of inductance you are causing, or if you aren't, a tiny amount of inductance from your neighborhood. Overall, the current to run the LED causes more waste than anthing useful a capacitor that would fit into the small box can do. The purpose of this device has nothing to do with power factor. It's all about gullability factor and separating non-technical people from their money. Since you have one, it is apparently working as intended.
H: ReRAM CMOS compatibility (vs phase change memory) When ReRAM is described as having good compatibility with CMOS processes, it means that ReRAM can be constructed with "standard" manufacturing processes, correct? Meaning that it can be grown with typical thin film deposition methods? This, as opposed to phase change memory, which uses more "exotic" compounds and therefore isn't as "CMOS compatible" as ReRAM? AI: Compatibility could refer to any of a number to different and varying issues but mostly refers to fab poisoning. In general the techniques and equipment used will be similar, only sometimes is a certain piece of equipment not available. CMOS compatible refers more to the potential to "poison" the fab. Meaning that you have introduced a material into the fab that will cause your yield to crash mainly because the new material interferes with the device operation, has nasty characteristics or is hard to control in fab. I would caution against overly broad conclusions as the various companies that are implementing the variants of these two different devices almost certainly will be using different materials. In general Tantalum (which is used in some ReRam devices) is a fairly benign material which forms a stable oxide that is not mobile in-situ. Additionally the technique used for its deposition is fairly safe in terms of how much material gets left in the chamber and how easily the wafer can be protected. Phase change devices use many different chemistries/materials, I'm sure some of them would prove to be difficult materials to deal with. As a case in point, copper (Cu) was once forbidden in foundries and it was considered to be incompatible with CMOS processes. However, techniques were developed and now all processes below 90 nm all use Cu in the wiring. Cu is particularly nasty in that it is highly soluble in Si (yes, solids can be soluble with each other) and a Cu atom can move 100's of micrometers per hour at room temperature in a Si substrate. Also, application of Cu means that it is plated (an electro chemical process - not used that much before Cu) which means the whole wafer must be exposed during processing. With Aluminum (Al - the previous metal used)) this is sputtered and only lands on the top of the wafer where it should go. To answer your first question: "it means that ReRAM can be constructed with "standard" manufacturing processes, correct?" No, there are many different techniques used which are determined by material composition, chemistry and nature of the films needed. Most are available in fab. An integration engineer may not want to use a particular machine for this new material with an old one but most materials can be dealt with using extant equipment. And your second question "... uses more "exotic" compounds and therefore ..." is the right answer if you've picked a particular Phase change device that uses an incompatible material. There are so many variants that you'd have to specify what device is being compared.
H: What can the source of 100Hz noise be? I'm making data acquisition with an amplifier (amplifier is amplifying a transducer and is connected to a data acquisition hardware). After I make data aq. I am plotting the output signal data in fast Fourier transform. It is a DC output from the amplifier. I observed a sinusoidal ripple over DC voltage on an oscilloscope and I thought it was 50Hz.(Because we use 50Hz in Europe for power supply) But when I take the Fourier transform the highest noise spike is 100Hz not 50Hz. 50Hz is the second after 100Hz in freq-power spectrum. And the other spikes are 150 and 200. The thing is it looks like harmonics of 50Hz but then why 50hz is not the maximum and 100Hz instead? AI: user16307 asks: "but do you have any idea why there is a full wave rectifier needed in an industrial amplifier?" Have you researched full-wave versus half-wave rectification? Half-wave rectifier raw output: Full-wave rectifier raw output: From these images, it is clear that the output of the full-wave rectifier reduces the energy storage requirements of the power supply filtering circuit.
H: Problem graphing inductor current-time I am trying to graph the equation VbackEMF = L di/dt When SW1 is off and has been off since negative infinity, I realize that there is no current in the system. Now I imagine SW1 being pressed. The switch can probably make a good connection in 0.1 seconds, and current in the circuit without the inductor is 1A. So here is what I am stuck on. Back EMF = 1 Volt at the first instant. Well, how does the current ever start moving through the loop if the first instant doesn't allow any current through? simulate this circuit – Schematic created using CircuitLab AI: When the series current is zero, the voltage across L1 must equal V1 (by KVL and Ohm's Law). But, for an (ideal) inductor, we have: \$v_L = L \dfrac{di_L}{dt}\$ Thus, by KVL and the definition of an ideal inductor, at the moment SW1 closes, the time rate of change of current is: \$\dfrac{di_L}{dt} = \dfrac{1V}{1H} = 1 \dfrac{A}{sec} \$ So, the crucial insight here is this: there is no current at the moment the switch closes but, at that very moment, the current begins to change. How do I calculate the rate of change slightly after the first after-SW1-closed rate if R1 is to be taken into consideration? By solving the differential equation that describes the circuit. By KVL and Ohm's Law, we have: \$v_L = L \dfrac{di_L}{dt} = v_1 - i_L R \rightarrow \dfrac{di_L}{dt} + \dfrac{R}{L}i_L = v_1\$ This is an easy 1st order ordinary differential equation for the series current \$i_L\$. The solution, for zero initial condition, is: \$i_L(t) = \dfrac{v_1}{R}(1 - e^{-\frac{t}{\tau}}) \$ Where \$\tau = \dfrac{L}{R} \$ When t is "small enough", i.e., right after the switch closes, we have: \$i_L(t) \approx \dfrac{v_1}{L}t \$ So, in the early moments, the resistance has negligible effect and the current is approximately a ramp. The current begins to significantly deviate from a ramp only after the current becomes large enough such that the voltage drop across the resistor is significant compared to the voltage source.
H: Source for a 6-pin DIL "stackable" header (for Arduino ICSP header)? Does anyone know of a source for a "stackable" 6-pin DIL header? I would like to use one on an Arduino shield I am designing, in order to carry the ICSP header from the Arduino up through the shield so it's usable with the shield still installed. I found this article where a more industrious / patient man than myself managed to fabricate a suitable part by cutting up an 8-pin SIL pass-through header with a Dremel tool and a diamond blade. I do have a few of those about, but they're matched in sets for making shields and I don't really want to start cutting them (and probably myself) up. AI: Samtec makes them, and surely others. They're pretty expensive though,and take some sifting to find a part number, and more to find someone that stocks them. Probably $3+ a piece in small qty, which is too rich for me. They should be cheaper from the orient, but I don't usually see these being sold to end user / in small quantity, so you'd have to get in touch with someone making connectors there and buy a lot, most likely. I usually use the no-name Chinese arduino ones like you mention, and just cut them with wire cutters. Diamond disk isn't required.
H: Does an SD card in SPI mode respect chip select/slave select? Seems to be resetting in my application I have an application where I have a microcontroller (NXP LPC1343) which is connected to an FPGA via 16-bit SPI. There is also an SD card using the same SPI port (MISO/MOSI) but with a different CS/SS pin (both are active low, as per the SPI specification). One of the things I need to do is write data from the FPGA onto a file on the SD Card using FAT32, and this is the job of the microcontroller. The microcontroller is running FatFS, which I have gotten to work reliably by itself. Because the microcontroller only has a small amount of RAM, only a small amount of data can be buffered at once. Hence, the micro has to read a buffer from the FPGA, change the SPI mode to 8-bit, and then write that data to the FATFS. Recall that in order to configure the SD card for SPI mode, a command must be sent while the SPI bus is running at 400 kHz, and a certain amount of waiting has to happen. Therefore, I would like to have to only perform the initialization once. However, performing transactions on the FPGA even while holding CS high on the SD card seems to put the SD card into a weird state such that it needs to go through initialization again. This of course is undesirable, since the initialization may take several milliseconds, in order to write just 4 kB or so of data (again limited by the small RAM capability of my micro). As I need to write several megabytes as quickly as possible, this reduces performance from about 500 kB/s to less than 100 kB/s. I'm aware that SD cards aren't technically fully SPI compliant, but how can this problem be fixed? AI: Okay, I figured it out actually. I should have googled a bit deeper. It turns out that SD cards don't act exactly like SPI devices when sharing a bus according to How to Use MMC/SDC: In the SPI bus, each slave device is selected with separated CS signals, and plural devices can be attached to an SPI bus. Generic SPI slave device drives/releases its DO signal by CS signal asynchronously to share an SPI bus. However, MMC/SDC drives/releases DO signal in synchronising to the SCLK. This means there is a possibility of bus conflict with MMC/SDC and any other SPI slaves that attached to an SPI bus. The right image shows the drive/release timing of the MMC/SDC (the DO signal is pulled to 1/2 Vcc to see the bus state). Therefore to make MMC/SDC release DO signal, the master device must send a byte after CS signal is deasserted. The SD card and FPGA were probably both trying to drive DO and the SD card lost out, so it reset. Sending an extra byte seems to have fixed it.
H: Servo position with no pulse I am using a PIC 16F884 to run 2 motors and 2 servos. The motors are using the onboard PWM module, and I am bit banging PWM for the servos on Timer 2. With only one servo being controlled, it works perfectly, but when I add a second servo control, the timing becomes off because of the number of commands that are being issued during the interrupt period (at least this is what I've seen when I've hooked it up to an oscilloscope). My question is: Can I issue a command to a servo, wait until its reached to proper position, then turn off the pulse and expect it to maintain position? If this is the case, then I should be able to control both servos with 1 timer. I saw a similar question here: Will a servo hold its position without a signal? with no definitive answer. AI: A specific type of servo motor, a latching servo, is required for holding position after the control signal is removed. Depending on the specific servo in use (see caveats below), an alternative "poor man's latching servo" can be implemented thus: Control the power supply line for the servo with a high side switch, either a P-MOSFET or for high power servos, an SSR. Low side switching is not suggested, as disconnecting the ground path may cause unpredictable behavior due to the control signal losing ground reference. After allowing the servo time to achieve desired position, disable the servo power before removing the control signal. For changing position, start the control signal, then enable power to the servo. Caveats: The servo needs to be of a high reduction ratio / high torque type, so that small forces applied to the arm while it is unpowered, do not cause the arm to rotate. Not all servos can tolerate a control signal arriving while supply power is absent. While some will suffer damage to the internal electronics (not too likely), I have at least one servo that tries powering its motor from the control signal, ergo microcontroller pin damage. Side Note: Servo control signals are not actually PWM but a variant, pulse duration modulation: Servo position is not defined by the PWM duty cycle (i.e., ON vs OFF time) but only by the duration of the pulse. As long as it is anywhere in a range of (typically) 40 Hz to 200 Hz, the exact value of the frame rate is irrelevant. The servo expects to see a pulse every so many ms, this can vary within a wide range that differs from servo to servo. This is relevant because the OP's requirement can be meet by generating consecutive pulses of desired durations for each driven servo, with a lot of flexibility in the time taken between a pulse for Servo A, and a pulse for Servo B, for example. The servos would thus be fed their control pulses in round Robin fashion. As pointed out by Dave Tweed in comments, using the acronym PDM can be confusing, as that is also applied to Pulse Density Modulation, yet another special case variant of PWM.
H: Electret microphone with class a amplifier has no speaker output I' m a relative beginner trying to build this audio amplifier, using this electret microphone, and output my sound to this 8 ohm speaker. I'm getting no audible output. I tested the microphone only, with no amplification, and there was indeed a small response, ~15mV and ~4uA (loud radio near the mike). So it seems like the mike is at least providing a signal. With the amplifier, the output response is ~350mV, 70uA (again, with a loud radio near the mike). This is much larger than before, but it still seems small to me. Should I be getting an audible response? Is it actually necessary to amplify the signal again? AI: If the signal measured directly from the microphone is about 15mV and the measured at the output of the amplifier is about 350mV, then the good news is that you circuit actually works. Its gain is 350mV/15mV = 23, not bad! Another good thing about your circuit is that you really need a simple amplifier to amplify the tiny microphone signal to something usable for a regular power amplifier. You are definitely on the right track. The bad news however is that the speaker you are using is by far too heavy load for such a simple circuit. The amp just can't drive enough power into it and hence it will sound so softly that you will not hear it. Try a pair of headphones instead, you probably have some more luck for several reasons: higher impedance, many headphones have 32 ohm or higher impedance. This is already easier to drive, but probably still a bit low. If you connect the two outer most pins of the headphone socket, both of its little speakers will be in series, resulting in both being driven and load halved. higher efficiency, less power required to make some sound; closer to your ear, so less power required to hear the sound. What you need to drive your speaker is power amplifier. The easiest for you to verify your microphone preamp is to test with a pair of active PC amplifiers, the kind with a power amplifier in them. You can try connecting the microphone directly and through your preamp and you should notice a huge difference. Internet is full of simple little power amplifier designs, even with discrete components, that are great as beginner's projects.
H: Microcontrollers with extreme high temperature range I am looking for components which works at high temperature. Especially I am looking for microcontrollers which works at 180 °C to 200 °C. I need to found microcontroller which works fine at extreme conditions. If the microcontroller have built in CAN interface then it would be really nice? or any other methods and microcontrollers that i can use for my project. The purpose microcontrollers is to get information from different sensors and perform some calibration. I found one microcontroller from TEXAS which is SM320F28335-HT but the cost of that microcontroller is very expensive. Is there any microcontroller with low cost and works at high temperature. AI: When doing down-hole stuff for oil and gas - my guess is the cost of a chip is not going to make any difference on the economics of your whole project. You may be spending more money on time wasted looking to save even $100 in parts. Say you cost $100 per hour (salaries + overhead). Not unreasonable if you are a good engineer. Say you save $100 by spending 20 hours searching for a cheaper part. That's amazingly good savings on a single microcontroller. Say you build 100 units per year. That's a lot of units in that industry, even though you may destroy one in every job you do. Your added engineering cost is 20 x $100 = $2000. Your saved production cost is 100 x $100 = $10000 per year. Looks like a great deal, but if your project is valuable to customers. In that industry that means a lot of money. Say $100.000 per job. And say you can do 100 jobs per year. That's $10M per year. Now those 20 hours you finished late because you wasted time searching for a cheaper part ends up costing your company 20/(8 x 200) x $10M = $125.000 (if and if and if... I, know - but you get the idea). My short answer: Stop searching when you have found something that works well. Unless you are making 1K-10K units per year or more... Build it and start making money instead of blindly focusing on BOM cost.
H: Is there any possibility of dissecting a microchip to get data from its internal memory? There are many devices that perform various cryptographic operations inside their microchips. One of their key feature is that the secret keys are stored inside of the hardware and never leave it. Since it is possible to reverse engineer a chip, I am wondering if it is also possible to get at the chip's internal memory as well to steal the data stored in it? AI: In general yes that is possible. For example a guy called Christopher Tarnovsky managed to tap the inner data paths of a Trusted Platform Module. He used acid to remove the encapsulation, rust remover to get rid of some mesh and then managed to probe the circuit and intercept internal communications. Obviously on such a small scale it is a non-trivial excercise, but there is no theoretical reason I'm aware of why you couldn't disconnect the address and data bus of an on-chip ROM for example and read back the contents once you have physical access to it.
H: Signal bus in Kicad I would like to know how does one design a signal bus in schematic in KiCad. I only worked in Eagle before and I cannot figure it out. E.g. - I have 5 digital signals going to another part of circuit and I want to connected them all to some other part without necessity to route them one by one. How can I do it? AI: As far as my understanding goes, you don't truly need a bus, to logically connect the signals at two (or more) locations. When two pieces of wire have the same label, they are considered part of the same net, even if there's no wire drawn between them. The bus is more of a visual thing, to guide the reader through the schematic. Here's how to quickly place one: Say you start with all five signals located on the right-hand side of an IC, on five neighboring pins Draw a short piece of horizontal wire, going out of the topmost pin Tap the 'Insert' key four times - KiCAD should draw the wires for the other four pins (*) Add a net-name (local label), so that it attaches to the topmost wire. Let's call it SIG1. Tap 'Insert' to get SIG2 ~ SIG5 on the other four wires Add "wire to bus entry" for each of the pins - these are the wires drawn at 45 degrees angle Place a vertical bus, to "connect" all the wire-to-bus segments. This bus can now be routed to other parts of the schematic (*) The exact behavior of 'Insert' is configured by the three "Repeat draw/label" settings in the "Preferences" -> "Options" dialog There's also an "interf_u.sch" schematic which you can check out, it's part of the KiCAD example files
H: Long Range RF communication After playing with Arduino and different kind of sensors for my garden, now I'm starting a new project for my free time. I want to work with RF communications because I need a long range device for my application, about 2 Km distance. The idea is to make only an identification of which unit is, as a long range RFID but without RFID. I mean some devices/units are placed somewhere, and after a time, someone could move them to another place, so I want to know where they are, only reading information send by them via RF. I don't mind their real position (GPS) because I going to be able to see them where they are from my top window. I only want to know which of them are. I'm reading about 315/434 MHz, but it seems not be able to get this distance without a high power consumption. What about a lower frequency (150 MHz)? It is above the license frequency band for AM/FM radios. I live in a village - I have a lot of terrain to play with my experiments and a line of sight over 2 Km. EDIT: The @Hoppo idea is just what I'm trying to do. Also it lets me to get "energy harvesting" because the idea is transmitters go with a small battery. Also the transmitters have to be small enough and without antennas for not disturbing and avoid dogs play with them. In receiver side, it doesn't matter if I need a larger antenna or more power. It will go connected directly to a PC or power source. Moreover as @Hoppo says, I only want to send a 'ping', a message with an identifier and maybe battery level, so data rates could be lower than 9600bps. AI: If you are able to see the devices, then we can only assume line of sight, 2km distance 433Mhz (70cm) should be fine with quite a low power solution. If you can't see them then that drastically reduces the transmit range at 70cm without increasing power consumption. As with all radio communication it can be power hungry. I have created similar projects with the arduino using a radiometrix NTX2 transmitter at 434.650Mhz. My solution to save power was to turn the transmitter on, send a location 'ping' and then turn off the transmitter again rather than constantly transmitting. Easily done with an arduino.
H: Use old PC power supply for 24v solenoids? I'd like to use the +12 and -12 leads from an old PC power supply to power 24v irrigation solenoid valves. The values are rated 0.22A inrush current and 0.1A holding current. I only plan on 1 or 2 solenoids being energized at a time. I can arrange for them not to be initially energized at the same time. I see from some wikedpedia info on PC power supplies that the -12 is only rated for "minimal" current. But what is a typical -12 max current value for some random old PC supply? Q: Would a 1A max load be a problem? Bonus Qs: Any problem using the +12 and -12 leads for 24 V potential? I'll be controlling the solenoids through a relay. For the solenoid loads, should I use diodes across the solenoids? AI: Here is a random 350W power supply (http://intrl.startech.com/Computer-Parts/PSUs/Dell/350-Watt-ATX12V-201-Replacement-Power-Supply-for-Dell-PC~ATXPW350DELL). It can provide 0.8A on the -12V rail. The answer for your specific power supply will depend on the power rating - try to find the datasheet or look for stickers on the back. My guess is it will struggle with 1A. Why do you need the 1A? 2 solenoids x 0.22A inrush makes me think you need about 0.5A at worst case scenario? Bonus Qs: There is no problem using a -12 and +12 to get a 24V potential. Is there anything else on that line (especially semiconductors?) It is good practice to put catch diodes on the relays and solenoids to avoid large voltage swings but if there is nothing sensitive on the line you can do without them.
H: Can leaving rechargeable batteries in the unplugged charger for a few weeks cause batteries to lose their charge? Is it okay to leave rechargeable batteries in charger even if it's not plugged in? AI: Depending on the charger you won't know until you examine it, but generally I would say yes, it hurts your battery. It doesn't take too much current (a few mA) depending on battery, to cause permanent damage after a few months.
H: transistor loop to limit the current I am trying to implement the DALI TX/RX circuit below. The description says: The other transistor (T2) is controlled by the current flowing through the resistor (R1). If a DALI slave unit is connected, this current will be the same as that flowing through the power transistor. The value of the resistor is chosen in such a way that when the current exceeds 250 mA the voltage level across the resistor will open the transistor (T2) which in its turn closes the power transistor (T1). In this way the current is maximized to 250 mA. The designed circuit is here below, the relative part is in the red rectangular box. Could anyone explain me how does the resistor R1 (in the first picture) value 2.7 ohm opens the transistor when the current exceeds 250mA? On that design, the signal is transmitted as 12V (logic high) and 0V (logic low). Here below is the circuit lab drawing in case it is needed. simulate this circuit – Schematic created using CircuitLab V2 is a pwm that gets 5V and 0V values. datasheet of T2 and T3 transistor (BC337) datasheet of T1 transistor (BD135) AI: BC337 is a silicon transistor. Silicon PN junction starts conducting between 0.6V and 0.7 volts applied to it with P terminal being more positive than N. In your circuit, when current in 2.7ohm resistor reaches 250ma, it causes 0.675 volts across it turning on BE junction of transistor T2.
H: Triangulate with Ping Is it hypothetically possible to triangulate the location within any accuracy of a server at an unknown location by using ping times? 9 computers with location known log on to a multiplayer server. The 10th player (unknown location) arrives. Can the pings to that machine acts as radii of circles on a map and a bunch of circle intersection math take place to narrow the location of the 10th user? I am guessing it would depend on the correlation between ping and distance from a machine (since packets probably go through so many different routers before reaching location), but could a method like this pinpoint with more accuracy than just doing a lookup of the machine's ISP? AI: The answer is YES, but with a lot of caveats. Let me re-phrase the question into a more useful form: Using only Ethernet packets, on an Ethernet network, can you determine the physical cable length from one device to another? There is a standard called the Precision Time Protocol (PTP), which is used to synchronize clocks of devices on a network. The basic protocol can achieve sub-microsecond accuracy, but there are ways to get accuracy down to 10's of nanoseconds. Part of this protocol requires hardware-based timestamping of Ethernet packets in order to measure and calculate the "time of flight" of a packet across an Ethernet cable. This time of flight measurement is then used to adjust for any clock skew across the network. In our case, we only care about the time of flight. While this does work across Ethernet switches and routers, to get an accurate time of flight the switch needs to support PTP and be involved in the measurements. PTP does support the involvement of the switches and routers. Because PTP uses Multicast packets, it won't work over the Internet. More and more Ethernet controllers support PTP (even some PC motherboards support it), although switch and router support is lagging by quite a bit. In theory, PTP can do this. In practice, I don't know if you can extract the time of flight data from this clock syncing protocol-- but the data is there. It might require some somewhat custom implementations of PTP, and definately requires switches/routers that are rare or not quite on the market yet. I am also massively generalizing PTP. I know the hardware side of PTP, but there is a lot of software that I don't know completely. Another alternative to PTP is to use Ethernet Phy's that can measure the length of the cable. It turns out that many Gigabit Ethernet Phy's can do this now, but those features are rarely exposed past the device driver level. The Phy's do this by using time-domain reflectometry, and can also measure the distance to the break in a faulty cable. The main problem with any of this is that it measures cable length, not physical position. If the cables were measured accurately, and they were stretched in a straight line, then that could determine physical location. But that never happens. It also requires that the network infrastructure is under your control, which it is probably not. Of course, what I describe is nothing like using Ping times across the internet to get a physical location. I agree with others that this is not going to be very useful, and probably won't get you anything more accurate than what Continent you're on (if that).
H: Why is it desirable in an amplifier to have high input impedance and low output impedance? I've learned that it's desirable in an ideal amplifier to have high input impedance and low output impedance. Why exactly? What are the implications an amplifier has the opposite- low input impedance and high output impedance. I don't exactly understand how impedance input and output. AI: Actually, the premise of your question is only true if the signals you are interested in are voltages. In that case, if the amplifier draws no current through its input (has infinite, or at least very high input impedance), then connecting it to a source won't affect the signal voltage, regardless of what the source impedance is. Similarly, when you connect a load to the output of your amplifier, if the amplifier has zero output impedance, the signal voltage won't change, regardless of the current drawn by the load. These properties make it much easier to analyze the behavior of the system overall. However, if the signals you're interested in are currents rather than voltages, you want your amplifier to have zero input impedance and infinite output impedance for the same reasons.
H: GEDA - cannot edit attributes I'm trying to design a circuit in GEDA/Gschem in Ubuntu. I could insert new components in the circuit but I cannot in the name change or add values. For instance when opening the window for attributes of a resistor, I cannot see 'value' on the list. I tried to add 'value' but the field for adding the actual numeric value is not a textfield and cannot enter anything. When I click on Add, I always get this message: The input attribute "netname=" is invalid Please correct in order to continue The name and value must be non-empty. The name cannot end with a space. The value cannot start with a space. Utterly confusing. Any ideas what am I doing wrong? AI: It sounds like you are not managing to select anything other than the default attribute name. Click the dropdown arrow for the "Name" field where it defaults to 'netname' and select 'value' from the list. Then enter your value in the large "value" text area. Then select the visible button and choose name and value or not as you need for this attribute (value is normally visible and "Show Value Only"). Then click Add and it should put the new element in the list for you. If it doesn't look anything like the following image (also from Ubuntu) then your installation likely is broken in some manner.
H: What is the difference between an alternator and a generator? What is the difference between an alternator and a generator ? AI: Realistically, not a lot. An electrical generator is any electro-mechanical device that converts mechanical energy (typically a spinning shaft) into electrical energy (a current). This is the exact opposite of the operation of an electric motor which converts a current (electrical energy) into mechanical energy. As such, some motors can also function as generators if the shaft is externally driven. Generator is an umbrella term; there are various types of generators, but the only ones pertinent to your question are a dynamo and an alternator. A dynamo is a common generator used on bicycles to power lights, but it has been used for many other purposes as well. It incorporates a "commutator" which periodically switches the direction of the current flow from the rotor to the external circuitry to generate DC power. If the commutator is removed, a dynamo is essentially an alternator producing AC power. The frequency of the resulting signal is determined by the windings of the generator and the rotational speed of the internal rotor. Technically, any generator that produces AC power is an alternator, but usually only the smaller AC generators driven by internal combustion engines (such as the one in a car) are known as such.
H: Confusion over SMPS controllers/regulators I am looking at datasheets for ICs like FAN4800 or NCP1337. Some of these are PFC boost converters and others are for other types of SMPS topologies. My confusion is that I can't tell if these ICs are actually supposed to be regulating the output voltage. There is never any mention of PID or compensation techniques to use with these ICs. I am hoping that its all included internally, but I see no hints of a PID system when I look at the internal block diagrams of these parts. Is this correct to assume or do I need to design an external compensation circuit? AI: Most controllers require you to implement external loop compensation. This makes sense, since most controllers can be used with a large number of topologies, and a near-infinite number of input power/output power combinations. Consider the FAN4800 that you mentioned: On the PFC side, \$V_{FB}\$ is the voltage feedback input, and you can see its external compensation on the \$V_{EAO}\$ pin. Also, \$I_{SENSE}\$ is the current feedback input, and you can see its external compensation between \$V_{REF}\$ and \$I_{EAO}\$. On the PWM side, \$V_{DC}\$ is the voltage feedback, and the compensation is on the secondary side around the TL431A 'error amplifier'. There are some rudimentary controllers out there with internal compensation, but you end up extremely limited in terms of powertrain (i.e. fixed frequency buck converters with a specific range of inductor and capacitor values that you are permitted to use.)
H: Transfer Function Of Multiple Feedback Filter Can someone please give me tips on how I could prove that the transfer function of the multiple feedback filter below is \$ T(s) = \dfrac{ -\dfrac{1}{R_1 R_2 C_1 C_2 } } {s^2 + s\dfrac{1}{C_1} \left( \dfrac{1}{R_1} + \dfrac{1}{R_2} + \dfrac{1}{R_3} \right) + \dfrac{1}{R_2 R_3 C_1 C_2} } \$ I just can't figure out a way of getting an expression for \$ T(s) = \dfrac{V_{out}(s)}{V_{in}(s)} \$ AI: You must use the basics of your ideal opamp assumptions and derive the KVL and KCL equations for Vout/Vin. If you recall ideal opamp assumption "1", the inverting terminal voltage is equal to the non-inverting terminal voltage, and so that node, where R2 and C2 connect, is at ground (they call it "virtual" since its actually the opamp forcing this node to ground with its infinite open loop gain in negative feedback). If you recall ideal opamp assumption "2", the inverting/non-inverting terminals have infinite input impedance, and so any current going through R2 is going into C2 since it can't go into the opamp terminal. From there, you have enough givens to find the unknowns. To set up some of the equations: First, assign the impedance of C1 and C2 as Z1 and Z2 to make the algebra easier, where \$ Z_1 = \dfrac{1}{sC1} \$ and \$ Z_2 = \dfrac{1}{sC2} \$. We use Ohm's law: \$ i_{C2} = \dfrac{V_{out}-0}{Z_2} \$ (\$ i_{C2} \$ is shorthand for the current through C2, and I use this shorthand in the following steps). With the ideal opamp assumption "2", we can say \$ i_{C2} = i_{R2}\$. Now we can ask what is iR2? We already know it is equal to iC2, but our strategy is to link an expression for \$V_{out}\$ to an expression for \$V_{in}\$. An equivalent expression that we could find is that \$i_{R2}\$ is the voltage across R2 divided by R2. We know that the voltage across R2 is the difference of whatever the node voltage of where R1, R2, R3, C1 meet, call it \$V_f\$, and ground. So \$i_{R2} = \dfrac{0-V_f}{R2} \$. We don't actually know what \$V_f\$ is yet, and it is just a place holder for whatever that voltage could be. Now we can equate: \$i_{R2} = i_{C2} = \dfrac{-V_f}{R2} = \dfrac {V_{out}}{Z2} \$ so rearrange \$ V_f = \dfrac{-V_{out} \cdot R2}{Z2} \$ (notice this looks like the expression for Vout/Vin for a simple inverting feedback opamp with gain -Rf/Rin) We now have linked \$V_{out}\$ to \$V_f\$, and so we must make another link from \$V_f\$ to \$V_{in}\$ from where we can make use of algebraic substitutions to directly link \$V_{in}\$ to \$V_{out}\$. To do this, we can use a final "super" KCL equation if we recognize that the current out of \$V_f\$ is equal to the feedback currents (\$i_{C2}\$, and \$i_{R3}\$) going into \$V_f\$. We don't really care what direction the currents are going relative to \$V_f\$, so long as their signs are consistent relative to each other for the KCL equation. So, the super KCL at that node: \$ \dfrac{(V_{out}-V_f)}{R3} + \dfrac{V_{out}}{Z2} = \dfrac{V_f-V_{in})}{R1} + \dfrac{V_f}{Z1} \$ At this point, you should be able to solve \$ \frac{V_{out}}{V_{in}}\$ for this equation by plugging in the previously derived term for \$V_f = \frac{-V_{out} \cdot R2}{Z2} \$. Then plug in your Z1 and Z2 terms with the capacitor's complex imedances. There are probably short cuts or better ways to solve this. This solution is quite acceptable even though it may be more mechanical than someone with experience would use.
H: Does a capacitor in an inverting op-amp make a difference? Just a quick question, does a capacitor in an inverting op-amp make a difference to the transfer function? Or, are just the resistors taken into consideration? Non-Inverting op-amp: \$ \dfrac{R1 + R2}{R1} \cdot V_{in} \$ simulate this circuit – Schematic created using CircuitLab Inverting op-Amp: \$ - \dfrac{R2}{R1} \cdot V_{in} \$ simulate this circuit In both of the above equations, capacitance is not a factor, yet in a number of circuits, capacitors are present as voltage regulators. AI: The gains of the two op-amp circuits you refer to are DC gains and, in simple circuit configurations apply across a range of frequencies up to a certain "limit". The "limit" is usually (but not exclusively) the point where the op-amp can no longer sustain the desired gain and this may be due to parasitic capacitance on the circuit board, intentionally placed caps or internal capacitors within the op-amp. This means the formula for the op-amp's gain is modified by a capacitor across R2 - this is an approximation but gives reasonable results. There are other places caps have an effect but normally, it's the feedback components that are generally affected first. So, more realistically, any op-amp gain formula of the type you mentioned only holds true for DC and low/medium frequencies and if you were to be more accurate, the formulas would include effects of capacitance and, "normally" with op-amps this is the addition of a capacitor across R2. At certain "higher" frequencies this capacitance will have the same magnitude of impedance as R2 and this is often referred to as the 3dB point of the circuit - this is the point at which the amplifier's gain falls to about 70% of what it was at much lower frequencies. Capacitors are also commonly placed in series with R1 in order to minimize low frequency or DC effects. In this situation there is another 3dB point at a low frequency and that is when the impedance of the cap is the same magnitude as R1. As frequency lowers the cap becomes dominant and reduces the gain even more until at DC the op-amp has no gain. The above diagrams are for inverting op-amp configurations. Caps used intentionally in the described situations give the op-amp circuit the ability to pass a range of frequencies whilst attenuating others above and below the range - they are called band-pass circuits. If there is no cap in series with R1 but there is a cap in parallel with R2 this is a low-pass filter.
H: Would a capacitor labeled 470K be 47pf or 470pf I have a cap labeled 470K. I would have thought for sure that it would be 47pf until I saw this link where it said if a capacitor has a 0 as the last digit, it is the whole thing in nano-farads. How can I figure out this without a capacitance meter. 470K 100V C is the whole label if that helps. AI: If you have a 471 capacitor of the same type, then clearly a 470 capacitor is not 470pF. If you have a 47 capacitor of the same type, then clearly 470 capacitors are not 47pF. You can make the same judgements if you have capacitors of the same type marked xx1 or xx For example 331 (330pF) and 33 (33pF). You can compare the physical size of the capacitor to a 472 and a 479 of the same type. You can connect it to a resistor, and observe the decay curve with an oscilloscope. You can download the spec sheet for the capacitor, or for the manufacturer, and read what the marking convention is. You can connect it to a linear regulator that requires 470pF load, and see if it oscilates You can buy a 47pF capacitor of the same type, and see what how it is labeled. OR You can assume that it is a 47pF capacitor. If it's a K labeled capacitor, the chances that anyone would label a 471 as 470 are small. 470 10% on a small can might be 470pF, but 470K is 47pF.
H: USB charging and powering circuit with MAX1555 and MAX1881 I'm new to (rechargeable) battery powered devices, but I found the following article about using the MAX1555 and MAX1881 for building a charging (via USB) and powering (µC-circuit, 3.3V, max. ~70mA) circuit. They describe the following diagram: The MAX1555 seems to fitting very well for my application. It is cheap, compact and easy to use. But the MAX1881 looks uneconomical for my application. It has a lot of functions, it is rather large and the datasheet describes another usage area for this IC. Its particular advantage seems to be reverse battery protection. Does anybody has experience with the MAX1881 or does anybody know a good alternative? AI: The MAX 8881 EUT33 is a LDO in the first place. Note that the battery voltage maximum is 4.2 Volts when charging - which is too high for many 3.3 V circuits - so you need a voltage regulator in most cases anyway. The part is SOT23-6 and $0.86 @ 1k (from Maxims website), so both small and cheap.
H: Peak voltage rating means voltage drop? This LDR is said to have Peak voltage rating of 400V in the description. Does this equal the voltage drop, meaning that I need to supply at least 400V or is it the maximum voltage value? AI: 400 V seems a stretch for that. The LDR is claimed to be able to dissipate 400 mW, which is plausible enough. To dissipate 400 mW at 400 V would mean the resistance is 400 kΩ, which is also possible for a CdS cell like the one shown. However, whether it can really withstand 400 V without breakdown is another matter. Since the price seems high and there doesn't seem to be a datasheet, I'd move along and forget about this one. What the 400 V rating is saying (whether it is correct or not is another issue), is that this is the maximum voltage you can ever put accross this device. That does not mean you have to, and in any normal light sensing circuit you would put much much less than that accross it. This device will operate fine (vary it's resistance as a function of light) at any voltage down to 0. You can use this in a 3 V battery-operated circuit, for example.
H: Sizing MOSFET gate resistor I have an N-MOSFET gate connected to a 4043 logic. Id is about 100 mA. Both the 4043 and MOSFET have +5 V. I plan to use a 2N7000. How large a gate resistor do I need between the 4043 and MOSFET? The logic output is sometimes switched rapidly. How fast? A motherboard HDD LED controls it. Do I need to place pull down resistor from logic to 0 V, between the 4043 and the MOSFET? AI: It is generally a good idea to include a gate resistor to avoid ringing. Ringing (parasitic oscillation) is caused by the gate capacitance in series with the connecting wire's inductance and can cause the transistor to dissipate excessive power because it doesn't turn on quickly enough and hence the current through drain/source in combination with the somewhat high'ish drain-source impedance will heat the device up. A low ohm resistor will solve (dampen) the ringing. As @PhilFrost mentiones, a high value resistor to ground is a good idea to avoid capacitive coupling driving the transistor when it is otherwise not connected. simulate this circuit – Schematic created using CircuitLab At all times keep the wiring between logic output, transistor gate, transistor source and ground as short as possible. This will ensure fast turn on/off.
H: Op-amp input stage for Arduino Due ADC - guitar signal I am trying to design an op-amp input stage to capture a guitar through an ADC, specifically the ADC on an Arduino Due (3.3V, 12 bit). I am aware there are numerous ways to configure and bias the op-amps. I have designed a simple circuit based on a inverting amp followed by an active LP filter. The system will be running off a 9V battery and the power will be provided to the op-amps and uC (regulated) from this. The aim being: Bias the signal around Vdd/2 (mid of ADC input range) Amplify the signal to use best of the ADC's range Lowpass filter the input signal at Nyquist rate (fs/2) to avoid aliasing However, I have been unable to find much information on what the benefits or drawbacks of different configurations and methods of biasing are, specifically for this kind of signal. I have not yet measured the voltage output of my guitar so the specifics of the required gain properties are not known yet! Aslo, will I require a high input impedance for a guitar? Any advice or comments would be greatly appreciated. simulate this circuit – Schematic created using CircuitLab AI: Generally a guitar amp would have about 100k (or greater) input impedance - this is because the tone controls and volume controls are about that sort of range. Yours has 10k input impedance. I'd make R8 100kohm and R7 1Mohm Your 2nd stage is not needed - it has unity gain for the relevant frequencies and your filter cap might just as easily be placed across R7 but obviously 100x lower in value because R7 is 100x bigger than R10. But having said R7 needs to be 1Mohm (above) the cap needs to be 1000x lower like 15pF. I'd also use an input jack socket with an earth switch integral then you can disconnect the battery when not plugged in.
H: Doing FFT of electroencephalogram signal at 200Hz - what window size to use? I got a brainwave EEG(ElectroEncephaloGram) sensor that is continuously sending data over to my program at about 200 data points per second. Can someone suggest what window/bin size I should be using if I want to do a Fast Fourier Transform(FFT) of this signal? I'm thinking of using the maximum - 1024 points, but that would mean that I need almost 5 seconds of data to update the readings. Is there some smaller size I can use for faster updates that would still be accurate? Here's how my signal looks like (orange line, top): Thank you! AI: It depends on the tradeoff you want between frequency and time resolution. The shorter you make your time window, the better you'll be able to tell when changes occur, but you'll pay for it in reduced frequency resolution. Longer windows give sharp frequency resolution, but poor time resolution. Cf. "Gabor Limit" Keep in mind that the limits for the EEG frequency bands are a bit fuzzy. It's not like content at 3.9 Hz means something completely different than 4.1 Hz from a biological standpoint. 1 second windows provide plenty of frequency accuracy, and I've seen cool things done with windows shorter than 1/4 second. We are measuring a brain after all, not a crystal oscillator.
H: ratiometric ADC, is it feasible to separate reference voltage and excitation voltage by an amplifier I have a variety of bridge transducers (pressure, strain gage) with sensitivity of 1mV/V. Also, most 24-bit ADCs and analog frontend chips have a PGA with programmable gain between 1-128. This means that at the highest gain setting, the maximum output is only 12% of full-range. In other words, the ENOB of the ADC reading is decreased by 3 just as a result of insufficient gain. Recently I noticed that some ADCs allow a reference voltage significantly less than the excitation voltage of my sensors. Is it feasible to, for example, reduce the reference voltage and then use a non-inverting op-amp with 4x gain to supply the transducer excitation voltage? As far as I can tell, I will still have all the benefits of the ratiometric connection, with only slight degradation in noise performance (due to the ADC performance with reduced Vref... the closed-loop output resistance of the op-amp and its input voltage and current offsets appear to be negligible in this scenario) in terms of noise bits -- but the increased resolution more than compensates for the increase in noisy bits. As a bonus, this can separate the excitation voltage for each channel, so that e.g. a short circuit in one transducer won't interfere with excitation of the others. I believe I can get very good gain accuracy by using a chip bussed resistor for the feedback -- this way the feedback resistors will be exceptionally well matched to each other and also be thermally-linked, so the feedback won't vary with temperature either. If this works, any ideas why this arrangement doesn't commonly appear in example circuits? Diagrams modified from http://www.ti.com/lit/ml/slyp163/slyp163.pdf The "usual" circuit: Proposed circuit: Where the amplifier block looks like (pay no attention to the op-amp model number, it's what CircuitLab supports) simulate this circuit – Schematic created using CircuitLab AI: It certainly looks feasible, but first make sure you NEED to do it. The 24 bit ADC gives you an awful lot of dynamic range that you don't need, and plenty of bits to spare. You often use them to sample small signals without worrying about preamplification. So, work out your noise budget, figure out how many bits you need, and do what you need to get them. Try to remember that an engineer who consistently exceeds specs instead of meeting them is wasting time and money.
H: What the name of this connector? I've spent a load of time looking for the answer to this question, but I cannot find it. What is the official name of this connector? AI: It's a female crimp terminal (sometimes called an open barrel or u-barrel crimp connector). More specifically, since it has the plastic housing, it's called a PCB female crimp terminal. Seems like that information was available from where you apparently got the image on ebay If the case was that you happened across this image out of context, I recommend images.google.com. Google lets you search by image, basically you can bypass the 1000 words by just uploading the image.
H: What is the meaning of "Register.Rd"? Reading Hennessy's book "Computer Organization and Design" it is mentioned "Register.Rd" and "Register.Rs" but what does it mean? The .Rd, .Rt and .Rs parts I can't understand, on page 365: AI: They are just generic ways of referring to cpu registers: Rd is usually denotes a destination register. Rs, Rt usually denote source registers. For example, a cpu instruction could be: add Rs,Rt,Rd Which would mean: Rd = Rs+Rt The Rd,Rs,Rt are placeholders for the actual registers used in this instruction. A specific example for this instruction could be: add $1,$2,$3 Which would mean "write the sum of specific cpu registers $1 and $2 into $3".
H: Wireless transmission of energy through a layer of non-conductive material Is it possible to effectively transmit energy by electromagnetical induction? I have a plate of nonconductive material (5-10 mm) and I would like to transfer electrical energy from circuit on one side to circuit on the another side without drilling into the material. I have been thinking about attaching coils (similar as coils in RFID tags) to each side and let the electromagnetical induction do the work. The first circuit has alternating voltage up to 70V and the another circuit should have very similar voltage. But I have no idea about how big the coils need to be, how big current should pass through the first circuit and whether it is reasonable to use it anyway. AI: To transmit power across a gap you can do it by transformer action but the efficiency will be low because the magnetic field from the power coil doesn't 100% couple to the receive coil. Depending on the gap the coupling may be only (say) 10% and this means you have to use a lot of brute force to get the power you need on the receive coil. A significant improvement on this is to use tuned coils operating at resonant frequency. I'm going to describe one I was involved with last year - it didn't achieve anything more than 10% power coupling but, the constraints on the application were enormous - this is why I'm using it as an example - if you can avoid these constraints (described below) then you should get easily better than 50% power efficiency. It needed to transfer power to the end of a 500MW Power generator's turbine rotor and the shafts are quite large. In effect the receive coil was about 1.5 metres diameter: - The red circular line is the coil sitting in a raised insulated groove above the metal of the rotor. The metal was expected to give poor coupling but at the frequency used, it wasn't too bad at sucking the power away (maybe 20% loss). The coil was a single turn of 1.6mm Cu. The stator coil coupled to about 30º of the circumference i.e. it wasn't a full turn of 1.5m diameter. It was a 4 turn coil. Each of the 4 turns used 3 litz wires of diameter 1mm with 250 strands in each litz wire, 750 strands in total. With a full circular coil, power-coupling would be better; probably something like double. The coil-gap was about 40mm and, despite all the constraints, the arrangement could easily produce 50VRMS on the tuned rotor coil. The power needed on the rotor was about 2W maximum. Smaller gaps are going to be more effective. The stator coil had two tuning capacitors, one in parallel and one to bring the 600kHz AC feed in. The feed-in voltage was about 30VRMS but due to the tuning it was generating about 100VRMS across the coil. Better litz wire would improve the voltage and reduce the power losses - the coil rose about 5 to 10ºC when operating under ambient conditions. This design was also constrained with a small diameter 600kHz input power-feed cable (about 3mm for screened twisted pair) and the cable was about 10 metres long - having the 600kHz generator up close to the power coil is the way to get more efficiency in power-coupling. Also, the efficiency wasn't that great because of the 40mm gap and the need to run at temperatures approaching 100ºC. Summary - yes, you can transmit power magnetically across a gap and having a full loop on both the primary and secondary will couple much better than the fractional coupling described above. Having a smaller gap also couples much better. The receive loop described above had a single turn because it was also coupling data back out from the turbine mounted electronics - more turns on this winding would help - try and match the input coil profile and turns with the receive profile and turns. Use of ferrite material was impractical on this particular job but they would help.
H: how to represent a bridge in eagle pcb schematics? i'm trying to show that points 7,8,10,11 are connected to ground and point 9 is connected to R18 resistor. but the visuals is misleading. how to create that "jump" (sorry i don't know the correct lingo for that operation, please edit if you know, thankyou) AI: Eagle wants you to put junction points where two lines connect each other. Otherwise gives a warning in ERC (Electrical Rule Check). I suggest you this notation; This way Eagle becomes sure, if it's a connection or just a different net passing over. To put junction points you can use 'Junction' from toolbar. But if you draw your nets with 'Net' tool rather than 'Wire' tool junctions will be automatically put.
H: Can a linear regulator in shutdown mode have the output in parallel with a switching regulator I am trying to design an efficient battery powered circuit using a 3.3V microcontroller (NXP LPC1343). One of the requirements is that the microcontroller periodically read a value from an ADC and based on this, power up the rest of the system to perform some operations. The total power of the system is around 400mA, and the battery is a single cell lithium-ion rated for 850mAh. Therefore, it is desirable to use a switching power supply for maximum efficiency (TI TPS63061). The software on the micro can be configured to power down the core, leaving only a WDT, which periodically wakes up the rest of the micro to perform the ADC read (while leaving the rest of the system powered down). However, the standby current for the micro is very low, on the order of uA, which from my understanding is too low for the switching regulator to operate (although I could not find a minimum load spec in the datasheet). Also, the input quiescent current for the TPS63061 is up to 60uA, which is much higher than my micro in sleep mode (~2uA), so in either case it is undesirable to leave the switcher powered on. Therefore, my idea is to have a linear low-dropout regulator provide standby power for micro. The micro can then power up the switching regulator once it decides that the rest of the system needs to be powered up. My question is how to handle this switch-over phase. The LDOs which I looked at have reverse current protection and may be put into standby/shutdown mode. Is this sufficient to not destroy the LDO when the switcher starts working? AI: Here is a low power LDO voltage regulator (TPS79733) that consumes less than 2uA quiescent current whilst delivering up to 10mA to keep your MCU ticking over when it's asleep. It has a fixed output of 3.3V and I think the clincher would be to arrange for your TPS63061 switcher to generate maybe 50mV more output (3.35V) so that when it gets activated, it sources all the higher current when you are taking 400mA. In effect the LDO would not source any current because it would see an output voltage across its terminals that forces it to "open circuit" its pass-transistor. Thus you don't need to enable/disable the LDO regulator. My question is how to handle this switch-over phase. The LDOs which I looked at have reverse current protection and may be put into standby/shutdown mode. Is this sufficient to not destroy the LDO when the switcher starts working? Handling the switch-over phase - enable the switcher when the MCU powers up Standby/shutdown for LDO protecting the LDO - the LDO will always be enabled.
H: Why Characteristic Impedance must be 50 ohms? Where does this number come from? For single ended it must be 50 ohm and for differential pairs 100 ohm. Why? For PCB with controlled-impedance these are that common numbers. Outside of the PCB you can find others numbers for characteristic impedance. But what is the reason of use these numbers for the PCB tracks? AI: The 50Ω standard is basically just convention. There are various stories about how 50Ω came to be chosen. The article Anindo linked is good. There is also The History of 50 Ω or There’s Nothing Magic About 50 Ohms. But the long and short of it is that it is a compromise between low attenuation and power handling. But it became the standard impedance when designing for transmission line applications way back when. When an IC datasheet says you need to design your PCB traces with a controlled impedance, then you're designing to compensate for transmission line effects. If the impedance of the trace is matched to the output impedance of the IC or source, you reduce the possibility of reflections which would lead to standing waves on the trace and cause all sorts of headaches. Since the designers of the IC are designing with transmission line effects in mind, and since 50Ω is commonly used by convention, the 50Ω standard proliferates. But 50Ω is by no means special. From this paper on controlled solutions by Advanced Layout Solutions: Within reason, the absolute impedance value chosen is not normally important, providing it is controlled along the entire length of the line. Other constraints in a design often dictate the impedance for us; it may be chosen based on a design specification (e.g. 65 Ohms for PCI) or chosen to reduce current (a high impedance). It will generally be between 45 and 80 Ohms due to typical material geometries, and if the signal changes layer then the trace geometry should be adjusted as necessary to maintain a consistent Zo.
H: Why does grounding my switch cause the fuse to blow? I'm working on restoring an old ATV, and I'm having a bit of trouble with the wiring. When I got the ATV it was missing the ignition switch, so I decided to replace it with this awesome looking switch instead. Which I'm guessing, internally looks something like this... After looking at the wiring diagram, I've figured out how to connect the switch. Click for larger view When I install the switch like this, the ATV powers up. However, when I ground the switch so the LED will light... The fuses blow. If I don't connect the ground and I connect the pink and black wires to the switches Ground terminal, the LED lights but the ATV is not powered up. How can I connect the switch so that it turns the ATV on, and the LED on the switch itself also lights? AI: You need a resistor between the LED pin and ground. Try anywhere from 220 to 1K ohm. The LED, being a type of diode, will allow as much current as it can if directly connected from power to ground. If it blew a fuse, it's possibly blown the LED too... but you may be lucky.
H: Sensor decoupling and noise reduction I have an Arduino UNO board, and I wanted to design a simple 'sensor shield' --since all simple sensors has 3 pins (namely, SIG-5V-GND) and it is convenient to connect bunch of them directly-- and thats where things got ugly. Below you can see my very basic design, As you can imagine, there is 'a-lot' of noise going on right know (with 1 IR range and 3 ultrasonic sensors). I've managed to reduce some of the misreadings on the software side, yet it is clear that I have to make some hardware modifications as well. A lot of people that had similiar problems advise coupling each additional IC with a 100nF cap. My question is; Should I de-couple each line with its own 100nF cap, or is there a neater solution ? Also, these sensors are connected to my arduino with a 15-20cm cable (physical design restrictions). Because of this, should I take extra measures as well ? EDIT: Sensors that I'm using HC-SF04 Ultrasonic Range Finder Sharp IR Range Finder 10 cm AI: Your sensors are actually circuit boards that process the sensor output and give you a easily understood and implemented signals. I have checked, and these boards include their bulk and decoupling capacitors. One thing to improve is the grounding quality. To do that, you have to improve the impedance of the ground tracks. In low frequencies, the ground impedance is dominated by the resistance, however when the frequency goes high, inductance kicks in and dominates the impedance. One way to make the ground impedance low at high frequencies is bypass capacitors that are put very close to the supply pins. Since you already have about 20 cm of wires, you cannot do much for the high frequency on your board. But at least you can isolate the noise from the board as noted below. There are couple of things that come to my mind that will reduce overall noise: Add a bulk capacitor: Put an electrolytic capacitor that has a value of about 10uF to 220uF across GND and +5V. This will give you a cleaner power and room for inrush currents. Since capacitors have relatively low series resistance, they can give higher currents, of course limited with their storage. Also, connecting a 100nF ceramic capacitor with this bulk capacitor will filter out high frequency content and decouple the "sensor shield" from Arduino. Add decoupling capacitors to sensors: Sensors can include digital circuitry which can generate high frequency content, thanks to square waves. You cannot give these sensors low impedance power paths because of the already long wires, however, you can limit the high frequency content coming from these sensors to your board. You can add some 100nF ceramic capacitors in-between Vcc and GND of these sensors and the high frequency content coming from the sensors will be shorted to GND with the help of the capacitors. In other words, you are going to decouple your sensors from your board. Make these capacitors as close as possible to power pins of each sensor. You can sort of use one capacitor in common for very close sensors. Make the ground trace gain weight: When a trace gets ticker, its resistance drops lower. Make the ground trace as thick as you can. Or better, as Andy aka suggested, make a ground fill, or a ground plane, depending on what your CAD software calls it. Also, there is nothing pulling you from making the Vcc trace thicker and lower impedance. One small detail is to twist those long cables so that they are all close to GND cable.
H: What is the reason that Bus resistance is normally small I have seen typical bus resistance as few ohms. For example on MAChX02 1200 ZE board the bus that connects FTDI chip and the FPGA has only around 11 Ohm resistance. Is there any specific reason for keeping bus resistance small? Thanks in advance AI: Unless designed otherwise, logic drivers aren't very strong. The process of transmitting a signal can be modelled as charging a small capacitor (a few pf) on the device to be driven, through the resistance of the bus. The higher the resistance, the slower the rise time on the target. For slow signals you can go up to a few hundred ohms, or insert 100 ohm resistors in a bus if you fear it may be accidentally driven from both ends. 11 ohms seems quite high for a PCB trace.
H: 1-pole and 2-pole DC circuit breaker My question is rather simple, when and why do one use a 1-pole or 2-pole circuit breaker in DC (+24VDC and GND)? AI: In many applications, it is reasonable to assume that under any plausible fault conditions breaking one particular power supply connection will safely interrupt any fault currents. In such applications, a single-pole breaker is appropriate. In some other applications, however, there may exist plausible fault conditions in which either supply connection might by itself be able to supply fault currents. As an example, suppose that many reversible motors are driven by the same relay, and the wires feeding each motor would of a gauge sufficient to handle one motor's current, but insufficient to safely handle the current of the main breaker. Assume further that one of the main supply wires is connected to the frame. The wires for each motor should be protected by an interrupting device whose trip current is low enough that they can't overheat, melt, ignite, etc. but interrupting one wire from each motor would be insufficient to ensure safety if the other wire happens to short to the frame. The solution would be to have a breaker that will disconnect both wires if either wire has an over-current condition.
H: How to connect 4MHZ crystal oscillator to get 16MHZ I've 10 4 MHZ crystal oscillators. I need a 16MHZ clock signal. Can I connect multiple 4MHZ oscillators somehow (serial, parallel) to get 16MHZ? AI: No, connecting them in series or parallel won't get you a higher frequency. What you're looking for is a Phase Locked Loop or PLL. Here's a block diagram: A Voltage Controlled Oscillator (VCO) generates the output frequency. This signal is divided and then compared to the input frequency in the Phase Detector. If the two frequencies aren't the same, the output frequency is adjusted. This is called a feedback loop: you feed the output frequency back to adjust it. The Pre Divider allows you to multiply the input frequency with a floating point number. For example, when you want to multiply by 2.5=5/2, you first divide the input frequency by 2 and then multiply by 5. There are ICs available that have a PLL implemented, like the LM565. On page 10 of the datasheet a typical application circuit for a ×10 multiplier is given: By changing the voltage divider (the external IC) you can make it a ×4 multiplier. Implementing a PLL will cost some effort and space - consider buying a new crystal.
H: Routing the circuit for a snubber diode on a PCB? I understand that the "ideal" place for a snubber diode is across the terminals of the inductive device that generates the flyback. But in the interest of making my PCB design for an Arduino shield as "bulletproof" as possible, I would like to have a suitable diode across the terminal block pins that will be connected to the device on my PCB. My question is, how do I route this? This is my schematic in Eagle. When when I go to the PCB layout, pin 2 of the terminal block (at the right side of the diagram above) gets connected to the ground pours. I think it would be better if it connected to an insulated trace that went first to the anode of the diode, and then joined into the ground plane. Is that correct? Or does it not really make a difference? [My idea is that this would discourage current coming from the strike magnetics from flowing into the ground plane; it should instead flow through the diode and be dissipated by the diode's (minimal) internal resistance.] EDIT: I have attempted a few approaches, but the only thing that has done the trick of breaking up the net from J1 pin 2 to the GND plane is putting a 0Ω resistor in the circuit (between the net with the diode and the GND). But this puts a resistor component to be lain out on the PCB, which is not exactly what I want here. AI: The circuit idea is fine and so is keeping the ground/power plane away from the protection device. If you are able to define a component shape/footprint/decal in eagle then, define an SMD component with two pins that are connected by a solid lump of copper. The copper is part of the component footprint. Thus when you route your connections, there will be one component that looks like a piece of track - make the pin connections as thin or as wide as you want to suit the track you are wanting to route. I've used OrCAD layout and mentalgraphics PADS and this is the only sensible way I've found to deal with the problem. I haven't used EAGLE but maybe someone knows a work-around?
H: Possible measures to make power supplies safe I'm looking for a list of ways that mains-powered ELV power supplies with touchable terminals can be made safe in the case of transformer failure with primary and secondary coils becoming connected within the transformer. One method I'm aware of is a feedback control circuit that isolates the input to the transformer in the case of excessive voltage across the secondary winding, that in part uses an opto-isolator, as described here. However I'm not certain what failure conditions within the transformer that this method can/cannot protect against. I'm primarily concerned with conformance with CE marking and other EU requirements but non-EU regulations and beyond would be a bonus. I'd like multiple options as I'd rather have overkill (no pun intended) than potentially mediocre protection. Cost is an issue but I'd like to know the options so appropriate optimisations can be made. Last but not least, references to reputable sources are important. AI: To establish the ELV you will need isolation. This will probably be a transformer (Linear or Switchmode does not matter) Transformers can be protected in a number of ways from faults... Self Limiting (Internal resistance limits the available power) The use of Triple Insulated wire (TIW) in the transformer construction. Fuses in the primary or secondary depending on the requirements. Thermal sensor in the transformer (Rare?) Internal thermal fuses Over voltage sensing (Most Switch Mode Power Supply IC do this anyway, it's often how they regulate). Over voltage sensing can be via opto-isolators with zeners or similar . In the end testing will probably be required unless you buy a pre-evaluated product. This depends on your end application. There will be a safety aspects in those standards that relate to transformers and their faults. Look at what the requirements are and this determines your minimum effort/cost. Get your self access to those standards and read them. The best way is to be taught by one of the more experienced engineers. Ask them to review a design with you. Trying to read standards the first time tends to drive you crazy with forward and backward references ... oh and the language used between Europe and the US can also make life interesting.
H: Charge LiPo battery with solar panel I've a solar panel of 5.5 V and 100 mA. Could I use it to charge LiPo batteries using the MAX1555? Of couse that the voltage will drop due to the the Schottky diode. AI: I see no reason this wouldn't work. Of course, you can only charge a single cell at a time with the Max1555, but you should be able to connect the solar panel directly to the chip as the Max1555 accepts input voltage from 3.7 - 7 V. As long as the output voltage from your solar panel is going to stay in that range I think you'll be fine. Just be aware, 100 mA could take a long time to charge your battery, depending on its capacity.
H: Is De0-Nano an alternative to Arduino/RaspberryPi? Arduino and Raspberry Pi are touted as ideal programming boards for beginners and hobbyists. Could De0-Nano fit in that role, too? What does Arduino or RaspberryPi have that De0-Nano does not? AI: Trying to compare the Arduino series and RPi to an FPGA of any capability is an apples to potatoes comparison. Can they be made to do similar things? Absolutely, but the way you're going to get there is very different. Arduino is based around Atmel's AVR series of RISC processors (and one Atmel ARM version), RasberryPi is a single board computer, based around an ARM processor. Regardless of which part is at the core of the development board, there is defined processor architecture. The datasheet will show a a block diagram of this architecture, such as this one from the ATMega168 datasheet. This is hardware that was designed by the manufacturer, is in silicon, and cannot be changed. The manufacturer will publish an instruction set, either with the datasheet, or as a separate document detailing how the part can be programmed. The DE0-Nano is an FPGA board. When you look at an FPGA datasheet, you will find an extensive set of electrical specifications, no block diagram of the architecture. It is up to the developer to develop their own architecture to meet the engineering requirements. The designer will then implement the appropriate logic in a hardware description language (HDL), typically VHDL or Verilog. These languages are not like writing C or assembly. HDLs were designed to describe hardware, rather than a sequential list of operations to perform. This means that there can be, and almost always are, multiple operations occurring in parallel. This is one of the most powerful aspects of an FPGA, and the reason they are used in applications where high performance is necessary. In reality, any project that can be completed on an Arduino or RPi cannot justify the use of a FPGA. They are more difficult to work with, and require some actual electrical knowledge to use to their potential, and that is probably the reason there isn't an FPGA hobbyist community.
H: Interpreting the power rating of the refrigerator My refrigerator is rated as 130W of power. I need to know how to interpret this. Does that mean if the compressor works for a whole hour then only it consumes 130W? Or is 130W the average power considering that the compressor will be sleeping for most of the time? The refrigerator is from LG electronics. AI: 130W continuous power draw would be a huge fridge (if it is any good at its job). For example, my fridge does 25W on average over 24hr and has a capacity of approx. 200 liters cooling area + 94 liters fridge area. A fridge in Europe comes with an energy label that specifies its consumption / power-hungry'ness, if you search for your exact type on Internet you'll find these specs for your fridge too. Amongst other things the label will specify the power use per year. In my case 219kWh/year. So if there are: 1000 Wh in a 1kWh 365 days in a year 24 hours in a day Then the average power equals: \$P_{avg} = \dfrac{219 × 1000}{365×24} = \boxed{25\text{W}}\$ The type plate however states 90W. This is maximum power when the compressor is running and probably when the lighting is turned on. The type plate also states 0.7A, which would come to 230V × 0.7A = 161VA. Notice these are VA, not W! The higher current probably be drawn during compressor start up, and probably has some safety headroom too.
H: Searching for standalone unix development board to connect DC motors I though a bit about the board and came to the conclusion that it may be more intelligent to use a stand-alone component which provides serial ports and an unix os which I then can control over the network. I want to write the port driver myself so it shouldn't require to implement a big sub protocol like I have to do with USB and similar. Which board is recommended for such a task? I found so far: gooseberry beagleBoneBlack (does this require a host?) cuubieboard else? they mostly support the arm branch of FreeBSD as fallback archlinuxarm is there too Is there a better port then the old serial one? AI: Well you can take pretty much any AVR development board and load VUSB on it. It's a fully open source USB stack for the AVR. I've used it in a number of projects along with LIBUSB. It works great and runs on pretty much anything. Note though that since it's software based it's only USB1, shouldn't be a problem in your case though.
H: MIDI sequencer timing accuracy using the Arduino I build these music sequencers. Only it's not exactly a sequencer, it's a physical interface for a sequencer. The sequencer is an application that runs on a laptop that the sequencer connects to, this thing lets the user make drum loops on the fly. It's pretty fun, but it requires a laptop because the sequencer isn't 'on-board'. What I would love is to do the sequencing on-board my device. Now let's assume I know how to solve for class compliance for USB MIDI connectivity, and let's also assume I can figure out how to wire up an arduino to send MIDI notes from a 5 pin DIN port. What I'm most concerned about is tempo drift over time due to inconsistent timing in minute amounts over every run of the event loop. Some things I know: You should not rely on delay() to control the tempo loop. Delay stops all operation of the firmware, and that can't work because i need to poll the physical user interface for changes while the sequence is running. Calculations based on millis() are better because the firmware can continue to operate and act when a certain count has elapsed. Even though none of my physical controls are triggering interrupt routines, some operations can delay the main loop() from running. If I design a function that waits for user input, that can obviously cause a problem of missing a "deadline" to act if the millis() count is way over. I know this problem is of my own design... Questions: A. Is the AVR-based arduino an appropriate microcontroller to poll a user interface and run a mission critical timing loop? I know there's an ARM based Arduino now that's a lot faster. Would a Teensy 3.0 be a better alternative? Both of these are 3.3V boards, so that's another set of issues to work with... but I'll ignore that for now. B. Should I split the task into two microprocessors? One to handle polling and updating the user interface and one for mission critical timing loop. c. Something else? My main goal is to not have to use a computer at all. I also want to calculate for swing, but in this case, swing don't mean a thing if I ain't got a locked and timing accurate tempo. Thanks for your advice! AI: Interrupts are your friend for timing sensitive tasks, but only if you put the timing critical aspects into the interrupt, and there are no other interrupts happening that have a higher priority. The microcontrollers on the "AVR-based" Arduino (e.g. the ATmega328P) have fixed interrupt priorities as detailed on page 58ff of the datasheet. So if you used TIMER2 COMPA as your critical timing interrupt and no other interrupts you should be OK (as it has the highest priority). If you also want to use lower priority interrupts, you need to make sure that all of them re-enable global interrupts when entering their interrupt service routine: When an interrupt occurs, the Global Interrupt Enable I-bit is cleared and all interrupts are disabled. The user software can write logic one to the I-bit to enable nested interrupts. All enabled interrupts can then interrupt the current interrupt routine. (p. 14 of the datasheet) This is slightly different on ARM based Arduinos as their Cortex-M3 core has a "Nested Vector Interrupt Controller", where the priorities aren't fixed (can be set in software), and nested interrupt handling is the norm. So for timing critical applications, the ARM based Arduino would give you more flexibility. However, I don't think that's really necessary for your application. The bigger question is really how easy these things can be implemented with the Arduino libraries. To get the best performance you will probably have to code outside the libraries to some degree, at least for the timing critical bits, i.e. avoid things like delay() or millis() altogether. Whether or not you need to split depends on how much processing you intend to do. Again, going outside the libraries can potentially give you better performance.
H: Trigger Monostable 555 When Capacitor Raises above 0.5 Volts So I want to trigger a monostable 555 to fire when a capacitor raises above 0.5 volts. My plan was to use a Zener diode to bias an NPN transistor that would trigger the 555. But I discovered the smallest zener voltage you can buy is 1.8 Volts. Is there any way I can somehow bias the zener to react to a lower reverse voltage than its actual threshold? -or- Does someone have a better idea on how to get the 555 to trigger when intended? ASIDE: I would also be satisfied with having the 555 trigger when the capacitor drops below 0.5 volts. I don't think it matters to me if it's going up or down, just so long as I can make the trigger at the stated voltage (very close to zero). The purpose is I'm trying to trip the 555 at some point where the cap is very close to zero volts. AI: Jippie pointed out in his comment this: Voltage drop of a normal (eg. 1N4148) forward biased diode is about 0.6 or 0.7 volts, maybe that is worth an experiment? A Schottkey diode (eg. BAT43) would be around 0.3V My note: Brilliant! A regular diode won't begin to saturate with current until the forward voltage is reached. So just using a regular diode in the forward direction and connecting it to the base of a suitable NPN transistor would allow the transistor to be biased on strongly only when the diode voltage threshold was reached. Excellent!
H: Best practice to switch +V or GND connection? Consider LAMP1 and LAMP2 in the simple example circuit below: Which is the "better" practice, using the switching component (here RLY1) to break the +V connection to a component that's always connected to GND, like LAMP2; or use it to break the GND connection to a component that's always connected to +V, like LAMP1? I understand that from a purely theoretical perspective it makes no difference… But my "practical intuition" insists that LAMP2 is a better practice, because it's always grounded; thus you cannot inadvertently energize the circuit with an accidental short to ground. And yet, it seems like many (if not all) example circuits I look at connect things like LAMP1. So probably that means my intuition is wrong. AI: In practice it is best to switch the hot terminal, +V in your case. Ground is often connected to safety ground and as such has same potential as the world around you. When you unscrew a light bulb from its fitting, you don't want to accidentally get zapped when you touch the metals. BTW it it also good practice to connect null to the outer terminal of the light bulb because of exactly the same reason: it is easier to accidentally touch. With electronic circuits on the other hand, often the low side is switched with a transistor. This is in part because old logic parts were much easier made to be able to sink more current to GND than they could source current from Vcc. This is in turn caused by the fact that it used to be easier to manufacture NPN transistors and N-channel MOSFETs. Today PNP and P-channel MOSFETs are not too much of a problem, but you can still find better specs for NPN and N-channel in the datasheet. The main difference is with the 'majority carriers', either free electrons (for NPN and N-channel FETs) or free 'holes' (missing electrons for PNP and P-channel FETs). Electrons move quicker through the semiconductor material than holes. Hence low side switching with transistors is usually preferred.
H: How can a Live-Neutral transformer fault cause 2000 Ampere to flow? In this critique of an ELV PSU design, it is suggested that a "Live-Neutral" fault could result in a fault current of thousands of amps. It says: Fire – (d) the plastic had a UL94-HB rating ( which limited its use to a decorative enclosure); (e) the fuse rating would not protect the transformer from fire; (f) a glass fuse will have a typical maximum “breaking” current of only about 30 Amps. This means that a Live Neutral fault could create a fault current in excess of 2,000 Amps – causing the fuse to explode and create a plasma that would sustain the fault current – perhaps for several seconds. I'm sceptical. Please could someone explain how this could be? I can't imagine any circumstance where such a 100 mA, 240 - 15 V transformer could produce such a current. And if there is a live-neutral fault, would the fuse not blow, as they say, at about 30 Amps (at the most)? I thought the mains wiring and associated resistances*, capacitances and inductances would limit a current surge such that the 1 A fuse would clear before exceeding 30 Amps. Isn't that, after all, what fuses are for? To repeat my question, how is the figure of 2000 Amps arrived at? Thanks Edit: Such as the resistance of the fuse. 0.25 Ohms for an average 1A 250v fuse AI: 4:40am Rushing. If you search prior material on Stack Exchange EE you'll find a substantial amount of material on this. The figures you cite are in the order of right. Fuse blowing current and fault clearing current are different. HRC (high rupture capacity) fuses exist to deal with this difference. The ceramic bodied fuses you see in better equipment are HRC. A glass fuse may blow but sustain an arc of 100's of amps long enough to kill you. If your pole fuse is 100A and your neighbours is 100A and ... what is the street cct able to supply? If you draw 50A from your home mains supply and it sags 1%, what current would you expect it to supply if you hard shorted it? At 50 Hz, 230 VAC, what inductance do you need to add say 1 Ohm reactance to your house feeder circuit. What inductance do you think the feeder has? A friend had an electrician (stupidly) reverse phase and neutral when wiring up their house. Steam came out of the cold taps due to electrical heating in the grounded copper "cold" water pipes as current flowed from mains phase via switchboard ground to copper pipes and thence to ground. (really) and worms crawled out of the ground (really) and they tell me that the house made groaning sounds. I imagine that that was probably from water boiling in the cold water pipes. What current do you think flowed :-) :-( ? HRC fuses - there will be somje ueful links there. Wikipedia - fuses The breaking capacity is the maximum current that can safely be interrupted by the fuse. Generally, this should be higher than the prospective short circuit current. Miniature fuses may have an interrupting rating only 10 times their rated current. Some fuses are designated High Rupture Capacity (HRC) and are usually filled with sand or a similar material. Fuses for small, low-voltage, usually residential, wiring systems are commonly rated, in North American practice, to interrupt 10,000 amperes. Wikipedia - breaking capacity Miniature circuit breakers and fuses may be rated to interrupt as little as 75 amperes and are intended for supplementary protection of equipment, not the primary protection of a building wiring system. In North American practice, approved general-purpose low-voltage fuses must interrupt at least 10,000 amperes and certain types useful for large commercial and industrial low-voltage distribution systems are rated to safely interrupt 200,000 amperes.. ADDED Stack Exchange: Similar material. Fuses: What are the practical differences between Ceramic and Glass cartridge fuses What is the Thévenin equivalent of the mains power supply? - 1st approximation - a piece of copper busbar :-) The Impact of Mains Impedance on Power Quality Useful. See fig 6. Note transformer impedances specified as a % - this is the % drop in output voltage at rated load. Added 2: Thanks for the clarification of breaking capacity and highlighting reactance. I still think 2000 amps is over the top. 200 amps I could understand. I'd guesstimate that 2000A would probably be getting on the high side in a residential situation. But 200A is far too low. Far far too low. If you can get 50A intended current at your home's distribution board and your neighbour's lights do not flicker, what would you get if you shorted it? People have died from mains arc discharge that was improperly interrupted. Standards typically allow a 5% V drop at the farthest outlet from the distribution board in a home at rated load. At 20A rate that implies available current is ~+ 20A/0.05 = 400A. And that's worst case on house wiring!.
H: Home made USB charger based around LM2596: Smoothing caps I'm embarking on building a home made mains USB charger based around an LM2596 DC:DC converter. I had a couple of Newbie questions. Can I connect 5 or 6 USB plugs to the output of the LM2596 (assuming it's set at 5v and I respect the aggregate current limit of the devices I'm trying to charge). If I feed the output of the bridge rectifier into the LM2596, do I have to be particularly fussy about the smoothing cap value? (do I even need a smoothing cap) AI: Yes, you can connect the output of the regulator to as many USB ports as you want, but the total current drawn by all ports can't exceed what the regulator can supply. 5 ports is really pushing it unless you know that the devices that you will be charging don't take much current. Normal USB ports only guarantee 100 mA, and then up to 500 mA after negotiation. However, the pure charging interface doesn't require any negotiation and can supply significantly more. Note that the LM2596 only guarantees 3.6 A. Yes, you need a capacitor on the output of a full wave bridge. It sounds like you plan to feed the LM2596 from the full wave rectified output of a transformer secondary. That's fine, but the reservoir cap is still important. Without the cap, the voltage will drop to 0 twice per line cycle. You need a big enough cap so that the minimum input voltage of the LM2596 is maintained between power line peaks when the cap will be recharged. For example, assuming 60 Hz power, there is 8.3 ms between line cycle peaks where the cap gets charged. With a 3.6 A load, a 10 mF cap would drop 3.0 V. If you have at least that much headroom above the regulators minimum input voltage, then that's fine. One nice characteristic of such a switching regulator is that it can handle a wide input voltage range. This one can handle up to 40 V. If you can arrange the transformer output after the rectifiers to provide nearly that much under no load, you have a lot of room to allow the voltage to sag between peaks and can use a smaller cap than 10 mF. If you really want to drive a large number of ports, you could use multiple regulators, in which case the total current required out of the transformer will be higher and the cap will need to be larger to achieve the same voltage drop.
H: Breadboards and ground loops The book Practical Electronics by Scherz and Monk states (3rd ed., p 48): A ground bus, or bus bar found in breadboards... serves as an adequate substitute for a single point ground. Is this statement correct? AI: No, the statement is not correct. A single point ground is used specifically to avoid daisy chained returns, because it addresses problems caused by them. X is not an adequate substitute for Y, when Y is specifically designed to fix issues with X. At least, not in those circumstances when those issues are a problem. If bussed returns were absolutely adequate, there would be no point in star grounding, because star grounding is more difficult to lay out and takes up more PCB space, and creates more messy point-to-point hookup cabling when it's done between devices in a chassis. It is much more tidy to daisy chain devices. Imagine if every light in a Christmas tree had individual wiring all the way back to the power supply. But chaining, convenient though it may be, introduces parasitic interactions between circuits or devices. You can have a ground loop even on a single circuit board. For instance a the power output stage of an amplifier can generate large currents which can appear as a voltage on the reference ground of a sensitive input stage, because the return path happens to be shared.
H: threshold problem on a Schmitt trigger op amp I have the Schmitt trigger op amp on the below diagram. (channel A & B refers the oscilloscope probes on the following figures). The resistor values are selected to set the trigger threshold as ~9.5 V and ~5.1 V and I use this page to verify the threshold values. However, the oscilloscope output below shows that the comparator handles the signal on the left side(High=10.71 V; Low=-106.8 mV) correctly, but it fails for the signal on the right side (High=10.36 V; Low=2.85V). Here there is the zoomed signal: The signal is not only handled wrong, it is also extended 377 usec on the time domain. However, there is no time extension on the signal on the left side of the first oscilloscope figure. Could anyone tell me why the comparator does not handle the second signal and how it can be solved? Thank you in advance.. Datasheet of the comparator. AI: Note that the LMC6772 chip you are using is not an opamp; it's a comparator that has an open-drain output. Since it can't actively drive its output high, the Schmitt trigger circuit won't work as designed. The datasheet says, "Refer to the LMC6762 datasheet for a push-pull output stage version of this device." However, look at how you have the optocoupler wired up: the anode of the LED goes to the output of the comparator, and the cathode goes to ground. This means that when the comparator output is "high", the LED is driven by the current coming through your resistor network, and when it is "low", the diode is shorted out. This also means that the "high" voltage at the output of the comparator is the forward voltage of the LED. (According to the datasheet, this is at most 1.8V) Do NOT switch to the push-pull version of the chip unless you also add a current-limiting resistor in series with the LED. Note also that the website you used to calculate your resistor values is assuming that the opamp in question has bipolar supplies, and that the output swings to -Vcc when the output is "low". Your opamp is being powered by a singled-ended supply, which makes the lower threshold 7.56V when the output is low. So, the actual threshold voltages of your circuit are 7.92V when the output is at 1.8V and 7.56V when the output is at 0V. The general equation for the the voltage at the junction of three resistors, each fed by a voltage source is: $$V_{junction} = \frac{\frac{V_A}{R_A}+\frac{V_B}{R_B}+\frac{V_C}{R_C}}{\frac{1}{R_A}+\frac{1}{R_B}+\frac{1}{R_C}}$$ In your circuit, one of the three resistors is always connected to ground, so you can ignore that term in the numerator. If we plug in the voltages and resistors you used: $$V_{junction} = \frac{\frac{12 V}{150 \Omega}+\frac{1.8 V}{470 \Omega}}{\frac{1}{150 \Omega}+\frac{1}{470 \Omega}+\frac{1}{560 \Omega}} = 7.92339 V$$ $$V_{junction} = \frac{\frac{12 V}{150 \Omega}+\frac{0 V}{470 \Omega}}{\frac{1}{150 \Omega}+\frac{1}{470 \Omega}+\frac{1}{560 \Omega}} = 7.56141 V$$ But you're right, these thresholds should work fine in your application, and they don't explain the problems you're seeing. I can only surmise that you're seeing some secondary effects arising from the fact that you're trying to operate a "micropower" comparator at some fairly high voltage and current levels.
H: ATTiny45 Quadrature Decoder Pull-Up resistors I am trying to use the ATTiny Quadrature Decoder from here. The schematic that I have attached here has two external 10K Pull-up resistors. I have looked into the ATTiny45 datasheet and it seems that the I/O pins already have pull-up resistors that you can enable. My question is why would you need external pull-up resistors if you could just enable internal ones? AI: The internal pullup resistors might be considerably higher in value than 10k - perhaps 50k. (I don't have the Attiny45 datasheet handy, but another AVR datasheet lists 20k to 50k for the Atmega328). That might be too high for this application; without the datasheet for the encoder I can't say. The external 10k resistor will allow faster rise times on those input signals, or cope with the capacitance of longer cables, or allow better logic levels if the encoder has significant "off state" leakage current. It makes sense to design the schematic and PCB to allow fitting the external resistors (unless size or weight are REALLY critical for your application - you can always leave them off where (perhaps the cables are short) you don't need them. EDIT : the encoder datasheet tells you precisely nothing useful in this respect. However, IF this sensor is representative, (links to this datasheet) the "output leakage current" is maximum 10 microamps : with a 50 kilohm pullup, that means an output voltage 0.5V less than you expect. I'd probably play it safe and add the resistors : 10k would be fine.
H: Current flows from the source towards the sink I happened upon the following schematic: simulate this circuit – Schematic created using CircuitLab It's supposed to reduce the max.voltage between the GPIO input pin and the current source to 3.3V, since 5V * (10K/(10K+5K)) = 3.3V. The thing is - 3.3V is the voltage over the 10K resistor and 1.7V is the voltage over the 5K one. As long as the current flows from the source to the sink, the voltage between the source and the GPIO pin should be 1.7V - what am I missing? AI: I'm not sure what you are trying to ask here. The voltage difference between the 5V rail and GPIO pin is 1.7 because 5 - 1.7 = 3.3V When GPIO voltage is measured it is measured from that pin to ground, which is 3.3V,.
H: Power consumption of Arduino Nano (current draw low power) Anyone got measurements of Arduino Nanos power consumption? It guess it should be less than e.g. of the Uno or Mega as the USB part only get powered when connected via USB and so does the 3.3 regulator. Also I should be able to easily disconnect the 5 V regulator and use a DC-to-DC converter instead with ~87% efficiency 34V -> 5V. More or less there should be not much more left than the LEDs (can be disabled by software to only blink every some seconds?) and the Atmel 328P itself? It will be able to sleep alot and beeing woken up by watchdog timer every 8 seconds for some measurements and communication. AI: According to the schematic, the FT232RL (which is the 3.3v regulator as well) on the Arduino Nano v3 is powered from the 5v line. Regardless if you use USB or VIN or a 5v in. As does the blue power led4 (680Ω resistor means 2.5mA). Led1 and LED2 are controlled by the FT232RL, so should only be on when there is usb/serial communication. Only LED3 is controlled by the arduino D13 pin. According to this page, the Nano takes 20mA when running, 17mA with the blue power led removed. That is not standby/power down current, which should be a lot lower. The FT232RL has between 15mA full operational current, to at most 2.5mA or minimum 70µa (0.07mA) in USB suspend mode, or with reset pulled low. Since the reset pin is not used, I believe that it should be 2.5mA by itself without a usb cable plugged in, but can't be sure (the FTDI datasheet does not say). That is without any draw on the 3.3v regulator line. You could remove the 5v regulator, or just ignore it and use the 5v pin to input the externally regulated 5v, which is almost exactly how the USB power is handled (that goes through a shockley diode to protect the USB when 5v is already present). But you should be aware of your regulator's actual efficiency. At a 29 volt difference, at say 5mA to 50mA draw, is it actually 87%? The datasheet's graphs will tell you.
H: How to light an LED when a voltage hits a certain point Lets say I need an LED to indicate when a DC voltage reaches 5 volts or more. I don't want the LED to be dim when it is at 4.5 or anything. I just want it to be full bright at 5, 0 bright at anything below 5. Is there a way I can do this with discrete components (no IC's, just resistors, capacitors, transistors etc.)? I do not require the input has the same power source as the meter. AI: To narrow the voltage range over which the LED turns on, you can use a transistor in order to create voltage gain, to drive a second transistor which drives the current into the LED. simulate this circuit – Schematic created using CircuitLab Results from simulation, where the input ramps from 0V to 8V over the period of a second: Input Voltage: LED Current: The LED goes from zero to fully on over a range of something like 80 mV. Zener diode D1 biases the input so that the turn on takes place at around 5V. Note that only about 150 microamps of current are required across R1 to develop 0.7V across Q2's EB junction. That small amount of current does not require the BE junction of Q1 to be fully turned on! This is why the Zener value isn't based on 5V - 0.7V. From the simulation, the transition occurs between 5.12V and 5.2V, and not starting at 5.3V as the approximate junction model would suggest. Higher values of R1 do not significantly improve the upper 5.2V voltage, but degrade the soft turn on voltage. The next available lower Zener model in the simulator is a 4.3V unit, which leads to a turn on that falls short of 5V. Raising that toward 5V requires lower values of R1, which cause Q1 to pull as much current as Q2.