text
stringlengths
83
79.5k
H: Resistance Vs Impedance? What is the difference between the Resistance and Impedance? When we will say it is an Impedance and when we will say it as an Resistance? Can you explain it with diagram (If possible) and real time example. And how the reactances will form in the circut where the Capacitors and inductors are not available in our circuit? How we will find the reactances in the circuit and its values in real time? I means is this possible to calculate the reactance by using any instrument? Do the reactance was intentionally kept by the designer or generally it'll forms with in the circuit? All answers are appreciated. AI: Diagram! This is for a complex impedance: \$Z = R + \dfrac{1}{j \omega C} \$ Resistance \$R\$ is in phase with the applied voltage, so the vector points in the same X direction. The impedance of a capacitor is almost completely reactive, i.e. its resistive part is much smaller than the \$\dfrac{1}{j \omega C} \$. The \$j\$ causes a \$\theta\$ = 90° rotation, and since the \$j\$ (= \$\sqrt{-1}\$) is in the denominator the angle is negative \$\left( \dfrac{1}{j} = -j \right) \$. To calculate the current \$ I = \dfrac{U}{Z} \$, we note that when dividing by an impedance with angle \$\theta\$ we subtract the angle from our reference, so that the angle's sign is inverted. The result shows how for a capacitive load the current leads the voltage by an angle \$ \theta\$, where \$ 0 \le \theta \le 90°\$. For inductive loads a similar diagram can be drawn, only \$ j \omega L\$ points in the opposite direction of \$\dfrac{1}{j \omega C} \$, and the current will trail the voltage. edit (after your edit of the question) So, resistance will cause the current to be in phase with the voltage. If there's an imaginary term (the \$j\$) then that term represents the reactance, either capacitive or inductive, and Resistance + Reactance = Impedance In an ideal world, if you don't have capacitors or coils you wouldn't have reactance either. But a circuit may have parasitic impedance: the length of a PCB trace will cause an inductive reactance (it behaves as a coil), and two adjacent traces will have a capacitive reactance (they behave as a capacitor). Parasitic impedances are unintentional, and most of the time a nuisance, though sometimes a designer can make good use of them. You can measure components impedances with an RLC-meter, which will give you resistance in series or parallel with a reactance (inductive or capacitive). Reactance will show as a phase shift in voltage or current. This phase shift can be shown on an oscilloscope in X-Y mode; a zero phase shift will show a straight line, a 90° phase shift will show a circle, anything in between will give you an ellipse.
H: Do fuse blow on ampere or effect? I have a faulty car (bad central locking engines) and a fuse is blowing every time I open/lock the it. I'm looking to do a quick fix, and just replace it with an automatic fuse. The car runs on ~12V, and the fuse is at 15 ampere. Are fuses designed to operate on specific voltages, and have their ampere "tolerance" rated for the specific voltage? As I understand it, a 15A fuse for 12V is designed to blow at 180W (the heat produced in the fuse wiring is what makes it melt, right?). So, if I use an ordinary 16A/220V fuse in my car, it will blow at 3520W, and should really be rated 293A for a 12V circuit... If my reasoning is right, that fuses blow at effect and not ampere, what I'm looking for is a 0.8A fuse that is designed for 220V (I=180/230), and it would work as a good replacement...? AI: The 180W reasoning is wrong. You don't have the full 12V across the fuse, only a fraction of it. Say the fuse has a 0.1\$\Omega\$ resistance, then 15A will cause a power dissipation of \$ P = I^2 \cdot R = (15A)^2 \cdot 0.1 \Omega = 22.5W \$. And that 22.5W in the thin wire is just too much, and the fuse will blow. Note that the 12V doesn't appear anywhere in this, and you could do the same calculation for 15A at 230V AC. There's a "but", however. Fuses do have a rated voltage. Not for the blowing, as we've seen, but to make sure the remains of the fuse won't cause sparks when at a high voltage. So you can't use a 12V car fuse in a mains appliance, but the other way around should be safe. Automatic fuses also react on current only. They have a coil which releases a latch if the number of coil-windings exceeds the rated value. Also here it's independent of voltage.
H: ADC sampling rate to MCU clock speed relationship How can I determine the clock speed requirements of a mCU to manage a given ADC input? This application is very simple - I just want to take an SPI stream from an ADC into a mCU and spit it out the mCU. No major DSP happening or anything like that on board. [added] The mCU is ultimately there to push the video out a USB port. In this scenario I have a 40,000 kSPS (40 MSPS) 10bit ADC that I need to push through a 16 bit micro. Do I use a 40MHz micro? Can I use a slower micro? AI: Your question suggests that the SPI is the input from the ADC. However, the ADS825E is a parallel output device. So, is the SPI the output from the microcontroller? I'll presume it is. You'll always need a faster clock. Even for a RISC controller running 1MIPS/MHz a 40MHz clock will allow you to execute 40M read instructions per second, but you have extra code, at least a jump instruction to create a loop. So at 80MHz you can read, and jump to the read instruction. But that's not all. If you want to shift the read data out through SPI that will need to be clocked as well. At least 10 clock pulses per read sample, to be precise. Unless you're using an asynchronous microcontroller (I don't know if they already exist outside of the lab yet) that means 400MHz. At least. You can do this with some high end ARM controllers, but if you just want to read and shift out there are better solutions. Oli mentions an FPGA, but a CPLD will probably do.
H: How do I convert AC current at 110v to Watts? So I'm trying to measure the power consumption of my home PC. I used to have a kill-a-watt meter which I can't find, so I wired up my multimeter to measure the current. Now I'm not sure what to do next. Is it just .6Ax110v = 66W? Or do I have to do one of those sqrt(2) adjustments? Seems like a silly question to ask. AI: I suggest you read this answer to a previous question. For a resistive load \$P = V \cdot I \$ so the 66W would be correct. No need for the \$\sqrt{2}\$; you want the RMS (Root-Mean-Square) value, not the peak value. However, your PC's power supply isn't a pure resistive load and then \$P = V \cdot I \cdot cos(\phi) \$ where \$\phi\$ is the phase difference between current and voltage. You need to measure both simultaneously to determine the phase, something your kill-a-watt does. Since a cos is maximum 1 your power may be lower than the 66W.
H: Least expensive way to boost DC voltage What would be the least expensive way to boost a DC voltage? The aim is to convert 1.2 V/1.5 V (from an AA/AAA cell) to 3.3 V to power a small 8-bit microprocessor, like Atmel ATtiny45 or ATtiny2313, and also (if possible) 6 V to power a buzzer. Also, what would be the maximum current one could draw safely from an alkaline battery, after boosting it to 3.3 V/6 V? Finally, how I could compute the duration for which the alkaline battery would last, given a certain consumption? AI: There's a technique called a charge pump with which you can make a voltage doubler, but that will only give you 3V from a 1.5V cell, and even less from the 1.2V cell. I'm still mentioning it because several microcontrollers these days will work with voltages down to 2V. A charge pump can only supply limited current, enough to power the microcontroller, but extra power devices like motors or relays are out. The voltage will also drop under load. So not ideal. The LM2660 is a switched capacitor charge pump. The better solution is a switching regulator. These exist in two major topologies: "buck" to go from higher to lower voltage, and "boost" to go from lower voltage to higher. So you want a boost regulator. Major manufacturers include Linear Technologies (more expensive) and National Semiconductor (recently acquired by Texas Instruments). The LM2623 can operate on input voltages as low as 0.8V. About current and battery life. I'll assume you're working with 1.5V batteries. The ones here on my table are rated for 2300mAh, so let's use that value. Also let's say your microcontroller plus extras need 100mA at 3.3V. That's 330mW. If the switcher is 85% efficient that means it draws 330mW/0.85 = 390mW from the battery. That's at 1.5V, so you'll draw 260mA from the battery. The battery is rated at 2300mAh, then your device can run for 2300mAh/260mA = 9 hour on one charge. If you plan to load the battery rather heavily, I would remain below 2300mA, which will drain it in 1 hour.
H: Way to discharge solenoid without (heated) resistors? Here is a simple simulation of a schematic for my solenoid: Once the switch is closed, the solenoid will be activated with ~80mA charge. When it is open (where the screenshot is at) it will discharge via the resisters in a looped path, due to the diode. Now those resistors are cumbersome. A 100 Ω resistor would reach ~800mW of power during discharge, so for this specific test I split it in to four 25's in series. I would like to provide a lot more power to my solenoid however (200-800mA), how would I be able to discharge it safely, with minimal current resistance when the switch is closed? I could possibly use some wire-wound resistor (~5W) as a last resort, however those I do not have currently. AI: It IS valid to use discharge resistors, but they would usually be in series with the diode and NOT the solenoid. You DO need to model the solenoid resistance by a resistors in series with the solenoid where you have the resistors now. The resistors in series with the solenoid are a potentially* valid way to reduce the solenoid on current BUT it means your solenoid is not really the right one for the power supply you are using. If you want extra resistance (see below) put it in series with the diode. The reason to put extra resistance in the circuit is to cause your solenoid to relase FASTER when the power is turned off !!! This is not intuitive :-). Thereason is that the time constant of an inductive loop with current flowing in it is T = L/R, amd so by adding extra R we reduce the time cinstant ! :-). This is STILL not intuitive! What makes this so is: When the current feed to an inductor happens there is NO instantaneous change in curremt. The SAME current keeps on flowing. This is in fact part of the fundamental definition of what an inductor is. Not many people know that. The still flowing current MUSt be allowed to "go somewhere" and in the real world it will in fact just do that. Always. The diode in the circuit provided provides a current path. If there is no formal current path the inductor will "find" one. Always. If necessary the inductyor will deliver the current into its own parasitic capacitance. As this capacitance is very small it need a lot of voltage to store energy as E = 0.5 x C x V^2. Small C = big V squared.This is why you get an inductive kick and a spark and other interesting results. With just an inductor plus a diode plus (we'll assume) negligible coil resistance the losses in the circuit are due to te diode voltage drop x the current plus I^2R losses from the (assumed neglible resistance. The diode voltage drop is typically in the 0.4 to 1.0 Volt range. Energy dissipated in the diode will slowly dissipate the circulating current. The losses are roughly linear with current (Power = Vdiode x I) now assume that the coil resistance is not negligible. say we have a 12V , 100 mA relay. If the current when turned on is limited only by its resistance then R = V/I = 12/ 0.1 = 120 ohms. When we turn off the power the current will be as before so the coil resistance will have Vin across it and will start to disipate Iin^2 x Rcoil. Also the diode will dissipate Vdiode x Iin_initial. This will decay ~= exponentionally. Now add a resistance of say 10 x Rcoil in series with the diode. Let's call this Rdiss When Vin is removed Iin will flow. V_rdiss = Iin x Rdiss = Iin x 10 x Vcoil. Dissipation in Rdiss = 10 x as much as in Rcoil before so ~ exponential decay will start at 10x the rate before. (Actually 11x as Rcoil is still present.) The solenoid will hold in until Ihold is reached - and this is being approached at aout 10x the rate without an R. SO adding a series resistor did in fact reduce hold time or increase release delay. FWIW.
H: Is FR4 waterproof? What about soldermask? I'm investigating ways of making a capacitive sensor that will operate in very moist environments, potentially even submerged. What I need is a way to make some conductive plates in a specific arrangement that are electrically isolated from each other and from the environment. One of the options I'm looking at is to use a PCB. I would put the plates in the proper arrangement on both sides of an FR4 board using polygon pours and then cover the whole thing with soldermask. There would be no components on the PCB at all. The entire board, except for the external contacts (outside of the moist/wet sample), will be soldermasked. Questions: Will the soldermask block the moisture effectively, preventing the plates from forming an electrical contact even in the case of prolonged submersion? Will the FR4 remain dry? Or will it soak up water, leading to an electrical contact between the plates? If this is not the case, is there anything I can treat the board with to make it waterproof? Let's say for the sake of argument that I will be using seeedstudio's Fusion PCB service. AI: Yes FR-4 itself is waterproof ("near zero water absorption" according to Wikipedia).
H: Choosing a DSO, advice sought As a tinkerer, hobbyist, wannabe-'maker' (as in the protagonists in the Make magazine), sometimes I feel the lack of better tools in some projects, although for most, I can make-do with my DMM for test/measurement. Have been considering buying a basic 2-channel DSO, because I am having some timing issues which I'd like to investigate. I have used a DSO back in school for a semester, as part of an Analog electronics elective, so I think I can manage to refresh and learn. The latest project for which I felt motivated to buy a DSO, involves some RF based sensor network. The RF in question is the 315MHz/433MHz kinds, with the prototyping being done around a 80MHz Cortex-M3 MCU based board. Other than that, at the moment, I do not foresee much analog projects. Given my nature of requirement, can someone confirm if a 50MHz 2-channel 1Gs DSO would be good enough ? I am not very keen on used CROs, since I believe there is a bit of gamble with used stuff, and chasing for returns/refunds is no fun, especially for online transactions. AI: If all you care about looking at is the output of your receiver (which is likely a slowish serial output like 2400 baud if it's anything like what I used on the Wicked Node) you don't need a DSO, just get an inexpensive USB logic analyzer like this one. If you have built your own RF front end (because you are a masochist for instance), you'll need an RF-rated oscilloscope, which will cost you a pretty penny (>$2k USD probably). Hope this helps.
H: Reducing noise in elementary audio circuit I wish to hook up the line-out from a digital piano to a surplus 4 ohm 15w speaker unit. I bought a simple Amplifier module and connected it up. My plan was to roughly assemble the circuit and, if it worked ok, transfer to strip-board with RCA connector for Audio and a DC power socket and some sort of quick connector for speaker cable. When I play a note on the piano I get a good level of sound from the speaker but the quality is very poor. I guess I need to use better wiring on the input side of the amp? Circuit: Here's a photo: Battery: 12V SLA 3.3Ah Speaker: 4 Ohm 15W Amplifier: Kemo M031N 4.5-12V, 3.5W "Music power", for 4-15 ohm speaker, 40Hz-20kHz, Source: Line-out 1/4" TR connector (left channel, set to mono). Pot: 10K Linear The speaker is a rear satellite speaker unit from an old TV that had 5.1 surround-sound. The speaker enclosure contains two sounders (approx 5" and 1"). The digital piano is powered through a mains adapter (100-240 VAC 0.2A 50-60Hz) connected using a USB cable (5V 1A). It is light so assume switched mode. Notes sound rather buzzy. There is mains hum in the background. What steps can I take to improve the quality of the sound? AI: It's really hard to tell from your description. A good description of the noise and when it happens would be a good start. You already said that the noise happens when you play a note. What happens if the volume is turned down? Either using the control on the electronic piano or by using the pot in your circuit. If the noise goes away then you can assume that the problem is either with the signal level on the input, or that you're asking the amp to put out more than the rated 3.5 watts. If I were a betting man, I would guess this is the case. You're using a 3.5 watt amp to power a 15 watt speaker. Normally for a 15 watt speaker you would be using a 15 to 30 watt amp. So your amp is undersized. Adding a cap like what @Manmanguruman suggests isn't a bad idea, but I would hope that there is already some caps inside the amp module. Still, you would use the largest cap that is somewhat practical. Start with about 470 uF and higher. The pot should have a log taper, not a linear taper. Changing the pot will make the volume control more useful-- but will do nothing for your noise problem. It is also possible that you have a signal loading problem with the piano. Basically, the piano might not be able to handle having an amp plugged into it. I would hope the piano was designed better, but I have seen some products do some stupid things. Turning the volume down with your linear/log pot should help this issue. Other than that, the only thing I can think of would be a component failure. Something like the speaker, amp, battery, or piano actually being broken in some way.
H: What do I need to do the following things with an arduino? I need to do the following with an arduino board: Drive something at a power higher than that of the usb, like max 50W. I guess I have to use analog output and then amplify the signal somehow, but I don't know how. Do the opposite too, I mean safely measure a signal if it is even at 50W, without frying the arduino in the process. As you can guess I'm a newbye, so please be patient. AI: Regarding the first part of your question: Are you using DC or AC? If it's AC, things are potentially a modest amount more complicated, and I have little experience in that world so I'll defer from commenting much further, on any AC specifics, other than mentioning Triacs That said, in principle, there are a few ways to control a higher-current / higher-voltage load from an Arduino. Note that in all the scenarios I'm describing here, I'm talking about using an independent power supply to power the load. use a "power transistor." You'd probably want a MOSFET or an IGBT, rated for the voltage / current you're trying to control. For MOSFETs, you'll probably want to look for a "logic level" MOSFET where the gate can be driven fully on by the 5 volts from an Arduino digital pin. If you use an IGBT or an non-logic-level MOSFET you'll need additional circuitry to drive 10-12 volts (usually) to the gate. They make "MOSFET Driver" ICs that are purpose built for this, but you can also roll your own driver (of sorts) a couple of different ways. I've gotten good results using a quad voltage comparator IC. Use a (mechanical) relay. You'll have to poke around the parts catalogs to find a relay that can be controlled by an Arduino, or - again - you'll need some additional circuitry between the Arduino and the relay. Use a solid-state relay (SSR). If you're doing AC, you'll probably want a Triac. Some other considerations: You might want an optoisolator between your arduino and ANY of these devices. It's not strictly required, but it will help protect your Arduino from damage. IF your load circuit is DC, you can (usually) just join the ground of the power supply that's driving your load and the ground on your Arduino. This makes wiring things up a bit simpler, but there is some small risk associated with ground loops. This is not a concern if you use an optoisolator. If you're doing AC, you absolutely can't just connect the two circuits together. If your load is inductive (like, say, a motor) there are additional concerns regarding "inductive kickback." Read up on that before you start switching motors on and off. As for measuring.. are you trying to measure voltage or current (amperage) or both? For current, you could possibly use a hall effect sensor, or an inductive current sensor. I've never tried measuring voltage like that, but there's a long thread on the old Arduino forum talking about this stuff: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205745528
H: When is using latches better than flip-flops in an FPGA that supports both? The Question: When is using latches better than flip-flops in an FPGA that supports both? Background: It is a well-known principle that level-sensitive transparent latches should be avoided in FPGAs, and edge-sensitive flip-flops should be used exclusively. Most FPGA architectures natively support both latches and flip-flops. The general advice -- even from the FPGA vendors -- is to watch out for latches, or never use latches, etc. There are very good reasons for this advice, the details of which is all well-known. However, most advice is phrased, "don't use latches unless you know you need them". I am an experienced FPGA designer, and over the years every time I thought I knew that I needed a latch, a quickly realized that there was a better way to do it with flip-flops. I am interested in hearing examples of when using latches is unequivocally better. Important Note: Latches vs. flip-flops often gets people riled up. I am only interested in the answer to the question. Responses explaining the difference between latches and flip-flops, expounding reasons to use NOT use latches, detailing why flip-flops are better than latches, talking about how latches are better in non-FPGA targets, etc, would be totally off-topic. AI: Your question is basically, "when do you know you need latches?" Which, as you implied, is a subjective question. Expect more opinion than fact as answers. That being said, here is my opinion: I, like you, often find better ways to use flip-flops thus avoiding latches. The resulting logic is often more elegant and robust. But there are times where I don't have enough control over the logic to avoid latches. For example, I might be interfacing to a processor bus that requires latches to meet the desired specifications. Since I can't redesign the CPU or the bus, I'm stuck with the latch. In the past 13+ years, that is the only time I have needed latches.
H: Taking input from a generic usb gamepad in controllers (preferably like MSP430g2231) I was just wondering how can I take input from this cheap but awesome HID compliant generic computer gamepad into the launchpad. I know the launchpad could work at good speed so what it would take to take the input? The info doesn't really have to be about only launchpad just give me generic info, I can build off that. AI: As the device is a "USB HID Device" then the system you want to build would have to act like a "USB Host". For this you will require a microcontroller with "USB 2.0 OTG" in it (OTG = On The Go). The little MSP430s in the launchpad don't do it. You would need something like a PIC24 or PIC32 that has the facility, or one the Atmel chips with OTG in it. There are probably some TI chips that do it as well, but not that will fit in the launchpad. It's generally the higher-end chips that have that facility.
H: Why is the Nyquist data rate lower than the Shannon data rate? In the book Computer Networks, the author talks about the maximum data rate of a channel. He presents the Nyquist formula : C = 2H log\$_2\$ V (bits/sec) And gives an example for a telephone line : a noiseless 3-kHz channel cannot transmit binary (i.e., two-level) signals at a rate exceeding 6000 bps. He then explain the Shannon equation : C = H log\$_2\$ (1 + S/N) (bits/sec) And gives (again) an example for a telephone line : a channel of 3000-Hz bandwidth with a signal to thermal noise ratio of 30 dB (typical parameters of the analog part of the telephone system) can never transmit much more than 30,000 bps I don't understand why the Nyquist rate is much lower than the Shannon rate, since the Shannon rate takes noise into account. I'm guessing they don't represent the same data rate but the book doesn't explain it. AI: To understand this you first have to understand that bits transmitted don't have to be purely binary, as given in the example for the Nyquist capacity. Lets say you have a signal that ranges between 0 and 1V. You could map 0v to [00] .33v to [01] .66v to [10] and 1v to [11]. So to account for this in Nyquist's formula you would change 'V' from 2 discrete levels to 4 discrete levels thus changing your capacity from 6000 to 12000. This could then be done for any number of discrete values. There is a problem with Nyquist's formula though. Since it doesn't account for noise, there is no way of to know how many discrete values are possible. So Shannon came along and came up with a method to essentially place a theoretical maximum on the number of discrete levels that you can read error free. So in their example of being able to get 30,000 bps, you would have to have 32 discrete values that can be read to mean different symbols.
H: Understanding Flip Flops I am trying to better understand how flip flops work. I am asked: Desing a three-bit up/down counter using T-ff. It should include a control input called Up(bar)/Down. If Up(bar)/down = 0, then the circuit should behave as an up-counter. If Up(bar)/down = 1, then he circuit should behave as a down-counter. The solution to the problem is this: My question is basically how they came to this conclusion. I know from a truth table the behavior of a t flip flop: Q Q^+ | T 0 0 | 0 0 1 | 1 1 0 | 1 1 1 | 0 I don't understand how to make a T flipflop into a up counter or a down counter respectively. AI: You can work it out by going through the steps. We know if T is at 1 then Q will toggle, if it's at 0 Q will stay the same. Say we start off with Q0, Q1 and Q2 at 0, and the multiplexer input is set to 0 (so basically ignore the Qbar paths) At the first clock pulse, since T0 is at 1, then Q0 will toggle from 0 to 1. So we now have 1 0 0 At the second clock, since T1 is at 1, Q1 will toggle from 0 to 1. Q0 will toggle back to 0. Now we have 0 1 0 At the third clock, Q1 will remain at 1 since T1 is at 0. Q0 will toggle back to 1. Now we have 1 1 0 At the fourth clock, since the and gate now has both inputs (Q0 and Q1) at 1, then T2 will be at 1 therefore Q2 will toggle from 0 to 1. T1 is at one so Q1 will toggle back to 0, as will Q0. Now we have 0 0 1 At the fifth clock, T2 = 0 so Q2 will remain at 1, T1 = 0 so Q1 stays at 0, and Q0 always toggles so it will change to 1. Now we have 1 0 1 At the sixth clock, T2 = 0 so Q2 stays at 1, T1 = 1 so Q1 toggles to 1 and Q0 toggles to 0. Now we have 0 1 1 At the seventh clock, T2 = 0 so Q2 stays at 1, T1 = 0 so Q1 stays at 1, and Q0 toggles to 1. Now we have 1 1 1 At the eighth clock, both inputs to the and gate are high so T2 = 1, so Q2 toggles to 0. T1 is at 1 so Q1 toggles to 0, and Q0 toggles to 0. Now we have 0 0 0 which is where we started. If you change the multiplexer input to 1 and select the Qbar path, you can see how it would count down (just complement all the above results, e.g. 0 0 0 becomes 1 1 1, 1 0 0 becomes 0 1 1 and so on)
H: Systematic construction of the ODE system of a circuit containing opamps I want to compute the voltages and currents in a circuit containing R,L,C, opamps and voltage sources. I perfectly understand how to do this for circuits containing only R,L,C and voltage sources, using mesh or nodal analysis. But as soon as a circuit contains an opamp, I'm stuck. In the literature I found, it is explained only by example (typically the inverting and non-inverting opamp), but no general "algorithm" is given. Can somebody please explain to me how to construct the DE system for circuits of arbitrary size which contain opamps? AI: I'm assuming if you want to construct your ode systematically, you're actually thinking about doing this on a computer -- basically writing your own simulator. Probably the key difference between the op-amp and R, C, L, or V elements is that those devices are all one-port devices while the op-amp is a two-port. The first port is the input pins, the second port is the output pin and the ground pin. To set up the equations, you can treat the input as a very high resistance, in the gigaohm range (better yet, pick a real op-amp and use the value from its datasheet). It's probably not a good idea to make the input resistance infinite the way we do for hand calculation, because that could lead to an unsolvable set of equations if there's no other path to ground for one of the nodes in your circuit. The second port is just like a voltage source, and you set it up in your equations the same way, but with the extra feature that its voltage depends on two other nodes in the circuit -- the input pins. Again, you probably won't want to assume infinite gain like in hand calculation, just use a high number, maybe 10^6, or use the open loop gain value from a real part.
H: How to convert voltage into digital signals? How do I convert voltage into digital signals or pulses? For some reason I have to get voltage readings of the battery connected to the UPS of the computer systems. For that purpose I am designing a device and computer program to monitor voltage and current readings. Previously I designed an Ohm meter via a 555 timer. When R2 is change the timer generates relative (to the resistor) frequency of pulses and my program can easily detect the change in the value of resistor. So, Can I use 555 timer for my purpose since its equation for frequency has no variable for voltage and current? Schematic of the circuit will be highly appreciated. AI: In general what you are looking for is a analog to digital converter, or A/D for short. There are many different types. Each different technology has its own tradeoff between speed, accuracy, resolution, cost, and other parameters. One method of making a number from a analog parameter is to have the parameter change the frequency of a oscillator as it seem you did with your 555 timer, then measure the frequency. There are many other ways too. Nowadays, just about every microcontroller comes with a A/D converter built in. 10 bits is quite common. Some low end ones may only have 8 bits, and 12 bits is available too. Beyond that the anlog requirements get difficult to meet with the same technology the micro is fabricated with, so you pretty much need a external A/D for more than 12 bits. The battery in your UPS may be isolated from the output or not at the same ground reference, so some care must be taken to measure its voltage and get the data into your PC. My first knee jerk reaction is to put a small micro on the battery circuit. It measures the battery voltage locally, then sends the resulting digital data serially over a single opto-coupler to another micro that interfaces to the PC via USB, or perhaps directly to the PC's COM port.
H: What does edge triggered and level triggered mean? I am studying 8085 microprocessor architecture and the terms edge triggered and level triggered confusing me really very much. Can anyone explain me it in layman's words ? While studying the interrupts of 8085 named RST 7.5, RST 6.5, RST 5.5 and TRAP i came across these terms and they confused me. Here i have attached one document link from which i was reading and i have mentioned my confusion diagrams. in the document RST 7.5 -> Edge triggered RST 5.5 -> Level triggered. TRAP -> Edge triggered and Level triggered. (why does it make any difference?). the document link AI: I didn't read you document really, but I can understand why you are confused. But it is a very simple concept really. Let me explain. Triggering: This means making a circuit active. Making a circuit active means allowing the circuit to take input and give output. Like for example supposed we have a flip-flop. When the circuit is not triggered, even if you give some input data, it will not change the data stored inside the flip-flop nor will it change the output Q or Q'. Now there are basically two types of triggering. The triggering is given in form of a clock pulse or gating signal. Depending upon the type of triggering mechanism used, the circuit will become active at specific states of the clock pulse. Level Triggering: In level triggering the circuit will become active when the gating or clock pulse is on a particular level. This level is decided by the designer. We can have a negative level triggering in which the circuit is active when the clock signal is low or a positive level triggering in which the circuit is active when the clock signal is high. Edge Triggering: In edge triggering the circuit becomes active at negative or positive edge of the clock signal. For example if the circuit is positive edge triggered, it will take input at exactly the time in which the clock signal goes from low to high. Similarly input is taken at exactly the time in which the clock signal goes from high to low in negative edge triggering. But keep in mind after the the input, it can be processed in all the time till the next input is taken. That is the general description of the triggering mechanisms and those also apply to the 8085 interrupts.
H: Radio triangulation on millimeter scale plausible? (For this question, let's throw away the skepticism of what's possible or practical today and instead focus on what's plausible in the future. This is all theoretical, but here's the idea:) We'd like to design future nanobots (≈5-10µm in size) that navigate around in the brain in mass quantities (a million or so of them) to apply therapeutic stimulation. In order for them to know where they are, one idea was to use RF triangulation. Essentially, a helmet with RF beacons would be placed on the patient's head, and then the nanobots could somehow use those beacons and a nanotube radio to determine their location in the brain. Assume that the bots have some processing capabilities. If we placed some beacons around the patient's head, would the close proximity of those beacons allow the bots to find their location to within, say, a millimeter or less? Would direction be possible as well? How many antennas would be required? AI: Using a different method than what you propose, achieving navigation by "bots" at the size you specify does meet your fair game" criteria - but it's almost certainly beyond what is reasonable now. Note that the scale of your 'bot' is in the same order of size as a current IC transistor cell - so you are going to need some other technology changes along the way. I am in the process of trying to explain to people how you can telemeter the position and orientation in space of say a cylinder 2mm in diameter and say 4mm long. That's 2000 micron x 4000 micron, so "rather larger" than what you have in mind but small by most modern standards. The system used should scale to your bots level, provided that you can fabricate to dimensions substantially smaller again - say 100 Angstrom or less wires :-). A method that does work is to use orthogonal coils (2 or 3) and linearly varying 3D external fields to allow the 'bots' to determine their position. Fields are set up using various methods similar to those used for NMR (Helmhotz coils and other). This is not at all hard to do compared to the rest of the problem. Good results are currently reported using coils of under 2mm diameter and the principle can be extended downwards in size. Also, systems like GMR. AMR and other can be used for field angle measurement. It is possible to determine position and orientation from such a system. I have obtained several papers which I can provide references to which show what has been done recently. I can provide references in due course if of interest - rushing off elsewhere at present. Note that powering is an issue at very small scales. Work out how much energy you can store electrochemically! Remote power transfer becomes attractive and is (probably) not too hard in comparison to all the other issues involved. Some people are using magnets and gradient field methods to actually navigate devices internally in people ! :-). One paper that I referred to is described below. Their sensor coils are 2mm diameter. They monitor the real time flight of a blow-fly with 1 kHz update or orientation and position in space. They are achieving 1mm positional accuracy, but that depends on aspects which will be makedly different in a much smaller system. Their system has the massive advantage of having a "tether' - the wires are so light that the blowfly can free fly while trailing an "umbilical" cord. Your nanobots and my sensors do not have this luxury. J Neurosci Methods. 1998 Sep 1;83(2):125-31. Using miniature sensor coils for simultaneous measurement of orientation and position of small, fast-moving animals. Schilstra C, van Hateren JH. Department of Neurobiophysics, University of Groningen, The Netherlands. Abstract A system is described that measures, with a sampling frequency of 1 kHz, the orientation and position of a blowfly (Calliphora vicina) flying in a volume of 0.4 x 0.4 x 0.4 m3. Orientation is measured with a typical accuracy of 0.5 degrees, and position with a typical accuracy of 1 mm. This is accomplished by producing a time-varying magnetic field with three orthogonal pairs of field coils, driven sinusoidally at frequencies of 50, 68, and 86 kHz, respectively. Each pair induces a voltage at the corresponding frequency in each of three miniature orthogonal sensor coils mounted on the animal. The sensor coils are connected via thin (12-microm) wires to a set of nine lock-in amplifiers, each locking to one of the three field frequencies. Two of the pairs of field coils produce approximately homogeneous magnetic fields, which are necessary for reconstructing the orientation of the animal. The third pair produces a gradient field, which is necessary for reconstructing the position of the animal. Both sensor coils and leads are light enough (0.8-1.6 mg for three sensor coils of 40-80 windings, and 6.7 mg/m for the leads, causing a maximal load of approximately 5.7 mg) not to hinder normal flight of the animal (typical weight 80 mg). In general, the system can be used for high-speed recordings of head, eye or limb movements, where a wire connection is possible, but the mechanical load on the moving parts needs to be very small. The abstract is available at a number of places including here and here. Cost of viewing the paper is about $US30 if you do not have a relevant academic or other access. I can comment on the content but NOT send you a copy. Contact me privately if you wish. See my profile page for my email address.
H: How much current is consumed by an avr analog sensor? I'm trying to measure a small analog device that emits about a volt (I believe up to 5V, but I've not measured at extremes yet) AC. I rectify the reading to DC, but I'm really interested in getting something a bit smoother out of it because I just want to know approximately what it's doing. I'm looking to size a reservoir capacitor, but that requires me to know how much current is actually flowing through this circuit. I assume it's non-zero, but must be somewhat close to that. I can compensate by just taking a few samples and picking the biggest one, but I'd like to be able to just take any given sample and have it properly represent the current state (in practice, "current" is on the "second or so" scale). I've seen RMS ICs, but I don't really want to add another $10 to the project when I've already got a reasonable workaround. More importantly, I'd like to understand the stuff I'm working with a bit better. AI: The ATMEGA328P that the Arduino runs on (assuming an UNO or similar) has an input resistance of 100MΩ on the analogue inputs: So, at a maximum of 5V, the current draw would be: \$I = \frac{V}{R} = \frac{5}{100000000} = 0.00000005A = 50nA\$ Half level would be 2.5V, so 25nA, etc.
H: Simple spark gap for ignition - Looks correct? I was wanting to build a simple fireworks igniter (single line, 1m cable to actual firework) Here is my current circuit design: I suppose after the switch is pushed, it will send 9+9 (18V) to the transformer, and for a short time causing an 180 or so volt spike. It will then store and discharge in to the electrodes (a few mm apart I guess) Do you see any major issues with the design? Will small spark gaps like this actually spark with that voltage? AI: Summary: It probably won't work in practice as an igniter for solids. You MAY be lucky or clever, but there are few fireworks ignition systems that use sparks. Very little energy is transferred when the switch is closed in an inductive circuit. Energy is stored in the coil as current increases and released when the switch is opened. Coil "dotting" will need to be changed to achieve spark when the switch is opened. It MAY work for gases. A thermal igniter (heated coil etc) is usually used for solids. The best spark will occur when you "break" the circuit. On "make" the inductance of the primary (labelled sec here) will cause the current to ramp up slowly from zero. When you break the primary current the energy stored in the inductor will be 0.5 x L x I^2 and this is where the energy for the spark comes from. Having a basic pulsing circuit on the left had side would help significantly. A "555" oscillator often turns up in such circuits. If you had nothing on the right had side except the gap there WOULD be a spark at this stage. Adding D1 is presumably meant to isolate the transformer secondary (labelled pri) from the spark gap and series resonant LC circuit. As the energy will be transferred on the break portion of the cycle you will need to reverse the polarity of one or other winding. At present the "dotting" shown means that D1 will conduct on the make portion of the cycle when there will be little energy available. The series resonant circuit is presumably meant to allow an oscillatory waveform to occur with multiple firings of the spark gap, or the gap maintained in ionisation as the polarity changes. However, onm the next half cycle after charging the polarity on L1 will reverse and D1 will conduct and "pri" will now load the signal. What actually happens depends onmvalues of L1, C1 and pri. BUT at best you get the energy from one charge cycle. Real world experience is that fireworks ignition is a demanding task. If you are especially skilled or lucky you may succeed with this design but others have not managed to make this sort of thing work reliably. The higher the current available when the circuit is broken and the higher the total inductance available in the transformer the more ignition energy will be available. Most electric fireworks igniters use an electrically heated element. Even these are less than straight forward. Usually a secondary chemical is volatilised and used for ignition. Spark igniters are probably not the way to provide volatilisation. They do work well on gases but even then, multiple sparks are also usually used.
H: Can you make a non-polar electrolytic capacitor out of two regular electrolytic capacitors? There was some discussion on this question What are some reasons to connect capacitors in series? What are some reasons to connect capacitors in series? which I don't see as being conclusively resolved: "turns out that what might LOOK like two ordinary electrolytics are not, in fact, two ordinary electrolytics." "No, do not do this. It will act as a capacitor also, but once you pass a few volts it will blow out the insulator." 'Kind of like "you can't make a BJT from two diodes"' "it is a process that a tinkerer cannot do" So is a non-polar (NP) electrolytic cap electrically identical to two electrolytic caps in reverse series, or not? Does it not survive the same voltages? What happens to the reverse-biased cap when a large voltage is placed across the combination? Are there practical limitations other than physical size? Does it matter which polarity is on the outside? I don't see what the difference is, but a lot of people seem to think there is one. Summary: As posted in one of the comments, there's a sort of electrochemical diode going on: The film is permeable to free electrons but substantially impermeable to ions, provided the temperature of the cell is not high. When the metal underlying the film is at a negative potential, free electrons are available in this electrode and the current flows through the film of the cell. With the polarity reversed, the electrolyte is subjected to the negative potential, but as there are only ions and no free electrons in the electrolyte the current is blocked. — The Electrolytic Capacitor by Alexander M. Georgiev Normally a capacitor cannot be reverse-biased for long, or large currents will flow and "destroy the center layer of dielectric material via electrochemical reduction": An electrolytic can withstand a reverse bias for a short period, but will conduct significant current and not act as a very good capacitor. — Wikipedia: Electrolytic capacitor However, when you have two back-to-back, the forward-biased capacitor prevents a prolonged DC current from flowing. Works for tantalums, too: For circuit positions when reverse voltage excursions are unavoidable, two similar capacitors in series connected “back to back” ... will create a non-polar capacitor function ... This works because almost all the circuit voltage is dropped across the forward biased capacitor, so that the reverse biased device sees only a negligible voltage. Solid Tantalum Capacitors Frequently Asked Questions (FAQs): The oxide dielectric construction that is used in tantalum capacitors has a basic rectified property which blocks current flow in one direction and at the same time offers a low resistance path in the opposite direction. AI: Summary: Yes "polarised" aluminum "wet electrolytic" capacitors can legitimately be connected "back-to-back" (ie in series with opposing polarities) to form a non-polar capacitor. C1 + C2 are always equal in capacitance and voltage rating Ceffective = = C1/2 = C2/2 Veffective = vrating of C1 & C2. See "Mechanism" at end for how this (probably) works. It is universally assumed that the two capacitors have identical capacitance when this is done. The resulting capacitor with half the capacitance of each individual capacitor. eg if two x 10 uF capacitors are placed in series the resulting capacitance will be 5 uF. I conclude that the resulting capacitor will have the same voltage rating as the individual capacitors. (I may be wrong). I have seen this method used on many occasions over many years and, more importanttly have seen the method described in application notes from a number of capacitor manufacturers. See at end for one such reference. Understanding how the individual capacitors become correctly charged requires either faith in the capacitor manufacturers statements ("act as if they had been bypassed by diodes" or additional complexity BUT understanding how the arrangement works once initiated is easier. Imagine two back-to-back caps with Cl fully charged and Cr fully discharged. If a current is now passed though the series arrangement such that Cl then discharges to zero charge then the reversed polarity of Cr will cause it to be charged to full voltage. Attempts to apply additional current and to further discharge Cl so it assumes incorrect polarity would lead to Cr being charge above its rated voltage. ie it could be attempted BUT would be outside spec for both devices. Given the above, the specific questions can be answered: What are some reasons to connect capacitors in series? Can create a bipolar cap from 2 x polar caps. OR can double rated voltage as long as care is taken to balance voltage distribution. Paralleld resistors are sometimes used to help achieve balance. "turns out that what might LOOK like two ordinary electrolytics are not, in fact, two ordinary electrolytics." This can be done with oridinary electrolytics. "No, do not do this. It will act as a capacitor also, but once you pass a few volts it will blow out the insulator." Works OK if ratings are not exceeded. 'Kind of like "you can't make a BJT from two diodes"' Reason for comparison is noted but is not a valid one. Each half capacitor is still subject to same rules and demands as when standing alone. "it is a process that a tinkerer cannot do" Tinkerer can - entirely legitimate. So is a non-polar (NP) electrolytic cap electrically identical to two electrolytic caps in reverse series, or not? It coild be but the manufacturers usually make a manufacturing change so that there are two Anode foils BUT the result is the same. Does it not survive the same voltages? Voltage rating is that of a single cap. What happens to the reverse-biased cap when a large voltage is placed across the combination? Under normal operation there is NO reverse biased cap. Each cap handles a full cycle of AC whole effectively seeing half a cycle. See my explanation above. Are there practical limitations other than physical size? No obvious limitation that i can think of. Does it matter which polarity is on the outside? No. Draw a picture of what each cap sees in isolation without reference to what is "outside it. Now change their order in the circuit. What they see is identical. I don't see what the difference is, but a lot of people seem to think there is one. You are correct. Functionally from a "black box" point of view they are the same. MANUFACTURER'S EXAMPLE: In this document Application Guide, Aluminum Electrolytic Capacitors bY Cornell Dubilier, a competent and respected capacitor manufacturer it says (on age 2.183 & 2.184) If two, same-value, aluminum electrolytic capacitors are connected in series, back-to-back with the positive terminals or the negative terminals connected, the resulting single capacitor is a non-polar capacitor with half the capacitance. The two capacitors rectify the applied voltage and act as if they had been bypassed by diodes. When voltage is applied, the correct-polarity capacitor gets the full voltage. In non-polar aluminum electrolytic capacitors and motor-start aluminum electrolytic capacitors a second anode foil substitutes for the cathode foil to achieve a non-polar capacitor in a single case. Of relevance to understanding the overall action is this comment from page 2.183. While it may appear that the capacitance is between the two foils, actually the capacitance is between the anode foil and the electrolyte. The positive plate is the anode foil; the dielectric is the insulating aluminum oxide on the anode foil; the true negative plate is the conductive, liquid electrolyte, and the cathode foil merely connects to the electrolyte. This construction delivers colossal capacitance because etching the foils can increase surface area more than 100 times and the aluminum-oxide dielectric is less than a micrometer thick. Thus the resulting capacitor has very large plate area and the plates are awfully close together. ADDED: I intuitively feel as Olin does that it should be necessary to provide a means of maintaining correct polarity. In practice it seems that the capacitors do a good job of accommodating the startup "boundary condition". Cornell Dubiliers "acts like a diode" needs better understanding. MECHANISM: I think the following describes how the system works. As I described above, once one capacitor is fully charged at one extreme of the AC waveform and the other fully discharged then the system will operate correctly, with charge being passed into the outside "plate" of one cap, across from inside plate of that cap to the other cap and "out the other end". ie a body of charge transfers to and from between the two capacitors and allows net charge flow to and from through the dual cap. No problem so far. A correctly biased capacitor has very low leakage. A reverse biased capacitor has higher leakage and possibly much higher. At startup one cap is reverse biased on each half cycle and leakage current flows. The charge flow is such as to drive the capacitors towards the properly balanced condition. This is the "diode action" referred to - not formal rectification per say but leakage under incorrect operating bias. After a number of cycles balance will be achieved. The "leakier" the cap is in the reverse direction the quicker balance will be achieved. Any imperfections or inequalities will be compensated for by this self adjusting mechanism. Very neat.
H: Demodulating a signal generated by IR LED/ phototransistor pair I am driving an IR LED with a 20kHz square-wave signal (I may/ may not use PWM) and I am trying to demodulate the signal being generated by the corresponding phototransistor. I don't have access to demodulator ICs so that means I have to build a demodulator using an op-amp. My current plan is to subtract the original square-wave signal from the IR LED modulated square-wave signal using a difference amplifier built from an op-amp. My question is this: Is a difference amplifier a sufficient solution to my problem, or is there a better option out there? Any help would be much appreciated. AI: I've done exactly what you are trying to do (for photoplethysmography). The demodulation is easily done with a sample-and-hold type circuit. To see why, just think about how the blood modulates the pulses of the carrier signal. It effectively scales the amplitude of the pulses (hence it is amplitude modulation) according to the heart beat waveform. Then the S/H circuit samples the amplitude of each pulse, recovering the heart waveform itself. Here's a working implementation of the circuit. You simply close the switch for a period when the IR LED is on, then keep it open and it will hold the value sampled until the next IR LED pulse.
H: Measuring cpu load of interrupt routine I have an isr that is updating a display at a fixed frequency. I would like to tune my routine to minimize overhead and keep as much cpu time as possible open for other processing, but I don't have any good way to collect metrics to determine my cpu load. I could look at the assembly and analyze the routine, but I don't have the patience or the ability to do that accurately. I don't feel like I need terribly fine grained results either, just a simple percentage of cpu time occupied by the isr. I could set a pin high only when the isr is active and measure it externally. That has a minimum of overhead in the code, but I do not know what to measure it with. I don't have an oscilloscope or anything like that. Is there a simple ic or an easy way to use another micro to measure duty cycle? I have heard of dedicated frequency counter chips, but is there anything for duty cycle? AI: Just a half-baked idea, you might be able to make use of timers like so (pseudo code): int main(void) { /* ... init timers and uart here, enable your interrupts ... */ start_timer0(); while (!timer1Started()){} stop_timer1(); uart_puts("Idle ticks: %d, ISR ticks: %d", timer0_value, timer1_value); } and in your display ISR... ISR_display() { stop_timer0(); start_timer1(); /* ... your ISR routine ... */ } I've made a few assumption here. 1 - that you're not using your timers for anything else, and that, 2 - the overhead of starting and stopping a timer is minimal (typically done with a single register write). EDIT: and a 3rd assumption, you can capture all of this before a timer overflow occurs, but maybe you can account for that as well. There will be some context switch overhead that you won't be able to catch, and this also adds two additional operations in your ISR (be sure to use macros for your start_timer/stop_timer to eliminate function call overhead). If you can get the total number of cycles used for start+stop timer macros, then you can subtract those ticks from the timer1_value to get the ISR ticks value a little more accurately. Your final calculation for % of CPU time used would simply be: $$ Usage_{cpu} = (\frac{Ticks_{isr}}{Ticks_{isr} + Ticks_{idle}}) * 100 $$
H: What electrical processes are behind RECCO system? According to Wikipedia, RECCO system for finding people buried under snow uses reflectors each of which contains a pair of foil aerials, joined by a diode. The text further says the size of the aerials makes the unit a tuned circuit resonating at one specific frequency. AFAIK any piece of metal will reflect electromagnetic waves and will resonate when irradiated with waves of length matching the piece size. How does connecting two pieces of metal through a diode form a resonating circuit? What is the diode doing in that circuit? AI: The diode in a RECCO avalanche victim locator * uses a "diode mixer (see below) which acts as a harmonic generator to produce multiples of the received frequency. While such systems can produce higher harmonics the RECCO system is optimised to produce the second harmonic of the received frequency = 2 x input signal. This 2x effect is used to provide a positive indication that a RECCO device is present. While a resonant length of conductor could reradiate on the fundamental (= received) frequency, the 2 x frequency reradiation is a positive sign that a non linear mixing device is present. Here is an excellent paper on Frequency Multipliers. The whole paper is relevant to some extent but the section on diode multipliers from bottom of page 5 (unnumbered) to page 9 especially applies. A formally optimised diode multiplier may have DC bias applied and tuned input and output structures. Most of this apart from the DC bias may be present in the RECCO device - even though the description given sounds somewhat simpler - all this is just a matter of properly shaped and orientated foil patterns - and possibly the inclusio of one resistor. Note that the single diode arrangement shown radiates on the second harmonic while dual diode version radiates on 3rd and higher odd harmonics. The proviion of DC bias is uiseful but not essential - it allows th ediode to be "moved up" its conduction curve thereby increasing sensitivity From the above paper. The above Wikipedia RECCO writeup says: The RECCO system consists of two parts: a reflector integrated into clothing, boots, helmets, and body protection worn by skiers and riders; and a detector used by organized rescue teams. The reflector consists of a small, flat capsule, about 1/2" by 2" by 1/16" thick, which contains a pair of foil aerials, joined by a diode. The size of the aerials makes the unit a tuned circuit resonating at one specific frequency. The reflector is passive meaning it has no batteries and it never has to be switched on. RECCO recommends users be equipped with two reflectors placed on opposite sides of the body. Many garment manufacturers now place one in one jacket sleeve and one in the opposing side trouser leg. Many snowboard and ski boot manufacturers place one in each boot. The detector sends out a highly directional signal on that frequency from an aerial projecting from the front of the unit, and if the signal ‘hits’ a reflector it is bounced back. And, due to the diode the returned signal is doubled in frequency - harmonic radar. Thus the detector tells the operator that it is pointing at a reflector, and not just a piece of metal the right 'length'. The returned signal is translated into an audio tone whose volume is proportional to the returned signal, and by means of a volume control a trained rescue operator can literally go straight to the buried reflector once a signal is detected. It has (very reasonably ) been asked Well, the circuit diagram shows either two LC-circuits or two grounded circuits. Where's that stuff in the RECCO reflector? Answer Vector sum" :-) - More or less: "diode plus signal = harmonics" ie in an arrangement where maximum results are required you may put more effort into getting the resonant voltages as high as possible. If minimum price and OK performance is required then compromises that work OK are OK. The main requirement is to get a voltage that drives the diode to & fro across it's non linear region to promote harmonic generation, and a good enough tuned circuit is going to do that. The required range is very small compared to what is usually required for radio communications and truly tiny signal strengths are OK. Consider that signal strength decreases with the square of the distance or transmit power requirement increases with the square of the distance. Imagine a transceiver with a 5 km lime of sight operating distance. A 1 Watt transmit power will probably handle that OK with a typical portable antenna. If the RECCO equipment is required to work at say 10 metres then the distance ratio is 5000m : 10m = 500:1. The square of the distances = 500^2 = 250,000:1. If the transceiver works with 1 Watt, a similar signal strength can be obtained from about 1 Watt/ 250000 = 4 micro-Watts = very small indeed. (An AA Alkaline battery would, apart from shelf life issues, provide 4 uW of power continuously for about 100 years.) Given that they say that the RECCO transmitter has a highly directional antenna - as opposed to the the quarter or 5/8 wavelength "rubber ducky" antenna on a typical handheld transceiver which has not much over unity gain, there is extra gain both to concentrate the transmit signal and the receive signal. The proverbial "smell of an oily rag" of signal will be enough for a modern receiver. As a "data point" the APN1 radio altimeter produced just after WW2 used a push pull acorn tube transmitter and dual thermionic diodes in the receiver. This altimeter detected radio ground reflections over a return path length of up to about 6 km (10,000 feet altitude) using a passive diode detector. Frequency of operation was simila to that of RECCO. As noted - a diode plus almost any AC is enough. The foil pieces are arranged to form a resonant circuit such that as one end assumes one polarity the other is of opposite polarity. The diode sees large voltages across it and is operated in its non linear region thus producing harmonics. Consider a typical half wave dipole antenna - TV receiver or amateur aerial etc. The whole antenna establishes an oscillating signal along the receiver element. The feedline breaks this arrangement at the midpoint and transfers the signal to the receiver. In this case "the receiver" is the diode and the feedline is nonexistant. From here This diagram and text The half-wave dipole antenna (Figure above) is the basis of many other antennas and is also used as a reference antenna for the measurement of antenna gain and radiated power density. At the frequency of resonance, i.e., at the frequency at which the length of the dipole equals a half-wavelength, we have a minimum voltage and a maximum current at the terminations in the center of the antenna, so the impedance is minimal. Therefore, we can compare the half-wave dipole antenna with a series RLC resonant circuit as given in Figure 2. For a lossless half-wave dipole antenna, the series resistance of the equivalent resonant circuit equals the radiation resistance, generally between 60 Ω and 73 Ω, depending on the ratio of its length to the diameter.
H: Confused about frequency and bandwidth in BP filter? I am trying to design a simple bandpass filter and I am confused what should be my central frequency and bandwidth should be. I have a 1MHz square wave with 20% duty cycle, so the signal is on for 200nsec and off for 800nsec. I have a rise time and fall time of 10nsec. The desired filter is passing this signal and eliminating all the noise. If my bandpass filter centered around 1MHz, how wide it should be so that I can maintain a decent rise time. According to the relationship between rise time and bandwidth (0.34=tr*BW) my signal bandwidth to observe 10nsec rise time is 34MHz. If my filter is 1MHz +/-5KHz, I would loose the rise time granularity (At least this is what I think since the FFT of that sharp edge will be in higher frequencies and will be cut off) Bonus question: How can I design a BP filter that still allows for sharp rise and fall time and narrow around 1MHz? AI: To answer your last question first, you can't have a narrow bandwidth filter around 1MHz and yet still have a fast rise time. If you think about the spectrum of a square wave, it has frequency components extending to infinity. The higher frequency components contribute to the 'squareing up' of the signal and sharpening of the edges. e.g. see http://mathworld.wolfram.com/FourierSeriesSquareWave.html Having a narrow band around 1MHz means your signal will come out looking like a 1MHz sine wave. With that in mind you have to design a bandpass filter that does not attenuate your 1MHz fundamental frequency too much, yet includes high enough frequencies to give the desired rise time. Following your formula, 0.34 = rise time * bandwidth, you have calculated a bandwidth of 34MHz is required. The next step is to consider bandwidth = high cutoff freq. - low cutoff freq. You want the low cutoff to be less than 1MHz. Let's choose 500kHz. Thus the high cutoff would be 34.5Mhz and the centre frequency 17.25Mhz. To get rid of the most noise, the filter should have a steep rolloff, e.g. the two filters mentioned in the comments. This means your low cutoff frequency can be very close to 1MHz without too much attenuation, and in the higher end of the spectrum rolls off very quickly after the high cutoff frequency, reducing high frequency noise.
H: Why is RS-422 interface interference insensitive? I am trying to understand differences between RS-232 & RS-485. I just don't grasp what is the core principle behind RS-422 inteference resistance? Is it number of wires (4 instead of 3)? Is it because these wires are twisted? AI: Summary In a balanced signal both wires carry the signal, with one wire the negative of the other. In the receiver both are subtracted, giving the double of the positive wire's signal. If both wires pick up a disturbance this will be cancelled by the subtraction. Twisted wires reduce the inductance because the field inverts with each half twist. An inductive disturbance induced in one half twist will therefore be cancelled by the next half twist. See this answer for more details.
H: LED lifespan after current increase I have a 3W LED that the manufacture states that if I 'feed' it with 750mA it will 'live' 100,000 hours (Very good heat sink, mid ambient temperature, etc....). Assuming this is correct and the manufacture knows what he is talking about, how will the lifespan of the LED be affected if I 'feed' it 800mA? 850mA? Will the lifespan will be shortened dramatically? Or 50mA isn't such a big deal? I'm sure there is no straight answer but even a 'rule-of-thumb' will be good. Thank you for your answer Gilad. AI: This answer is based in part on my personal experiences in building solar powered LED lighting in China over the last 4 years. You learn a few things along the way :-). The actual lifespan, properly operated, depends critically on the manufacturer. The "big 5" (or 6) and their licensees can make long life LEDs. Vanishingly few others manage. If it's Luxeon / Lumileds (Philips), Osram, HP (Avago) , Nichia, Cree and probably Siemens, Sharp, Seoul semicondutor* OR a company that has licenced their technology and used it properly and completely then you may well obtain the performance claimed. (I will have missed a few here). If there is NO traceability by formal contract with the big 5 you will very very very likely not achieve the claimed performance. Up to 10% over rating may not make a vast difference but it will definitely be a measurable difference. eg 800 for your 750 mA part is about 6.5% over. 850 mA is 13%+. The differences between the two will be noticeable. LEDs of another age could often withstand pulsing at immense current ratios as long as mean power was limited. Modern "phosphor LEDs" often have I_abs_max very little more than I_optg_max. Die temperature and absolute current level both impact lifetime wholly independently. (Many people are unaware of this an seem to think that temperature is what matters and that current is only a "proxy" for temperature. As a guide, a part I use that is rated at 50,000 hour at 30 mA is rated at 14,000 hours at 50 mA. Here's a LED patents relationship chart. ex LEDs magazine 2006/2007 so somewhat dated. Note that using a manufacturer's die may NOT mean you get all the advantages. eg many makers say "Cree chip inside" BUT they can do things that reduce lifetime. Lead frames, epoxies, mounting stresses, ... all have effects. This Future lighting solutions page may be useful. Luxeon features in the fine print Lumileds do a very nice lifetime versus various parameters document with good discussion. I can dig a coy up in due course if you don't find it by web or site search first.
H: Blending RGB LED colors together Although this question is more of an optics than electronics, it strongly involves LEDs so I think it is a good idea to post it here. I have a simple 3W, RGB LED with a 5deg lens. Everything is connected and and works but when projecting the light on the wall I can easily see the 3 different colors. I tried using a diffuse lens with partial success as the color mix inst 100%. Is there any way to fully mix the colors of a standard 3W RGB LED? AI: I had this problem when I was making a propeller display. We bought some clear lens leds but we were getting this same problem. More precisely, the cause is that there are 3 physically different LEDs inside the package. Now there are two options which worked for me. (But take all of this advice with a grain of salt since I worked on simple 5mm low power LEDs, as the size and power goes up things change.) Change the LEDs and get diffused lens ones. Like this here. I really don't know why someone would want a clear lens one. But I don't know much about optics. If you are really careful you can just use sandpaper to make the outer surface diffused, but I would not advise that, since I damaged some LEDs by doing that, before I got good results. Another way is to use something to diffuse the light. I know you used lenses but those worked for me, and I don't know why they didn't work for you. Maybe a pic showing your setup would give us a clearer idea. I got good results with covering them with a little butter paper. Normal paper could be used, but of course that will dim the lights way too much.
H: Lower Lifespan Components? So i've searched around the site, and there have been some questions about Capacitor shelf life and it being a somewhat sensitive components. But are there any other "Lower" life components that someone would need to be aware of (Both Shelf life and "In Use" life, or whatever you would call that). I figure Capacitors would be sensitive and relays (since they have moving parts) but what else? and wouldn't a ceramic capacitor generally last longer than a Electrolytic? -Also as an Add-on, is there a site listing or something with a "Average" lifespan of the most common components (Resistors/LEDS/Caps/etc)? AI: Electrolytic capacitors are probably the most common short life component. Some are only rated for 2000 hours or less, which really isn't much for many devices. However, their life can be significantly extended by running them below max voltage and temperature. LEDs are another component that wears out with time. Again running below max rated current will extend life. For good LED life getting it from one of the few major manufacturers, and making sure there's no cheating in the supply chain, is important. Photovoltaic cells also degrade with age and use. The cathode coating of vaccuum tubes wears out. As a result, the work function goes up and more anode voltage is required to get the same current. The fillament of a incadescent bulb keeps shedding atoms, and eventually wears thin and breaks. Fillament life is inversely proportional to something like the 12th power of the applied voltage (it may not be exactly 12, but it is quite surprisingly high if you haven't thought about it before). Metal oxide varistors (MOVs) wear out a little every time they absorb energy. Then of course there are batteries, fuses, and the like which are intended for limited operation, but that's not what were talking about here. Most other components don't really wear out with use as long as their specs are not violated. Plastic will eventually degrade, silicon dopants will diffuse, etc, but these are such slow processes to be irrelvant in normal settings.
H: Using Logic-Analyzer to reverse-engineer ISM-band ASK/OOK encoding, possible? Is it possible to use a Logic Analyzer (such as this one), to determine the waveform s.t. on the DATA out pin of an ISM-band ASK/OOK (315/433.92MHz) RF module, in turn to decode it's encoding scheme. I know for sure that it is not Manchester/NRZ. By 'waveform', I mean the highs/lows with the duration of every bit Note that this questions is an extension of my other thread on choosing a DSO. While I might still go in for a DSO, but I really wanted to thoroughly understand the LA as an option for my purpose. Now for the other (possibly dumb) question -- will a logic-analyzer work without a clock input ? Say in my case of decoding ASK/OOK encoded data, I have no way to retrieve the clock, as this is asynchronous operation. Query extension (Nov 9, 2011): My target RF encoder's encoded pattern uses 32 oscillation cycles to encode every bit. So for 9600baud, I have 307200 sample/sec. However, for better accuracy, it might be good to use 3x-5x that many no. of samples (does this concept apply for Logic Analyzers as well) ? If that is true, then for 5x sampling, I'd need 1536000 (~1.5Ms/s), on a single channel. Of course, this reasoning for (kind-of over-)sampling comes from the DSO world, but not sure if it applies for Logic-Analyzers as well ? AI: I did exactly that in a previous project, I didn't use the open logic analyzer but the bus pirate which uses the same software. http://s3cu14r.wordpress.com/2011/06/19/basic-rf-sniffing-with-the-bus-pirate/ I used this to decode the protocol for another project that sniffed RKE data. http://hackaday.com/2009/10/03/garage-door-packet-sniffer/ Hope this helps.
H: Why are digital oscilloscopes still so expensive? I'm a beginner in hobby electronics and I am wondering why digital oscilloscopes are still so expensive? In times of cheap GHz CPUs, USB 3, ADSL modems, DVB-S receivers, blu-ray players which all of them have remarkable clock frequencies/sampling rates it makes me wonder why a digital oscilloscopes which is capable sampling signals of a bandwidth of 10MHz are still very expensive, 100MHz is already high-end. How can this be explained? What differs the ADC from an digital oscilloscopes from one of the devices mentioned above? AI: I'd firstly agree with other posters as to economics of scale. Consumer devices are produced in the millions whereas such a market does not exist for digital oscilloscopes. Secondly, oscilloscopes are precision devices. They need to undergo rigorous quality control to ensure they live up to expected standards. This further increases costs. As for bandwidth. The Nyquist criterion states that the sampling rate should be at least twice the frequency you want to measure. But even at twice the rate, it is terrible at best. Consider the following pictures: The graph captions tell the story. You need to exceed the specified bandwidth by a great amount in order to gain an accurate representation of the square wave input signal (high frequency harmonics). And greater bandwidth = greater cost. In the end the precision, bandwidth and limited production quantities that drive up prices.
H: Plated Through Hole at home? Is it possible to make PTH (Plated Thorugh Hole) at home? Can somebody explain the procedure? AI: As Majenko says, a few folk have tried the conductive liquid route. From what I have read it seems to work okay but requires fine tuning and experimentation (but then so do the rest of the home brew PCB techniques if you want the best possible results) I like the idea of conductive liquid/vacuum followed by copper electroplating to make them more reliable. In general I agree with Mike - if you are doing this at all seriously etching your own is simply not worth it given the speed/price/ease of obtaining great quality boards. However if you need a quick hack or are in a rush to try something out though I find it certainly can come in handy to have a little etch tank sitting there. Anyway, another suggestion is to use through hole rivets. I have used these (the 0.6mm and 1.0mm ones) with great success on my etched boards. I didn't bother getting the press as it was too expensive to use for something I only do occasionally when in a hurry, but it works fine without if you can cope with a little bit sticking out on one end (~0.4mm) and having to solder them. If you are planning to do this a lot grabbing the press would probably be worth it (or hacking one together yourself with e.g. a hole punch and pin) Here is a picture of them in use (e.g. there are 2 next to the light brown capacitors pads just below the top IC) Resistors are 0603, traces from ~0.25mm to ~0.8mm, rivets 0.4mm hole, 0.6mm diameter.
H: Complete alternatives to the Arduino IDE? I'm not that big of a fan of the official Arduino IDE (in terms of visuals), so I've started looking for nicer alternatives. However, most of the projects I've found are in alpha/beta and are generally incomplete. I'm 100% new to circuit board programming and I've never used an Arduino before, but from what I gather the Arduino IDE is just a wrapper for an avr library which does the actual writing to the board. Are other "arduino-like device" IDEs a possible option? Again, I'm very new to this so user-friendly-ness would be nice. AI: Warning, a long-winded explanation is forthcoming. I'd like to clear some misconceptions that I think you're having. The Arduino is really two things. A collection of C/C++ libraries compiled with avr-gcc and A small bootloader firmware program which was previously programmed onto the chip from the factory. Yes, the Arduino IDE basically wraps avr-gcc - the AVR C compiler. Your projects, or "sketches", incorporate the mentioned Arduino libraries and is compiled with avr-gcc. However, none of this has anything to do with how anything gets written to the board. How these sketches are deployed is a bit different than usual. The Arduino IDE communicates with your Arduino over the usb-to-serial chip on the board and it initializes a programming mode that the bootloader understands and sends your new program to the chip where the bootloader will place it in some known location and then run it. There is no "avr library which does the actual writing" - it's just the Arduino IDE opening a serial port and talking with the bootloader - this is how your debug messages get printed to the IDE during runtime as well. Any alternative IDE will have to be able to do this same serial communication with the bootloader. Arduino is easy because of all the libraries they already provide you with and one-touch program-and-run from the IDE. I honestly don't think it gets any easier, or more user friendly. They've abstracted all the details of the AVR micro-controller and the building/deploying process. The alternative would be something like avr-studio (which also uses avr-gcc for its compiler) and an ICSP programmer (which is an additional piece of hardware that you have to buy). You aren't provided with much other than some register definition header files and some useful macros. You also aren't provided with any bootloader on your AVR chip, its just a blank slate. Anything you want to do with the microcontroller, you'll have to go in depth and learn about its hardware peripherals and registers and move bytes around in C. Want to print a debug message back to the PC? Write the UART routine for print() first and open a terminal on your computer. A step lower from this you're writing code in an text editor and calling avr-gcc and avr-dude (programming command line tool) from a Makefile or command-line. A step lower from that and you're writing assembly in a text editor and calling the avr-assembler and avr-dude. I'm not sure where I'm going with this, I just think that the existing IDE and Arduino is absolutely genius and perfect for a beginner - their claim to fame is user friendly-ness. Maybe not the answer you're looking for, learn the work flow and make something cool with it.
H: What device should I buy to cool liquids in a container Basically I have a large Evaporative Cooler (one of those fans that you can put water in the bottom of). It has a really large container so it can last a day or two. The problem is once the water gets hot its doesn't work as effectively. I was wondering if there's some type of cooling element I can purchse that could be rigged up in the water? I'm just not sure what I should be Googling for, does something like this exist? Using a commercial refrigerator would be too big and too expensive. Is their some form of electronic device which can be used to apply refrigeration or cooling to reduce the water temperature, and how well would this work ? AI: You can use a "Peltier effect" cooler of the sort that you get in 12V powered portable refigerators / chilly bins/ eskys / ... . You can ither use an existing bin as the source or you can but Peltier effect devices from surplus and electronics suppliers. As you would then need a fan + heatsink + 12V power supply a complete bin may be cheaper and would be easier. HOWEVER - it seems likely that the loss of effectiveness you are perceiving may not be real or may not be major. Another effect may be occurring. I say this because the very major part of the cooling from such a device is supplied by the "latent heat of vaporisation of the water and the actual heating of the water as a liquid should be a minimal part of its cooling effect. Energy required for heating water or for vaporising it is measured in Joule = Watt seconds. The energy involved is About 4.2 Joule per cc of water per degree C heated. About 2260 Joule per cc of water when evaporated. If you heat 1 cc of water fron 0c to 100 C you require only 4.2 x 100 = 420 Joule but you need 2260 to vaporise it. If you heat your water by say 30C then you remove 30cc x 4.2 J/cc = 126 Joule/CC but this is far less (~= 6%) than the 2260 Joule needed to evaporate 1 cc of water INTEREST: It requires 2260 Joule to vaporise 1cc of water. As there are 3600 seconds in an hour it takes 3600/2260 =~ 1.6 Watt to vaporise 1cc per hour or 1600 Watt to vaporise 1 litre/hour.
H: Simple, passive way to remove high frequency interference from low power audio I have used the innards of a Korg Mini-KAOSS Pad to add some amusing effects to one of my electric guitars, but in order to do this I had to remove the original input connectors and wire my pickups directly to the input circuitry. The input voltage is fine, however I do now have a problem with a high pitched digital sounding whine when using effects. My assumption is that the input connectors probably had some type of rolloff circuitry (almost certainly passive) and in removing these I am getting interference from the high frequency oscillators in the DSP circuitry. As part of my remediation I am increasing shielding, but realise I probably need to add a filter to remove higher frequencies. tl;dr - is there a simple circuit (ie probably just an R/C) that I can pop in to roll-off rapidly above the usual frequencies I would get from my guitar strings? AI: Can you show us a picture of exactly what you removed? (and maybe the input circuitry) Any filtering will likely take place after the input amplifier, so it's possible something else is happening. It certainly wouldn't hurt to add a simple RC filter just in case though, then if the problem persists you know it's something else. If you do this I would go for something like Olin suggests but adjust the values for your guitar pickups (e.g something like 100k for R1) which will probably be higher than 600 \$\Omega\$. For line level connections, old equipment was often matched 600 \$\Omega\$ in/out. Nowadays however it's usually Lo-Z out to Hi-Z in. The Hi-Z input is often 10 k\$\Omega\$, but can be higher. You could measure the resistance across your Mini KAOSS input (be sure to do it after any DC blocking cap if present) to find out exactly what you are working with. YOu could also measure your pickups DC resistance to get a rough idea there too. I can only see a line in connection, which will probably be expecting a lower impedance signal than your guitar can provide. Have you tried putting your guitar through a preamplifier/DI box? There may possibly be a DC blocking input cap you may have removed, which might cause strange things to happen. Here is a clip of a typical guitar amp input to give you an idea of what it expects to see. Note the 1 M\$\Omega\$ input resistor. I'm no expert on guitar (passive coil) pickups but I think they are commonly around 5-20k (varies with frequency) A piezo pickup will be much much higher.
H: What rechargeable battery is suitable for severe frost (−10 Celsius and below)? Suppose I want a rechargeable battery for a hybrid electric vehicle like Toyota Prius - one that can power the vehicle traction motor at low speeds. The vehicle would have to operate in a region where −25 Celsius is not uncommon and −10 Celsius is typical for several months per year. What battery chemistry is suitable for such requirements? AI: From what I've seen, the lithium ferro-phosphate types (check out A123) have better low temperature performance than most. I won't say "good" performance because really no battery is good in the cold compared to room temperature, but some not as bad as others. The first generation of popular hybrids, like the Toyota Prius and the Honda Civic for example, used NiMH batteries. The newer lithium were known at the time but not deemed ready for volume end use. The next generation is being designed with these batteries. If I remember right, the Tesla and Chevy Volt use them already.
H: Assembling ARM computer I want to assemble my own mini-computer with ARM processor, but I don't know the start point I must to start. Can you advice me some articles or other sources where I can read something about that? EDIT: I want to assemble computer with ~500-700 MHz CPU freq, 128-256 MBytes operational memory, ethernet, wifi, VGA EDIT: Now I am a bachelor in IT, and programming is the best I can. In hardware I does not know so much. In university I've listen several courses like Computer (CPU) Architecture, Disctrete Math and other like this. I want to replace my annoying home proxy-server with that computer to decrease noise and energy consumption, and it is also interesting :) AI: You can't do that as a beginner. It's more realistic to split it into two parts: Buy a suitable small ARM computer for the server (for example a Beagleboard). Tinker with microcontrollers to learn about hardware.
H: Sources for cheap/free electronics for students? I've just recently discovered an incredible interest in building my own circuits and my own logic. I'm in a computer architecture class and we're learning how to make ALUs based on a set of instructions. Last year, we would create logic circuits on a breadboard using NAND and NOR chips. This year, we're using Altera to download circuits we build in software to download to a circuit board. This stuff gets me so excited, it's not even funny. I've been collecting certain parts (some logic gates and LEDs) and I have a breadboard. I'm also thinking of buying an (or a couple) Arduino(s). However I want to build more complicated circuits with other components (variable resistors, sensors, etc). Is there a good online source where I can buy these on the cheap (maybe even bulk)? I've also heard of companies giving parts for free (as long as it is for education purposes, which I believe it is). I'm a student and I can't afford to spend significant amounts of money on a part collection, but I do want to learn and explore.\ (On a side note, I've read Which electronics components should I always have on hand?. Does this apply to a student as well? Any advice on WHAT components I would benefit from?) AI: I am also a student and always try and get the parts as cheap as possible. Here are a few pointers: Many companies give out free samples of their devices. One of my lecturers posted this on his website: For "samples", try Texas Instruments, Maxim-IC, Microchip and Motorola (ICs) en Samtec (connectors). For National Semiconductor, Philips, Atmel, ST Mirco, ens., ask EBV Elektrolink (Local distributor) for samples. Most of these companies will provide you with a couple of samples if you fill out a small form. If they do not, email them and ask if they will assist you for "educational" purposes. Another source I usually look at is Ebay. Many Chinese manufacturers sell their LEDs and other products cheaply over Ebay. It might not be the best but nothing beats 100 LED's for $5. I have dealt successfully with these suppliers: http://stores.ebay.com/ledhk http://stores.ebay.com/bestchoose702 http://www.ebay.com/sch/sweetflower8588/m.html?_nkw=&_armrs=1&_from=&_ipg=25&_trksid=p3686 Try and look for local supply companies in your area/country. Stay away from big supplies such as RS. They usually have EVERYTHING but you pay a premium for their service.
H: programmer is not responding with stacked shields I keep getting the following error when trying to upload my code with the Arduino IDE: avrdude: stk500_recv(): programmer is not responding I stacked the following shields: Sparkfun ColorLCD shield (shieldlist reference) Libelium XBee shield (shieldlist reference) on top of a Arduino UNO. I first thought it could be coming from the shields draining too much power from the USB port, but connecting an external power supply hasn't changed the situation (I had to set it up to 7,5V/600mA to avoid overheating). I'm kind of lost here, judging from shieldlist I should only be worried about the power supply, which is obviously not the case. Any idea about my problem? AI: The culprit will be the XBee shield. It uses the TX and RX pins. These are also used by the programming system. If anything is connected that uses those pins while you try to program it can interfere with the programming data. I usually design shields that use the UART to include a pair of diodes to isolate them from the rest of the UART system and allow programming to work while the shield is connected.
H: How does active power factor correction in computer power supplies work? I'm not looking for very detailed explanation (although it would be welcome). I'm more looking to intuitively understand how it works. Basically in computer PSU I have input followed by filters followed by PFC circuit followed by switch followed by transformer followed by rectified and in the end I have output filtering and consumer. From what I've read the same PWM circuit which controls the switch and regulates voltage at the output also controls the active power factor correction. What I don't get is the way the power factor is actually corrected. Here's a picture: How do those two transistors work here and how would the PFC controller determine that the power factor is bad? I know that the power factor is usually corrected with coils and capacitors and I see both here, but I don't understand what actually happens when one of the transistors starts to conduct, why two transistors are needed and how that affects the power factor. AI: The power factor is managed ("corrected" is really the wrong term, although its the common one) by making the current follow the voltage. In your schematic, the bus voltage will be a bit higher than the peaks for the AC waveform. The inductor, FETs, diode, and capacitor form a boost converter. This converter takes the rectified AC input voltage and makes the bus voltage. If the control system only regulated the output voltage, there would be no PFC happening. What it does instead is regulate the average current thru the diode to be proportional to the instantaneous rectified AC input voltage. Remember that the ideal load from a power factor point of view has the current in phase with the voltage. Another way of looking at it is that load on the AC line needs to look resistive. Just like a real resistor, you want to keep the current proportional to the voltage. Of course that is at odds with regulating the bus voltage. This is handled by having a fast response to the AC input voltage but a much slower response to regulating the bus voltage. In other words, the AC line still sees a resistance, but the resistance value is slowly changed as needed to keep the bus voltage near its target value. You can check out my Digital PFC Control writeup for more background on PFC and a way I came up with to keep the current proportional to the voltage without having to measure the current. I've got a patent on that, which also includes using digital computation to control the bus voltage more accurately. With a little computational power, you can know what ripple is caused on the bus due to following the AC line voltage, then use that to determine what changed due to varying demand from the load. This allows adjusting to load changes more quickly than the conventional approach but without defeating the PFC function.
H: Identify a fuse part I'm trying to identify a fuse part that says 125V T 2A on it. It seems to be a solid state fuse soldered in place. IE I can't just snap in another replacement fuse in a glass tube like I'm accustomed to. So I need to desolder this one and solder in another. Anyone know where I can order one or if it would be possible to put in a holder for a more regular one? I'm hoping I'll do better here than with the no-comment public post on Google+ I had. AI: Yes, that is a fuse. Just a normal fuse. You see the little holes above and below it? These look to me like they're to take a standard PCB mount fuse socket. The solid module is easier to auto-assemble than a traditional fuse. Check the traces under the board - you may well be able to replace it with a standard fuse socket and use a normal fuse.
H: Powering microcontroller off USB, load off wall-wart I'm developing a light display thing using a Teensy 2 and a digitally addressable LED string that draws quite a bit of power, more than can be provided over USB. I have ordered a switched wall-wart style power supply that more than adequately meets the power needs of the system, and should serve me well in production. During firmware development however the Teensy will be connected over USB to the host computer. The methods recommended by the manufacturer are a bit invasive. I like that the Teensy is powered over USB, and I plan to keep using that function after this project is done. Also, I don't really feel comfortable taking a razor to my Teensy, let alone soldering an additional component to those tiny tiny pads. Question: Is it possible to power the Teensy off the USB connection and the load off a separate power supply if I make sure they share a common ground potential? Do I need to take any special precautions? Is this just a really really bad idea? I can't shake the feeling that I should not be doing this, but I can't think of a reason why. Can anyone settle this one way or the other? UPDATE Thanks to your excellent answers, I now have 50 individually addressable 24-bit color RGB LEDs in my Christmas tree. Read more about it here and here! AI: Since the digital RGB pixel strand uses a 5V SPI-like interface, and the Teensy 2 is also running off of 5V USB power, then as long as the grounds are connected in common you should be able to run the two off of separate supplies and just route the two digital leads (green and yellow) plus ground (blue) to the Teensy, and the +5 (red) plus ground (blue) to the separate wall-wart power supply. They give an example of this using an Arduino. As they mention in their writeup, wire colors can vary from batch to batch so the above instructions may need to be adjusted.
H: How to find connectors for Densitron TFT displays I'm having a hard time to find information about the connectors for a TFT display I just bought from Densitron. The cable is physically similar to FFC/FPC, but the terminals are not straight, so I can't use normal FFC/FPC connectors. The measures are in mm, and this particular connector has 39 pos. Does anyone knows if there's a specific name I should search for at Digikey/Avnet/etc.? AI: I think the connector you need is one like this or similar. They seem to be quite common now, I suspect if you type in "FFC 39" (or "FFC" and then select results with 39 pins) most of the results will be similar. Here are the results I got when doing this on Farnell, I only checked the first two but they both had the same pattern (I selected the second as the first is no longer stocked) If you check near the bottom of the datasheet, it shows a diagram of a typical FPC pattern which would be used with it. This looks like the diagram in your question, you can check the dimensions to make sure.
H: Benifits of using Breadboard instead of PCB What are the main advantages of using breadboard instead of PCB? AI: Works great for quick prototypes using through-hole resistors, capacitors, and DIPs with 22ga solid-core copper wire. You need to be aware of the disadvantages though. not meant for withstanding high voltages (don't plan on anything above 48V) not meant for carrying high currents (I'd consider anything over 20mA questionable and anything over 100mA objectionable) high parasitic inductance and resistance high parasitic capacitance between adjacent rows The last two are issues with high bandwidth circuits; don't expect to send around 10MHz analog signals easily. One way of getting around it a little bit is for sensitive signals to use every other row and ground the in-between rows. (this is somewhat like using a guard ring) This also works well for reducing unwanted Miller capacitance e.g. between base and collector pins of a bipolar transistor.
H: Can I log current using a voltage input and V=IR I have a sensor which produces a current proportional to the variable it is sensing. My data logger only accepts input as a varying voltage, which it then encodes in 8 bits (scaled linearly to volts). Can I somehow use this and a knowledge of the equation V=IR to allow me to measure the current (and therefore the variable that the current is proportional to) with my datalogger? Or would I need to find a logger that can log current directly? AI: Yes. Pass the current through a resistor to ground, then measure the voltage across that resistor with your data logger.
H: Various Memories? Is the basic device to store the bits are Flip Flops or Not? There are Various types of memories are available in the market such as RAM, ROM, FLASH Memory,SDRAM etc.... Then what is the basic memory unit is used in it in order to change its functionality? Is clock is compulsary for a flipflop to store memory? or It'll store the bit value without clock? What makes the flipflop to store the value in it? with reference to this Question which I asked previously AI: Bits can be stored on any system that can latch, not necessarily a flip flop. For instance a latching mechanical relay can be used (and has been) or a magnetic core, etc. All the different technologies use different methods. I'll deal with SRAM for now as it seems relevant to your previous question. Maybe add more later. SRAM (static RAM) uses some kind of latch arrangement. The basic 6 transistor version uses cross coupled inverters: This is a bit like the latch in the below diagram except there are no resistors (the collector resistors are replaced by the PMOS devices M2 and M4) The value to be written is placed onto the BL lines, then the WL line is set and state is forced as M5 and M6 (which would connect at A1 and A2 - or E1/E2 as RB1 and RB2 are not present) have a much higher drive than M1,2,3,4, overriding them and forcing a state, which will then be held. You can see this does not require a clock, just a simple set/reset operation. In contrast some latching circuits (there are many) use a clock to enable the set/reset to take place (effectively gating the input signal) Here is a diagram of a gated latch: Now you can see unless E is at 1 then S or R will have no effect. The clock could be attached to E to only enable changes to be latched when high. DRAM (dynamic RAM) uses a capacitor to hold a charge which represents 1 or 0. This requires a refresh to take place temporarily as otherwise the charge will leak from the capacitors. It is also generally slower than SRAM. The advantage is that it can be made much smaller as it uses fewer transistors (check the average DRAM versus SRAM IC size/price and you can see a considerable difference)
H: Remote Control Design I am want to design a remote control. All I need is the appropriate IR LED and the Receiver to use, that will yield optimal performance. i need real practical experience here. What is the best receiver to use. Photo diode or a Photo transistor. As regards the distance. This remote control ought to work like that if the Indoor AC,radio or TV sets, where at a distance of about 10-12 Feet maximum. Also I am considering a good reception angle for the receiver. I have know about the modulation method, which I believe is the best. So how do I possibly go about it. Circuits diagrams, components data sheets, and detailed analysis will be greatly appriciated. Thank you all. AI: As starblue says, standard recievers are available for this. Here are some options for recievers. Another list of emitters. Using a ready made reciever is a lot easier than making your own. They contain filtering and adapt for ambient light conditions. Matching this performance is difficult and not really worth it given the cheap price you can buy them for. You need to choose an emitter/reciever pair with matched wavelength. Then you will need to modulate your emitter in burst for 1's and 0's at the stated frequency of the reciever. You can choose which protocol you wish you use - RC5 is a simple and popular one. I hacked a little PIC based remote to work the sky box using RC5. This link helped a bit. On the same site there is more useful info on other protocols and basic Remote Control theory.
H: How many kilowatts (or amps) can I safely draw from the AC grid? I rent a house in the SF Bay Area. The house is not exactly new, but it's in good condition; hopefully the AC installation is the same. Most AC outlets are without grounding; but fortunately, there are two outlets in the backyard that do have ground connectors. I am thinking to build a kiln to fuse and slump glass. The problem is, these things draw a lot of power. I was told I may need 8 kW, perhaps more. Well, that's 72 A on a 110 V grid. Is it safe to draw that much power from a regular outlet? If not, what other options do I have? Keep in mind, I rent this house, so I can't do any hacks. The heating elements will probably be controlled via some nice hefty triacs (with an Arduino behind them, or something), which will open earlier or later during each AC cycle depending on how hot I want to make the kiln. Probably doesn't matter, but anyway, it's not a purely resistive load. AI: As others have said, 72A can't be drawn from a regular outlet and will need special wiring. Legally, this wiring will need to be done by a licensed electrician, and of course will require the landlord's approval. As to whether the grid feed can support that, that is something you should be able to ask the electric company. My house is in Massachusetts, was built in 1985, and has 200A service. That's fairly typical of new construction, but less is common in older houses. Again, this should be a easy answer for the electric company. As for the Adrduino controller, that's a bad idea. Since you obviously aren't expert at either electric power handling or microcontrollers (that's not a bad thing, just a fact), this is not something for you to hack around at. This is in no way a beginner project, since it's handling high power levels and lethal voltages (you will certainly be using 220V for this not 110V). If you do somehow end up trying to do the temperature contol and power handling yourself, I would definitely not use phase angle control on a cycle by cycle bases as you mentioned. First, this will cause nasty harmonics on the power line current, present a bad power factor, and maybe get you into trouble when neighbors report excessive radio interferance. Second, you don't need to control the heater power anywhere near that fast anyway. The first time constant of the heater system is probably measured in a few minutes at least. The control system can easily decide to switch the heater on or off for multiple seconds at a time. Plain old relays are appropriate here because the currents are substantial and you don't need to switch often. As I said above, every 10, 20, or 30 seconds is probably good enough. Unfortunately relays aren't synchronized to the power line zero crossings. A possible solution is to use zero crossing solid state relays for the actual on/off switching, with a mechanical relay taking over shortly after the solid state switch goes on up to shortly before it turns off. The reason for not using the solid state switches during the steady state on phase is that they drop some voltage. At your current levels, that will result in significant heat, which will be a lot of trouble to deal with. By having the solid state switches only dropping this voltage for a cycle or two at each transition means you can operate them at their peak current rating and not worry about cooling them that much. This also reduces the stress on the relays since they won't be switching high voltages. The relay output is in parallel with the solid state switch output, and the relay is only switched when the solid stat switch is on. This will greatly reduce wear on the contacts and thereby increase relay life.
H: What's the 2N3904 / 2N3906 FET equivalent? Is there a generic low-power switching FET that's multiply sourced, generally readily available, most simulators already have models for, etc.? I'm not looking for FETs that have similar electrical characteristics to the 3904/3906; I'm looking for FETs that have similar ubiquity. AI: 2N3819 and 2N3820 JFETs, BSS84 and BSS123 MOSFETs. They are rather old, but are readily available.
H: Simple capacitor use for buffering a battery? I have a simple application where a 6V, 2A DC power supply is driving 4 hobbyist-grade servos. In most cases this is adequate, but there are cases (when all servos are suddenly loaded) when I think the power draw will exceed 2A for a short period of time. It was suggested to me that I should use a capacitor between my power source and the servos in order to handle this kind of transient load. Unfortunately the suggestor didn't know how this would actually be implemented. I tried the University of Google, but mostly came up with videos of giant capacitors being used to dramatically explode things. Could someone point me in the right direction, or give me a simple circuit example of how I would do this. Is it as simple as wiring a capacitor onto the positive lead? What calculations should I make to determine the appropriate capactitor size? For example, if I wanted to sustain a peak of 3A for 5 seconds. AI: Subset summary: I = excess current to be provided. T = time to provide this extra current. V = acceptable drop in voltage during this period. C = capacitance in Farad to meet this requirement. Then: C = I x T / V In theory, and close enough to be useful in real applications: One Farad will drop in voltage by one volt in one second with a 1 Ampere load. Scale as required. The results are not encouraging :-(. (1) Providing a capacitor to do everything For over current of I ampere, droop of V volt over time T seconds (or part thereof) Capacitor C required is, as above) C = I x T / V <- Cap for given VIT ie more current requires more capacitance. More holdup time requires bigger capacitance. More acceptable Voltage droop = less capacitance. or droop given CIT is, simply rearranging Vdroop - (T x I) / C or time a Cap C will hold up given C I V, simply rearranging = Time = T = V x C / I So eg for 1 amp overload for 1 second and 2 volt droop C = I x T / V = 1 x 1 x/2 = 0.5 Farad = Um. Supercaps may save you as long as required peak current can be supported. SUPERCAP SOLUTION A Supercap (SC) solution looks almost viable. These 3F, 2.5V supercaps are availale ex stock from Digikey for $1.86/10 and under 85 cents in manufacturing volume.Prices For the 3F, 2.7V unit the acceptable 1 second discharge rate to 1/2 Vrated is 3.3A. Internal resistance is under 80 milliohms allowing about 0.25V drop due to ESR at 3A. Two in series gives 1.5F and 5.4V Vmax. 3 in series gives 1 Farad, 8.1V Vmax, same 3A discharge and 0.75V drop due to ESR at 3A. This would work well for surges in the tenths of a secnd range. For the specified wort case 3A, 5 seconds requirement perhaps 15 Farad is needed. The same family 10F, 2.7V $3/10, 26 milliohm looks good. 10A allowed discharge. Two in series drooping from 5.4 to 5 volts at 3A gives T = V x C / I = 0.4 x 5 / 3 = 0.666 seconds. Getting there. (2) IF the droop causes system reset etc and one wishes to avoid this (as one usually does :-) ) an often useful solution is to provide a sub supply for the electronics with cap that hold them up over the dropout period. eg electronics need say 50 mA. Holdup time desired = say 3 seconds (!). Acceptable droop = 2V say. From above C = I x T / V = 0.05 x 3 / 2 = 0.075 Farad = 75,000 uF = 75 mF (milliFarad) This is large by most standards but doable. A 100,000 uF supercap is reasonably small. Here the 3 second holdup is "the killer". For a more typical say 0.2S dropout the required cap is 75,000 uF x 0.2/3 = 5000 uF = very doable. (3) A small holdup battery for the electronics can be useful for obvious reasons. (4) Boost converter: In a commercial design where 4 x C non rechargeable batteries were used, to provide 5V, 3V3 and motor drive battery (exercise equipment controller) end of life Vbattery got well below needed 5V during end of battery life and much much below when motors operated. (The primary design was not mine). I added a boost converter based on a 74C14 hex Schmitt CMOS inverter package to provide 5V to the electronics at all times plus 3V3 regulated to the microcontroller. Quiescent current of boost converter and 2 x LDO regs and electroncs under 100 uA. E&OE - may have got something on wrong side somewhere there, easily done. If so, somebody will tell me about it :-). ADDED: Query: It has been (quite understandably) suggested that I am not sure you are answering the users main question. To stop from overloading a power supply it does not seem feasible. It is not a case of power supply cutout, it is a case of wanting to allow higher current for short periods(on the order of 5 or more seconds). This seems like a case of needing another power supply Response I believe that I am addressing the question completely, as asked, BUT I am also addressing what I believe is liable to be the larger question as well. Consequently, there seem to be tangents and irrelevant material here. I have addressed points unasked as well as points asked based both on my own experiences in closely analogous applications and also on general expectations. The issues are "What if demand exceeds supply" and "What if supply falls below demand". These are one and the same in practice but may have different causes. Note that my answer (1) specifically says "For over current of I ampere" and his question was " ... but there are cases (when all servos are suddenly loaded) when I think the power draw will exceed 2A for a short period of time. ie dealing with overcurrent is exactly what he is asking. BUT overcurrent is caused by overload and, when the "cost" of trying to deal with overcurrent is seen (0.5 Farad caps or whatever) then the perspective may well turn to "what can we do to ride out this overload differently". The next most obvious "solution" is to accept the hit on motor performance, let the supply rail fall BUT maintain a local supply to keep the eectronics sane. Another solution which I didn't bother addresssing is to deloa the system by eg slowing servo rates when all are on at once. Whether this is acceptable depends on the application. The reason that we can TRY to address the short term overcurrent situation is that the supply has spare capacity most of the time and this is used to charge the caps prior to the surge event. The caps do not magically manufacture extra current, just save up spare current for arainy day. To supply current the capacitor MUST lose voltage so I specify the acceptable limit for that too. I think you'll find that if you couch his requirement in numbers and then plug them into my formulae that his question as-asked will be answered. Re on geometrikal post. But it is not a case of 6V*3A*5s. You need enough capacitance to stop the output from sagging low enough to cause the output of the power supply to need to host more current. It is really just not going to happen in a good way. What happens depends very much on the original supply characteristics. Imagine an LM350 was being used. Datasheet here. This is essentially an LM317 on steroids. Good for about 3A in most conditions and 4.5a IN MANY, deep-ending on application. 3A guaranteed. Fig 2 shows that it is good for 4.5A for a Vin-Vout differential of 5 to 15V depending on other issues. It can be run up near its current limit with good regulation. If being run at 3A and if the drop across it is not too high and it is well heatsunk it will not be hot and intermittent peaks of 4.5A will be provided. Do this too often and the temperature will rise and figs 1,4,5 and a few things unshown will affect how it behaves. First off Vout will start to droop on peaks and a capacitor on the output will help it serve the load. Increasing drOop and longer peaks and the capacitor will be called on to do more. If the IC decided to completely cut out for a moment (which it is unlikely to ever do) as long as T x I / C does not exceed the voltage droop which is acceptable the capacitor will do the whole job. Restore Iout to 3A and the capacitor will recharge until next time.
H: Modifying a soldering iron for lower power I have a 60W soldering iron, which is too much heat for typical electronic soldering purposes. I find myself constantly switching it on and off using a powerstrip to control its temperature so it does not get too hot. I was wondering if there exists some easy way to reduce its power output. Is there some type of circuit I can build which could limit its current draw to only 100mA (so it would be a 12W iron) for example? Maybe I could wire a 40W lightbulb in series? AI: There are numerous ways of reducing power input to your iron. As others have said and you yourself have noted, this is more likely to be of value as a learning exercise than a major improvement to the iron. A temperature controlled iron is a really really really good idea for quality soldering. A "closed loop" temperature controlled iron regulates the power to achieve a desired temperature by varying power based on what a sensor measures. A power controlled iron which is "open loop" (no temperature sensor) will vary widely in temperature depending on local environment -- eg air flow & drafs, contact wit metal stand etc. However :-) : Series Diode: An extremely easy way to reduce power input is to switch a diode in series with the iron circuit. Short the diode when full power is required. Remember that mains kills. Power input will be about 50% with diode in circuit. Diode voltage rating must be mains suitable (say 2 x Vac) and current raing must at least equal iron max current TRIAC CONTROLLER: A cheapish and easy method is to use a TRIAC type light dimmer. Wattage rating should be at least equal to iron max wattage unlikely to be a problem. Series Light Bulb(s) If wishing to experiment with series light bulbs place a lamp socket in series with the line. Building this into an extension cord allows you to avoid hacking the iron. Putting two sockets in parallel allows some interesting experiments. Sockets with bulb out and iron plugged in will be as lethal as a normal lamp socket is. A shorting switch across the socket gives full power. The high resistance-nonlinearity of tungsten filaments with temperature will be learned about this way :-).
H: De2 Board reading sensor reading I wish to operate a LVMAX Sonar EZ1 sonar rangefinder. They say With 2.5V - 5.5V power the LV-MaxSonar EZ1 provides very short to long-range detection and ranging, in an incredibly small package. The LV-MaxSonar-EZ1 detects objects from 0-inches to 254-inches (6.45-meters) and provides sonar range information from 6-inches out to 254-inches with 1-inch resolution. Objects from 0-inches to 6-inches range as 6-inches. The interface output formats included are pulse width output, analog voltage output, and serial digital output. I wish to control this using an Altera DE2 Education and development board, User manual, Getting started guide They say: The Altera® DE2 Development and Education board is an ideal vehicle for learning about digital logic, computer organization, and FPGAs. Featuring an Altera Cyclone® II 2C35 FPGA, the DE2 board is suitable for a wide range of exercises in courses on digital logic and computer organization, from simple tasks that illustrate fundamental concepts to advanced designs. I am not sure how I can do this. The two possibilities I see are the expansion headers and the rs232. But i have never used them and am not able to find any links on how to do analog read using the expansion headers. The rs232 serial interface just looks a lot more challenging. AI: RS232 looks like a straightforward way to interface the two devices. You have to get the baud rate the same at each end, connect appropriate pins and deal with th eincoming data - s "simple matter of programming " :-). Data output: It sounds like the EZ1 can be persuaded to output RS232 data continually Data input: Page 42 of the DE2 users manual and pages 26 & 27 of the DE2 Getting Started Guide show how to configure an RS232 interface using the onboard PS/2 socket. They advise that: The DE2 Board uses the standard 9-pin D-SUB connector for RS-232 communications between PC and the board. The transceiver chip used is MAX232. For detailed information on how to use the chip, users can refer to the spec under C:\DE2\Datasheet\RS232. <- Probably on the supplied CD ROM Figure 3.11 shows the related schematics. The pin assignment of the associated interface is shown in Table 3.9. As long as you do NOT have a "brown dot part" then the EZ1 Sonar can be easily configured to calculate range repeatedly and to output the results as a continual sequence of R232 strings. ie TX – , When the *BW is open or held low, the TX output delivers asynchronous serial with an RS232 format, except voltages are 0- Vcc. The output is -an ASCII capital “R”, -followed by three ASCII character digits representing -the range in inches up to a maximum of 255, -followed by a carriage return (ASCII 13). The baud rate is 9600, 8 bits, no parity, with one stop bit. Although the voltage of 0- Vcc is outside the RS232 standard, most RS232 devices have sufficient margin to read 0-Vcc serial data. If standard voltage level RS232 is desired, invert, and connect an RS232 converter such as a MAX232. *Brown dot parts: When BW pin is held high the TX output sends a single pulse, suitable for low noise chaining (no serial data)
H: relay power ratings - AC vs DC I'm in the process of finding a suitable relay for switching the elements in a mini oven I want to use for solder reflow. I've found what I think will be a good candidate, however I'm a bit confused by the maximum power ratings. Here's the relay in question: http://www.rapidonline.com/Electronic-Components/Mi-ss-106l-6v-10a-Spdt-Relay-60-4598 Das Datasheet: http://www.rapidonline.com/pdf/60-4598.pdf The ratings state a max load of 2500VA / 300W. The 2500VA seems to be an AC rating @ 250V and the 300W is for DC, but even taking that into consideration, the disparity between 2500VA and 300W seems huge?! I know that the RMS voltage of 250VAC is considerably less (circa 160V) but @ 10 amps that should still be around 1600W?! What's going on here, can someone explain this rating disparity in greater detail? AI: When the relay opens it will draw an arc. With AC power the current drops to zero 100 or 120 times per second (depending on whether you have 50Hz or 60Hz power), and this will allow the arc to extinguish. With DC power you don't get this automatic interruption, and an opening arc may last longer, burning the contacts in the process. That's why relays are allowed to switch only a fraction of the AC power if DC. It's not uncommon to see 250V AC relays only rated for 30V DC.
H: RTU card of SCADA systems In most of electrical SCADA systems, RTU (Remote Terminal Unit) panels are very common in power transmission & distribution companies. There are several cards inside each RTU panel, some are binary input/output cards and the others are analogue input/output. I would like to ask about the function of these cards? These are some images of that cards: Edit: This is the data sheet of 23BE23 card not 23BE21,but I guess it is for same purpose. AI: You do not offer very much information, however this is the basics. An RTU receives and transmits information to and from a master control station. Typically that being a central control station, such as a control office in a power utility. The satellite remotes can be electrical substations, for instance, which will have their switching remotely controlled. These satellite stations will report the position of switching and can also report real time data such as voltage or current readings. The "card type" RTU is commonly being replaced by PLC's which usually use Ladder logic so as the functions can easily be reprogrammed. EDIT: You should be able to get some clues as to the cards function by looking up the chip numbers. The older systems did not have analog capabilities, not sure about this one. How many pins are on the header? Could possibly be an SBC with format PC-104 compatibility?
H: Shorting the output ports which have nominal bandgap voltages of 1.24V I am using LED drivers (TLC5940) which allow one to fix the operating current \$I_c\$ flowing through LEDs. This is accomplished by connecting a resistor (of the desired value) between an output port, driven by a bandgap reference of 1.24V, and ground. The chip then amplifies the current flowing out of the reference port by a fixed factor to give \$I_c\$. The situation is that I have several of such chips on a PCB board. To reduce component usage, I am thinking of shorting all the bandgap referenced ports and use a resistor to bias all chips in one go. The issue is that if the references on different chips happen to be slightly different, shorting the outputs may be unwise. In that case, is shorting advisable? AI: I don't think this is a good idea. I agree with Russell in that I don't see this causing any damage or running the chip out of spec, so you can always try it. The reason I don't like this is because the output current is set in part from the current out the IREF pin. Each chip will have its own voltage source it tries to drive that with. The ones that happen to have a little higher internal source could drive a disproportionate share of the current out their IREF pins when you really want each IREF pin to be sourcing the same current. The chip does seem to have some impedance in series with the voltage source which will mitigate this effect. But, I just don't see the upside. Your cure is worse than the problem. Giving each chip a separate resistor is the easy way. Resistors are cheap and small, and the traces stay local to the chip. With one global resistor you have a bigger routing problem that may end up using more board space than the local resistors. The only way that this makes any sense is if this is a very high volume product. In that case, each resistor costs under $.01, so the savings will still be minimal. In a lower volume product it's not worth trying to play these games. You've already wasted more design time on trying to get away with this than you'll ever get back unless you're going to sell many many of these units.
H: Problems with Wien Bridge oscillator circuit simulation in Mutisim I am trying to build a Wien bridge oscillator that oscillates at 2.1kHz and that can be switched on by a transistor. The reason for me placing a transistor switch in the circuit is so that I can turn the oscillator on and off from a PIC MCU. However, when I build the simulation in multisim, I get an DC output voltage of 3.0mV and an. I want an output voltage of 5.0V p-p, so can anybody explain to me what the problem with this circuit is? Any help would be much appreciated. AI: Your opamp only has a gain of 1. A wien bridge oscillator needs a gain of 3 to compensate for the attenuation of the RC network at the freqeuncy of oscillation. Try adding the neccessary feedback resistors for G = 3. You would typically need some AGC (automatic gain control) in a real circuit, possibly here too. EDIT - I just noticed the 3.01k resistor (R4) on the V+ pin of the opamp. What is this for? It will certianly cause strange behaviour as the opamps supply voltage will vary according to how much current it draws. To simplify things I would get rid of R3,R4,Q1 and V3. Just use V1 to supply 5V directly to the V+ pin (pin 7) If you could update your diagram with the new version (with gain setting resistors, etc) it would help to be sure you have it right. EDIT 2 - I just tried this in LTSpice: Schematic: Simulation: There are two things to note here. One is the use of a gain slightly higher than 3 (R2 + R1)/R1 = 14.9k / 4.9k = ~3.04. The other is the inclusion of "startup" in the .tran command. This tells it to start the supply voltages at 0, giving the oscillations a chance to start before the circuit has reached a steady state. Otherwise you would have to inject some noise into the circuit to simulate real world conditions. You should have a similar setting in MultiSim (e.g. "start supply voltages from 0" box to tick or something like that) To include an AGC, you would use something like a thermistor in the feedback path (e.g. between R2 and ground) When the gain rises above 3, the thermistor passes more current and raises it's resistance, thus dropping the gain. You can also use a JFET, diodes, bulbs, etc. I wouldn't worry about this now though as you can get the circuit to work without this. The main purpose is to stop clipping/distortion of the sine wave which would be bad for e.g. a signal generator. EDIT 3 - Limiting current with a resistor is not necessary, the TL071 will only draw as much current as it needs so you can connect it directly to the voltage source. The amount of current the supply could provide is irrelevant, the TL071 will draw max 2.5mA whether connected to a 5V 3mA supply or a 5V 300A supply. To switch the power on and off, a P-channel MOSFET would work okay. You would tie it's source to +5V, drain to opamp V+ and gate to microcontroller pin. Set pin to 0 to turn on, 1 to turn off. If microcontroller supply is lower than 5V, then you would need a pullup resistor from gate to +5V (say 10k). Set pin to Hi-Z (e.g. input) to turn off, set to output and 0 to turn on. EDIT 4 - An N-Ch MOSFET wouldn't work very well, as when you turn it on (e.g. gate to 5V), the source voltage rises and narrows the difference between the gate and source again. It will ultimately settle at around Vgate - Vt. So if the Vt (voltage required to turn on = threshold voltage) is say, +1.5V, and the gate is set to +5V then the source would only reach 5 - 1.5 = 3.5V. Since the source is connected to V+, then the opamp will only see 3.5V for it's positive supply. Here is an example of the switching. Note how when the mcu pin (represented by V3) is set to 0 the oscillations start and vice versa: Schematic: Simulation:
H: Circuit for determining the dc mean of a wave-form I need to find the DC mean of a waveform whose maximum and minimum values will vary. The input signal has a frequency range of 0 - 3Hz, and will have a voltage range of 0 - 5V. I would like to find the DC mean of the waveform after the waveform has gone through three cycles. The waveform I want to find the DC mean of is shown below: Can anyone suggest a circuit for me to implement this solution please? Edit - RM:: I'm adding this "description". Please delete/ amend as appropriate. The requirement relates to blood pressure measurement. Each cycle is a pulse or heartbeat period long - typically around 1 second / 60 BPM (Beats Per Minute) but can be as long as 2 seconds / 30 BPM or as fast as 1/4 second / 240 BPM (although values at either of those extremes would be very rare.) (eg Super athlete resting and super athlete under utter extreme exertion.) Ideally the system will acquire the mean value after a single valid cycle and, chose 1 - Update it on a cycle by cycle basis thereafter Track it continually over the last single whole cycle so it is up to data instantaneously for the last pulse period. Track it continually over the last N whole cycles so it is up to data instantaneously for the last N pulse periods. Other ... AI: This is easy. This is exactly what a low pass filter does. You do have to decide over what time scale you want to find the mean. For short time, you want to get the average. Over long times, you want to let this "average" vary. Only you can say where this transistion should be. Once you know that transition period, you use that to adjust the time constant of the low pass filter. There are many types of low pass filters, but simple R-C should do well enough. Cascading several R-C filters will allow a more abrupt transition between the fast "find the average" and slow "follow the average" regimes. If you provide more specifics, I can provide a more specific answer. Added: Now that you've added significantly more detail, it is clear a simple analog low pass filter will not suffice. In particular, it's not going to meet the requirement to find the average each cycle and after only one cycle. There are analog techniques like a gated integrator, but this will be much simpler in a microcontroller. You say your micro has no additional A/D input, but that is a non-argument. First, you can certainly get one that has more A/D inputs. Second, since you were willing to add analog electronics you can just as well add a micro dedicated to this task alone. It can then report the average over a simple digital interface, like a UART, to the main micro. Third, you originally asked for a analog solution, so how did you expect to get this information into the main micro without a A/D converter? If a analog signal proportional to the average has to go elsewhere, then such a signal can be easily produced by the additional micro that does the averaging. Worst case you get a circuit that takes the analog pulse signal in and produces the analog average out as you originally asked for. It just happens the averaging will be performed digitally in a microcontroller inside the black box. Fortunately your frequency range is quite low, so is easily handled by even a small micro. The signal may have meaningful components up to 1 kHz, but since you want the average you can apply some analog low pass filtering and thereby decrease the sample rate even further. In this case loosing some of the high frequencies won't hurt since they don't contribute to the average anyway. With the high frequencies attenuated, it will also be easier to identify individual cycles by looking for peaks or zero crossings. Note that your original waveform as you show it has multiple local maxima and zero crossings. These are strictly due to the harmonics of the signal. With the harmonics reduced, you should be able to get a single local minimum/maximum and zero crossing each direction per cycle. The firmware computes the average from one positive zero crossing to the next, for example. I'd probably sample at 1 kHz. Put two poles of analog low pass filtering at about 200 Hz before the A/D. You will probably need to buffer the result to get a low enough impedance for the A/D input of the micro. Once inside the micro, I'd add another couple of poles of low pass filtering with a lower rolloff frequency, like in the 50-100 Hz range. This is to guarantee a single positive zero crossing per cycle. This may attenuate the input signal, but by using extra fraction bits in the micro no information will be lost. Then it's simply finding the average each cycle. At each positive zero crossing, clear a accumulator and a counter. Each sample, add the sample value into the accumulator and increment the counter by 1. Next zero crossing divide the accumulated value by the count to get the average in the previous cycle, then do it all again. If this average needs to be reported as a analog signal, then use it to drive a PWM output, which is externally low pass filtered.
H: Purchasing a Switch - AC vs DC Current Specifications? I'm trying to purchase several switches for a DC system with moderately low current (a few amps at 12V). When browsing for switches in parts catalogs (e.g. Mouser and Digikey) there are always separate voltage ratings for AC and DC applications. I understand that AC switches are less expensive because the switching time does not need to be as fast and arcing is less of a concern. There is only one current rating listed and I am not sure if it applies to AC switching, DC switching, or both. Does this current rating apply to both the rated AC and DC voltages? Is there a good rule-of-thumb for converting between AC and DC voltage/current ratings? What is the highest current I could reasonably expect from a DC switch before moving to a relay? AI: When comparing switching devices for AC and DC use you can specify the acceptable maximum voltages for a common current eg 10A at 230 VAc or 32 VDC or the acceptable maximum current for a common voltage eg 230V at 10A AC or 1A DC. The latter method is usually MUCH less useful. ie almost nobody cares about 230 VDC and few would care about eg 24 VAC. Specifying current is usually more useful. eg for a given system of voltage you usually know if you want to swutch 1A ir 10A or 50A etc. Re Does this current rating apply to both the rated AC and DC voltages? For a reputable specification the spec applies in a logical manner as stated. So if it says 10A, 230 VAC, 32 VDC you can expect the 10A to apply to both. Occasionally a manufacturer MAY indeed spec both different Voltage and current eg 12 VDC, 10A or 230 VAC, 20A usually because the voltages concerned are standard ones which buyers are liable to be interested in. eg here "car battery" type voltages and mains type voltages. re What is the highest current I could reasonably expect from a DC switch before moving to a relay? Whatever the manufacturer says. You can buy switches of almost any rating. 10A is common. 50A is more specialised but not wholly unknown. 500A would be very very very specialised and you probably want to be wearing a specialised suit when using it (really) BUT they exist. Realays are not special as of right in switching ability. They exist more because of their remote controllability than because of any ability to switch better. Switches that are liable to draw an arc that prevents switch "opening" will also have mechanisms to stop this happening. This may be as simple as spring loaded flick action which many people will have encountered without realising why they act as they do, through to units with magnetic blowout and arc paths which cause the arc to climb, lengthen and self extinguish. The latter are more the realm of very high capacity breakers but could be used i switches for the brave and foolish if desired. FWIW there are contactors which may also be used in "switch" mode that are so hazardous that they will usually kill a person in the vicinity if they break rated fault current while people are in the vicinity and which, if they need to be manually operated, require special suits, long poles and lots of luck and still may kill people ... ! Glossary: Z ~~= s when the world is upside down.
H: Building a large lead acid battery? I am building a large water tank. I'm thinking to convert it into a big lead-acid battery. I am interested if exists a formula that could calculate how much will be the capacity of that battery, voltage, energy density, specific power, specific energy and other parameters ... The volume of the finished tank will be 5 cubic meters. If we assume that the tank will be filled with an exact mixture of sulphuric acid and water like in the small one battery what will be the battery properties. Does the dimensions of the battery determines the capacity of one single cell? Does the dimensions of the battery determines the voltage of one single cell? AI: There are vast resources on the web re lead acid batteries. Key parameters are provided below. A look around the internet and sorting the good references from the not so good would be a helpful part of your necessary education if you are going to do what you suggest. Energy able to be stored in your water tank if it was converted to a large lead acid battery can be roughly determined from the Wh/l figure that I give further down. Energy density = 60 - 75 Wh/l VANADIUM REDOX BATTERY - Energy stored in liquid !!! The main advantages of the vanadium redox battery are that it can offer almost unlimited capacity simply by using larger and larger storage tanks, For a battery where the liquid IS the energy store and where adding more liquid adds more capacity see Vanadium Redox battery. They note: The vanadium redox (and redox flow) battery is a type of rechargeable flow battery that employs vanadium ions in different oxidation states to store chemical potential energy. The present form (with sulfuric acid electrolytes) was patented by the University of New South Wales in Australia in 1986. There are currently a number of suppliers and developers of these battery systems including Ashlawn Energy in the United States, Renewable Energy Dynamics (RED-T) in Ireland, Cellstrom GmbH in Austria, Cellennium in Thailand, and Prudent Energy in China. The vanadium redox battery (VRB) is the product of over 25 years of research, development, testing and evaluation in Australia, Europe, North America and elsewhere. The vanadium redox battery exploits the ability of vanadium to exist in solution in four different oxidation states, and uses this property to make a battery that has just one electroactive element instead of two. The main advantages of the vanadium redox battery are that it can offer almost unlimited capacity simply by using larger and larger storage tanks, it can be left completely discharged for long periods with no ill effects, it can be recharged simply by replacing the electrolyte if no power source is available to charge it, and if the electrolytes are accidentally mixed the battery suffers no permanent damage. The main disadvantages with vanadium redox technology are a relatively poor energy-to-volume ratio, and the system complexity in comparison with standard storage batteries. LEAD ACID: Lead acid voltage per cell, as in any battery chemistry that you will probably encounter, is very largely a function of the battery chemistry, with other factors making a very small difference to the cell voltage. The example battery cited here on the Wikipedia Lead-Acid battery page gives values of key parameters which you would achieve if you implemented a competent design. For a battery of the size you suggest this would be at best impractical and liable to be near to impossible. So consider these as values you can aim at but will not achieve. Note that a number of these values are somewhat dependant on sub technologies or mechanical construction methods. Voltage per cell: Open circuit fully charged 2.10 - 2.13 V / cell. Open circuit, fully discharged 1.95 V - 2.0 V / cell Loaded, fully discharged 1.75 V/cell Gassing threshold 2.35 V / cell Specific energy 30-40 Watt.hour/kg ~= 0.10 - 0.15 MJ/kg Energy density = 60 - 75 Wh/l Specific Power = 180 W/kg Charge efficiency 40% - 98% very much dependant on application circumstances. Cycle life 100 - 1000+ cycles very much dependant on construction and usage patterns. Useful: paper on 3.3 amps/100Ah battery capacity charge efficiencyNote: real world solar charge currents go up to 35 amps/100Ah. http://en.wikipedia.org/wiki/Lead-acid_battery http://wattsupwiththat.files.wordpress.com/2011/11/ridley_rsa.pdf
H: How can I improve this SMPS design? In: 21-32V Out: 12V, 3A Working Frequency: 300 KHz Controller IC: FP5138 from Feeling Technology MOSFET: IXTP44N100T from IXYS Schottky Diode: MBR20100CT from ON Semi The MOSFET and the diode are going to be isolated from the heatsink. Should I connect the heatsink to the ground via two screws that are shown below? Should I connect four mounting screws in the corners of the PCB to ground? I tried to minimize the length of the critical traces but the heatsink didn't allow me too much. In addition to that, I kept the area of these critical traces that can act as an antenna to a minimum -only as big as to carry the currents. Also, I tried to keep output capacitors away from the heatsink as they are electrolytic and they should be away from the heatsink. It would be great if you can draw the main current loops! AI: Added: Points raised are being addressed. Have left most in and tidied as example of things to consider and that have now been considered. Added PFET level shift comment at end. [This comment is for anyone following this - NOT as an edit trace]. You do seem to be trying and have a general grasp of what is needed but, no rudeness intended, the circuit shows several signs of very major lack of design. You need to think things through MUCH more carefully.Fine detail cannot be looked at until you get the basic circuit details correct. As shown it will not work AT ALL for several major reasons. Drive polarity wrong: The IC is able to be configured as a buck converter but as shown the output drive is of the wrong polarity if you use a P Channel high side switch and of the wrong voltage swing if you use an N Channel high side switch - see below. If using a P Channel MOSFET (which would be normal here) the output drive needs an inverter in it. As shown it will not work. Level translator needed in driver: If you DO run the IC off a 12V supply (and Vdd max = 15V) then the inverting driver which you have not yet got also needs to level translate as the MOSFET is high side and gate drive needs to go to 30V or whatever for MOSFET turn off. While addressing that do also ensure that MOSFET Vgs max is not exceeded when driving. FET is wrong type The MOSFET is nice enough BUT is N Channel (as befits the incorrect topology that you are using). An N channel MOSFET COULD be used there but the gate would need to be driven above V+ rail and you would need a gate drive supply. The overwhelmingly usual thing to do would be to use a P Channel MOSFET as the switch Output diode The output diode is very nice but is "overkill". The high max voltage leads also to higher than necessary forward operating voltage. You can probably get a few % more efficiency end to end with a lower voltage Schottky. At a glance without pouring over the details the IC looks competent and should be capable of good efficiency as a buck regulator. I'd expect 90-95% to be achievable once the circuit was correct. Driving high side PFET. Vin max = 32 V (specified). Vdd Ic = 12V (user specified) or 15V abs max. PFET will have a Vgs max. Above that you get magic smoke. As PFET source is connected to Vin+ the Vgs is measure relative to Vin+. PFET gate can be driven low BELOW Vin+ by Vgsmax - ideally a bit less. FET's that are not logic FETS often have Vgsmax of 20 to 25V. Most FETs are totally "enhanced" (aka turned fully on) by the time they have Vgs = 12V - see curves for FET of choice. Let's set Vgs max actual = -12V relative to Vin+. This means that when Vin+ = 32V, Vgs may range from about 32V (FET is off) to 32-12 = 20V (FET is hard on). BUT available drive voltage at IC = 0-12V approx. So a level shifter is definitely needed.
H: Does Tesla coil use near field or far field? According to Wikipedia a Tesla coil transfers energy (via loose coupling) from one oscillating resonant circuit (the primary) to the other (the secondary) over a number of RF cycles. which I don't quite get. RF is likely opposed to near field and the near field spawns about 1 wavelength from the source and that's 30 meters even at 10MHz, so looks like it's a plain old near field transformer, just with an air core and with coils separated rather far from each other. So does Tesla coild use near or far field for transmitting energy? AI: Tesla coils generally use near-field energy transfer. But ... The page cited is sloppy in its wording and it would better to say "near field" where it says "RF". But, (again) ... The answer is necessarily not black and white. "Near field" has a precise meaning BUT obtaining ONLY near field coupling in a given case is not certain. There is a gradual transition from NF to FF and a boundary region where both can occur. Near Field essentially occurs where certain geometry dependant terms form a major or significant part in describing interactions between transmit and receive structures - these relate to cyclical transfer of energy between the antenna I and V and adjacent electrostatic and magnetic fields. As distance increases these terms become less significant until they can be ignored. You'll always get "some of both" with "some" varying as you move away from the antenna. (1) At distances of well under a wavelength there is substantial interaction between the electric and magnetic fields produced by the aerial and current and voltage in the antenna. Energy is transferred to and fro between fields and aerial throughout with losses caused by non idealities but no energy loss due to energy "leaving" the aerial structure. This close in zone is termed the "reactive zone" where power may be absorbed by a tuned load which has voltage and current induced in it and which then dissipates energy (ie has a resistive component). Coupling involving power transfer is magnetic. (3) [note number] "RF communications or energy transfer occur at distances beyond several wavelengths form the"antenna" structure. Here the ratio if electric and magnetic coupling have "settled down" and any energy present is not coupled to the structure I & V so is "lost", whether "received" or not. One way of viewing this one is that the two aerials are geometrically distance and secondary terms which account for the filed coupling and which have a strong distance dependent component have become insignificant - the field has become essentially homogeneous over lengths of the order of the receiving antenna. (2) At distances past about half a wavelength the "second order" terms on which pure NFC coupling depends start to get small and the field starts to become homogeneous. This is termed the "Fresnel zone" (the guy has his name all over) and there is a degree of non ideality in field coupling to the antenna. _ This wikipedia page on near and far field does a better than usual job of commenting. Their summary section says, in part: The near-field is remarkable for reproducing classical electromagnetic induction and electric charge effects on the EM field, which effects "die-out" with increasing distance from the antenna (with magnetic field strength proportional to the inverse-cube of the distance and electric field strength proportional to inverse-square of distance), far more rapidly than do the classical radiated EM far-field (E and B fields proportional simply to inverse-distance). Typically near-field effects are not important farther away than a few wavelengths of the antenna. Far near-field effects also involve energy transfer effects which couple directly to receivers near the antenna, affecting the power output of the transmitter if they do couple, but not otherwise. In a sense, the near-field offers energy which is available to a receiver only if the energy is tapped, and this is sensed by the transmitter by means of answering electromagnetic near-fields emanating from the receiver. Again, this is the same principle that applies in induction coupled devices, such as a transformer which draws more power at the primary circuit, if power is drawn from the secondary circuit. This is different with the far-field, which constantly draws the same energy from the transmitter, whether it is immediately received, or not.
H: Shielding can, what is the proper way? I like to protect a sensitive circuit of mine with a shield. I don't have a picture but basically, I have put together a 1 mm thick ground rectangle on the top layer, and I will place the shield on top of this such that it will contact to this ground trace. I have some concerns. Am I creating a ground loop by doing this? If I don't use the shield, am I making an antenna that will pick up noise? What is the recommended practice for this type of shield? Actually, I like to connect the shield at a single point, but a hardware person who has more experience insists that he like to have a full rectangular ground exposed, so that the shield can touch to the ground at every point. Update Here is a very rudimentary representation. UPDATE 2 Noise is at the output of our amplifier (transimpedance). It is around 3-5 mV for an amplification of 300,000. (I have made mistakes in the first layout and am now doing a better board and the goal is to reduce the first stage noise to less than 1 mV.) I have two LDOs that take energy from the battery. Both of them are high PSRR. This is a six-layer board with the following stack up, S/G/S/G/P/S. This is a bit unusual stack up, but I hide sensitive signals between these grounds. The board doesn't need to be six-layer, but this later will become part of another crowded board, hence the six layers. Noise sources are in abundance: Power supply: We mitigate this with good LDOs, filtering (pi filter), bypass capacitors, etc. So far, worst case I see 1-2 mV ripple on power; this could even be my equipment. (I don't have good equipment, also the amplifiers have 50+dB PSRR, so this should have minimal impact on the output.) Opamp noise: This is the inherent noise coming from the amplifier. I have a low-noise opamp. \$3\ nV/\sqrt{Hz}\$. Photodiode: I use a large photodiode, this picks up noise, unavoidable. Other electromagnetic sources: We have seen the board is very sensitive, the noise goes up in various situations. Also, the reference schematics from some sources recommend shielding the reduce outside noise sources, so we are putting this shield option to test our next board. UPDATE 3 3-5 mV exists even without the 10K and the C1. Essentially no input to the opamp. This makes me think that my layout is not perfect. Here is the basic schematics for the amplifier. I can add more if we think it is necessary. The following rules have been observed: Complete two ground layers connected via several vias. The 3.3 V supply (also the supply for the opamps) are filtered via a 2.2 µF tantalum capacitor and the pi network (100 kHz roll over) before the supply to the photodiode (that is, before the 10K resistor). We also have 1/100/10 nF capacitors close to the 10K. (I am not sure it is great idea, but it is better to be safe.) C1 blocks the DC (AC-coupled architecture), we only amplify AC. Opamp has 1/100/10 nF at supply and bias pins (bias is provided by the second LDO). The feedback capacitor and resistor are placed as close as possible to the opamp. All signal traces between the photodiodes and opamps are minimized; we are talking <2 cm worst case. All the critical deemed signals are placed between two ground layers. Also another observation that explains why we think of shielding: I connect a resistor to our function generator and turn on, this is via crocodile cables, (essentially a loop antenna) so we know it radiates at the frequency we choose. I can see the output of opamp picking this up nicely and amplifying. So, it is very clear to me the outside sources come in to play, hence the whole discussion. AI: When I first hear someone wanting to use a shield, I start out by saying a shield is the first refuge of the incompetent. That's not totally fair as there are legitimate uses for shields, but it sets the tone for the real discussion, which is usually about RF emissions or susceptibility and ultimately about bad grounding that is causing the mess. A shield should be the last refuge of the competent. Shields also have significant downsides, beyond the obvious cost issue. The incompetent believe in the myth that if you enclose something in a conductive box that RF energy can't get out or come in. That's absolutely not true. A shield can also become an antenna if not designed properly. Before we can talk about your shield, we first have to go over your grounding strategy carefully. Shields and grounding go together tightly. Explain what exactly the problem is you think the shield will solve, how exactly everything is grounded, what the sources of noise are, etc. In general, good grounding will do more to reduce RF emissions and susceptibility than a shield. If the grounding is done right, a shield can add some extra attenuation of emissions. If the grounding is done wrong, the shield could become a antenna and make things worse. With a good ground, you generally want the shield enclosing the circuit with as few and small holes as possible, connected to the main circuit ground in exactly one place. Again, tell us more about your circuit, layout, and problem. Then we can discuss more about the shield if it's still appropriate. Added after update 2: It sounds like your primary concern is noise getting onto your analog signal. You currently have 3-5 mV noise on the output of the first amplifier, but you want to get that down to 1 mV. You say this is a transimpedance amplifier, but this is contradicted by your gain of 300k, so we still don't know what your circuit really is. Where is the input signal coming from? How does it get to the amplifier input? What is its reference and what have you done to insure this reference is clean? The real issue is to make this first amplifier stage as low noise as possible. After that the signal is higher level and lower impedance, so it won't be as susceptible. What are the external noise sources that get onto the input signal? How much noise do you get out of the first stage if you short its input? High PSRR for amplifiers and voltage regulators is good, but keep in mind that only applies at low frequencies. If you have a particularly sensitive circuit, give it its own linear regulator with the power supply inputs to that regulator filtered. Something like a chip inductor followed by a large ceramic capacitor to ground in front of the regulator is usually good. Maybe even two of these in series. The point is to eliminate the high frequencies on the power supply feed such that the active electronics in the regulator can handle the rest. I would want to see the filters roll off at 10 kHz or below. You also want to keep the unfiltered power supply feeds away from the input signal to avoid capacitive pickup. Guard traces can help. I don't like the two ground layers. Two ground layers can get you into trouble unless they are stitched together regularly. Again, you are thinking shield when instead you should be thinking carefully about grounding. Visualize all the return currents flowing, and make sure the high frequency components don't flow across the ground plane. Use local sub-ground planes under specific sections that either produce high-frequency noise or are sensitive to such noise. The immediate bypass capacitors go to the local ground net, which is then tied to the global ground net in only one place. Show the circuit of the first amplifier stage and explain how all the grounds are actually laid out. Added after update 3: 3-5 mV exists even without the 10K and the C1. Essentially no input to the op-amp. This makes me think that my layout is not perfect. That tells you the noise is not coming from the photodetector, so you can forget about that for now. The noise is either on the bias voltage for the positive input or is on the ground. Complete two ground layers connected via several vias. Again, I don't think this is a good idea for two reasons. First, these two planes need to be regularly stitched together. That's not as easy to do right as it sounds. Second, it sounds like you therefore didn't use sub-ground for critical subsystems. Part of the point of these sub-grounds is to isolate the high frequency loop currents to keep them off the main ground. By attaching each sub-ground to the main ground in only one place, it keeps the high frequency loop currents local, and prevents the subsystem seeing offset voltages between different ground points due to currents on the ground plane. The 3.3 V supply (also the supply for the op-amps) are filtered via a 2.2 µF tantalum capacitor and a pi network (100 kHz roll over) before the supply to the photodiode (that is, before the 10K resistor). But you don't show any of that. A tantalum capacitor will have poorer high frequency response and higher ESR than a ceramic capacitor. There is really no reason at all to use a tantalum capacitor at this voltage and capacitance. Also, a capacitor by itself isn't much good without some impedance to work against. You mention a pi network, but none of this is shown on the schematic and you only talk about a single capacitance, so that doesn't add up. As I also said before, 100 kHz is too high. As I said, I would like to see that 10 kHz or less. We also have 1/100/10 nF capacitors close to the 10K. Good, but again, they need some impedance to work against. A ferrite bead chip inductor in series with the supply feed would do that, as I said before. Op-amp has 1/100/10 nF at supply and bias pins OK, but once again, these need some impedance to work against. A chip inductor in series would help. Also, again, where exactly do these capacitors connect to the ground? I suspect you are just punching through to your ground planes. Again, this should all be connected to a local ground net connected to the main ground plane at a single point. The feedback capacitor and resistor are placed as close as possible to the op-amp. Good. All signal traces between the photodiodes and op-amps are minimized; we are talking <2 cm worst case You have already shown this is not where the noise is coming from. All the critical deemed signal are placed between two ground layers. Again, this kind of shielding is only useful if you have a clean ground, which I think you don't. If you don't, all this does is increase the capacitive coupling from the noise on the ground to your signal.
H: TS317 voltage regulator falling voltage I am looking for some help explaining a dropping voltage reading on a circuit I have built. Details below. I have built a circuit to experiment with the TS317. The circuit is very similar to the standard application circuit on the data sheet. R1 = 212 Omhs R2 = POT makked with 47 Omhs 3W [[Note that "very similar to" may mean "not the same as". ANY differences should be explained clearly]] (These resisters are random taken from a lucky dip bag, I'm finding reading resisters very tough from differentiating the colour to working our which end to rad from when there are 6 bands as there is not always a clearly wider band at one end, any tips?) C1 = 0.1 micro farad I think, labelled A5E104M C2 = 1 mico farad I am powering the circuit from a 9V battery and have a small piece of aluminium angle iron attached to TS317 with some non-silicon head sink compound, surface are ~ 1000 mm^2 one side (so double - area of TS317 for total). I am measuring my voltage with a cheap digital multimeter. When I attach my batter I get a maximum voltage of 3.3 Volts and a minimum of 0.25 volts. Both these voltages slowly drop if I leave the circuit on. This would suggest to me that I am for some reason drawing more and more current resulting in a larger and larger voltage drop. Could any one please explain to me why this is? Considering the heat to dissipate per second, HeatToDissipate_min = (9 - 3.3)*I = 5.7I HeatToDissapate_max = (9 - 0.25)*I = 8.75I but being as I have no load and I am just measuring v_out to ground then I should be negligible (volt meters are very high impedance right?). BUT I have noticed the pot is getting pretty warm too again suggesting current flowing, heat sink dose not seem too hot. According to the data sheet formula I should only be getting ~ 1.5 V with R2 = 47 and R1 = 212, with I_adj as I understand limited to 100 micro ohms. Why are the values I'm getting different? I've obliviously done something pretty wrong but don't know what. New to this electronics game as you can guess. Thanks. EDIT: Thanks. Sorry for the late reply been busy at work. I have not gotten around to trying to draw the schematic with the pot yet. I decided to do away with the pot for now anyway for simplicity. Figured out my mistake. I was taking the pins on the schematic to be 3-2-1 left to right, not reading properly that they go 3-1-2. Idiot. Sorry. AI: It sounds like the regulator may be going into thermal shutdown (or battery is sagging if small 9V PP3 type) This is probably due to a short on the output. Are you sure R1 = 212 ohms? Also are you sure you have the potentiometer connected correctly? (e.g. from top to bottom, not from wiper to top/bottom. If it is connected from wiper, is it turned the right way?) Did you test the resistance of both with your multimeter? As Leon says it would help if you post a schematic of your setup (whilst doing this you may notice a mistake) A picture would probably be very useful too (or instead) Set your multimeter to continuity test mode (or low ohms) and test for shorts between the output and other junctions of your circuit (e.g. output to ground, output to input, output to Vadj etc) You can also confirm that the circuit is drawing too much current by setting multimter to Amps range and connceting it in series between the battery and circuit (e.g. red lead to battery plus, black lead to Vin of regulator. You will probably need to swap the red lead to the dedicated Amps socket) EDIT - From reading the comments you need to sort the resistive divider out to suitable values. 212k ohms and 4.7 ohms could cause strange things to happen. Also it sounds like your battery may be dead if you are measuring such low voltages (it may be due to a short though, so measure the battery voltage when unplugged from circuit) EDIT2 - I noticed you have the TS317 attached to a piece of aluminium. Be careful here as the metal tab on many TO-220 regulator packages is electrically connected to the output. Make sure nothing else that shouldn't be is touching the aluminium and causing the short. Easiest way to be sure is remove it from the aluminium, as you don't need a heatsink unless you are dissipating a reasonable amount of power (say > 1W) so with no load on the output it will be fine. You can add it again if necessary when you have figured out the problem.
H: How to reduce voltage without using Transformer? Is there any way to reduce voltage without using transformer? I have a supply of 24 volts AC @ 1500mA (1.5A) and I want to convert it into 6 volts @ 500mA. Because I have to supply the 6 volts to the 7" compact LCD screen via rectifier. Since, there is no enough space available in the LCD housing to use transformer and I think transformer may also cause screen to damage due to its magnetic fields. Schematic will be highly appreciated. AI: External transformer will work well. If you can find a mains to suitable multiple low voltage output windings transformer you can make your own step down. eg a 12/12/6 can be arranged as a 24:6 which is about right. SMPS is a good idea due to efficiency. Slightly more dangerous load safety wise - see below. eg ye olde MC34063 This would cost a few dollars. Note that with ANY non isolated circuit protection should be provided that will blow a fuse if the converter fails shirt circuit. Running yuour LCD on 24V would be a bad idea. See fig 24 in the above datasheet that shows an isolated output converter. Resistor dropper + regulator Cheap and nasty solution that works OK Note that this is quick and easy and nasty. Not recommended but doable. Rectify 24VAC to about 34 Volts (!) Pass this through a 47 ohm 20 Watt resistor (can be several smaller resistors in suitable series / parallel arrangement) and then connect this to a 5V, 1A regulator such as LM340, 7805 etc. Resistor max drop = 0.5A x 47R =~ 24 V. V into regulator = 34-24 = 10V max. Power in resistor = I^2 x R = 0.25 x 48 = 12 Watt. Use much larger rating eg 20W+ You can tailor R so that V in to regulator is about 8V. Less may cause troubles. You need a cap at regulator input. Heatsink regulator appropriately.
H: Calculating resistor and capacitor values for an op amp differentiator circuit design I need help in designing a differentiator using an op-amp. I know that the equation for an op-amp differentiator circuit is Vo = RCdVin/dt, but I don't know how to calculate the component values to finish the design. All of the web resources that I have viewed so far shows the characteristic equation of the differentiator, but they don't give any guidance as to how to calculate the actual values. Can somebody help me with this please? AI: That formula is all you need...in theory. In practice the circuit tends to be unstable due to the capacitance on the input interacting with the finite bandwidth of the op-amp. This is remedied by placing a resistor in series with the input capacitor: This link gives an elementary explanation of why this works. It will also modify your differentiating characteristic somewhat, adding a pole at 1/(2*pi*R1*C1) So basically, it's an ideal differentiator at lower frequencies only. A more complete explanation of the stability issue can be found here.
H: UART core Altera De2 I have to implement a rs232 receiver for my project. Does any one have any idea on how do I start learning / implementing this. Do i have to use the nios ii software or just implement it using verilog modules? http://www.altera.com/education/univ/materials/boards/de2/unv-de2-board.html - The de2 board http://www.altera.com/literature/ug/ug_embedded_ip.pdf Chapter 7 - UART core AI: You can either use the provided core or write your own. The C bit is probably for use with a processor core, so you almost certainly don't have to use it with C. What the core is written in doesn't matter either as it's only the function you care about. You need to either use a soft core processor and connect using whatever bus system Altera provide (and maybe use C), or write your own module and connect to the necessary "pins" on the module to control it. In the datasheet you linked to it gives details on the registers for control and data. You would access these through the address and data ports on the module. It may be useful to find an example RS232 to give you an idea of what is necessary. Take your time, if you are new to this as it may take quite a while to get up to speed. Pong P Chu's "FPGA Prototyping with Verilog Examples" is a pretty good book, it starts from the beginning and works up to things like UART implementation with example code, etc. Also I'm sure Altera have loads of examples on their site (probably the DE2 board comes with some too) Here is a decent run through of writing a UART in Verilog. It is a few pages long so you have to click on the "next" link at the bottom of each page. At the end it has a link for the full code. Note that in order to design something you need to have a good idea of how it works, otherwise you are flying blind. If you are not familiar with the inner workings of UART then have a read up on this too (the above link goes into some detail)
H: Resistor suggestions for colorblind person I'm a developer who has always had a love of the low-level electronis, but I have always been intimidated by it since resistors all seem to be color based and as a color-blind person, this is difficult to work with. So my question to everyone here is if they know a good, practical way, to work with resistors (mark them, shelve them, etc). This is the one thing that keeps me from doing more electronics hobby stuff since I hate spending an hour trying to find a 10K resistor in my collection of a few hundred. AI: Try not to be intimidated by the colours, I think it should be easy to get round this. Certainly I wouldn't let it put you off electronics, too much fun to be had :-) You would ideally have them sorted into separate marked drawers anyway. For example these storage cabinets are what we use. It has 44 separate drawers that can be divided themselves into three parts with dividers, and a slot at the front for a label card. There are many types/sizes around so find something that suits your needs. That gets you "pretty certain" that the resistor you take out of the drawer will be the right one. To make sure though, I would maybe buy a cheap multimeter (or repurpose one) and set it up as a value tester. If you make a little frame to set the probes just the right distance apart, you can quickly place the resistor between them and double check it's value. This is more for loose resistors, but another option is to keep them in their packets in the drawers until needed, then take out as necessary. Though you can get errors in the packaging/component it's very very rare, and if you test one you can be even more sure all the rest will be the same anyway. This should ensure you have very little chance of making a mistake (probably about as much as anyone else, many don't go by the colour bands anyway) Most other components nowadays have values/codes marked on them, and if you are working with SMD (most) resistors do too - it's the unmarked capacitors that are the pain (for everyone) there :-)
H: What IC is good for driving an array of smaller solenoids? I have a 7 segment display where all segments are driven with a solenoid. In order to switch each segment I have to pulse a short current on the solenoid. To change the segment I have to pulse it in reverse polarity. This means that I have to use something like a "full H-Bridge" for each segment which can switch 12volts, 300mA for 100 microseconds. I'm looking for a suitable IC that I can do this with. I'd like to end up with as few components as possible while maintaining the cost low (don't we all). Since I don't need PWM I don't know what IC to get. Ideally something that works similar to a shift register where I can cascade to drive an array of solenoids. Alternatively an H-Bridge that can drive 7 solenoids. I'm driving this with 3.3v logic from a microcontroller. AI: This isn't a direct answer but is pointing out a alternative. You don't necessarily need a double ended drive like a H bridge. That would certainly work, but a push/pull driver with a capacitor in series with the relay coil would do it too. Here is a possibility to think about: In the steady state, the capacitor charges up to whatever the drive level is at the left side of the relay coil. It then provides the opposite polarity for the right end for a while immediately after the left end is switched. 22 µF will charge up to only 1.4V after 300 mA for 100 µs. 22 µF and 16 V can be had from a 1206 ceramic capacitor, like this one from Mouser. The cap can be polarized since the top side will always be at or above the bottom side. The double emitter follower can be driven directly by a CMOS logic gate. There are some that can handle this voltage. The input to that could be driven by a open collector with pullup. Since the CMOS logic input is high impedance and you don't need really fast switching, the pullup can be quite high. 100 kΩ should be low enough to work well, but high enough that the quiescent current in the low state is small. Of course you could replace the transistors with a half bridge drive chip that takes logical level input for higher integration, but also likely higher cost. Added: You are asking about driving this from a single open drain output. As I said above, I'd use a CMOS gate that can run from 15V. The high impedance of the CMOS gate input allows for a high value pullup resistor, as I mentioned previously. Here is this concept shown explicitly: Q3 is a switch. When off, R1 pulls the input of IC1A high for one relay state. When Q3 is on, the input to IC1A will be low for the other relay state. Q3 could instead be the output transistor in the driver chip you mentioned. However, it only takes one NPN and one resistor to replace each channel of that chip. The left side of R2 can be directly driven by your microcontroller output. The driver chip could be less board space, but the NPN and resistor will be cheaper. The whole circuit from the micro up to C1 could be replaced by a half bridge driver chip, which again will be more cost but maybe less board space. Everything is a tradeoff. I also flipped the relay coil and C1. Since these are in series, it doesn't matter to the operation of the circuit. However, it may be convenient to tie one end of all the relay coils to ground. This second circuit allows you to do that.
H: Why exactly can't a single resistor be used for many parallel LEDs? Why can't you use a single resistor for a number of LEDs in parallel instead of one each? AI: The main reason is because you can't safely connect diodes in parallel. So when we use one resistor, we have a current limit for the whole diode section. After that it's up to each diode to control the current that goes through it. The problem is that real world diodes don't have same characteristics and therefore there's a danger that one diode will start conducting while others won't. So you basically want this (open in Paul Falstad's circuit simulator): And you in reality get this (open in Paul Falstad's circuit simulator): As you can see, in the first example, all diodes are conducting equal amounts of current and in the second example one diode is conducting most of the current while other diodes are barely conducting anything at all. The example itself is a bit exaggerated so that the differences will be a bit more obvious, but nicely demonstrate what happens in real world. The above is written with assumption that you will chose the resistor in such way that is sets the current so that the current is n times the current you want in each diode where n is the number of diodes and that the current is actually larger than the current which a single diode can safely conduct. What then happens is that the diode with lowest forward voltage will conduct most of the current and it will wear out the fastest. After it dies (if it dies as open circuit) the diode with next lowest forward voltage will conduct most of the current and will die even faster than first diode and so on until you run out of diodes. One case that I can think of where you can use a resistor powering several diodes would be if the maximum current going through the resistor is small enough that a single diode can work with full current. This way the diode won't die, but I myself haven't experimented with that so I can't comment on how good idea it is.
H: How to correct instability of op-amp voltage follower? I am using a number of single-supply op-amps (OPA4344) in a circuit, and am using one of them to supply a VCC/2 value for a virtual ground to the + side of several other op-amps. VCC is +5 volts. When I first power up the board, I get 2.5v from the output, but after awhile the output jumps to around 4.5 volts and stays there until I power off and back on again. I read here that: Due to the strong (i.e., unity gain) feedback and certain non-ideal characteristics of real operational amplifiers, this feedback system is prone to have poor stability margins. Consequently, the system may be unstable when connected to sufficiently capacitive loads. In these cases, a lag compensation network (e.g., connecting the load to the voltage follower through a resistor) can be used to restore stability. As you can see, I am already using a resistor on the output. The datasheet for the 4344 (referenced earlier) claims the op-amp is "unit gain stable." Is there something else that can be causing the instability? Do I need a separate resistor for each output (currently I the + inputs of three op-amps tied to VOUT). AI: VCC is +5 volts. When I first power up the board, I get 2.5v from the output, but after awhile the output jumps to around 4.5 volts and stays there until I power off and back on again. At first I thought this sounds like a case of phase inversion outside the common-mode input range (which for the OPA344 is -0.1V to (Vcc - 1.5V = 3.5V in your case). It's rarer these days, but some op-amps exhibit gain reversal when outside their common-mode range, causing an effective latch-up condition. For an op-amp with phase inversion, as long as you stay within the common-mode range, you should be fine, but if it ever strays outside, there's no guarantee that it will operate properly. But the OPA334 datasheet says this: The OPA334 and OPA335 series op amps are unity-gain stable and free from unexpected output phase reversal. They use auto-zeroing techniques to provide low offset voltage and very low drift over time and temperature. So at this point we're left with a couple of things to try, assuming you can reproduce this problem easily. Check all the opamp pin voltages with an oscilloscope. Make sure Vcc and Vss are what you expect, and check to see if the + pin of the op-amp is the 2.5V that you expect. Add a capacitor (100-1000pF) between op-amp + and ground. You should be doing this anyway to keep the impedance of the voltage divider node low at high frequencies so it does not pick up noise. If this fixes the problem, you may be running into RF rectification (If this is the case, I'm surprised, but it's possible.) where the op-amp behaves linearly with low-frequency signals, but behaves nonlinearly like a rectifier with high-frequency signals and turns AC into a DC bias. Add a bypass capacitor across the op-amp supply. (supply noise shouldn't make that much of a difference, but you never know) Replace the op-amp with another of the same model -- the one on the board could be damaged. If all still looks good, then you've got quite a stumper.
H: Single resistor powering multiple LEDs in parallel where current through resistor is lower than max allowed current for an individual LED While writing an answer about using multiple diodes connected to a single resistor, I stumbled upon a case about which I haven't read a lot: What happens when we set the resistor so that it sets the current to be within safe levels for a single diode and then connect several diodes in parallel to it? The LEDs themselves should be safe from overload, becasue the current is limited. I expect that in the LED case, the distribution of current among them will not be equal since those with lower initial forward voltage will get more current and will be brighter. After a while the forward voltages will match and the current distribution will stay uneven. Is there anything else that will happen? I've read the answers in this question and some of them mention oscillations, but don't elaborate on the topic. AI: Question: What happens when we set the resistor so that it sets the current to be within safe levels for a single diode and then connect several diodes in parallel to it? No harm will be done, but this result will seldom be useful. One possible use is for eg a backlight where you only need as much light as one LED would make but you want it more widely distributed physically than you can achieve with only one LED. I have actually done this BUT it is an unusual application. Question: The LEDs themselves should be safe from overload, becasue the current is limited. I expect that in the LED case, the distribution of current among them will not be equal since those with lower initial forward voltage will get more current and will be brighter. After a while the forward voltages will match and the current distribution will stay uneven. The forward voltages will match instantaneously "by definition" and will stay matched as they are connected together electrically. What WILL vary is common Vf and the current that each LED takes. The LED that takes the most current will heat the most (subject to absence of differing ventillation and heatsinking etc). With 10 LEDs the effect of variable individual cooling could have a significant effect on results. For practical purposes the LEDs will settle down with currents about equal to the currents that they initially drew at the group Vf. See "Oscillations?:" below for comment on why the result is somewhat more complex in reality - BUT that you will not notice this. Question: Is there anything else that will happen? I've read the answers in this question and some of them mention oscillations, but don't elaborate on the topic. The above are the main things that will happen. LEDs run at below rated current may change colour - especially ones that use a phosphor based emission technology. The exact effect varies with manufacturer and product. Some white LEDs run at low currents assume ugly green or purple tinges. Some get more blue or more yellow depending on the blue LED / Phosphor reradiation mix that is used to usually make white. Luminous efficiency increases slightly with decreasing current. ie if you run 1 LED at x mA or 2 LEDs at x/2 mA each you will get slightly more light from the two LEDs. Lifetime to say 70% of initial output will increase significantly if you share X mA among 2 LEDs and very very very much so if you share it amongst 10 LEDs. This is based both on the current density per LED and the likely reduced die temperature. These are largely independent effects. OSCILLATIONS? : As shown in the typical graph below, the effect of increasing temperature is to slightly decrease the forward voltage for a given current, As Vf is common to all LEDs this will instead have the effect of slightly lowering the overall group VF and of increasing the share that this LED takes. As an LEDs VF/current curve is not linear this will not "run away" indefinitely but will assume a new higher current value. Other LEDS may then have very slightly less current so cool somewhat so draw less current so decrease group Vf so decrease net current so ... . This is the "oscillation that is referred to in the post you mentioned by Rocket Surgeon and it is a real effect but it will essentially always be such a small effect that you will not notice formal oscillation - just a very small continual shift of overall operating point.
H: Memory-mapped I/O address ranges In Memory-mapped I/O, how does device allocation and address ranges are decided? For instance like, EPROM has control over address bus for address from > 0x0000 and <0x4000, RAM1 from 0x4000 to 0x8000 Especially curious about partial address decoding methods AI: Pure address decoding logic. The upper bits of the address bus are routed through logic, usually including things like '3-to-8 decoder' and the like to create a selection of "chip select" signals that connect to the different devices to activate them at different address ranges. So for your example, the upper 2 bits of address bus could be linked to a 2-to-4 decoder to give the ranges 0x0000 to 0x3FFF, 0x4000 to 0x7FFF, 0x8000 to 0xBFFF and 0xC000 to 0xFFFF The lower 14 bits will all be connected direct to all the devices (or as many as they need up to 14) Within those ranges you could further split it down if you desired to make a finer-grained range.
H: Square Wave Voltage Level Shifting I have a square wave signal of 300 KHz which is 0.2 V to 1 V. It is the output of FP5138 Non-Sync PWM Controller IC. I want to drive a PMOS with this square wave but with the levels shifted to (Vin-12)V ... (Vin-5)V to Vin, where Vin is 20 to 32 V. To explain it better, let me try this way (the Vin above and below are different): 0 1 Vin : A -> B Vout: C -> D A: 0.1 V typ, 0.2 V max B: 1.0 V typ, 1.2 V max C: D-12 min, D-5 max D: 20 V min, 32 V max I have 12V, 1A source (78L12) and Vin source of the converter which has boundaries of D above. It is going to be a P-MOSFET driver and I need up to 0.3 or maybe 0.4 A spikes for Cgs. MOSFET is not yet chosen. I have tried to build this circuit but no hope. I hope I could explain myself. AI: You do not need or want the intermediate voltage represented by V3.Trying to create it as an actual volateg will cause you effort which is not required. Allow the low side driver to drive a high side driver connected to tje V+ rail. THEN limit the swing of the high side driver OR the swing that the FET gate sees. Zener diodes are your friends in such cases. Note that you should zener clamp the INPUT of a driver stage, not the output - so that the driver is not always "fighting" the zener. .
H: What is this transformer-like component with only two leads I found this while taking apart a PSU, the closest label was B1. It appears to be a transformer-like component with two leads, and the coils on the vertical part around the core seem to be connected opposite the leads. Googling the label got me nowhere. AI: Just an inductor, it's used in some large switched mode psus to do powerfactor correction.
H: charging and discharging capacitors I'm wondering if it's possible to charge say a capacitor with a stepper motor (~12V DC after rectifying), which when it reaches its maximum capacity discharges. I'd like the discharged power to activate a solenoid? AI: You really asked two questions: Can a stepper motor be used as a generator? Can a charged capacitor activate a solenoid? Yes and yes. Stepper motors almost always have permanent magnets, so just spinning the shaft will cause each winding to produce a voltage. Each winding should produce the same AC waveform, but at a different phase. Each would have to be rectified separately onto the DC bus. The stepper motor must also be turned at some minimum speed to get enough AC voltage out to overcome the diode forward drops. Lower than that speed, there will be no DC output. The unloaded AC output voltage will be proportional to speed, so at some level it should be possible to get a reasonable DC voltage. The details depend on the stepper motor, and can vary greatly. Note that while stepper motors are usually driven rather slowly in normal operation, there is no such restriction when running it backwards as a generator. You should therfore be able to get substantial voltage from such a stepper. The easiest way to get some idea what you can get out is to watch the voltage of one winding on a scope while twirling the shaft. Obviously, the resulting DC voltage can be used to charge a cap. If a capacitor holds enough energy at the right voltage, it can activate a solenoid for a short time. You need the solenoid particulars to compute the capacitance required to activate it. Find out how much current the solenoid draws at what voltage and for how long this needs to be held to activate it. If you are asking about a trigger circuit to turn on the solenoid when the cap gets to a certain voltage, then that is possible too. The simplest, but not most efficient, way is to use the capacitor voltage to fire a SCR, which in turn discharges the cap onto the solenoid. You have to adjust the voltage divider from the cap to the SCR gate so that it fires as the desired cap voltage. This requires only two resistors and the SCR. I would probably use a tiny micro like the PIC 10F204. It includes a fixed voltage reference, comparator, and internal oscillator. These are all the elements you need to determine if the capacitor is at high enough voltage, and then to time the turning on of a low side FET switch to discharge the cap onto the solenoid.
H: Building a treadmill speed sensor I know very little about electronics so I was hoping to get some advise on a small project I want to do at home. My home treadmill already has the standard dashboard that tells me the mph I'm going, time and so on, however it doesn't offer any way to get at that information - as you'd expect no dev kits, ways of accessing the data via bluetooth etc. etc. So my plan is to build a cheap sensor that would measure the speed of the belt. For this I've got the following in mind: A small square with some kind of high visibility sticker/paint on the belt. A way of tracking the belt paint passing the camera lens, or preferably something cheaper than a camera lens. (This would be calibrated to know how far a second represents on my treadmill). Battery-powered by AA/AAA batteries. A wifi chip that broadcasts the information it gets from the sensor. I haven't figured out how this will be configured to join my wifi network. Now the question - is there some kind of cheap sensor that could do the tracking? And is my sketchy idea feasible? I don't want to have to open up the engine or attach wires to the existing sensors, I'm hoping to build something that's entirely independent. AI: There is almost certainly some part of the motor mechanism that is accessible and which can be used to return a periodic signal. This could be eg a rotating shaft with a "bump that will trigger a magnet plus Hall sensor, or the flywheel on the motor which will probably have some part which differs enough to trigger a sensor. or the flywheel surface can be given a white soot of paint etc or a strip of reflective tape to trigger an optical pickup. You can buy optical tachometers which will repond happily to a periodically varying surface and the silvered tape trick is a standard one with them. Some of the available tachometers will have some form of output (RS232?) or will be more acceptably hackable than the treadmill. OR you could build your own without too much effort: DIY Optical Tachometer Another home made optical tachometer More complex crcuit than is needed but the front end gives ideas. This (from above) plus an Arduino is about enough - or just the sensor with care. Arduino in the sky with clothespegs - actually a really simple optical interface optical tachometer with Arduino based optical tachometer with numerous clothes pegs assisting. Wow !!! - Vast list or Arduino application with link to above project (at least) Sample of commercial unit - Australian seller $A80 rtail. I have one of these. Goes OK. No external interface. Hackable. Identical unit at Farnell UK 43 GBP ;-(. A zillion possible references
H: Modular PCB Design I'm designing a basic harness continuity checker based on shift registers implemented in Max V CPLDs. I'm aiming for a modular/extendable PCB design for the project as it has several benefits (cost, less complexity). A uC communicates with my CPLDs using SPI. What I'm not sure about is how to best cascade these CPLDs in order to obtain a larger shift register. In a 144-pin TQFP, I only have 114 IO pins. Therefore, I can only implement a 114-bit Serial In Parallel Out or a Parallel In shift register. But by cascading these 114 IO devices I can obtain much larger shift registers. However, I'd like to place these additional CPLDs on a different PCB. This has the advantage that I can simply extend the device when I need. On smaller harnesses, a single 114 test-point PCB will suffice. On larger ones, I can cascade. At the moment, the CPLD is really just a shift-register. But in the future I'm hoping to implement a state-machine that can possibly implement more functions, like checksum to verify the contents sent by the uC etc. But that's for later and all I know is that I'd just use SPI for communication. As the CPLDs need SPI for communication, I am guessing that I need to pass these onto the cascading shift register i.e. each device will have a Serial Out (SO) pin. But it will also need to pass CLK, Chip Select and even a SI/MISO pin incase the uC needs to read back the shift register contents. Each CPLD will drive the next one in the chain by passing CLK, SO, CS. I think buffering all the signals leaving the PCB would be necessary. But what would be the best way to actually connect the PCBs together? I suppose these really depends on the speed of operation. Fortunately, speed isn't an issue and therefore I'm operating at a very low frequency - just 62.5kHz. I'd like to be able to increase this, perhaps to 500kHz. I don't think I'll need any beyond that. At such frequencies, what's the best way to cascade PCBs? Please note, I'm aware that I can purchase a large 324-pin device. I'm afraid, I can't really use that as there is no way to inspect BGAs here locally. So I'm sticking with TQFP packages. I'm also aware that the topic, perhaps, mostly pertains to pcb-layout but I'm also hoping I can get some CPLD/FPGA centric advice here regarding what signals I need to send as I'm not so sure about that. Would appreciate any responses. Some more information based on Keven's answer: The reason we feel daughter cards would benefit is most of the harnesses we assemble are have less than 70 wires. There are only 5 harnesses that have more than 250 wires. A single large circuit would be too costly. The reason the PCB would be large is because the mating connectors we use (62 pin D-Sub) are quite large physically. So we thought of divinding the PCB by having a motherboard which houses the uC, LCD interface, CPLDs, SD Card, LED Controller etc. This would have about 62 or so test points. The daughter card would also have 62 test points and it would only contain additional CPLDs and the connectors. This PCB would also be much smaller than the motherboard. The motherboard would be able to test 70% of our harnesses, with additional units allowing us to expand the test points when needed. Not only would this be cost-effective, it would also make the overall system much simpler. Chips, by themselves, are really cheap. The Max V 240Z that I'm using costs just $5. However, the cost for four-layer PCB is the limiting factor for us. Each daughter-card would have connectors for programming the CPLDs and for connecting to the other PCBs. I don't feel programming each CPLD is much effort, especially because I won't really need to change any of the code. The uC won't even know the shift registers are cascaded... well, except, for the fact that I'd it to be able to sense the presence of additional PCBs so it knows the overall width. I think that shouldn't be too hard to do. AI: I'd like to place these additional CPLDs on a different PCB. This has the advantage that I can simply extend the device when I need. On smaller harnesses, a single 114 test-point PCB will suffice. On larger ones, I can cascade. There are multiple levels of modularization which you can aim for. Where you want to stop depends on your specific use case. At the most basic level, the hardware must be designed such that you can select the number of modules in use after the design stage. The difficulty of changing the number of modules, space available, desired software complexity (and available space for software, especially on a CPLD) and the system cost will be key factors in your decision. Hardware The simplest and cheapest way to do this is to build one PCB, (You don't need multiple PCBs for modular design!) and put footprints for your desired maximum number of CPLDs on the PCB. If you need more IO, you can then solder down another CPLD. Obviously, this isn't something you'd want to do very often. At the next stage, you'd want to build daughtercards so that you can more easily add and remove modules. You asked: But what would be the best way to actually connect the PCBs together? This depends on your system architecture and number of modules. If you know you'll never want more than, say, 3 modules at any one time, just put three connectors on the main board. These can be edge connectors, or stackable connectors, or whatever you like that doesn't require wires. If the number of sub-modules is too large to fit connectors for each on one PCB, then you should consider stacking (if your bus can handle the fanout of your maximum number of modules) or daisy-chaining (if you need to buffer the signal or vertical space is limited) the modules. Plenty of connectors are designed for this purpose; check the "Board-to-Board" section of your favorite distributor or manufacturer, and many are designed for extremely low crosstalk and high frequency - 500kHz is nothing, unless you're using PTH 0.1" breakaway headers and have fast-changing signals (even then, you're probably OK). Check the mating strength of your connectors just to be sure, but if you only have a few pins, the footprint of your interconnection doesn't carry the stresses well, or the system will be subject to vibration, you'll need standoffs. It's often wise to design the interface in such a way that different modules can be designed to interface with the motherboard in the future. Pins are cheap, give yourself a couple spares just in case! Software If your number of modules supports it, you can simply add a slave select line for each module. This isn't really a software solution, but I wanted to mention it. If you don't mind programming every CPLD differently, you could build the system such that the microcontroller sees it as one giant shift register (which you've suggested). If you added or removed a module, that module's address space would simply be wasted, and extra time would be used transmitting to addresses which don't exist. Each module would need to 'know' its address space, though, which would make programming the complete system a struggle. A more versatile solution is to use software addressing to access each sub-module. In a 'programming mode' (perhaps a pushbutton on the module, or simply only connecting one at a time), you could assign the CPLD an address. By assigning each CPLD a different address, you could add or remove modules at will, and only have to adjust the activity of the microcontroller (which I presume to be easier to adjust than the CPLD). My suggestion for this project If a 324-pin device will solve all your foreseeable use cases, then the single-PCB method should work fine. The multiple-slave-select method would allow you to program all the CPLDs simultaneously with a single programmer. Sorry, but this project as described doesn't seem like a candidate for daughtercards.
H: address field and words of memory "Consider as an example a typical computer of that era which might have had a 16 bit address field in its instructions and 4096 words of memory.A program on this computer could address 65536 words of memory." I don't understand some of the terms. What is meant by "16 bit address field" , "words of memory" . And what does "4096" denote ? I don't get the feel of what the author is saying.Please explain the whole sentence. AI: Let's start with the word "word" (pun intended) In this case it represents the default size of the storage medium of the system. This could be any number of bits, but was commonly 8 bits (in, for example the Z80 of the ZX Spectrum, etc), or 16 bits in the early PC systems (8086, 80286 etc). So an 8 bit computer has a word size of 8 bits. Then there are 16 address bits. This is literally the number of address lines on the chip. Again, taking the Z80 as an example, there were 16 of them (A0 to A15). This gives a possible \$2^{16}\$ addresses - 65536. Each one of those addresses represents the memory location of one word of data. That's 65535 available words - on an 8-bit system that's 64KBytes. On a 16-bit system it would be double that at 128KBytes. Now, the RAM memory, the ROM memory, and (depending on the architecture) the IO peripherals will all take a number of those 65536 addresses. Say for example you have 2K of ROM and 4K of RAM. That's 2048 addresses of ROM and 4096 addresses of RAM. Not all the addresses are used up, so there is room for memory expansion say. The ZX Spectrum 48K had 16K of ROM and 48K of RAM for example. That's 16384 addresses pointing to ROM, and 49152 addresses pointing to RAM. How much of the available 65536 addresses are actually used is purely down to the designer of the computer.
H: How and where is energy dissipated in a driven traction motor? When a fully loaded elevator is moving down its potential energy is decreased and I guess is somehow converted by the elevator traction motor into heat. How exactly does it happen? What exact elements of the motor or other parts do the conversion and how? AI: A typical three-phase induction motor has a synchronous speed and direction at which applied voltage will be precisely canceled by back EMF, and can operate in several modes: When the shaft is turning at precisely the synchronous speed (and direction) for a supplied voltage, as noted, no current will flow. When the shaft is turning faster than synchronous speed (but same direction) for a supplied voltage, the phase of voltage and current will be such that the motor feeds power back to the supply. When the shaft is turning slower than synchronous speed (but same direction) for a supplied voltage, the phase of the voltage and current will be such that the motor takes power from the supply. A stalled motor is a special case of this. If the shaft is turning in a direction opposite the applied voltage phases, the motor will turn all of the supplied electrical power and mechanical energy into heat, a condition known as "plugging". A motor which is plugging consumes more power and current, but generates higher torque, than one which is merely stalled. Plugging is generally bad, since it not only wastes energy, but it subjects the systems involved to very high mechanical and electrical stresses. While plugging might sometimes be useful in an emergency-stop scenario, in most cases a mechanical brake would be better.
H: Is it safe to connect Arduino/Netduino to car voltage source On Netduino homepage it is stated that Netduino can be powered by input: 7.5 - 12.0 VDC or USB. The car output voltage is 12V but the car voltage source can produce voltage spikes so I am not sure whether it is safe to plug netduino directly into car voltage supply without any additional protection such as voltage limiter. Does anyone know if it is safe to connect Netduino/Arduino directly to car voltage supply? Thanks AI: No. Going strictly by the spec you quote, connecting to a car is out of spec. Even without spikes, it will be close to 14V when the engine is running. Spikes can be 10s of Volts, and unless a circuit specifically states it is designed to handle that, you must assume it can't.
H: How can I make a 15 minute egg timer circuit? I want to make a 15 minute timer for a game. I would like it to count down 3 x 5 minute segments of time, and then ring a bell when the 15 minutes is up. To do this, I want to push a button to initiate the timer, which will then light 3 x leds. After each 5 minute segment is up, one of the LEDs should go out. Finally, when 15 mins is up, I want to ring a bell (just once) using a solenoid. Trouble is - I don't know where to start! My background in more in computer programming - so I understand the logic required to do it, just not how! (I've put circuits together in the past, but always using someone elses schematic - I'm not sure where to start in terms of designing my own.) I'm not looking for someone to design it for me (though it might help!) but for an idea of where to start figuring out how to do this. Have had a look at some 555 based egg timer circuits, but don't know how you set the time periods on them. EDIT Have knocked up a vague schematic - does it look like I'm heading in the right direction? If this does what I think it does it should begin with three LEDs switched on, then with each clock pulse knock an LED off until they're all off - then it should reset. AI: I'd not like to ruin your learning fun BUT if you get a more or complete idea on this project you can move on to more difficult ones. The circuit below is almost exactly what immediately came to mind for me (I have had lots to do with 4017's in recent years :-) ) and lo and behold somebody has done a very nice job of writing it up. The 4017 is a decoded "Johnson Counter" (look it up) which provides a sequencing one-of-ten output. You can cause it to count up to position N and stop, or to position N and then reset or you can chain chain several together or more .... A very useful IC. Datasheet for the basic CMOS version here and for the buffered 74HC4017 version here. Note that the "basic" CD4017 has a very special feature which tends to be lacking on all "improved" versions - it has a Schmitt triggered clock input - which means that you can use it with a user pushbutton input or other slow and noisy input. ometimes an immensely valuable feature. The circuit itself is enough: Does this do whta you want?. Well, almost. Look at the enable and reset lines. Look at the datasheet. What happens if you plug the enable line into output N? https://homepages.westminster.org.uk/electronics/images/4017_08.gif BUT they have done a really superb job of presenting a plug in bread-board version here Leading to this. You could use one small breadboard and less LEDs and a different oscillator (eg 555 / 4040 et al etc) but this is an extremely nicely done example THEN you can consider a zillion alternatives [fromhere] - all images hotlink to a page. Look at he top of the page to see the obvious and extremely useful way that I got this eggtimer circuit collection and this overlapping but not identical egg timer circuit collection (plus some other stuff in each case). 74HC4017 "under the hood": Clock accuracy: Try it and see. Use a good quality clock cap- NOT a ceramic. What if you clocked it twice as fasts and used eg diodes to OR a single LED per 2 outputs? Or 3 times as fast? If you want to use a faster clock look at CD4040, CD4020, CD4060. Note that one of these can both divide and self oscillate. You can still have 2 ICs total but a clock and a divider as well. Enjoy.
H: Battery circuit power drain Bit of a newbie question here... I want to build a battery powered LED light for use outdoors. So basically needs to be pretty bright and last a while. If I have battery rated like this: 5.0Ah 6V Discharge current 20 hr rate 250mA Capacity: 20hr rate (0.25A) 5.0Ah 10hr rate (0.50A) 4.3Ah 5hr rate (1.00A) 3.8Ah 1hr rate (2.70A) 2.7Ah An LED rated like this (lumens): Forward Voltage: 3.7V @ 350mA : 100 @ 500mA : 130 @ 700mA : 185 @ 1,000mA : 250 So I want to create a circuit where I can switch between using 0.25A and 0.5A from the battery. So, if I were to create a circuit with just the battery and LED, would the LED draw the maximum current it is able to? (lets say that's 1A, so it lasts 5h) Or would the battery dump all it's power into the LED since there is no resistance in the circuit? To get the circuit running at 0.5A, by Ohms law, I would need to add in a 12 Ohm resistor (I think! - 6V / 0.5A) Does the addition of the resistor reduce the power drain of the circuit? Do the resistors regulate the current from the battery in a way that will extend the life of the battery? Also, if the forward voltage for the LED is only 3.7V in a 6V circuit, how would I go about reducing the voltage for the LED? AI: It is not very efficient using a resistor to drop the current of a high power LED. In your example 3.7/6 of the power is used by the LED and 2.3/6 of the power will be consumed by the resistor which it will have to dissipate as heat. Something like one of these components would do the job: http://www.jaycar.com.au/productView.asp?ID=AA0593&form=CAT2&SUBCATID=976#1 It takes a variable battery voltage range, and has an input for a potentiometer so you could adjust the brightness.
H: 9bits/signal element, what's the bandwidth? If I encode 9bits/signal element, what is the minimum required bandwidth of the channel in Hertz? With the information that 9bits/signal element, is it possible to find its bit rate or any other things so as to find the minimum required bandwidth? AI: The bits/signal ratio is irrelevant, and can be anything. What matters is the (signals or symbols)/second. As such, the actual required bandwidth is completely independent of the modulation scheme. It is only a function of the data rate. From your description, I assume 9bits/signal basically means something like encoding a 9 bit value as an analog value, where 512 discrete steps represent 512 possible 9 bit values. Therefore, if you had a required data rate of 9 bits/second, your required signal bandwidth would be 1 Hz (or 1 symbol per second). 18 bits/second would be 2 Hz, 27 would be 3 Hz, etc... Related Reading: http://en.wikipedia.org/wiki/Amplitude-shift_keying http://en.wikipedia.org/wiki/Intersymbol_interference
H: Is it advisable to use lead-free PCB and solder paste on a first SMD assembly job? I am sending my first PCB design to Sunstone for manufacture and I need to decide whether to order the board finish lead-free. All of the components are lead-free, and I have not decided on solder paste. There are about 25 chips on the board and the smallest are 0803 and SOT143. The board size is 3.0x1.5 inches. I am planning to order a cheap IR reflow oven like the T962A. This is not a consumer product (it's a driver board for an IR laser used in scientific experiments). I understand that lead-free solder doesn't flow as nicely and requires higher temps, etc. Shoud I Go Green or should the additional usage complexity dissuade me from using lead-free? Followup question: should I order a stencil for a board like this? AI: When you are doing reflow, leaded vs. leadfree does not really make much of a difference. Leaded has a lower melting point, but is you are using a reflow oven with a temperature profile, you will not really experience any difference. You will notice a difference when hand soldering. Leaded solder is easier to work with especially if your soldering iron is so-so. It's kind of like driving with a stick vs automatic transmission. Btw, you'll be surprised how much of a difference a really good soldering iron makes. I had a cheap no-brand soldering station for a long time. Last year I got a new one (i bought PACE, but there are other good manufacturers as well) and the difference is astounding. Lead is actually poisonous and working with solder paste is more messy than solder wire. I have kids in the house and I use leadfree solder paste for reflow and anything commercial. I use leaded solder wire for the occasional hand soldering on prototypes.
H: How do I set the speed of a 4060B chip? Apologies if this is a bit simple, but I'm new to this! How do I set the speed for a 4060B chip? I want it to trigger every 5 minutes (fairly accurately). I've looked at the instructions here: http://www.reuk.co.uk/Timer-Circuits-With-4060B.htm and it looks like I need to trigger on pin 4. However, I don't get how I set the resistors and capacitor. AI: According to the datasheet the formula for the R/C oscillator is: \$ {\dfrac{1}{2.3 \cdot R1\cdot Cx}} \$ So for R1 = 10k\$ \Omega \$ and Cx = 10\$\mu F \$ \$ {\dfrac {1}{2.3 \cdot 10k \Omega\cdot 10 \mu F}} = 4.34Hz \$ You can use any of the Q4 to Q14 pins for output, they have different division ratios of the oscillator speed. Where Osc = the oscillator frequency the frequency of each Q pin is Q4 = Osc / 16, Q5 = Osc / 32, Q6 = Osc / 64 and so on up to Q14 = Osc / 16384. So with the above example Q4 will toggle every \$ {\dfrac{1}{4.34Hz}} \cdot 16 = 3.68\$ seconds For five minutes you simply need to choose a compatible frequency and divider ratio. 5 * 60 = 300 seconds. If we choose the divider as Q6 then 300/64 = 4.68 seconds needed for the oscillator. A quick shuffle of some figures gives one possible way as R1 = 204k\$\Omega\$ and Cx as 10\$\mu\$F. This would give: \$ 64 \cdot \left( \dfrac{1} {{\dfrac{1}{2.3 \cdot 204k\Omega \cdot 10\mu F} }}\right) = 64 \cdot 2.3 \cdot 204k\Omega \cdot 10\mu F = 300.288\$ seconds. Pretty close. I would probably use a smaller more precise capacitor and a larger resistor for more accurate timing. For best accuracy use the crystal option.
H: How do I calculate the temperature rise in a copper conductor? If I pass a current through a copper conductor, how can I calculate how hot the conductor will get? For example, if I have a 7.2kW load powered by 240VAC, the current will be 30A. If I transmit this power to the load via a \$2.5mm^2\$ copper conductor, how do I calculate how hot this conductor will get? UPDATE: From the comments and answer from Olin and Jason, I've created the following graph showing Watts per foot of \$2.5mm^2\$ copper wire: But how do I translate this into the the actual temperature rise. I understand that the missing variable is the rate of cooling, but I just need to get an idea of what the maximum safe current is that can be passed through copper cable of a given thickness. Assuming a constant current, and that there is no cooling at all, how do I calculate the degrees of temperature rise per hour per Watt for the foot length of copper cable in question? AI: In your edit, what's missing is that the rate of cooling will depend on the temperature. In general, the cooling rate will increase as the temperature increases. When the temperature rises enough that the cooling rate matches the heating rate, the temperature will stabilize. But the actual cooling rate is very difficult to calculate. It depends on what other materials the copper is in contact with (conductive cooling), the airflow around the conductor, etc. As an added complication, the heating rate will also depend on temperature, because the resistance of the copper will increase at higher temperatures. So without much more detailed information about your conductor and its environment, its not really possible to give a precise answer to your initial question, how hot will it get?. As for the second question, how fast will it heat up if there's no cooling, you can calculate that from the heat capacity of copper, which Wikipedia gives as 0.385 J / (g K), or 3.45 J / (cm^3 K).
H: Square Wave Voltage Level Shifting (Take 2) After my question before, I tried to design a circuit with zener diodes and transistors for this issue. It seems to work in simulation. Am I overdoing it? Are there any other simpler ways to do this, if so, could you please give any example or pseudo circuits? AI: Sorry - rushing - more later if needed. Try this for now. This came from someone (on PICLIST perhaps?) on August 13th - MAY have been Olin. Can check later. I use a different arrangement and will discuss later if needed. This a more clever circuit than may appear, despite its apparent simplicity. It limits high side gate drive voltage without using a zener diode and it is faster than some alternatives because it does not saturate Q2. Understand how it works! See description below. Q2 inverts drive signal so FET gate goes low when input high, so input high = FET on with a PFET output. CAREFULLY note the lack of input resistor to Q2. Understand why this is done and what it acheives. Q2 is an emitter follower and I_R14 ~= (Vin-Vbe)/R14. (~=3.3 - 0.6 = 2.7 mA in this case). This generates a constant current in R14 when Vin is high. ie Q2 is NOT just an on/off switch as is often used in such cases. The current in R14 also flows in R15. As R14 = 1k and R15 = 5K, the voltage across R15 is 5x as high as across R14. ie voltage across R15 = (Vin-Vbe) x R15/R14 ~= (3.3-0.6) x 5k/1k = 13.5V. So high side FET negative gate drive is limied without the use of a zener diode clamp. ie when Q2 is on the bases of Q14 and Q15 will be driven below V+ (here = 30V) by about 13.5V so FET gate will be about 1 Vbe more +ve = about -13V below V+or here ~= +17V above ground. The super magic here is that Q2 does NOT saturate so is fast switching compared to a saturated transistor. The person who drew this claimed 200 nS drive time which seems about correct. There are ways of making this faster but that's an excellent start. If you need an extra inversion you can add an extra PNP at the high side or an NPN at the low side. EITHER risks destroying the nice constant current drive system so think it through carefully. More anon if needed. MOSFET gate zener: Having elimnated the need for a drive voltage limiting gate zener with the above circuit, I'm now going to suggest that one be added, but for a different reason If the load is inductive, and in any case as a good precaution, it can be useful to have a zener diode between MOSFET gate and MOSFET source. This has a voltage rating somewhat higher than the maximum drive signal ever applied (so it never conducts in mormal use) but lower than VGS_absmax for the MOSFET. Connect this "protection zener" near the MOSFET with shortest reasonably possible track lengths between MOSFET and zener. BECAUSE: In real world situations high energy noise can couple to MOSFET drain to MOSFET gate - one path is via MOSFET Vdg "Miller Capacitance" (look it up) and the other is from whatever source Murphy decides to use on any occasion. I have had MOSFETS which should [tm] have had no problems in theory actually dying within minutes in practice, but working reliably when a gate zener was added. FET GATE TRANSITION FROM OFF TO ON Preparation - turning FET off to establish steady off state:: q14/q15 bases high so Q15 off. Q14 supplied base current by R15 so FET gate pulled high by current through Q14 until Gate comes to about 1Vbe below + so Q14 stops suppling current. Everything stops happening, FET is off. Peace prevails. NOW Q2 on, FET drive is wanted! Q2 on, Q2C low = about 16.5V BUT FET gate is a ~= 1NF capacitor (inside FET)(which is why we need a hgh current driver) so Q15 base is at 16.5V but FET gate is at 29.4V so there is about 12V+ across R31! so Q15 TRIES to supply about 12/10 = 1.2A into FET gate. FET gate voltage drops from 29.4v as I comes from Q15. When FET gate reaches about 17V Q15 has no current source and effectively floats. ie in steady states there is no current and no current paths for either Q14 or Q15 - they only get sensible currents when the FET gate cap is charging or discharging which is why the circuit makes little sense when in steady state.
H: Wake up on movement My circuit application requires processing during physical activity, but it can be put to deep sleep for long periods of inactivity. I need a "true" or "false" output from a sensor that can be used to interrupt a microcontroller, i.e. an accelerometer would be massive overkill. Is there a very cheap ( < $1 ) and very low power ( < 10uA ) sensor or technique that will generate an interrupt to a microcontroller when the sensor is physically moved? AI: I know you said an accelerometer would be overkill, however the Freescale MMA8453QT can actively sample while drawing only 6 ua and provide an interrupt on movement. Price is 84 cents in quantities of 100, which appears to meet your needs.
H: Temperature-Controlled Fan How do I trigger a fans function after a setpoint temperature is reached? I want to avoid using a PID Controller, and my heating element will be external of the circuit. Once the fan cools the thermister back to regulation, it should turn off. I have a fan that operates at 24VDC(full speed). Thanks a lot AI: This circuit looks like it would do exactly what you want. BUT it may not, as we don't yet know exactly what you want. This shows a 12V fan but 24V would work equally well. This use a relay to turn the fan on and off but you could connect it in the transistor collector if the transistor was suitable. As you have not told us the fan power or current rating we can't be sure about the transistor. That circuit is from here but they stole it from somewhere else to get people to look at heir ads so ignore them. Here is a direct fan drive circuit that is otherwise similar. IF you use the 24V for op amp supply and FET you'd need a zener on the FET gate to limit gate drive. A say 12V zener so Vgate - ground ~=12 V would be OK. Change R2 to say 10k. P1, R1, P2 could all be larger with increased voltage. They are non critical as long as you understand how they work and can adjust as required. Circuit and OK writeup here. Note that P2 operation is important. It provides "hysteresis" which controls how much diffetrence there is between fan stop and fan start temperatures. =========================================== CLEVER PROPORTIONAL DRIVE CIRCUIT But THIS may be what you REALLY want. You said you wanted to avoid using a PID controller. You did not say why - and you MAY have meant that you did not want to pay the usual price for one - ie a cheap PIC controller or similar may be OK. This simple but clever circuit is a P controller :-) (P for Proportional). You can easily make it a sort-of PI controller It's clever in several ways - read the referenced text to find out why. The MOSFET is directly controlled by the NTC thermistor. As the thermistor cools is resistance goes up, the FET gets less drive, the fan slows and the cooling rate slows. Slow the fan too much and the fan can't keep the temperature down, the temperature rises, the thermistor heats, its resistance drops, the MOSFET gets driven harder the fan speeds up the emvironment cools, we are all happy. It will probably "hunt up and down". It will be fun. The circuit is from here which gives a good writeup. You will probably have to play with R1 - make it a say 10K pot. Put a 12v zener gate to ground on the FET as above or it will die (if using 24V.) Note that FET will heat when used like this in its linear mode. Max FET power is a bit complex due to non linear motor power_in / voltage / load relationship BUT PFET max is probably about PFAN max when fan is run on supply by itself. eg if this is a 2A 24VDC fan = 2 x 24 = 48 Watt (quite some fan!) then PFET =~~~ 48/4 = 12 Watt. YMMV. Use a heatsink. Take due care. Put FET on heatsink on exhaust side of cooled area if possible. Doesn't hurt your cooling and uses the air flow. I said you can make it a PI controller of sorts. Thus: Mount the thermistor on a block of thermally massive material. To het the thermistor the system has to heat the block. Once heated it takes a while to cool. The longer it is at stable temperature the more it settles down. This may be a strop of aluminum or Al plate or ... . You can put it in the air flow to change it's cooling "I" value. Or not. Very rough. more fun. A cap from gate to ground also adds "I" but it needs to be large as the gate resistor is small. You can make this a "bang bang" controller than switches on an off with the on / off ratio being controlled by thermistor resistance. Then the FET does not get hot and needs no resistance. Usually you'd you end up back with an opamp or comparator but it can be done with just discrete parts. Ask ... . ================================================================== Ask questions ...
H: Can non-rechargeable batteries be used in place of rechargeable ones? I am aware that attempting to charge a non-rechargeable battery is a terrible idea, and I have no intention of doing so. But supposing that, in a pinch, I needed to use non-rechargeable batteries in a device that originally came with rechargeable ones, and I don't use the charging cable the device came with while the non-rechargeable batteries are in use, could there still be a problem? How long would it take to manifest? Would it damage the device or batteries? Sorry if this is off-topic, I'm thinking my question is along similar lines to this one. AI: RB = Rechargeable battery. NRB = non rechargeable battery. I'll limit the following to AA and AAA cells and then comment on others at the end. When standard cell types such as AA, AAA PP3 (9V "transistor battery) and similar are used, the use of non-rechargeable batteries rather than rechargeable ones will almost never damage equipment. Essentially never in normal situations. Almost no equipment that employs AA/AAA cells is made specifically for RB rather than NRB and it is expected that consumers will plug in NRB on some occasions. The range of RB of NimH or NiCd is about 0.9V - 1.3V and the range of NRB such as Alkaline cells is about 0.9V - 1.6V. So, at the high end a NRB may make (1.6-1.3)/1.3 x 100% = ~= 23% more voltage. This could conceivably cause a problem if tightly designed but is exceedingly unlikely to in practice. A RB may output in excess of 10A for short periods under very heavy load and a NRB probably under 1/2 that in most cases BUT RB systems do not rely on such currents as they are not consistently available and cannot be maintained for long or for a large % of battery capacity. "Standard" AA and AAA cells are expected to produce the voltages mentioned above. There are nn standard cells available that may give MORE voltage from a NRB than usual. eg primary Lithium Thionyl Chloride, Mercury, Lithium ion all MAY be found in AAA, AA, C, D sizes but they are rare an specialised and users are usually trained in the difference. Some of these are rechargeable and some are not. Even then - as the voltages of th standard NRBs are LOWER than the special batteries the system is liable to simply treat them as "flat". SO while some interesting an unusual situation MAY produce damage when very special batteries are expected , this is unlikely to happen and may never happen.
H: mapping non existent addresses? "In terms of this picture of mapping addresses from the address space onto the actual memory locations, a 4-KB machine without virtual memory simply has a fixed mapping between the addresses 0 to 4095 and 4096 words of memory. An interesting question is: "What happens if a program branches to an address between 8192 and 12287 ?" On machine that lacks virtual memory the program would cause an error trap that would print a suitably rude message,for example : "Nonexistent memory referenced" and terminate the program." From the above paragraph this is what i understand , this is a 12 bit addressing system as 2^12 is 4096 and each word forms 1 byte (since 4KB X 1024 = 4096 Bytes = 4096 Words) . But when the author says "What happens if a program branches to an address between 8192 and 12287 ?" I don't understand what does that mean.From where do the addresses 8192 till 12287 come up ?(doesn't the processor have a 12 bit addressing scheme ?) And what does the statement "On machine that lacks virtual memory the program would cause an error trap that would print a suitably rude message" mean ? What has virtual to do with this ? I guess my interpretation is wrong.Whatever it may be please help me understand this. AI: When designing a modern computer / operating system combination one of the things we want to do is run multiple programs at the same time. One of the problems that you would run into designing this system is that all your programs want to assume they have access to all the memory they want, and they don't coordinate what addresses they use. The solution to the problem is a system called virtual memory. The virtual address space is the address space the operating system makes available for a program to use. When a program tries to access virtual memory at say, address 1024, they don't get to access the physical memory address (the addresses that go out on the wires to the ram chips) 1024. Instead there is a mapping system. The operating system handles all the mappings, so that two different programs can both access what they consider address 1024, but process 1 might have its virtual address 1024 mapped to physical address 2048, while process 2 might have its virtual address 1024 mapped to physical address 4096. In order to keep the mapping information manageable, the operating system maps memory in "chunks" called pages. 4096 bytes is a very common page size. In the example you site, a certain process has a single page, located at virtual addresses 4096, that is 4096 bytes in length (extending to virtual address 8191), mapped to the physical address 0 (since the page is 4096 bytes long, the mapping extends to physical address 4095) The actual size of the virtual address space is not specified (it must be at least 14 bits wide because the address 12287 is mentioned), but that hardly matters. One thing for sure, it is not a 12 bit addressing system. That's just the size of a virtual memory page, the smallest chunk of memory the operating system will manage. The addresses 8192 through 12287 are just other virtual addresses a process could access. The author asks the question "what happens if there is an access to memory that is not mapped?" In a computer without a virtual memory mapping system, the hardware notices that accesses to addresses not connected to physical ram are errors. The hardware signals the operating system of the offense. This process is called an error trap. The operating system would then print the message "Nonexistent memory referenced" and terminate the process. That's the suitably rude message. In a computer with a virtual memory mapping system almost the same thing happens. Since most programs don't use all the memory that they could possibly address, the operating system doesn't map all of a process' virtual memory to physical memory (also, most computers have more virtual address space available then total physical ram installed in them). So when a process tries to access a virtual address in unmapped memory, the hardware notices there is no physical memory mapped to the virtual address in question. The operating system is signaled, it prints a rude message, and terminates the process. This mapping and error trapping system not only allows multiple processes to have their own views of the address space, it also allows the operating system to contain and protect the running processes from each other. Even though they may be using the same virtual addresses, the operating system keeps different processes mapped to different physical addresses. That way is isn't possible for a process to (accidentally or on purpose) access or overwrite the memory of any other process. This keeps buggy programs from taking out your whole computer when they crash.
H: Have I understood what Arduino is correctly? Just before I go out and buy an Arduino starter kit, can someone confirm I understand what it is? As I understand it, I can use a simulator to create the behaviour I want. Once I'm happy with the code I compile it, connect the Arduino Uno to my computer (with a "blank chip attached) and flash the chip. Then I can remove the chip, and put it on a breadboard, or Matrix Strip or suchlike and work it into a project. Is that right? AI: No, you misunderstood. The chip isn't blank (also you don't insert the chip into Arduino. It comes with the Arduino). It has a special bootloader which is actually the core of the Arduino platform and which allows Arduino not to have a special programmer to program the chips. So it will not work with blank chips at all. Furthermore you're limited only to chips which are supported by the bootloader or are very similar. Also from what I can see, the Arduino IDE doesn't have a simulator, so you're out of luck on that point. The main point of Arduino is that it hides the physical operation of the chip itself from the programmer making it easier to use for those that find it too complicated to start programming the chip directly. It offers a simplified C-like programming language and it has a large library of functions which make it easy to connect various peripherals. The PCB itself is useful since it allows users to have a good quality base from which to make their own devices and saves them the trouble of making a PCB which will drive the AVR themselves or using some type of prototyping board. Basically what you want is regular Atmel's IDE called AVR Studio which does have a simulator (you can download it freely and check if it suit your needs). On the hardware side, you'll need either a programmer, if the IDE's simulator is fine, or a in-circuit emulator which will allow you to directly debug the code on the chip. The emulator itself is pretty expensive, but there are some other products that will allow you to step through the code too. Do note that it is possible to make an AVR programmer using Arduino but that isn't a major advantage over other programmers available on the Internet or the official programmer.
H: Forward Bias Photodiode circuit I have made a quick search but couldn't find anything specific around. I need to design a rudimentary circuit for a photodiode in conductive mode. I am interested in high speed rather than sensitivity, a wavelength around 550nm. I have a notional idea of a battery connected across the legs as a voltage bias, but how do calculate what resistor to use to avoid overloading the diode... Sorry for being vague, I'm struggling to find out where to begin! (nb. I have a background in physics so have a basic knowledge of electronics.) AI: I'll edit this answer severely as a general comment: Photodiodes may be operated either forward or reverse biased. Forward biased gives most output. Reverse biased gives most speed. and is noisier. In this mode Vsupply needs to be < Vreversebreakdown - hopefully in the data sheet. Reverse biased mode is most usually used. The Sharp BS120 is optimised for 560 nM operation. It specifies Vreverse_abs_max as 10 volts and has curves all the way up (or down) to -10V. Wikipedia says In "forward biased" mode the diode is usually operated with NO added bias and is used as a voltage source. For a silicon diode with Vforwards = Vf = 0.6V . Say you want 5 mA current and are using a 5V supply then I = V / R = = (Vsupply - Vdiode) / R = (5-0.6) / 0.005 = 880 ohms Say 1000 Ohms (which gives a notional 4.4 mA) For 1 mA you'd use (5-0.6)/0.001 = 4400 Ohms
H: What are the pins of a MOSFET in a TO220 package? I have an IRF3205 MOSFET in a TO-220 package, and I would like to know where the drain, gate and source are. I can't find this information. AI: The information is available in the datasheet as you might expect (fourth hit on google). Here is the relevant bit (page 8 of the datasheet): So Gate, Drain, Source, and Drain on the tab.
H: Testing an 8-ohm speaker I have been trying to test an 8Ω speaker, but I am having some difficulties. I have tried to test the circuit using multisim using the circuit below: I used the 8Ω resistor in the place of the 8Ω speaker in the circuit. When simulating, I get about 106mA, which should be enough to power the speaker. However, when I built the circuit on a breadboard, I did not hear anything from the speaker. Should I be using an AC voltage source instead of a DC to power the circuit? Am I doing something else wrong? Can somebody help me troubleshoot this circuit please? AI: Speakers are AC devices, the cone will move with the waveform to make it audible. However, like Matt says, you should hear a click when you connect a DC supply, and another one if you remove the source. That doesn't contradict the AC behavior; when you connect the power supply the voltage steps up and for a very short time you get a alternating current. Striking a power wire against the connection may give you something more audible.
H: Is it safe to design board at fab houses minimum trace width? I am working on my first board to have professionally fabricated. Right now I am planning on using seeed studio mainly because they are the cheapest I have found. 10 5cmx5cm boards for $10 is pretty awesome. Their site says they can handle 6 mil traces with 6 mil spacing. I have routed my board to those specifications, and it passes their drc file. I am still a bit worried that this could lead to errors in manufacturing, or will be easy for me to screw up when soldering. It is mostly surface mount components of pretty generous pitches. SOIC and 0805 parts mostly, with a few through hole headers. Is there any danger to making smaller traces? Is there anything to be gained by making them thicker? I am not expecting current over 100mA or frequencies over 1MHz. I am also planning on paying for 100% etest, so I don't think I need to worry about the fab house delivering non-working boards. Information: Seeed Studios Seeed's Fusion PCB Service Seeed authorised user review and guide to using their Fusion service AI: A reputable PCB house will solidly deliver their minimum standard track & spacing. Some will let you try finer at your risk and some will reject your work outright if under spec. I assume that you are using a temperature controlled iron. If not, do. If you are not confident in your own soldering abilities and you have plenty of room then fattening up tracks and especially pads associated with through hole parts does no harm. I'd give the through hole headers as much copper as you reasonably can - especially if the board is NOT PTH (plated through hole). With PTH you get substantially more strength. If the board is single sided (probably not, but ...) then you want to take great care with through hole pad soldering and due care with everything else. SMD part pads should be suited to the part and you have to learn to accommodate them rather than them accommodating you. PS: Others feel free to contradict or improve anything I've said. I have very substantial soldering experience but there is always good stuff and ideas to learn. ________________________________ Related: This excellent reference - TI Analog Engineer’s Pocket Reference - 4th edition as well as a vast amount of other useful material it provides some useful information on PCB track current/ voltage drop / heat / fusing issues. Especially pages 55-68.
H: PCB (Auto-)Routability Background I'm working on a fairly dense mixed PTH/SMD (plated through hole / surface mount) component PCB design. I'm using Eagle CAD for it for the schematic capture / layout and I'm using the auto-router function to route. It's a two-layer board, and I'm trying to keep all the SMD components on the same side of the board for ease of manufacture. Experience I usually place my components in what I think are sensible locations from a point of view of interface proximity, rotate QFP packages 45 degrees where it looks like it might be useful, set the routing grid to 1mil (i.e. the minimum?), set the DRC minimum trace width to the minimum allowed by my manufacturer, click Go, catch some shuteye and see how it turns out in the morning (or that it failed). There are a lot of settings in the auto-router and DRC that I frankly never mess with because I don't understand how they impact routability (is that a word?), which may contribute to my frustrations with it. Question I've used Eagle a lot at this point, and I'm very happy with it, but it often seems like a real challenge to get the auto-route to complete, and routability seems to be very sensitive to component placement. It will often times get up to 98+% routed and then give up. What are some rules of thumb / guidelines / advice for how to help the auto-router get the job done? AI: The Eagle autorouter is a decent tool, and I use it a lot. However, like any tool, you have to know how to use it well and understand its limitations. If you are just expecting to throw everything at the autorouter, you will be dissappointed. No current auto router, and probably for a number of years to come, can do that for anything beyond contrived or toy problems. You say there are settings in the Eagle autorouter you don't understand and never mess with. This is a bad attitude, and probably a good part of your problem. There is no set of control parameters that works on all boards. Even within 2 layer boards there are various tradeoffs. You absolutely have to read the manual and adjust the parameters for your particular situation. For two layers boards, I often try to keep most of the bottom layer a ground plane. I therefore use the top layer for interconnects as much as possible, and the bottom layer for short "jumpers" to make the routing topology work out. In this case, I set a high cost for routing in the bottom layer. Before autorouting, you have to look at the board and think about the critical areas that you can't explain to a autorouter. For example, you want to keep the loop currents of a switching power supply local and off the main ground plane. The same holds true for high frequency currents local to a digital chip, like bypass caps and crystal with its caps. If you are using the pseudo ground plane layer as I described above, then you want to manually connect every ground connection immediately to the ground plane with its own via. That leaves maximum room on the top layer for routing everything else. The process of routing a board even when letting the auto router do most of the grunt work looks like this: Manually route the critical paths, as I mentioned above. Do basic housekeeping pre-auto routing. This includes connecting all the ground pins directly to the ground plane for example. Look for problem areas where you can see the autorouter might get itself into trouble. If there are short connections in dense areas you might want to make some of them. This takes some experience and intuition, so if you're new to the particular autorouter, skip this step for now. Save a copy of the board, then run the auto router. If this is the first thru here, just have it do the minimum to find a solution. The purpose of the first few times is to see where the problem areas are so you can adjust the layout and your manual pre-route accordingly. Look carefully at the resulting route. See where the problem areas are. Revert back to the saved copy from step 4 and adjust your layout and manual pre-route according to what the auto router did. Repeat back to step 4 until the result looks reasonable. As you do more iterations thru here, you crank up the autorouter optimizations and other parameters to make a more final route. In the beginning you are just trying to see if it can find a solution and what the large problems are. In later passes you converge on a real route. I start out with no optimization passes, and use 8 for final routes. I also configure early passes to find a solution, then later passes to optimize it. Do manual cleanup on the route. In the case of a two layer board with mostly ground on the bottom, you want to minimize the maximum dimensions of islands in the ground plane. It is better to have a large number of small islands than fewer large islands. Sometimes you can see ways of rearranging signals locally to minimize the jumpers on the bottom layer. In this stage, the big picture has already been taken care of and you are focusing on manually optimizing small areas. This is similar to a peephole optimizer of compilers. Here is a Eagle autorouter control file I used on a two layer project with the bottom layer a ground plane to the extent possible: ; EAGLE Autorouter Control File [Default] RoutingGrid = 4mil ; Trace Parameters: tpViaShape = Round ; Preferred Directions: PrefDir.1 = * PrefDir.2 = 0 PrefDir.3 = 0 PrefDir.4 = 0 PrefDir.5 = 0 PrefDir.6 = 0 PrefDir.7 = 0 PrefDir.8 = 0 PrefDir.9 = 0 PrefDir.10 = 0 PrefDir.11 = 0 PrefDir.12 = 0 PrefDir.13 = 0 PrefDir.14 = 0 PrefDir.15 = 0 PrefDir.16 = * Active = 1 ; Cost Factors: cfVia = 50 cfNonPref = 5 cfChangeDir = 2 cfOrthStep = 2 cfDiagStep = 3 cfExtdStep = 0 cfBonusStep = 1 cfMalusStep = 1 cfPadImpact = 4 cfSmdImpact = 4 cfBusImpact = 0 cfHugging = 3 cfAvoid = 4 cfPolygon = 10 cfBase.1 = 0 cfBase.2 = 1 cfBase.3 = 1 cfBase.4 = 1 cfBase.5 = 1 cfBase.6 = 1 cfBase.7 = 1 cfBase.8 = 1 cfBase.9 = 1 cfBase.10 = 1 cfBase.11 = 1 cfBase.12 = 1 cfBase.13 = 1 cfBase.14 = 1 cfBase.15 = 1 cfBase.16 = 5 ; Maximum Number of...: mnVias = 20 mnSegments = 9999 mnExtdSteps = 9999 mnRipupLevel = 50 mnRipupSteps = 300 mnRipupTotal = 500 [Busses] @Route Active = 1 cfVia = 10 cfChangeDir = 5 cfBusImpact = 4 cfPolygon = 25 cfBase.16 = 10 mnVias = 0 mnRipupLevel = 10 mnRipupSteps = 100 mnRipupTotal = 100 [Route] @Default Active = 1 [Optimize1] @Route Active = 1 cfVia = 99 cfNonPref = 4 cfChangeDir = 4 cfExtdStep = 1 cfHugging = 1 cfPolygon = 30 cfBase.16 = 10 mnExtdSteps = 20 mnRipupLevel = 0 mnRipupSteps = 100 mnRipupTotal = 100 [Optimize2] @Optimize1 Active = 1 cfNonPref = 3 cfChangeDir = 3 cfBonusStep = 2 cfMalusStep = 2 cfPadImpact = 2 cfSmdImpact = 2 cfHugging = 0 cfPolygon = 40 mnExtdSteps = 15 [Optimize3] @Optimize2 Active = 1 cfVia = 80 cfNonPref = 2 cfChangeDir = 2 cfPadImpact = 0 cfSmdImpact = 0 cfPolygon = 50 mnExtdSteps = 10 [Optimize4] @Optimize3 Active = 1 cfVia = 60 cfNonPref = 1 cfPolygon = 60 cfBase.16 = 12 [Optimize5] @Optimize4 Active = 1 cfVia = 40 cfNonPref = 0 cfPolygon = 70 cfBase.16 = 14 mnExtdSteps = 5 [Optimize6] @Optimize5 Active = 1 cfVia = 20 cfBase.16 = 16 [Optimize7] @Optimize6 Active = 1 cfBase.16 = 18 [Optimize8] @Optimize7 Active = 1 cfBase.16 = 20
H: Calibration of reading of current measuring cicuit I'm making a small current meter device. I was able to take the voltage coming from a "shunt resistance" which is a current transducer that gives me a specific analog signal that's proportional to the current passing through it. I take this signal into ADC, but I'm facing a problem of calibration. My question is: The available methods to calibrate the reading Is there some methods that I can make it programmatically without the need for a reference (external device) or human interference? My goal in accuracy for now is 1% in readings. I'm measuring AC current. Range from 0.5 A to 80 A. Heat is not a problem. AI: You should be able to compute the scaling factor. The resistor will make volts from the current according to Ohm's law. After that you should know what gain you have into the A/D and what range the A/D is using. For 1%, you probably do need to do some calibration. A large enough known voltage source with known resistor will give you a current. You can make the current as accurate as the resistor and your ability to measure the voltage accross it. With a 1/2 % resistor and any reasonable voltmeter (has to be good to 1/2 % minimum), you can know the current to 1%, then store that and the zero reading in EEPROM and correct from those on the fly each reading. Be aware that some of that might drift with temperature, so you want to calibrate at your center temperature or specify a narrow range. Added: Component values and amplifier offsets vary over temperature. I was assuming a two point calibration, which can always be mathematically reduced to OUT = IN*m + b M is the gain adjustment and B the offset adjustment. Since both gain and offset are functions of temperature, any one set of M and B values is only valid at the particular temperature the measurements were made to derive them. If this calibration temperature is in the middle of your usage range, then the actual temperature will never be more than 1/2 the range off of the temperature the unit was calibrated at. This may possibly be good enough and not require temperature compensation. If instead you set M and B to calibrate the unit at one end of the temperature range, then the actual temperature at usage time could be the full range off from the calibration temperature, making the worst case error higher. Since you mentioned a A/D, you will have the measured values in digital form. This allows for performing the calibration equation above digitally. This also means the M and B values have to be stored in non-volatile memory somehow. The obvious answer is in the EEPROM of the same processor receiving the A/D readings. Calibrating digitally and storing the calibration constants in EEPROM is cheaper and better than ancient methods like trimpots. Trimpots cost real money, take board space, and themselves drift with time and temperature. On the other hand, most microcontrollers come with non-volatile memory, and usually have enough code space left over to perform the calibration computation at no additional cost. Even if not, using the next larger micro is usually a smaller increment than the cost of adding a trimpot. As for AC measurements, why do you need them. Current shunts work at DC, so you should be able to calibrate the system at DC unless you have deliberately AC coupled the signal for some reason.
H: Use only programmer power Is it safe to program a Pololu 3pi robot from Sparkfun without batteries, using only a power supply from the AVR programmer? AI: Looking at the manual I would say it's probably not a good idea. It may draw too much current for your programmer (you would have to verify this yourself) and also looking at the schematic there is a linear regulator that may not like having Vcc on it's output whilst nothing is on it's input. Unless you can confirm that neither of these point would cause possible problems, I would stick with (fully charged) batteries. Especially given the numerous warnings saying losing power during programming may permanently disable the 3pi.
H: Faking poles on a simple switch I'm making a simple switch box and I've done quite a bit of looking but I can't find a 4 pole single throw switch anywhere on the major component seller sites in the UK (farnell.co.uk etc.), although I imagine if there is one it wouldn't be reasonably priced. So, can anybody think of a simple and fairly cheap way I could use a single pole single throw switch to control 4 circuits, or perhaps some alternative to achieve the same goal? Ideally I would like to use a basic rocker switch, but beggars can't choosers. AI: If consuming power in one of the states is acceptable, you can use one or more relays and energize their coil(s) using a single circuit through the available switch. There are also "solid state relays" and various do-it-yourself transistor/FET/SCR/etc circuits which could be suitable for switching various types of loads.