source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
At what cable lengths are termination resistors required for RS-485 networks? I've noticed my experiments in the lab with RS-485 work fine with fairly short cables, but termination resistors are needed for true installations. Is their presence or absence a function of the cable length, or other factors? <Q> In general, for short cables (< 20-30m) and low baudrates (< 115200) you can leave them out without much trouble. <S> But: It is useful to put some kind of load on the signal lines to improve noise immunity (the RS485 driver will supply enough current to switch the voltage on the differential line, many noise sources will not). <S> But you do not need this load to be equal to any "characteristic impedances", \$200-500\,\Omega\$ will be ok. <S> When you go for high speed or long cabling you will need proper termination that depends on the cable you use. <S> So this should be \$100\,\Omega\$ for Cat 5 cables (not \$120\,\Omega\$). <S> Don't forget about the pull-up and pull-down resistors. <S> They are required unless all receivers used in the system give a well defined (high-level) output for \$0\,\mathrm{V}\$ input. <S> Their values should be chosen so that (when connected together with the "terminating" resistors) the un-driven line is properly polarized (\$> 0.3\,\mathrm{V}\$ for most receivers) <A> Some may just happen to work without them, but all should have them. <A> Since terminating resistors load down the network, they should not be used unless they are required. <S> Since reflected waves will dampen in 3-4 cycles, if the time for this to occur is less than one data bit width (or one half the bit width if sampling in the middle), the reflected waves will not interfere and terminating resistors are not required. <S> It is a simple enough calculation, figuring on the propagation velocity averaging around 65% of the speed of light: <S> For a 9600 bps communication rate, on a 1000 foot cable, you have a round trip time of 3 usec, a dampening time between 9-12 usec, and a bit width of 10 msec. <S> Therefore, each reflected wave will dampen out prior to you sampling each bit, so termination resistors are not required.
All RS-485 cables require termination.
What is a fan-in of a flip flop? What is a fan-in of a flip flop? It is mentioned in the following context: "...primary inputs that are in the fan-in of each flip flop." <Q> Fan-out is the number of logical inputs an output <S> can drive. <S> (Both Kaz's answer as well as the Wikipedia entry about it are wrong.) <S> Even for HCMOS fan-out is expressed as the number of LS-TTL inputs it can drive. <S> The input current of an HCMOS gate is negligible. <S> Fan-in is a rarely used term simply meaning the number of inputs. <S> 1 input has a fan-in of 1. <S> Silly, but it fits with the fan-out definition. <S> edit ravi says this in his answer (from Wikipedia): "Physical logic gates with a large fan-in tend to be slower than those with a small fan-in, because the complexity of the input circuitry increases the input capacitance of the device." <S> This isn't true. <S> More inputs doesn't necessarily mean a more complex circuit. <S> An 8-input NAND gate has the same input capacitance per pin as a 2-input one. <S> Each input is connected to two MOSFETs, one P-MOSFET and one N-MOSFET. <S> If an input has to drive a large number of FETs it will usually be buffered. <S> In a microcontroller an I/ <S> O pin will probably only see two FET gates. <S> edit (upon request by clabacchio ) <S> To clarify: more complex ICs may be slower, but it's not because of increased input capacitance as the Wikipedia article claims. <S> This is the logic diagram of a 74HC30 : Notice that each input only sees one complementary pair. <S> You'll see this in most logic ICs. <A> Fanout refers to the number of output paths from some system or component. <S> Many flows emanating from something give rise to a picture which looks like a fan. <S> Fanin is the opposite: the number of inputs converging on some system or component. <S> Fanout also has a different shade of meaning, referring to the potential maximum number of inputs that can be driven by some output rather than the number actually connected. <S> These terms are used in other disciplines, such as software. <S> If a function has a large fanout, it means that it calls many other functions. <A> Within an FPGA or CPLD, it is very common for the data input of a flip flop to be driven by some combinatorial logic. <S> In many cases, the combinatorial logic and flip flop will be together regarded as a single unit. <S> The "fan-in" of a flip flop refers to the fan-in of the combinatorial logic which drives it. <S> For example, a flip flop which is driven by a six-input NOR gate would have a "fan-in" of six. <A> e.g. a 3 input AND gate has fan-in of 3. <S> Fain-in network may also extend to input of input pins. <S> Physical logic gates with a large fan-in tend to be slower than those with a small fan-in, because the complexity of the input circuitry increases the input capacitance of the device.
Fan-in refers to number of inputs in a device
Anyone know of a 2-1 mux chip? I'm trying to find an IC implementing 2-1 multiplexers, but I could only seem to find chips like this: SN54LVC157A - Quadruple 2-line to 1-line data selectors/multiplexers . Where there are 2 groups of multiple inputs and 1 of these groups is selected for the output (essentially a bunch of 2-1 muxes with shared select inputs). Instead, I want 2-1 muxes where there are separate select inputs. Anyone know of such a chip? Or is there a reason why these are not readily available? Basically, we need to implement some combinational logic on a breadboard for a lab, and we found we could do it with significantly less gates if we use muxes. <Q> This is a basic 2-to-1 multiplexer. <S> The 2G157 Brian mentions in his answer has an additional enable input and complementary outputs. <S> As far as I know there are no multiple 2-to-1 digital logic multiplexers. <S> But there's no reason not to use several 74AUP1G157s on your board. <S> The 1G157 is available in a SOT1115 package, which is less than 1mm\$^2\$. Three or even four of those are smaller than a typical 14-pin SMT package. <S> May not be the easiest solution for DIY, though. <A> TI little logic mux/demux . <S> You are looking for SN74xxx1G157., probably SN74LVC2G157 which is a 2:1 mux. <A> If you want to implement something on a breadboard, you could use the ADG1634 from Analog Devices , which has four independently-controlled analog SPDT switches (which can also switch digital signals) in a 20-pin TSSOP package. <S> You can use an adapter like this one to convert to a DIP. <S> Note that they also exist in dual or single version. <S> See this overview . <A> The very common CD4053 is 3 independent <S> MUXes on a PDIP chip. <S> Plus being a jelly bean 4000 series, it will work on 3-15V <S> so is pretty handy for breadboarding/experimentation. <S> It is an analog switch, so can switch bidirectional digital signals as well. <S> http://www.geofex.com/article_folders/cd4053/cd4053.htm
The HC157 has a two-input version in the 74AUP1G157 . There are several common logic ICs available in small/single versions today.
Reliability and failure mode of MLCC (chip capacitors) Recently I've been preparing to manufacture a product which exclusively uses MLCC capacitors across the board. It integrates an onboard buck converter which uses them, and MLCC are also used for local decoupling. My prototypes have consisted of "dodgy" reflow techniques using a hot plate. Generally, 10% of the time after doing this, I find a shorted MLCC on the board, usually found because when power is applied, the cap will smoke. However, just right now I was replacing one of these caps with a soldering iron and after I had replaced it, it was still shorted. I verified there was no other short circuit on the board (because when removed 3.3V showed a few kohms of resistance.) It seems the simple operation of soldering the cap has caused it to fail. I've also recently repaired an LCD monitor which had a shorted MLCC on the T-con board and a few other users on a popular forum have reported this issue as being surprisingly common. Now, in this case, a monitor gets warm or hot, but no where near as hot as a soldering iron - so why could these be failing? I am planning to offer a five year or perhaps longer warranty on these boards, but I can only do so if I am confident the board is capable of surviving normal conditions. Caps are 0603 (100n, 10u 6.3V), 0805 (22u 6.3V) and 1206 (10u 35V). All are X5R or X7R. There are some 18pF caps for the crystal, but I've never seen those fail - I suspect they are a different technology to MLCC though. <Q> Some buy caps from a smaller manufacture with the reels re-branded at the fab. <S> Watch out. <S> I got into a mlcc failure investigation in 2002 and started inspecting caps on a reel under a microscope. <S> 3/10 came off the reel cracked. <S> A crack will sooner or later lead to a short. <S> Cracks are not obvious even under a microscope. <S> They may present as a subtle colour shift if the crack is below the surface layer. <S> Not all. <S> The vendor's manufacturer in this case eventually identified a hopper where the caps were getting cracked. <S> MLCC are very sensitive to mechanical stress. <S> Especially bigger than 1210 sizes. <S> I found a big power bypass cap adjacent to a heavy mechanical connector once. <S> The nearest mounting hole was 2" away! <S> They were cracking at a rate of 5/10 during install of the unit. <S> A fraction of those were catching fire. <S> The fire would continue to burn until it melted the copper, breaking the power connection. <S> Another effect of a crack is a reduction of the max working voltage of the cap. <S> It might be spec'd for 200 V. <S> But once cracked it may break down at 40 V. Cracked caps burst into flames in my lab when tested - even below their rated voltage. <S> Another way to warm up caps is exceeding their max ac current. <S> It's easy to think of caps as zero power dissipation devices. <S> Especially the higher Q mlcc. <S> But they're not. <S> Calculate the power dissipated in caps and do not exceed power/ac current limits. <S> Shows up in power circuits and converters commonly. <A> They are very sensitive to the manufacturing process. <S> Type "ceramic capacitor failure modes" into Google <S> and you'll find all the data you'll ever need. <S> As for the CRT issue that you described, most likely the capacitors in question are being latently damaged during assembly, which prematurely shortens their life leading to early field failures. <S> The warm ambient may contribute a bit to the rate of failure, but I doubt that a properly-sized, properly-soldered part would fail solely because of this. <S> MLCC rework should not be done with an iron. <S> A hot-air rework tool should be used to uniformly heat the entire part so that it 'reflows' on its pads, then remove it with tweezers or some other tool. <S> Replacement is similar - evenly heat the part on the pads so that it reflows, then remove the air and let the solder solidify. <S> Too much heat with an iron can damage the part both on removal and on replacement. <S> I believe that IPC mandates hot-air rework for MLCCs, as both my current and former employer strictly enforced this policy on shippable goods. <A> We also mount them at right angles so that singulation stresses that crack one cap will not crack the other. <S> Since they virtually always fail short you are left with 1 of the caps still in the circuit. <A> MLCC capacitor manufacturers have lots of information concerning soldering and mounting <S> do's and don'ts. <S> Hand soldering is a large contributor of failure mechanism,(25 years of contract manufacturing). <S> The larger the cap, 1206, 2512, 2225 <S> etc. <S> the more susceptible to thermal shock and failure. <S> If hand soldering, heat components with hot plate to reduce the Tshock. <S> Many large corporations forbid the hand soldering of MLCC capacitors on their products. <S> Mechanical stress, especially depanelizing with a rotary cutter creates lots of bad components, LED's and MLCC's. <S> Design orientation of MLCC length should be perpendicular to PCB potential flex length. <S> Keep away from any potential stress points, i.e. mounting holes, <S> I/O connectors etc. <S> BUY Quality components. <S> If pennies and nickels make or break the product, then it probably is not important if it survives anyway!
Some cracks may be sufficient to present a short immediately. Some cap vendors make their own parts. MLCCs fail for a variety of reasons, including mechanical stress (board flex) and thermal shock. We have adopted the practice of stacking 2 MLCC in series and mounting them at right angles for any decoupling caps that are powered continuously.
Is MCP2551 a UART-to-CAN converter? I want to make a CAN bus sniffer for 250 kbit/s using my computer. After some research I've found that MCP2551 is some kind of voltage level regulator for CAN's physical layer. Keeping that in mind, I'm wondering if this setup could work. I just want to record the exchanged messages for automated test purposes, not be a part of communication: PC <-> USB-UART (perhaps CP2102, bacause I already have one) <-> MCP2551 <-> CAN bus If not, what kind of signals have to enter MCP2551 in order to make me be a part of the bus? <Q> You can do that, but what you'll get on your CAN bus will be UART using CAN voltage levels. <S> Same for listening: CAN messages are so different from the UART format that the UART won't know what to do with them. <S> You'll have at least frame errors all the time, and you won't get at the message's content. <S> This image shows the structure of a CAN message: <S> There's plenty microcontrollers around that have a CAN interface, sans the transceiver. <S> It's for these that the MCP2551 was designed. <S> In the past we've used the NXP LPC2294, which has 4 CAN interfaces. <S> Each of them needs an MCP2551 to connect to a CAN bus. <S> More recent controllers from NXP include the LPC1800 family, of which all members support CAN. <A> I have made a USB/CAN interface using FT2232H in MPSSE mode (forget UART), <S> MCP2515 and MCP2551. <S> MCP2515 is the key piece you're missing here. <S> Study well what it does. <S> It's the actual CAN controller that does framing, ACKs, checksum generation and verification, message filtering and other less obvious things that a CAN node is required to do by the standard. <S> If you want a sniffer, MCP2515 has a listen only mode which guarantees no transmissions on the bus. <S> MCP2551 is simply a dumb physical layer adapter, similar to a MAX232 for RS-232 or ADM485 for RS-485. <S> Now this architecture is far from perfect as FTDI MPSSE technology has essentially no support for interrupts <S> (I believe it only uses bulk USB transfers behind the scenes), so I have to poll the controller frequently for new messages. <S> This places a lot of load on the USB host controller but still doesn't guarantee that no messages are lost (MCP2515 can store up to 2 received messages internally if you enable "overflow mode", only one if you don't). <S> A far better solution would be a proper microcontroller with builtin CAN and USB peripherals such as <S> STM32F105 (103 can't use USB and CAN at the same time). <S> See this project for a working implementation of exactly this idea. <S> LPC18xx as suggested by stevenh will work too, but LPC17xx are probably cheaper and easier to find. <A> Since you want to listen in on a existing CAN bus as I understand the question, you really can't use a UART at all. <S> CAN and UART siganlling are totally different. <S> You could in theory look at <S> the CAN receive line coming out of the MCP2551 and decode the CAN traffic. <S> That won't be easy, but it is theoretically possible. <S> Without specialized CAN hardware, you'll have to sample a few times faster than the CAN bit rate and decode that bit stream in software later. <S> You'll probably need to record at about 1 Mbit/s to decode 250 kbit/s CAN. <S> Using a microcontroller will be far easier. <S> The PIC 18F2580 and other similar processors have a CAN peripheral built in. <S> The hardware does all the bit level decoding and receives whole CAN frames. <S> The processor can then send on received CAN frames via its UART to your PC.
You have to supply the MCP2551 with CAN protocol messages if you want to communicate with CAN devices on your bus.
what is the magnitude of total voltage in the below circuit? I was working on some RLC circuits and I found a question something like this. In series RL circuit, \$V_R\$ = 4V and \$V_L\$ = 3V. what is the magnitude of total voltage ? I just thought \$V_T\$ = 4V + 3V = 7V but the book says its 5V. Could anyone explain me am I right or wrong in thinking so. Is it 5V or 7V ? Please help me with these. <Q> Whenever you have a resistor in series with an (ideal) inductor, if the current is sinusoidal, their voltages will be 90º apart. <S> Since \$V_R\$ and \$V_L\$ are orthogonal (due to the 90º phase difference), the module of \$V_T\$ can be easily computed as \$|V_T|=\sqrt{|V_R|^2+|V_L|^2}=\sqrt{4^2+3 <S> ^ <S> 2}=\sqrt{25}=5\$. <S> The reason for those 90º is: if \$I=\sin(wt)\$, then it will be \$V_R= <S> R\sin(wt)\$ and \$V_L=L\dfrac{dI}{dt}=L·w\cos(wt)\$ . <S> Update : stevenh is right, and my explanation could be confusing. <S> I was indeed assuming, from the OP, some two-dimensional interpretation of sinusoidal voltages and currents (where A·sin(wt+phi) is just a rotating vector with radius A and phase wt+phi), although complex numbers are not really required. <A> The right answer is 5V as the others already explained. <S> I'll assume you have a sinusoidal signal applied <S> (otherwise you would have got a different result). <S> Impedance of the resistor is \$R\$, which is a real value. <S> Impedance of the inductor is \$j\omega L\$, which is complex. <S> While multiplying by a real value scales a vector, multiplying by (a power of) \$j\$ <S> rotates it in the complex plane. <S> Multiplying by \$j\$ gives a 90° rotation, \$ <S> \times j^3\$ is 3 \$\times\$ <S> 90°, and \$ <S> \times \sqrt{j}\$ will give a 45° rotation, for instance. <S> (In the image \$i\$ is used instead of \$j\$. <S> That's what mathematicians use. <S> In electronics \$j\$ was chosen because \$i\$ was already used to indicate current.) <S> \$V_R = <S> I \times R\$ <S> Voltage and current have the same phase; their vectors point in the same direction. <S> \$V_L = <S> I \times <S> j\omega L \$ <S> The factor \$j\$ causes a 90° rotation of the \$I\$ vector, so the voltage is at a right angle. <S> Now \$I\$ is the same for resistor and inductor since they're in series. <S> \$V_R\$ is in phase with \$I\$, and \$V_L\$ is at 90° with that same \$I\$, therefore \$V_L\$ and \$V_R\$ are at a right angle. <S> Adding them gives you a right-angle triangle, and you can apply Pythagoras to find the magnitude of the sum: \$ <S> |V| = \sqrt{|V_L|^2 +|V_R|^2} = <S> \sqrt{(3V)^2 +(4V)^2} = <S> 5V \$ <S> The phase difference between current and voltage is \$ <S> \phi = arctan\left(\dfrac{V_L}{V_R}\right) = arctan\left(\dfrac{3V}{4V}\right) <S> = 37°\$ <A> You need to provide far more information and a circuit or diagram. <S> BUT you are probably dealing with a circuit with resistive and reactive components at right angles. <S> Vr is probably the resistive component and Vl = inductive component at 90 degrees. <S> The resultant is the vector combination of the two = <S> the hypotenuse of the triangle that Vr and Vl form the sides of. <S> $$ V_{combined} = <S> \sqrt{ Vr^2 + Vl^2} = <S> \sqrt{3^2 + 4^2} = <S> \sqrt <S> {9 + 16} = \sqrt{25} = 5 <S> \mathrm{ \, V}$$ <A> Doesn't the reactance of L depend on frequency? <S> If the applied voltage is DC, since the reactive part cannot instantaneously pass current, the L initially has all the DC voltage across it, as if it had infinite DC resistance (wasn't there). <S> As it passes more current, it will eventually settle to a voltage depending on its DC (non-reactive), resistance, in series with the non-inductive R <S> The real weird thing is, what is the voltage when you disconnect the external source? <S> What happens when you compress a spring and then let go? <S> Just before you disconnect, the total current is passing through both the L and R, and the voltages are what you expect. <S> Then you disconnect. <S> Now the same current is passing through both as before, but with L now sourcing it. <S> The magnitude of the difference between the disconnected junction and ground is 4v due to R, 3v in the opposite polarity/direction due to L holding the current steady but being the sole voltage source, leaving <S> +1v. <S> Add to that <S> the positive 4v that appears across R and you have a total magnitude of 5V. <S> The current now goes in the same direction through R, but the opposite direction through L (remember the spring bouncing back?), except for what passes through the resistive part of L.
The total voltage \$V_T\$ is the vector sum of \$V_R\$ and \$V_L\$.
Cheapest way to dissipate energy (discharge battery) What is the cheapest way to burn a lot of energy? Say I want to burn 800W (4V, 200A). How should I do that? Ugly suggestions like: use a pot of water and a cable are welcome :) It should be easy and cheap.. <Q> It seems you want a dummy load that can dissipate 800 W. <S> Normally I use incandescent light bulbs for things like this. <S> They have some nice properties: Are designed to handle the heat. <S> Are cheap and plentiful, so a combination at the desired power can usually be found. <S> Are self-indicating. <S> You know when they are on or off just by looking. <S> However, there are two problems with this. <S> Incandescent light bulbs are getting less and less available nowadays, and are even banned in some cases. <S> 4 V is also a difficult voltage for dissipating significant power. <S> Even 12 V automotive bulbs aren't going to dissipate significant power at 4 V. <S> So in the end you probably end up with a bunch of power resistors in parallel. <S> The big fat ceramic wire wound types can do this. <S> There are also things called electronics loads . <S> Those are nice, often dump the power back onto the power line, but are expensive. <A> If you really want to kill you battery, Isabellenhütte may be of help. <S> They're known for very low resistance resistors (milliohms), but they also supply resistive alloy to resistor manufacturers. <S> Maybe they can supply you with some bulk material. <S> Other solution: this MOSFET will sink 100A. Place <S> a number of them parallel, fix them on a big block of steel, which you hold under water in the river. <S> You'll have to drive the FET with a higher voltage than 4V. <A> Just don't do it: the battery may explode. <S> First check the maximum discharge rate of your battery. <S> And clearly Olin's solution allows to obtain low values with higher power ratings :) <S> This solution will be cheaper, excluding the cost of the battery and your house :) <A> I had to do something like this a number of years ago. <S> I would agree with Olin for the most part <S> (incandescent light bulbs are ridiculously cheap, and they light up when powered), but light bulbs have the disadvantage that their resistance changes significantly between cold and hot, and to get 800W you're going to either have to purchase a bunch of them and wire in parallel, or find some very large bulbs. <S> The best way we found for a cheap dissipative load is a heating element. <S> You can get a hot plate with a spiral burner for under $20. <S> Heat or boil water, and you basically never have to worry about it overheating. <S> The tough part here is matching to the voltage. <S> AC loads are meant for rms voltages of 120VAC or 220VAC (or others) depending on your location, and if you have an rms load of 80-100V that would work ok with a 120VAC load. <S> But a 4V load isn't going to dissipate much power in anything intended for AC. <S> You could try to look for water heating elements that are in the 6-12V range -- if you search for "low voltage submersible heating element" you should find a bunch of 12V <S> but I haven't found any reputable vendors of 6V elements. <S> Do the math for a bunch of cheap power resistors in parallel (as Olin said) from Digikey -- if you can't find a single heating element that will beat that in cost/availability/ease of use, go for the power resistor approach. <A> I'd add just one minor detail that appears (at least to me) to getting overlooked here. <S> To draw 200 amps from a 4 volt source, your load has to be 0.02 ohms (R = E <S> /I). <S> If you start with, say, 1 ohm resistors, you'll still need 50 of them in parallel to get the right resistance, and each will need to be (at least) a 16-watt resistor to carry the load. <S> You could start with (for example) <S> 50 watt 0.2 ohm resistors to reduce the number/work involved, but either way it's not going to be particularly cheap. <S> Depending on exactly what temperature <S> you're willing to tolerate, you'd need something like 2 to 4 gauge copper wire to carry a 200 amp load safely. <S> Unfortunately, at that size you also get pretty low DC resistance so you'd be looking at something like one to two hundred feet of it to get the proper resistance -- still not what you'd usually call cheap. <S> Steel has enough higher resistance (and lower price) than copper that I'd guess something like steel pipe or I-beam would get you to the right resistance range for a lot less money. <S> You'd probably be looking at something like an 8 or 10 foot section of something like 4 or 6 inch I-beam/pipe (though there are a lot of steel alloys with different resistance, so you'll pretty much have to measure to find the right length). <S> This has the added benefit of a fairly large surface area for the cross section. <S> You almost certainly want to submerge it to keep the temperature reasonable, and the large surface area will help make the submersion more effective.
But if you REALLY want to harm yourself (or someone else), a small-value (fractions of Ohm) high-power resistor may work.
Using a motor to open doors I have made a wooden case to hold both my Xbox 360 and my PS3. It's as wide as both consoles laid down next to each other and as high as the console. it has 2 doors on the front, one for each console. They're both hinged separately from the bottom. What I want to do is to use a hobby motor to open (push) and close (pull) the door open to 90 degrees. The best way I can see is using plastic cord that has teeth on it and a motor that a teethed head on it to lower and pull the door up. The problem is: how can I control the motor to run for a certain time (so it doesn't just keep running) and how with just one button I can press it and it lowers to 90 degrees and press it again and it will pull the door back up and stop <Q> An H-bridge to interface the Arduino to the motor. <S> This is a chip which allows you to control the direction of the current in the motor. <S> You'll just need to select one which is rated for enough current and voltage. <S> A sensor to detect the position of the door. <S> Probably the simplest thing is to use two microswitches, one which is pushed when the door is fully open, and the other which is pushed when the door is fully closed. <S> Connect them to the Arduino so that it can tell the position of the door. <A> If the door has mechanical limits at the vertical and horizontal orientations, I would just use a cheap dc motor that winds/unwinds a thread that pulls/lowers the door. <S> To know when the door is vertical, you can measure current, and detect an excess of it. <S> About it being horizontal, you don't have to be so exact, since you can just unwind extra thread. <S> Just work by time, when opening. <S> The overcurrent detection will also "calibrate" your system, every time you close the door. <S> If the door does not have mechanical limits, or you don't want to detect overcurrent, you can attach a MEMS accelerometer to the door, at a point farthest away from the axis of rotation (so that it moves with the maximum possible radius), and read the signals along the two axes that are perpendicular to the axis of rotation, to know when you have to stop while opening and closing. <S> This way, you will be even able to choose any "closed" and "opened" angles, for the door. <S> However, the "opened" angle should not be much higher than 90º, because otherwise the thread will not pull correctly. <A> I'd suggest a much simpler solution: buy a hobby servo, attach a long-ish horn to it, and connect a rod from the end of the horn to the door. <S> Servos have built in position feedback, so you can control one with a microprocessor and instruct it to move to 'open' and 'close' positions as desired.
By adjusting the position of the rod on the horn and the door, you can ensure that at full extension, the servo opens the door completely. You need two more things, apart from your motor and Arduino. Probably the Dual TB6612FNG on a breakout board is the simplest solution for you. So, close until you detect overcurrent, and open during a fixed time.
Solar Panel as power supply for multiple borehole pumps I want to use solar panels to power my existing borehole pumps (5 of them). Someone says I'll have to power each pump separately with several solar panels. I am however thinking; I could build a small solar farm and connect the pumps in parallel on the grid i would have created, what do you think. The pumps range from 1.5hp to 3 hp and i am considering a 100W or 200W panel. My other consideration is replacing all the ac pumps with dc pumps. <Q> That's not a single 200 W panel, I hope. <S> 1 <S> hp = <S> 746 W, so 5 \$\times\$ <S> 3 hp is good for 11.2 kW, if that 3 hp is the consumed electric power (most likely). <S> If it's delivered mechanical power you'll have to divide by the pump's efficiency, in practice that could be doubling. <S> If your solar farm can supply the power there's no reason why the pumps should not be connected together. <A> 1 <S> hp = 0.735 kW = <S> 735 W <S> so <S> 1.5 hp = <S> 1.1 kW is the minimum power that you need from the panel to run one pump. <S> It's already quite a number, and you need to drive 5 pumps, for a total of 5.5 to 11 kW. <S> It's a very big solar system, with an estimated cost of about (rounded to the bottom) <S> 100k$. Replacing the pumps won't help you that much in this sense. <A> Use pump load = 10 kW to make easy sums easier. <S> 200 W panel storing energy at 100% efficiency and running pump at 100% efficiency will run pumps for Power_Panel/Power_pump = <S> 200/10,000 <S> = 0.02 hours per hour of full sun. <S> ie a single panel will give a minute of operation per hour of full sun. <S> Available average sunlight can be found from the marvellous www.gaisma.com site. <S> If you are lucky enough <S> (sun wise) to be near Phoenix in Arizone then <S> The Gaisma Phoenix page shows that sunshine-hours per day are: Insolation, kWh/m²/day <S> Jan Feb Mar ... <S> Dec: 2.98 <S> Jan <S> 3.78 <S> Feb <S> 5.06 <S> 6.53 <S> 7.37 <S> 7.54 <S> 6.99 <S> Jul <S> 6.21 <S> 5.46 <S> 4.30 <S> 3.30 <S> 2.74 Dec. <S> ie from about 2.75 hours in December up to about 7 hours average daily in June. <S> 7 hours is exceptionally high. <S> Close to the the best on earth (but, then uyou'd have to live there.) <S> So in December a 200W panel will run you pumps for about 3 minutes per day AT 100% efficiency for battery output and motors . <S> And about 20 minutes/day in July. <S> If you want to run 8 hours/day in July you'll need 7 hrs/20 mins = 20+ 200W panels at 100% efficiency or 30+ in practice. <S> And about 200+ panels in mid winter ! <S> Running less than 8 hours/day (eg water trough filling as opposed to eg irrigation will take proportionately less.
Consider that if you have such a big system you will want to use the power as efficiently as possible, so it'll be better to drive the pumps independently, even if using only one solar farm.
How do I pick a part that goes into a breadboard when I order it? I have just bought some 555 timers and they are timers for microelectronic circuits...could anyone tell me what I need to search for in order to get larger ones which will fit a breadboard? Thanks <Q> You want to look for a part in a "DIP" package. <A> OK, you know the answer from The Photon . <S> "DIP" package (a pleonasm) stands for "Dual In-line Package", also abbreviated to "DIL", for "Dual In Line". <S> They have been used for 50 years, but they're used less now than 20 years ago. <S> Almost all DIPs have a 0.1", or 100 mils, pitch, the distance between the pins. <S> Small DIPs are 300 mils wide, larger ones often 600 mils. <S> In both directions that will fit in a breadboard, either a solderless or Veroboard style. <S> You will have to press both rows together a bit. <S> Hobbyists often use DIP sockets when soldering. <S> They allow you to replace the IC without having to desolder it. <S> There are also ZIF sockets (Zero Insertion Force), which are(were) for instance used in programmers where you have to insert and extract ICs all the time. <S> In recent years DIP has been replaced by SMDs (Surface Mounted Devices). <S> They allow more compact products, are cheaper and offer technical advantages, like less inductance. <S> You probably bought the SOIC (Small Outline IC) version of the LM555: <S> Other often used SMT (Surface Mount Technology) packages include the QFP (Quad Flat Package): Many components are no longer manufactured in DIL packages, so you better get used to SMDs, both for ICs and discrete components: <A> For some SMD parts you can find so called "breakout boards", which allow you to attach wires (or even DIP-like pins) to them to use on a breadboard.
DIP or any Through-hole technology part.
Atmel chip come with bootloader? I would like to know if Atmel microcontrollers come with a bootloader. For example I asked a question earlier where other users were saying that a microcontroller could be used instead of a 555 timer which is old. I realise you can create a delay by programming the chip using AVRstudio? Basically do they have a bootloader or libraries installed that run this code or do you need to install it yourself? <Q> Some do. <S> From personal experience, I can tell you the ATMEGA32U4 has a USB Bootloader from the factory. <S> Personal experience aside, this list from ATMEL is more complete. <S> You can use whatever you want to actually compile the code into a hex file. <S> (ie AVR Studio). <S> You will then need to use ATMEL's FLIP uploader to program your chip. <S> Fresh from the factory, the chip will be in "programming mode", ready to accept your file. <S> If you want to change the program after initial programming, you can put the chip back into "programming mode" by grounding the HWB pin and toggling the RESET pin. <S> In your circuit, the HWB should be "pulled up" via a resistor to VCC. <S> That way, the pin is not left floating and you will not put the chip into programming mode accidentally. <A> Usually the microcontroller doesn't come with a bootloader. <S> You have to use a programmer (e.g. AVRISP mkII ) to program the device. <S> Microchip (manufacturer of the PIC micros) can deliver the microcontroller preprogrammed. <S> Dont know whether Atmel offers such a service, too. <S> Some suppliers offer theses, so you dont need a programmer anymore. <A> In general, they don't. <S> If you want to buy very large amounts of chips, you could have them preprogrammed by the manufacturer, but that's expensive, as far as I know. <S> The other options would be to find someone who will sell you chips with bootloader installed. <S> With the popularity of Arduino platform, it's common to find AVR chips with Arduino bootloader installed. <S> Some can for example be obtained from Sparkfun . <S> Some companies also sell AVR chips with their own bootloaders. <S> If you can't obtain such a chip, the other option is to obtain a programmer. <S> You could buy the official programmer which is AVRISP mkII or make one yourself. <S> There are numerous guides on the Internet on how to make such a programmer and many of them are very simple and work with PC serial ports. <S> This one worked nice for me, but if used with an USB to serial cable, it can be very slow. <S> Arduino can be used to program AVR chips, so a cheap option could be to obtain one of the microcontrollers with Arduino firmware and then use it as a programmer. <S> There's a guide on how to do that here . <S> Another option for AVR development that seems popular is the AVR Dragon development board. <S> It is worth noting that in general AVR programmers can't do debugging, that the debuggers are either old (and don't work with new chips) or expensive. <S> The Dragon can be used to debug newer AVR chips too <S> so that makes it an interesting product.
Another option is to use Atmel Atmegas microcontroller with a Arduino bootloader pregrogrammed.
Can a device be damaged by water even if there is no power supplied? For example, say I submerged a computer mouse entirely. Assuming that I ensured that all traces of the water were gone, would the device suffer any issues? It is my understanding currently that provided that there is no power being supplied to a device, and assuming that non-electronic damage like rust etc. hasn't taken place, then once the device is completely dry, it can be used without issue. Is this correct? <Q> If power is on when submersion occurs almost instantaneous damage can occur. <S> If no power is on and there are no batteries at any stage then CLEAN PURE water will often do no damage. <S> A common major mistake is putting power on too soon. <S> Days or a week of gentle drying at somewhat elevated temperature is a good idea if the equipment is valuable. <S> I have dropped a pager in seawater, removed battery, washed in a "clean" stream, washed more on getting home, dried slowly and had it work OK. <S> I dropped a portable phone in a bucket of concentrated pool chlorine, battery out, washed well, dried well, worked OK. <S> A friend had a small video camera with SD memory card that was in a container in the bottom of a dinghy - the allegedly waterproof container took in modest amounts of seawater while being rowed out to a yacht. <S> It died beyond recovery in minutes. <A> It the water is reasonably clean, that's true. <S> I've seen a company that specialized in cleaning up after fire damage. <S> They cleaned CRT TVs outside and inside with a hose. <S> Then left the TV for a number of days in a heated space (50°C IIRC) to dry. <S> They claim they have very few cases where an electronic product doesn't work afterwards. <S> Especially seawater should be rinsed away thoroughly. <S> The salt it leaves behind is corrosive. <A> The only five instances I see electronic equipment never work again are: <S> The water isn't clean - one of the ones that makes a big difference, with phones, is urine. <S> Even the diluted urine in a toilet bowl will cause problems much more quickly than fresh water. <S> Seawater is another <S> You say "assuming that I ensured that all traces of the water were gone", which is a big assumption! <S> Often there are parts of a device that are very, very difficult to remove water from. <S> Good examples are the optical assemblies in cameras and mice, LCD touchscreen laminate assemblies, and inductors and transformers. <S> Sometimes it is impossible to remove water even with prolonged dry heat and moving air. <S> The water isn't removed quickly enough and causes corrosion or other damage. <S> A good example of this is relays - the casing often easily allows water in, but it is very difficult to get out. <S> Eventually they will dry themselves, but it's hard to get it done quickly enough. <S> There are components that can be outright damaged by the application of water. <S> Paper component wrapping, some PCB laminates, water soluble coatings (such as colour light filters sometimes, or anti-reflection coatings on lenses), strings (such as on tuning mechanism on older radios - when these dry out they become brittle and too tight), anything lubricated (potentiometers, motors). <S> Power was applied at the time of it being covered in water. <S> Older equipment tended to be more sensitive to outright application of water - more components were damaged by water quickly, PCBs tended to delaminate more easily, more mechanical components. <S> On the upside, most equipment was either mains (so turned off) or had proper on-off switches, limiting damage. <S> Newer equipment has the downside that a lot of things are battery powered or have soft on-off switches. <S> Being powered up is a big issue.
Some components or non electronic parts MAY be damaged by clean water, but often a device will survive. They also often contain steel, which will corrode and cause issues.
Software alert when doorbell rings. Doable? I am looking for a way to send alerts to my Linux laptop each time the doorbell rings to avoid those unpleasant times when a visitor ends up waiting minutes outside my door when I am alone and have headphones blasting full volume, rendering my doorbell-hearing powers useless :x. Now, I am relative noob to all things electrical, which this project will most definitely involves. My brief search on Google indicated something called Arduino holds the key for me. So, would love some pointers as to whether such a thing is doable, and if yes, how should I proceed? <Q> Take a 110/220 Vac small table lamp, or one of those with clips, that allow you to attach it to thin surfaces. <S> Put it behind, or next to your laptop screen, so that you unavoidably see its light, when turned on. <S> Take a pair of long wires, and connect the lamp in parallel with your doorbell (assuming it is mains powered). <S> That should be the easiest :-) <S> Even if the actual solenoid is fed with a lower voltage, in many cases (in Spain, all the ones I know are like this) <S> the pushbutton still switches on/off the mains voltage. <S> So, take the voltage from the doorbell box, but from the primary winding of the transformer. <S> And, if the pushbutton switches a lower voltage, use a lower voltage lamp. <S> The idea is the same. <A> This is doable, but depending on a couple of things it can get complicated. <S> First you need to figure out how to intercept the doorbell button press: <S> Is the doorbell wired? <S> If so what voltage is the button signal wire carrying? <S> You need to get a multimeter to find this out. <S> Can you mount your sensing circuit (probably an Arduino) in the immediate vicinity with power? <S> Once you figure that out, sensing if the doorbell button is pressed is pretty simple. <S> Just take a look through this arduino user help thread. <S> Now you need to get the signal from the remote arduino to your laptop, I suggest using Xbee radios . <S> They are very cheap, simple to interface with, and spark fun carries a usb dongle that you can plug into your computer to talk to. <S> Basically your sensing arduino circuit will see the button press and then send a notification byte through its serial port which is connected to the XBee radio which will relay it to the radio plugged into your computer. <S> Now for the really easy part; since you are running linux it is really trivial to write a simple python script that will read from the usb port your radio is connected on: import serial, osimport sys// <S> setup the serail port <S> (the xbee dongle will device name// will be something like /dev/tty.usb-A0...234) and <S> make// sure you are using the same serial baud on all componentsser = serial. <S> Serial ('/dev/tty.usb-DEVICE', <S> 9600)// an arbitrary byte value that you send from the doorbell sensing unitdoorbellSignal = ' <S> A'while <S> True: <S> data = <S> ser.read <S> () if data == <S> doorbellSignal: <S> // <S> now do something, like post a message to growl <A> There are softwares that pick up the sounds from your microphone and put them in the headphones, so you can be aware of what surrounds you. <S> So that's may be an easy way to address this problem. <S> Another way is to "intercept" your doorbell signal and trigger a simple transmission over WiFi <S> (so you can forward it through the router) and then use some notification software on your laptop. <S> Or sit with your laptop close to the door :) <A> Doorbells usually run on 12 V AC isolated by a transformer. <S> The doorbell button is a simple switch that turns on a solenoid or bell by applying the 12 VAC to it. <S> You could have it also turn on a 12 V light bulb in addition. <S> Run wires from your doorbell to pick off the switched power to the room where you are hiding out with the headphones on. <S> No computers need to be abused. <S> Instead of a ordinary LEB (light emitting bulb), it could be two parallel LEDs with opposite polarity and a suitable current limiting resistor. <S> Each lights on opposite halves of the AC waveform, and guarantees the reverse voltage seen by the other is not excessive. <A> A more exotic solution: powerline transmission. <S> While it may be difficult to build your own, you can find some drivers that you can use to send a very simple message and catch it from your room.
Another alternative is to use another transmission protocol, like ZigBee, to turn on a blinky near your laptop: the advantages are that you don't need to mess with WiFi protocol (it's not that simple) and you may like to have an external alert so your monitor is not disturbed. It's definitely doable, but it just depends on how much effort you are willing to put forth.
Why do we call it a "board spin"? Possible Duplicate: Interesting/Unusual/Old Electronics nomenclature I've been getting into some minor board design work lately, and got confused a few times, because some of my colleagues were talking about "spinning" boards or getting things right on the first "spin" of a board. Where did the term "spin" come from for fabricating / printing a circuit board? <Q> The term is in common use. <S> Boards used to be spin-coated with liquid resist. <S> Perhaps that is where it came from. <A> It is a common term which refers to the process of laying out, routing, fabricating, populating, and testing a PC board. <S> I don't know where the term came from, but I'm guessing it refers to re-doing part of the engineering cycle. <S> To "re-spin" something isn't limited to circuit boards or electronics. <S> It basically means to re-do, retry, make another revision, "back to the drawing board" (partially), <S> etc. <S> Eventually the term "spin" came to be used sortof as slang in the industry for this particular set of tasks. <S> Now it's to the point where you can talk about the "first spin", even though nothing is re-done. <A> As others have pointed out, the term is not limited to electronics. <S> Spin literally means to "turn around" rapidly. <S> http://www.etymonline.com/index.php?term=spin <S> Sense of "to cause to turn rapidly" is from 1610s; meaning "revolve, turn around rapidly" first recorded 1660s <S> In PCB terms, the turnaround time is how long it takes to make a design change and get boards made. <A> Spinning makes me think of the textile industry. <S> My best guess is that the term spinning worked its way into electronics production terminology somehow, as they are both industrial type processes. <S> Also, the fact that PCBs are "fabricated" lends some small amount of credence to my spinning theory, as spinning is one of the processes that leads to the creation of fabrics.
So, a spin is a design change and manufacturing turnaround.
MOSFET topology to switch between voltage and ground? What topology am I seeking to switch a load between an arbitrary, positive voltage and ground? I am trying to operate the rungs of an R2R ladder so pull-ups and pull-downs are inappropriate. The circuit is low power (<100 mA), low voltage (<20V) and low speed (<1 Hz). <Q> Most people drive the rungs of an R2R ladder with standard CMOS output pins. <S> The "topology" directly connected to that output pin is generally a static CMOS inverter : <S> where 'Q', Vdd, and Vss are physical pins you have access to, and 'A' is internal node of the chip. <S> Some of them use a few CMOS output pins on a microcontroller to directly drive the R2R rungs. <S> The rest generally use a few output pins on a microcontroller to send data to some sort of latch chip or buffer chip, and then the CMOS output pins of that chip drive the R2R rungs. <S> Often the latch chip is the 74HC595 (if their "arbitrary positive voltage" is in the range of 2.0 V to 6.0 V) or the HEF4069 / CD4069 or the HEF4094 <S> / CD4094 (which can handle "arbitrary positive voltage" in the range of 3.0 V to 15 V). <A> In my other answer I focused on the high voltage, which is a problem for many components (and which David doesn't cover in his answer). <S> You may also do most of it at lower, logic levels, and only go to 20V at the end. <S> The HCMOS outputs of your microcontroller, or external logic IC, have a complementary MOSFET output, capable of both sourcing and sinking current. <S> If you don't have enough I/ <S> O on your microcontroller a shift register like the 74HC595 <S> David also mentioned, may offer a solution. <S> It gives you 8 output bits, you can cascade two devices if you need more. <S> This way you'll get an analog voltage between 0V and 3.3V or 5V, whichever your logic runs on. <S> You only have to amplify that by \$\times\$ 6/ \$\times\$ 4 to get a 0 to 20V output. <S> Use a Rail-To-Rail opamp which takes a 20V supply, like the CA3420 as a non-inverting amplifier: <S> This is a really low-power solution. <S> You have to use 0.1% resistors for the R-2R network if you want an 8-bit resolution. <A> You need a push-pull stage like David says. <S> Unlike TTL, (H)CMOS outputs are symmetrical and will source or sink the same current. <S> HCMOS is 5V typical, 6V maximum, and there are variants which only operate up to 3.6V. <S> Even the old CD4000 series is limited to 15V. <S> You'll have to make a driver yourself. <S> Place a P-MOSFET and an N-MOSFET in series and drive them from an open-drain/open-collector output. <S> Normally you would need low-value pull-up resistor to +20V, so that the N-MOSFET can be switched on fast enough, but at 1Hz that's not really an issue. <S> For the MOSFETs almost any low-power type will do: you don't need much current, nor high speed, and you have plenty voltage to drive them. <S> The BSS8402DW or the Si1029X , a.o., combine a complementary pair in one package. <S> Pay attention to the open-drain/open-collector driver. <S> HCMOS devices, like the 74HC07, have clamping diodes, limiting the output to \$V_{DD}\$. <S> Others have a limited output voltage of 15V. <S> The 74LS07 is specified up to 30V. <S> Alternatively , just the pull-up may be an option. <S> It depends on the DAC's resolution, and what you'll drive with it. <S> If the resolution is limited to, say, 8-bit, and you'll drive a high-impedance input with it, you can use high resistance value for the R-2R network, and a low value pull-up resistor may not cause a too big error. <S> If your R-2R uses 1M\$\Omega\$/2M\$\Omega\$ resistors, a 4.7k\$\Omega\$ pullup will only cause a 0.2% error, that's less than 1 LSB in an 8-bit DAC. <S> This may not fit the low-power you specified; each bit will draw 4mA from 20V, worst case (all zeros) <S> that's 32mA for an 8-bit DAC.
HCMOS and its many variants aren't suitable for your high voltage, though.
Using a 12V lighted toggle switch with an Arduino I would like to connect a 12V lighted toggle switch to an Arduino and be able to read its state (replacing the momentary button in this tutorial with this switch ). But the Arduino has only 5V power supply. Can I connect the 12V switch to the 5V power supply? Update: There are just three contacts on this particular switch. The contacts are labeled source, ACC (presumably accessory) and ground. When you close the switch, it connects source to ACC and also connects source through the lamp to ground. There is just a single power source in the circuit. <Q> I can't see anything about the lighting on the link you gave. <S> The lighting is normally separately controlled. <S> You have 3 contacts for the switch (that's usually a change-over switch, though the description says SPST), and a couple of pins where you connect the lamp. <S> Use a transistor to drive the lamp from your Arduino, then the Arduino's output pin won't see the 12V, and connect the switch like in the tutorial. <S> If the switch should happen to be connected directly to the lamp, so that it also switches 12V (it may explain that third pin), you'll have to use a resistor divider to bring the 12V from the switch down to the 5V the Arduino's input can digest. <S> Never apply 12V directly to the input. <S> edit (after your edit) <S> If I understand correctly source and ground are your power supply. <S> ACC (whatever it may mean) is the switched V+, which is also used to power the lamp. <S> In that case you simply need a voltage divider between ACC and the Arduino input. <S> The ratio should be 2:3, for instance a 30k\$\Omega\$ between ACC and the Arduino input, and a 20k\$\Omega\$ between the input and ground. <S> That will divide the 12V from the switch by 20k\$\Omega\$/(20k\$\Omega\$+30k\$\Omega\$), so you get 4.8V out. <A> I would draw a diagram for you, but I'm currently on a mobile device. <S> Connect the Arduino Digital pin to it and connect a 12V source upto the other part of the relay with the light attached. <S> That way, when you send the Arduino high, the relay switches on and allows the 12V to flow through to the light. <S> You also wanted to read the output state on the light. <S> You could always add a variable in so that whenever the relay pin changes from high/low, the variable can change from 1/0. <S> If you want to physically read the state, you could hook back the 5V from the relay pin to one of the input pins, but to me, this seems unnecessary. <S> Hope <S> this is helpful. <S> I'll post a diagram ASAP. <A> I'm also interested in this solution too, but my assumption is 12V lighted toggle switch does not connect to 12v power supply. <S> I use it with the Arduino UnoJoy flight simulator panel. <S> A 12v lighted toggle switch has 3 terminals/contacts (12v, GND, ACC) <S> An Arduino UNO use one digital pin, GND <S> According to my experiment , there have <S> if 12v connect to a digital pin, Acc of switch connect to GND of Arduino, you can off/on switch and receive a status in Arduino off/on (no LED light) <S> if 12v connect to a digital pin, GND of switch connect to GND of Arduino, you can off/on a switch and LED <S> will off/on (no digital status) <S> if 12v connect to GND of Arduino, Acc of switch connect to a digital pin and GND of switch connect to GND of Arduino, <S> 4.1 Switch off stage will get LED on, digital pin off <S> 4.2 Switch on stage will get LED off, digital pin on <S> From above result of item 4, together with minor edit a sketch , using digitalRead(pin-no) instead of ! <S> digitalRead(pin-no) <S> 5.1 Switch off stage will get LED on, digital pin on <S> 5.2 Switch on stage will get LED off, digital pin off <S> Now I will have a 12V lighted toggle switch work with Arduino UnoJoy for a flight simulator panel , just physically reverse a label plate off/on to on/off.
if 12v connect to a digital pin, Acc of switch connect to GND of Arduino and GND of switch connect to GND of Arduino, you can off/on a switch and receive a status in Arduino without LED light. My suggestion would be to use a 5V relay.
Which one is better to say? Volt or Volts? This question might be quite premitive, But I really want to know what is the standard way of saying for example: 2 Volts or 2 Volt1 Volts or 1 Volt (the Volt seems to be a better choice!)0.5 Volts or 0.5 Volt? <Q> (When I gave this answer, I had in mind that, with your "Which is better to say? <S> " you were meaning when writing . <S> Now I see in your comment to Tony that you indeed mean when talking. <S> When talking, W5VO's answer, in my opinion, is correct. <S> My answer is still useful if someone is interested to know how to write them.) <S> Regarding case, unless that word starts a sentence (which is not the usual case), it should be written in lowercase. <S> See Tables 1 and 3 in this page from the National Institute of Standards and Technology (NIST) . <S> So, when referring to the units themselves (without any quantity implied), you should write "volt", "volts", "joule", "joules", "watt", "watts", "ohm", "ohms", etc. <S> All in lowercase. <S> Regarding <S> singular/plural, see point #5 in this other page (also from NIST) to see an example ("The speed of sound is about 344 m·s-1 <S> (meters per second)") that shows that plurals should be used for unit names, when needed. <S> Regarding how to express values of quantities, point #14 says that you should always use Arabic numbers and unit symbols (not unit names!). <S> #14 : Numerals & unit symbols Values of quantities are expressed in acceptable units using Arabic numerals and symbols for units. <S> proper : m = 5 kg <S> the current was 15 <S> A improper : <S> m = five kilograms m = five kg <S> the current was 15 amperes (incorrect!!!) <S> So, to answer your question, you should write "2 V", "1 V" and "0.5 V". <S> "2 volts" / "2 volt" / "2 Volts" / "2 Volt" would be incorrect. <A> This is a twenty Volt power supply. <S> When giving a measurement or a measurable number, the plural form "Volts" sounds correct. <S> Increase the power supply output by 13 Volts <S> I measured the battery <S> and it was at 1.5 Volts <S> The capacitor is 1.0 Volts away from being fully charged. <S> (read as "one point zero", not "one") <S> When following "one" or "a", singular "Volt" seems appropriate. <S> I need one Volt of signal to reach full scale. <S> The supply is outputting seven tenths of a Volt. <A> "The American National Institute of Standards and Technology has defined guidelines for using the SI units in its own publications and for other users of the SI. <S> These guidelines give guidance on pluralizing unit names: the plural is formed by using normal English grammar rules , for example, "henries" is the plural of "henry". <S> The units lux, hertz, and siemens are exceptions from this rule: they remain the same in singular and plural. <S> Note that this rule only applies to the full names of units, not to their symbols ." <S> from here , highlighting by me. <A> I think the abbreviation avoids the issue. <S> [V] ( ha ) The SI unit of measure is [volt] but when used in specifications, units of measure show respect by using Capital letters when named after a person and in singular mode. <S> But in sentence form plural is used <S> so we say a 10 Volt rating for a 100 Farad capacitor on 1000 Henry inductor coming from 7 Tesla generator. <S> BTW non-personal names like "radians" would be lower case. <S> Latin powers of ten are often done either way. <S> Not sure which is technically correct. <S> So we see MHz for mega and mHz for milli Hertz and kV for kiloVolts an KHz for KillaHurtz... <S> ha ha. <S> I beleive <S> one may use lower case if there is no ambiguity like km. <S> I tend to <S> say Hertz and Volts , because it sounds better, but in specs I use [Hz] and [V] . <S> So in casual use, it does not matter as long as you are consistent. <S> But I am sure there is a military spec someone could find or from the SI standard.
What sounds right to me is the following: When describing a property of a device (not a measurement), the singular "Volt" sounds proper.
What are some methods to achieve constant LED brightness over large temperature ranges? I would like to regulate the light flux output of an LED or laser diode over its entire operating temperature range by varying the current. What are some different methods to achieve this? Edit: This is for a sensor application. I'm attempting to measure position by blocking the light over a photodiode. If the LED flux changes however, it will seem like position is changing, when in fact it is not. <Q> Your original question mentioned a sensor, which now seems to be gone. <S> How precise do you want to keep that luminosity constant? <S> If it's for visual <S> it's pointless: your eye's sensitivity follows a logarithmic curve, so that it can cope with both 1 lux moonlight and 100 000 lux sunlight. <S> Therefore it is not very sensitive to small changes in luminosity. <S> Most LED manufacturers will give a linear relationship between current and luminosity, so to get the latter constant you only have to keep current constant. <S> Note however that you have to derate current at higher temperatures: <S> So for this particular LED you can't go higher than 5mA if you want the same luminosity for 25°C and 85°C. <S> This has a 0.01%/°C typical temperature coefficient. <S> It is 25mA however, so you'll have to use a LED which doesn't need to be derated below that. <S> Rocketmagnet makes an important remark: <S> "It may be the phototransistor which is sensitive to temperature." <S> (RM, I hope you don't mind that I copy it here.) <S> Indeed, it's no use to have a temperature controlled LED driver if the sensor's reading varies highly with temperature. <S> You'll have to look into that too. <A> Sense the unblocked LED with a stable sensor and adjust it to maintain constant output and then use that light to drive the sensor proper. <S> ie <S> The LED is feedback stabilised. <S> Provide TWO sensors that at are accurate enough and stable enough for your needs. <S> One sensor views the LED via the blocking mechanism. <S> The other sensor veiws the LED directly. <S> Maintain illumination of unblocked sensor constant by adjusting the LED current. <S> Blockable sensor is now driven by a light output regulated LED. <A> I have come across the same problem as you in the past. <S> Analog photo sensors can make excellently sensitive position sensors, but suffer from temperature, as you mentioned. <S> The way I have solved it in the past was to use three IR transceivers: <S> Transceiver 1 was set up as the sensor. <S> Transceiver 2 was set up to always have maximum reflection. <S> Transceiver 3 was set up to always have zero reflection. <S> I used an ADC which had both positive and negative reference voltage inputs. <S> I connected Transceiver 2 to the positive reference input, and Transceiver 3 to the negative reference input. <S> Transceiver 1 was connected to the ADC input. <S> Now this gives you perfect automatic temperature compensation across the whole sensor range, and across the whole temperature range too. <S> However, the transceivers must all be placed close enough together to be at the same temperature. <S> You might be using separate LEDs and phototransistors, in which case, all three LEDs should be at the same temperature, and all three phototransistors should be at the same temperature. <S> But the LEDs needn't be at the same temperature as the phototransistors. <A> Sadly I think the view that constant current will assure constant light output is probably flawed: I'm presently trying to do precisely what's asked here, but using a temperature-compensation on a photodiode for feedback to the constant current source and am still struggling to keep reliably within +/- <S> 1% over the range 30C to 60C. <S> The following is the arrangement I'm using with compensated photodiode feedback. <S> Don't trust the values, they're from before I needed the compensation. <S> If you can get the curve suitable, this circuit without the photo-feedback may well be good enough and is simpler (mechanically and adjustably, at least). <S> Again find your own values and OpAmp ... <S> these were just a hack.
The Supertex CL25 is a temperature compensated constant current source for LEDs.
Why do 7 segment LED displays break apart when I brush my teeth? This question might sound silly, but it is very serious (although geeky, I must admit).When I use my electric toothbrush in front of my alarm clock (one of those with a big red LED display), the numbers seem to break apart. Why? With my current alarm clock the first 3 segments (a,b,c) make one group and the other 4 make another one. The striking thing is that both groups seem to slowly oscillate, in anti-phase. I cannot affirm that the grouping is the same for every display of the kind -- and I cannot check now because I only have this one LED display at home -- but I've seen this illusion on many different displays in the past. I think this illusion is fascinating (told you I'm a geek) and I would like to understand why it is... I believe that it has something to do with 1) the vibrations of the toothbrush making my eyes oscillate in their orbits so the image seems to move (a bit like when you touch your eye on the side with your finger and the whole image seems to move), 2) with the periodic refresh of the segments. I suspect that the two groups I'm seeing actually correspond to two groups of bars blinking in sync, so there really are two groups, (but why do they dislocate like that?) 3) with our periodic perceptual "refresh rate". Something similar to what makes us see car wheels as stationary when they rotate at a certain speed. I must say my competence in electronics is close to zero, so my questions might be trivial to you guys. How does the refresh of the line segments in a 7 segments display happen? Is it cycling (a,b,c,d,e,f,g,a,b,c...)? How come I see two groups, then? At what frequency are the LEDs blinking? I understand some of these questions depend on the specifications of my alarm clock, but since I've seen this illusion on basically every type of LED display I passed by with my toothbrush (microwave, VHS video recorder (yes the story started long ago. I bought the toothbrush I'm now using just for understanding this silly illusion, but it was actually as a teenager that I noticed it)...), I guess there is something constant there... <Q> Yes, it sounds like you are seeing artifacts of toothbrush frequency vibrating your head and therefore your eyes, and <S> that beating against the LED refresh frequency. <S> This is a similar effect to eating potato chips (actually anything crunchy) while watching the LED display. <S> In that case the head vibrations are more random, so parts of the LED display will appear to jump around randomly. <S> Some segments will be displayed during a head-high part of a vibration, and others during head-low. <S> These will appear in different locations. <S> LEDs are refreshed all kinds of ways. <S> A lot has to do with how clever or competent the engineer was that wrote the firmware. <S> I've seen naive refresh algorithms that simply do each digit in order. <S> Those have the most apparent flicker for any one refresh rate. <S> Better means interleave digits, sortof like interlacing of old TV scans lines. <S> The whole display is still refreshed at the same rate, but the apparent flicker is at least in part related to the interlace rate. <S> There are fancy schemes which interleave both digits and segments, but these are often not possible with common displays where whole digits are already partially wired together. <A> This can be experienced with any vibration of the head in front of certain LCD displays - usually microwave ovens for some reason - most amusingly by vibrating your lips the way you would as a kid when imitating a car or motorbike sound - no oral hygiene technology necessary. <S> If you purse your lips and modulate your trumpeting frequency from high through low, you can see different effects at various frequencies - at higher frequencies the letters merely vibrate in a boring green manner, but at lower frequencies they seem to oscillate like a loch-ness beastie swimming across your display - which has been known to reduce a roomful of trumpeting students to hysterics, as if the Great and Holy Defy they had gathered to worship with all manner of purséd lip, had just told them a very dirty joke. <S> Because the digital oven display right next to my microwave shows no effect whatsoever (either a much higher frequency or simply a DC on off arrangement . <S> . ? <S> I'm afraid my knowledge of electronic displays is sorely lacking). <S> So if at first you experience nothing, do not be disheartened - simply move onto the next household appliance (pausing briefly to give the victimised appliance a quick wipe-down). <S> However, if you try this at home, might I recommend starting out alone. <S> Your kids will love it, but it might be just the excuse your spouse has been waiting for to invite those nice men in white jackets to afternoon tea. <A> As other answers have stated, because the LEDs are being scanned at a rate that interferes with the vibrations in your head/eyes. <S> However, you can actually measure the resonant frequency of your eyeballs by looking at a slow trace on a scope and hitting yourself on the head! <S> You will see the trace "jump" and from the calibrations get a measure of impulse response of your eyes. <S> Not sure if it works on digital scopes, but it certainly did on the old analog ones. <A> The power line noise could be beating against the LCD display refresh rate (assuming an underfiltered or undershielded power supply and a scanned matrix display output). <S> The motor in the toothbrush can create an oscillating EM field which can couple to power lines. <S> This is just like playing 2 slightly differently out-of-tune notes and hearing a "beat", except visually. <A> So this doesn't happen when the brush is merely running but not in your mouth; you have to be actually brushing your teeth? <S> If that's true, then I think you nailed it, that it's a stroboscopic effect between the brush interacting with your eyes, and the refresh rate of the clock's display. <S> I see something related when I'm driving on the highway at night and approaching a car with LED tail lights, if I sweep my eyes across the road quickly while scanning traffic. <S> Those tail lights look like a dotted red line, while the incandescent ones look like a single red streak.
So yes, it's obviously as a result of beats created between the refresh rate of the display and the frequency of your vibrating skull (and thus the eyeballs too - assuming you've been blessed with the standard human eyeball-socket configuration).
Sending and getting commands through the Internet I have a little chopper (adult toy to be exact) that can be controlled by the controller within 30 metres. What I have in my mind whether I can send commands to this toy chopper though the Internet, a website (maybe fetches the HTML or php code) or whatever--the chopper will use the Internet just like we use the Internet on our cellphones. Briefly, Instead of pushing "turn right" button on the controller, I want to send that command through the Internet so that it will have a very large range, or unlimited, to be contolled. I am an engineering student so I want to build something touchable right now:) The problem is that I dont know where to start. I would google it but I don't even know keywords to search for. So even little push would be great. Which devices should I use, which language should I know, exactly, what is next I should do now? I hope I am not asking this question in wrong place. <Q> Think about what you want to build. <S> Are you firing commands into the blue (from the website) or do you use a camera for feedback? <S> If you use a camera (or even GPS), think about the delays involved. <S> A too large delay will render the remote control unusable. <S> All in all it sounds quite complicated for a beginner project in electronics. <S> Maybe you check out the Arduino ... <S> it will make build something "touchable" (as you stated your intention) way easy. <S> The Ethernet Shield will make hooking things up to the internet a piece of cake. <A> However, integrating this with the helicopter's electronics will not be easy. <S> The helicopter contains a circuit like this: RF Receiver -> <S> IC -> MotorsGyro sensor - <S> > <S> The IC would probably be a microcontroller or ASIC which contains the control algorithms for keeping the helicopter stable. <S> You have two options to add your internet controller: <S> Find a way to inject RF commands in to the microcontroller. <S> This is probably the hardest method, as you will need to reverse-engineer the RF protocol used by the helicopter. <S> Replace the microcontroller with your own. <S> Yours would communicate with the WiFi device, and handle all of the helicopter's control algorithms. <S> Add another microcontroller which communicates with the WiFi device, and modifies the gyro signals to cause the original microcontroller to move the helicopter. <S> This will be tricky. <S> Sadly, none of these approaches are really easy. <S> As others have suggested, you might just be better off trying to boost the output of the original controller, so that it has more range. <A> Ultimately the range is determined by the uplink (or uplinks) to the heli - IR, RF, ultrasonic whistle or whatever else. <S> Are you trying to build something analogous to a cellular command system, using the highest quality link available from many ground stations, all communicating over the internet? <S> Because otherwise, the uplink and its range are unaffected by whether the control commands are inserted directly in the ground-station, as in a typical RC transmitter, or arrived from half-way 'round the planet over the internet. <S> The heli's radius of action will around the ground station will remain the same; only your (personal) range would be increased. <S> If you are going for a cellular network, you've got a very interesting, fun, and very non-trivial project ahead of you.
If you want an internet connected helicopter, you'll need something like the Microchip MRF24WB0MA RF transceiver module.
Improve RF range with a boost converter? This might be a stupid idea, but I will try anyways: I have a RF 433MHz TX module ( datasheet ) which can be supplied with 1.5V...12V. My understanding is the range increases with higher voltage as the module can draw more power. My power supply is a 5V 10W wall adapter. Suppose I cannot simply change that to a 12V adapter. If I increase the voltage from 5V to 12V using a boost converter, or a charge pump, would that have the same effect as having a 12V supply in the first place? Can the RF TX really draw more power through a boost converter? <Q> The output power will be maximum at maximum input voltage. <S> It just mentions a typical and maximum: 14dBm typical, which is 25mW, and 32mW maximum. <S> But it also says maximum supply current is 8mA. <S> At a low supply voltage like 1.5V that would mean it consumes 12mW. <S> In that case it can't possible transmit 25mW, so at lower voltages the power will be indeed limited. <A> What range are you wishing to achieve? <S> If I increase the voltage from 5V to 12V using a boost converter, or a charge pump, would that have the same effect as having a 12V supply in the first place? <S> Yes. <S> as long as the supply can provide the required current the transmitter does not "care" how the 12V is provided. <S> Can the RF TX really draw more power through a boost converter? <S> It can really draw more power with more supply voltage - whether from a boost converter or otherwise. <S> RF can have more output voltage than supply voltage due to resonance but an order of magnitude check of result is often useful. <S> A 12V rail to rail signal = <S> +/- <S> 6V. RmS value is 0.7071 of that or about 4.2V. Say 4V. Power = <S> V^2/R and R = <S> V^2 / Power <S> To get 32 mW at 4V <S> then Rload = <S> V^2/Power <S> = 16/.032 = <S> ~~ 500 ohms. <S> As typical antennae used with such devices are liable to present impedances of 50 ohm or 75 ohm for whips or dipole or 300 ohm for a folder dipole. <S> Either way, there is enough supply voltage at 12V to meet the 32 mw spec. <S> If you need more than what simple whips etc will easily provide you can implement multi element "beams" or cantennas with relative ease. <S> 432 MHz is a bit low for good gain cantennas but you are unlikely to need much. <S> 432 or adaptable: Loop <S> Quadri Filar and here <S> Skewplanar - from here includes dimensions for 432 MHz. <S> http://www.n2jrf.com/antennasforvhfabove.htm ) <S> Classic turnstile etc <S> Mainly 2.x GHz - things to learn: <S> Oh Yes !!! :-) <S> The photo below is from this page which is all in Arabic unless you allow translation, when it's 98% in Arabic and the gear shown is largely aimed at 2.x GHz <S> BUT <S> it's very worth looking at regardless. <S> [They seem to think they know what they are doing :-) <S> : <S> Or in Turkish - not as good. <S> 2.4 GHz Spanish 2.4 GHz excellent <S> The aerial with a rod with circles twisted in it can be adapted to 432 MHz. <S> 2.4 GH - v good <A> To answer your questions: yes, you can, in general, deliver more power to a load, if you insert a boost converter between source and load <S> and yes, in this specific case, the RF module will probably transmit with a higher RF power, if you insert such converter. <S> It is hard to tell, because the datasheet is quite poor. <S> However, both switching and (especially) charge-pump converters produce a lot of noise, at their outputs. <S> Forget about charge pumps. <S> If I used a switching converter there, I'd probably insert a low-dropout linear regulator (LDO) between the switching converter and the RF transmitter, to have a cleaner supply. <S> Also, by inserting a boost converter, you do increase the power that you can deliver to the load, but only up to the limit given by maximum power that your wall adapter may deliver (10 W in your case). <S> In this case, the maximum power that the RF module may admit at its input (which is 12 V · 8 mA = 96 mW) is well below that 10 W limit, so that number will not limit anything.
If you want substantial range you are liable to get best return for effort by implementing a formal antenna (ie not just a random untuned piece of wire of unknown characteristic), driving it well (impedance matched, low VSWR).
What's the damage incurred by the chip on this photo? The "generic error" page features this damaged chip with some kind of cavity: I guess it's some typical damage, but I have no idea of what it might be. What's the damage incurred by this chip and how is such damage typically incurred? <Q> Thermal damage. <S> Part of chip, mostly metal, overheated, melted and evaporated, after some pressure build up it exploded. <S> Cause is shorting. <S> Cause of shorting can be anything, from manufacturing defect, to ESD, extraterrestrial particle, overvoltage, mechanical stress, bad design, or even software. <S> The chip itself is not visible on picture. <S> What fell off is only the mold/casing material. <A> Other people have identified what causes this failure mode, I'm going to comment on how it likely happened. <S> The chip in the picture is a TPA3100D2 . <S> This is a high-power, Class D audio amplifier. <S> Determined using the excellent alldatasheet.com search engine. <S> See: here . <S> The explosion happened near the corner proximate to the pins 32-42. <S> Pins 32-33, 34-35, 36-37, 39-40, as well as 41-42 are strapped together, and are the power supply and output pins for one channel of the device (this also explains the "solder bridges", as @Thorn described them. <S> They are the same pin, internally). <S> Considering the amplifier datasheet specifies it's protected against short-circuit <S> , I would imagine that there are two possible things that caused this failure. <S> The power supply voltage range was exceeded or reverse biased, or the amplifier was hooked up to a highly inductive or capacitive load. <A> IC manufacturers call this sort of damage "EOS/ESD" damage - electrical overstress / electrostatic discharge. <S> The real mechanism for this sort of damage is thermal - something under the packaging got really hot really fast, expanded and blew up. <S> This can be due to many factors, but usually means that the silicon under the package suffered some damage (electrical or thermal), became a non-fusible heat source and went kapow. <S> It's very difficult to pinpoint the real cause of this sort of damage without knowing the operating conditions and time-to-failure. <S> The reasons for failures can be nearly infinite, and proper failure analysis requires getting as much information about the conditions to pare down the fault tree to a minimal number of possible causes. <S> Assuming this part is part of a qualified, released assembly: <S> If the part blew immediately on first power-on, it's likely due to an electrical fault at the IC or elsewhere in the circuit due to a manufacturing defect (missing part/solder bridge) or operator error (reverse polarity applied, etc.) <S> If the part blew in the field, it could represent a design marginality that doesn't easily manifest, or latent damage, or customer abuse, or bad yield from the IC manufacturer... <S> If this is a first-run or prototype build, not only do you have to rule out manufacturing defects but also design oversights (excessive voltage or load, insufficient cooling, etc.) <A> Problem started due to overheating. <S> Because the system was running on very low or zero sound for long time. <S> Amplifier heats due to this reason.
If the part blew after a few hours, it could be due to process-related latent damage (thermal shock due to reflow, ESD during handling, mechanical damage from pick-and-place, board flex, etc.)
How to start embedded Programming? Possible Duplicate: How to become an embedded software developer? I am really a new bie and have some idea about embedded C. I want to program embedded devices using my computer and even want to program some of the computer peripheral. I have got some basics of embedded systems but dont know where to start from? Which platform to use? How to understand the mechanism? Do i need to know all about electronics before putting my hand into embedded world. Please help I have too many questions and need a way. Links to relevant articles are appreciated. <Q> I still think programming on "bare metal" is the best way to get involved in the embedded world. <S> IMHO, running on top of a platform like Android doesn't give you a real taste of embedded programming. <S> Although there are a lot of 8-bit microcontrollers out there, the future is 32-bit. <S> I happen to like the PIC32 series from Microchip. <S> You can get a complete development board from SparkFun for $40. <S> You don't need to buy anything else to start with, since there is a bootloader built-in. <S> You can also use one of Microchip's programmers like the PICKit 3. <S> This board uses the popular PIC32MX795, which has 512K flash and 128K of RAM, so you won't be outgrowing it any time soon. <S> There are tons of free libraries to make programming the peripherals easier. <S> Microchip has a free IDE and compiler that runs on Windows, Linux, and Macs. <S> (They also have a paid version, but all that gives you is optimzations to produce smaller code. <S> You don't need that for hobbyist use.) <A> The word embedded means different things to different people. <S> Basically it means any computer sitting inside a device, running one specific application. <S> But as always, the boundaries are blurred, and I'm sure people will disagree with my description. <S> An embedded MCU or CPU can range in performance from a tiny 8-bit chip with 6 pins, up to very high performance 64-bit CPUs running at very high speeds with external RAM, internet connectivity and colour touch screens. <S> Getting started Fortunately, if you want to get started in embedded programming on an 8-bit MCU, you really need to know almost nothing about electronics. <S> If you can wire up LEDs, then you can wire up a microcontroller. <S> The real difficulty is choosing a microcontroller to start with. <S> There are probably hundreds of families of devices, made by tens of companies. <S> Arduino is a popular open-source single-board microcontroller designed to make the process of using electronics in multidisciplinary projects more accessible. <S> You can program them in a language very similar to C. They <S> are very easy to get into, even for non-programmers. <S> The Arduino will cover you for almost any project you want to start with. <S> Moving on <S> At some point, you'll decide that the Arduino doesn't meet your needs. <S> Perhaps it's too big, or not powerful enough. <S> Probably by that time, you'll know more about the embedded world to know what to do next, or you'll know more about what you want to learn to know what kind of question to ask. <A> This is good question. <S> It worth revisiting every few years, as the landscape changes. <S> I recently tried to learn ARM from scratch. <S> Got to the point when Microsoft Studio 11 (as you saying using my own computer) was able to produce compileable ARM asm from plain C. <S> Did not yet got to JTAG debugger. <S> The goal was to have whole toolchain completely free without using too much non-Windows or open source software. <S> The problem this years is that everything is a platform. <S> There is no easy platformless path, say when you can code in Pascal to bare metal. <S> Most of the time you target the very thick layer of existing OS. <S> Like Android or Linux. <S> If you specifically try to choose the most compact platform, say Angstrom, you will find that typical disk image is 3GB. <S> And this is size of smallest platform. <S> It is a shame. <S> Everything is a bloat. <S> Another bad news, the Microsoft Mobile platform is their largest download ever. <S> Texas Instruments has Datasheet named Software Reference Manual for one recent ARM. <S> The pdf is over 5K pages. <S> Everything worthy learning is badly oversized and becoming obsolete extremely fast. <S> My suggestion and answer. <S> If you know x86 and more or less can tolerate Windows. <S> Stay there. <S> It may become a good embedded platform. <S> Look at Windows 8 RT for Intel <S> (forget ARM). <S> That what I decided for myself at the moment.
Since you are very new to the subject, I would recommend starting with something like the Arduino .
Why does GSM cause speakers to buzz? Based on numerous internet resources, speaker wire acts like an antenna which picks up the transmitted signal of nearby cellphones and causes the speakers to buzz. But I'm not really buying that... A 3.5 mm speaker cable is designed to carry 1 V. I've seen old setups where PC speakers are powered directly from the 3.5 mm jack (and I've tested playing unamplified sound directly from a PC through the jack, although the volume in my setup was not very high at all). How can the tiny bit of EM emitted by a cellphone radio cause a speaker system, designed to operate off of a fluctuating 1 v signal, produce such a loud buzzing noise? I couldn't imagine the EM generating more than a few micro-volts in a receiving antenna. Am I wrong? Thanks. Updated - corrected voltage of line out to 1 V (see comments) Update I looked it up, and yes it seems GSM transmits at 2 W. I'd like to do a sanity check with that figure to verify some of the answers which state that the transmitted power is significant. My physics is quite rusty, but I'll try... We know that the intensity of EM radiation around a source is: $$I = \frac{P}{4\pi r^2}$$ So let's say we have a wire 2 m long and 0.2 mm wide (I hope this is a valid approximation for the wire) that is approximately 2 m away from a transmitting GSM module. Then for \$P = 2 W, I = 39 \frac{mW}{m^{2}}\$ Multiply that by the surface area of the wire (0.2 mm * 2 m) The total EM power along the wire is then 16 \$\mu W\$. Like I said I'm quite rusty, but is this not correct? Is this really significant enough to produce that sound without being amplified somehow? Perhaps the signal resonates? Or interferes directly with sound cards? <Q> The buzzing is AM detected signal. <S> The reason of audio amplifiers being hit by GSM signal is that contemporary audio semiconductor parts are actually very functional up to high GHz range. <S> For GSM-800-900MHz range any 80mm copper trace works like 1/4 wave antenna, or stripline resonator. <S> The signal is AM detected on any non-linearity (transistors or diode structures in chips) on multiple points of amplifier simultaneously, also including power regulator chips and so on. <S> It is translated into audio range as tiny but very sharp and periodic dips or pops of averaged conductivity of non-linear parts (AM detection), which are DC powered. <S> Think of low speed <S> oscilloscope trace showing straight line with beads of UHF flashes. <S> Simple sharp spikes of consumed DC current will become audible with amplifier. <A> In my work on hearing implants I found that the buzzing is caused by magnetic radiation from the battery wires in the phone which carry pulses of maybe 2A. <S> This magnetic field is relatively intense and can couple into low frequency EMI susceptible circuitry of nearby devices. <S> The noise in my case wasn't from the RF and antenna at all. <S> This is why RF shielding may not work. <A> First of all, it is the power that matters in this situation. <S> Any small speakers are going to be only a few watts, if not loss. <S> The power out from the handset in cell applications can be as large as 33dBm (or 2 Watts). <S> This is the case for both UMTS and GSM; however, for GSM there are bursts that are around 217 Hz (which is in the audible range) <S> This 2 watts of power can be very strong compared to audio signals. <S> In UMTS, the protocol changed and was specifically designed to avoid bursts that would be in the audible range. <A> How can the tiny bit of EM emitted by a cellphone radio cause a speaker system, designed to operate off of a fluctuating 1 v signal, produce such a loud buzzing noise? <S> The interference is not driving the speakers directly; it is finding its way back into the electronics, through some path where it ends up amplified. <S> Here is one way. <S> The speaker is actually connected to the output of an amplifier, which is stabilized by a global negative feedback line. <S> That negative feedback goes back to a relatively high impedance, sensitive input earlier in the amplifier. <A> The buzzing you hear is interference. <S> Put ferrit beads on your cable to get rid of it. <S> Here is how. <S> As AndrejaKo pointed out, the radiation is significant since it can peak at about 2 Watts (for headsets). <A> If your speakers buzz every few minutes when the radio is off, then it is the auto-sync to the nearest cell tower that is the cause. <S> This burst is to ensure you stay connected to the strongest tower to receive calls. <S> If the above is true, then the solution is to add a small RF cap, 100 pF ceramic may work nicely, check ESR and choose the value that gives lowest impedance at 850MHz. <S> Normally >3m distance should not be detected. <S> The protocol for offline sync uses baseband signals when AM detected by the speaker coil. <S> but offers better SNR and reliable connection. <S> ADSL has the same issue and the bandsplitter is designed to filter that out. <S> Otherwise you would hear the protocol to connect using autobaud at broadband speeds. <S> The GSM problem is not evident with online connections as the modulation avoids baseband content with continuous carrier. <S> I do not know the Q of your speaker coil, but if you can hear it in a passive mode, it works pretty well. <S> If my assumption is wrong then it may be the other sources as mentioned above. <S> As I said the TDMA is AM detected by the resonant coil and non-linear properties of the magnet at those freq. <S> Can you respond to my Q? <S> The coil length is not as important as the radius. <A> This one is really simple. <S> The RF power amplifier in the phone needs a lot of current, and needs it quickly. <S> This creates a high di/dt in the traces leading to the power amplifier. <S> The result picked up by audio cabling (through magnetic coupling) is a series of impulses at a fundamental of 2xx hz (don't have the standard on hand). <S> That signal contains a lot of power in the audio frequency ranges, which are amplified and sent out the speakers. <S> The effect of the RF components are miniscule by comparison, you will not hear them over the much louder buzzing.
Reason: The speaker coil happens to make a nice antenna and the magnetics act in a non-linear fashion with eddy currents being rectified and causes EM force on the coil to be heard.
Suggest a timer chip I need to take voltage measurements separated by long delays (couple of hours) and beep a buzzer when voltage level is met. Power consumption is important. What I want is a simple timer chip like RTC chips, but dumb, without serial interface, memory, etc. What's nice about these serial RTC chips is power consumption in nA range though. I'm aware, I could use 555, but the lowest power consumption I've found is about 500uA. Can anyone recommend a simple timer chip with low power consumption? <Q> It has a hardware RTC and consumes <S> just 830 nA in sleep mode with the RTC running. <S> It has a 10-bit, 10-channel ADC <S> so you can do your voltage measurements with it also. <S> Available in a DIP package for prototyping for $3.18, and under $2 in a SMT package in production quantities if this is for a product. <A> Yes, 555 is pretty bad. <S> Even a CMOS device like the TLC555 consumes up to 400\$\mu\$A. <S> I blame the resistor divider, the other parts can easily be made in the 1-10\$\mu\$A range. <S> If I understand your problem correctly you want to monitor a varying voltage and get a signal when it reaches a certain level, and that at low power; I presume because it has to run a long time on a battery. <S> You don't want a 555, less a microcontroller. <S> You just want a low power comparator. <S> The LPV521 is a Nanopower opamp, requiring 400nA maximum at 5V. <S> No need to switch it on and off. <S> Just apply the voltage to be monitored and the reference voltage to the inputs, and switch a MOSFET which in turn controls the buzzer. <S> Apply positive feedback for the opamp to get a hysteresis to avoid oscillating of the output when the input voltage is around the threshold. <S> The circuit should consume less than 1\$\mu\$A, so that it can run for several years on a CR2032 button cell. <S> edit Note that to achieve this extremely low power the opamp has a very low bandwidth of 6.2kHz. <S> Here you signal is DC, but in other applications it may matter. <A> I agree with what tcrosley said, except that you don't need a real time clock at all. <S> You apparently only want to measure a delay and don't need to know the date and time. <S> A real time clock will be more complicated than just a timer for this task. <S> Any of the "XLP" PICs from Microchip with a A/D can do this. <S> If you need accurate timing, then you put a 32768 Hz crystal on the timer 1 oscillator pins. <S> This is the same kind of crystal used in wrist watches, and can be driven with very little power. <S> Without doing anything special, this can wake the processor every 2 seconds, and the rest is firmware. <S> The processor will only be running a few microseconds every 2 seconds, so the average power consumption will be quite low. <S> Some of the newer PICs have very low power RC oscillators built in too. <S> That might be all you need if a few percent accuracy is good enough. <S> In either case, this should be doable for around 1 µA or less.
Not needing a real time clock also allows for a simpler microcontroller. Rather than a stand-alone timer chip, I'd suggest using an extreme low power microcontroller such as the PIC18F24J11 .
Can I supply a 12V buzzer with 18V? I'm trying to make a little buzzer for my bike to sound occasionally to warn off bears. I have a 12V buzzer from Radio Shack (Cat. No. 273-065) and was wondering if I could run it off of 18V directly (2x9V Transistor Batteries series) for 1-2 second bursts, or if I should run through a lm317 which I worry might use more energy than the protection it provides. Are piezo elements relatively rugged when used like this? Note: I can directly run the buzzer off 9V, with OK results, but I imagine 12V (or 18V) should be much louder. Thanks! <Q> Devices have voltage ratings for a reason. <S> Usually a higher voltage will damage the device. <S> Look at the datasheet and see what the real maximum operating voltage of this device is. <S> Perhaps 18 V is OK, but unless it explicitly says so for a "12 V" buzzer, you should not assume it is. <S> Keep in mind that anything rated for "12 V" operation intended for end consumers (not engineers that actually understand voltage specs) is most likely designed to work or at least not blow up with 12 V car power. <S> Even without spikes, that is actually more like 13.6 V when the engine is running, so it is quite likely this buzzer can handle 14 V. 18 <S> V is more of a stretch. <S> If this is a piezo buzzer (you didn't provide a link), the higher vibration amplitude could damage something. <S> Eventually the higher power could cause overheating and damage something that way, but that is unlikely to be a problem with infrequent bursts lasting only 2 seconds. <S> The correct answer is to get a 12 V battery. <S> Unfortunately those are not as widely available as 9 V batteries. <S> Another OK answer is to run it from a single 9 V battery. <S> Try it, it might be loud enough. <S> You can also do what Coder suggested, although it will use the batteries less efficiently. <S> Find a resistor so that you end up with <S> about 12 V accross the buzzer. <S> Put a capacitor accross the buzzer to keep the voltage roughly constant, else you will still exceed the voltage spec some of the time. <S> Another possible solution is to not worry about bears. <S> You didn't fill in much in your profile (remember, that's really a courtesy for us, it's not for you). <S> Your mug shot implies Africa, but there are no bears there. <S> Maybe you live in place where there are brown bears or polar bears, but if it's just black bears this seems paranoid. <A> You should provide a link to the product so that we can have a look at it. <S> A datasheet would be great. <S> Not that it makes much difference, when I looked at a different buzzer <S> the product summary just says 6-16V, 65mA, 3200Hz. <S> That's it. " <S> Tech specs", where you should find more information, has literally nothing, unless you find "supported languages: English" useful. <S> Don't use RadioShack as a supplier if you're serious about electronics. <S> DigiKey for instance offers very good selection tools, and has datasheets for all of its products. <S> Like Olin says specs have their reason. <S> Since it's an active buzzer it has an oscillator inside. <S> Manufacturers usually don't tell you anything about that, I've never seen a schematic of a buzzer's internals. <S> The only thing you can guess is that it will use a couple of cheap components, an oscillator for a piezo is a simple. <S> I found these schematics in a Murata catalog , where they show them as examples of externally driven circuits. <S> Doesn't mean that they did it this way, though it's possible. <S> The left circuit uses a couple of discrete transistors, and if you ignore the piezo for a moment this may well work at 18V. Small signal transistors are often rated at minimum 30V. <S> The question is: what will the piezo do at this voltage? <S> I imagine the piezoelectric ceramic mounted on the brass diaphragm may crack. <S> The right circuit uses a logic IC, probably a CD4000 series. <S> Those are often specified for up to 18V recommended operating conditions, so that may work as well, but again the piezo may be the problem. <S> Don't do it. <A> My last answer was inadequate <S> so I have decided to try again. <S> To put it simply: <S> Yes. <S> You can. <S> But it is not a good idea. <S> It is advised (to get the longest lifetime out of your buzzer) to use the recommended voltage.
It will work but having more voltage than what is recommended will decrease the life time of you buzzer, drastically. It the datasheet says up to 12V then expect problems if you don't follow that. I couldn't find the product you mention on the RS website. If the product would work at 18V and produce a louder sound, they wouldn't hide this from you, on the contrary, trust me.
Turning ON a Thyristor Well, I've recently started reading about thyristors and I have been stuck by something my instructor said about the turn-on process. During the forward-biased state of the thyristor the junctions J2 is reverse-biased, which is essentially responsible for the forward "blocking" mode. However, after the break-over voltage, J2 starts conducting magically. How does this change come about? Is this due to the breakdown or avalanche process? If so, how can a device recover from it and turn-off? I mean, we say diodes are destroyed if the reverse voltage exceeds the breakdown voltage but how come the same process not destroy the thyristor junction? <Q> There are 4 quadrant sensitive gate type Thyristors with max voltage ratings and there are 3 quadrant types which are better for commutation and preventing back EMF from false triggering. <S> In both cases, however dv/dt can trigger false latching and low R and medium sized plastic cap called a snubber circuit or LPF for high voltage are required to avoid that. <S> You can try two discrete transistors to make an SCR and examine the Absolute Maximum Ratings to fully appreciate how this latch works. <S> from Wiki <S> .... <S> Thank you for letting me explain to assist your learning process.. <A> A voltage at the gate results in a breakdown at a lower voltage. <S> The thyristor is conducting now. <S> If the current flows stops or the voltage between anode and cathode is zero, the thyristor turns off (and recovers). <S> The conception of an avalanche neccesarily overheating and destroying diodes is wrong. <S> There are even avalance diodes , which work fine. <A> The mode which you had mentioned will starts the thyristor conducting but where as the thyristor will destroy when you use it in reverse conduction mode. <S> As you mentioned that the diode will destroy in reverse bias but not in forward bias. <S> like that the thyristor will works fine but it will work fine when the reverse voltage exceeds the its withstanding voltage. <S> Typicallly this voltage will be much higher when compare with the diode. <A> From your question that says: <S> How does this change come about? <S> Is this due to the breakdown or avalanche process? <S> If so, how can a device recover from it and turn-off? <S> I mean, we say diodes are destroyed if the reverse voltage exceeds the breakdown voltage but how come the same process not destroy the thyristor junction? <S> It is true that the thyristor will switch on due to zener or avalanche breakdown. <S> The thing is, it is not the breakdown itself that damages the semiconductor crystal but the increased temperature in the material. <S> Devices intended to work in the avalanche region are specifically designed to withstand high temperature and in fact while normal diodes have their breakdown voltages decrease with increase in temperature, the zeners are designed to have temperature coefficients that are independent of the rated breakdown voltage. <S> Of course the device will still get damaged if too much current is allowed to flow because then too much heat will damage the device.
A high voltage between anode and cathode results in an avalanche breakdown .
Supply power to USB with external power supply I have a device (pyro-electric array detector) that connects to the Pc vis a usb. The device itself has an additonal power supply as well. Now a strange thing happens: If I connect the device to a Pc-tower, it works. But if I connect to a Laptop it does not work. On my colleagues laptop it works but only if he plugs in his laptop's power supply. My assumption was that there must be a difference in the volatage/current supplied by the individual computers. And indeed there are small differences. 4.7V from the laptop and 5.23V from the PC. The current seems to be low 0.16mA and therewith well below the USB max spec. What I tried next is to connect an external power supply to be able to adjust the power to the device's need. For that I cut the USB cable, connected the D+/D- cables for data and connected the power leading to the device to the external power supply. From a control LED on the device I can see that it is happy with that. Now, however, the device is not recognized on the PC any more (Windows device manager). Any advice on how I can a)power the USB device by an external power supply and b) have it working on the PC? Any hints are appreciated. Forgive me if what I tried is foolish. My last electronics lecture was about five years ago and I never tempered with USB before. <Q> It sounds like your device needs more than the 100 mA it is guaranteed, but does not enumerated properly to request the extra current. <S> You can get up to 500 mA from a USB port if you ask for it and the host grants it . <S> In fact, the desktop motherboard schematics I have seen show only a polyfuse between the 5V supply and each USB port. <S> There is no active electronics limiting current. <S> On those machines, you get the full 500 mA even if you don't ask for it. <S> Laptops however have limited power and therefore actively monitor and control USB power in most cases. <S> Some machines may limit the sum of all USB devices to a certain current, or limit it more when running on battery only, or when the battery is low, etc. <S> Note that USB powered hubs can't ever grant the full 500 mA since that <S> is all they are getting themselves. <S> The reason your device won't enumerate anymore is because you broke the ground connection. <S> All three lines D+, D-, and ground are required for communication. <S> You can cut the power line if the device is self-powered. <S> That's perfectly OK, but they still have to connect via ground. <A> Martin H,Does your friend's laptop have a grounded charger on the DC side? <S> Normally that is a UL/CE safety violation. <S> Does your friend's laptop have a VGA port connected to a grounded LCD monitor? <S> If so then that would explain why it works. <S> If my assumption is correct it is the high impedance stray hum or noise and poor common mode rejection is causing an error or difference noise level that is intolerable. <S> It can be 50/60Hz stray hum on the order of 100V on this floating sensor array or any switching regulator nearby. <S> If and only if (IFF) these assumptions are true, then the simple solution is to shunt the CM noise by shielding, grounding, ferrite absorpion with a clam-shell CM choke around the interface cable to the array, such as on every VGA video cable. <S> Get CM chokes from your favorite supplier or ground the Laptop via LCD or put on a ground plane with aluminium foil grounded. <S> Any of these methods will work. <S> I learnt everything I knew about EMC from Dr Ott's book in the late 70's. <S> 98% of engineering is defining the problem well enough, so engineer can explain it <S> and then the solution is simple. <S> Otherwise it's voodoo magic with uncertainty on all the test conditions. <S> The same is true for cheap external mic hum on laptops when the charger is connected and no noise when disconnected. <S> However your friend's situation was the opposite, so I am guessing it does not match your situation. <S> I hope this sheds some light even if it does not apply to your situation. <A> The ground need to be shared between both power supplies (USB and external). <S> Have done a several experiments with an USB soundcard. <S> I want to seperate/ <S> isolate it (with an isolated DC/DC converter) from the USB power because an amplifier is also powered by USB. <S> There is a ground loop and want to avoid a ground loop but can't get it to work with an external power source UNTIL <S> i connect ground again (I think because the D- is connected to the USB ground). <S> For me it is useless because the ground cause a ground-loop. <S> In your case it might be a solution to connect the ground to get the device working on an external power source without any problems.
Self powered devices generally have no connection to the USB power line. There is no guarantee that the host will grant the request, but desktop machines pretty much always do since they have plenty of power available.
Plugging a 65W computer power plug into a 45W step down transformer Is it safe? Would it only charge slower, or could it damage anything? Here is the setup in more detail:I'm in Europe, where plugs are 230V.My computer was bought in the US, so it's a 110V appliance.I have a step down transformer 230V-110V, with a 45W wattage.My computer power plug has a 65W wattage. Thank you. <Q> Short answer: <S> No. <S> If the computer requires 65 W and your transformer can only handle 45 W, then various bad things could happen. <S> The transformer could saturate or overheat or have the output voltage sag. <S> Too low a voltage is not good for the computer either. <S> It should not be damaged if properly designed, but might not turn on at brownout voltage or abruptly shut down when it needs the extra power. <S> However, check whether your computer really is 110 V only. <S> If this is the case, all you need is a localized line cord. <A> Most external laptop power bricks produced in the last 5 years have been universal - <S> that is they accept 100-240V 50-60Hz with no issue. <S> If you need help, take a picture of the power supply. <S> You will receive the size up from that required by your laptop i.e. a 25W laptop would often have a 40W power supply. <S> The problem is that it is difficult for a consumer to tell how much power their laptop is drawing. <S> Worst case is usually charging an almost empty battery, whilst accessing the hard drive with the display at full brightness, running something graphics and processor intensive. <S> There are always edge cases you may not find where it draws more. <S> It is awkward for a consumer to measure current draw. <S> Not impossible, but not trivial. <S> Another complexity is the step down transformer. <S> These do not behave gracefully when overloaded. <S> They tend to saturate, overheat, and the voltage will sag. <S> This then causes your power supply to get hot as well. <A> The secondary windings are often AWG40 <S> so the failure mode is often, it to go open circuit if the current in the secondary is exceeded by the power rating. <S> It is safe but unreliable. <S> Do not operate while charging until it has reach full charge, then you may be able to sustain it or better, get a Universal 100~240Vac laptop charger that works anywhere. <S> on any laptop.. <S> These universal chargers are typically fifty cents ($0.50) per watt output from reputable small electronic or Big Box stores. <S> Anything more is just profit. <S> Your charger must be a dinosaur as the cost of universal compliance is pennies more in volume. <S> Hope that helped (HTH) <S> ;)
The transformer may overheat when the laptop battery is dead, but as it charges up it will not require the full power, so it will work. If not, the answer is not as clear-cut. Most modern machines use "universal" input power supplies that can usually run from 90-260 V AC at 50-60Hz. I would check your power supply to see if this is the case - you can normally just use a plug adapter. If your power supply is not 100-240V, then I would suggest the cheapest solution is to buy an entire new power supply from Kensington, Belkin or whoever. Most laptop manufacturers have a range of power supplies - say a 20W for netbooks, a 40W for portables, a 60W for most laptops, and a 120W for mobile workstations.
How big a magnet do I need to wipe my portable HDD? According to this article, I need a really big magnet to wipe the data off my HDD. Thing is, I don't know how strong a "laboratory degausser" is, so I'll ask it in my own terms: I have a pair of magnets that would crush my fingers if I let them close on my hand. Is that likely to be strong enough to wipe the data on my damaged portable HDD before I let the repair guys fix the dinky connector between casing and drive proper? It's a sleek WD Passport that I can't open up myself without ruining the aesthetics. Don't care if they give me a new one, do care if someone gets to poke around the data in the old. <Q> I doubt you'll be able to destroy your data with a magnet without opening the drive up. <S> Inside of the drive are a pair of neodymium magnets (similarly strong to the ones you have, but just not as large), within centimeters of the platter. <S> The drives are well shielded, so it is near (if not entirely) impossible to wipe them by waving a magnet around them. <S> What article are you referring to? <A> Multiple, judicious applications of a magnetized sledge-hammer should serve nicely. <S> OTOH, if you just need to keep out the curious, a wipe and reformat should be more than adequate. <A> In addition to what Shamtam said about how waving a magnet around the outside of the case could be ineffective, it can do damage to other things, especially if you do this while power is applied. <S> A strong but changing magnetic field (like that caused by waving a strong magnet) will induce current and voltage in anything conductive that happens to be at the right orientation. <S> It doesn't take a lot of current or voltage in the wrong place to do bad things, like making a chip latch up. <S> Then there is also purely mechanical damage. <S> Some things in this device are going to be magnetic, and a magnetic field is going to put a force on them. <S> A strong field may make such a strong force that things get bent, metal touches something conductive it isn't meant to etc. <S> All around, this is a really bad idea. <A> If you want to erase a drive, I'd recommend that you run dd <S> if=/dev <S> /zero of=/dev/hdX . <S> Not only would it be difficult to get powerful enough magnets, you would probably damage the drive itself by degaussing its firmware. <S> You could also just delete all the partitions on it... <S> I doubt the repair guys would go through that much trouble to find out what you have on that drive. <A> Of course, if you can't access the disk because its broken, you can't just do a simple wipe or reformat. <S> If the data on it is important to keep private, destroy the disk. <S> Drilling a hole through the platter is fine to stop most nonprofessionals. <S> If its important, don't send it for repair.
If someone will die or have their life ruined if the drive contents are discovered, you need a big enough magnet to pulverize the drive when forcefully dropped onto it.
How do I copy a hierarchical module in KiCAD? I have a schematic where I'm using hierarchical sheets. I'll have five same sheets and I'd like a way to make one and somehow just copy it for the other four sheets. Any ideas how to do that? I can't find any obvious way to do so. UPDATE: Just to be clear: I'd like to copy not just the sheet symbol but the whole sheet and all components in it. <Q> If you have many same schematic blocks you want to reuse, you can use hierarchical sheet like this: (Kicad-4.0.2-stable MacOSX) Create a hierarchical sheet with sheet name A_1 , file name <S> A.sch <S> Place your components and wires into this hierarchical sheet. <S> Add a new hierarchical sheet with sheet name <S> A_x <S> (x is 1, 2, 3), <S> file name A.sch ( only if the file name is the same, but different sheet name will work) <S> Done. <A> This is an old question I know, but it's what I found when searching for a solution to this problem, <S> so I think it's a good place to put the solution for fellow searchers: <S> Drag a box around around the sheet you want to duplicate, using the left mouse button. <S> Release the left mouse button and press the rightto see a menu of things you can do. <S> Select "Save Block". <S> Then click on the little clipboard (paste) icon which will be somewhere around the edge of your schematic editing area <S> (it's near the top left for me). <S> Select where the new block will go. <S> This will paste a copy of your block, but it will refer to a new sheet based on the same filename as the original. <S> If you annotate parts you'll see that the parts in the different sheets have different labels, even though they are sourced from the same schematic file. <A> Create your hierarchical sheet. <S> Then, press "Space". <S> It will look like it is in the image below, but you can move it anyways with "M" key, or right clicking and then clicking "Move Sheet". <S> I do not remember if this is the default hot-key for "Repeat Last Item" or if I have changed it before. <S> To check this, go to Preferences <S> > Hotkeys > List Current Hotkeys . <A> KiCAD when making hierarchical sheets creates a new .sch file for each sheet. <S> This way, when entered, each of the copies will look like original sheet.
One way solve the problem is to make several sheets and then copy the original sheet's .sch file and have the copies replace the .sch files of other sheets.
Changed fuses on ATtiny85, now Invalid Device Signature I changed the clock fuse bits on my ATtiny85. Now I can't flash anything to it or even change the fuse back. I get the error: avrdude.exe: Device signature = 0x000000avrdude.exe: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. The command line command I used to change the fuse initially was: avrdude -p attiny85 -P com8 -c stk500v1 -b 19200 -U lfuse:w:0x62:m -U flash:w:main.hex Now I understand that I set the clock fuse for an oscillating clock signal, not for a crystal. I read here that I can supply the necessary clock signal from an stk500. My Arduino UNO is functioning as programmer (and in the command line args, I actually tell avrdude that it's an stk500). How do I connect/configure UNO and ATtiny to supply the necessary clock signal? EDIT I'm not trying to use High Voltage Parallel Programming. I just want to supply the external clock signal which the AVR now expects in order to program it as normal. I have a second Arduino, and I tried to send a 16MHz square wave to pin 2 (CLK1) of the ATtiny85, using the code on this page . However, when I tried to program the AVR with both Arduinos hooked up to it (both the clock and the programmer), I got the same error as before. Any idea what's wrong? <Q> The guys on the Arduino forums helped me out. <S> Apparently, my code was not creating PWM. <S> Otherwise the concept is sound. <S> Here's their answer and all of my steps. <A> Actually, if the command you entered is really what you used, then you did not set the fuse for an external clock source of any kind. <S> Low fuse byte of 0x62 is the default fuse setting for the ATtiny85 device which uses the internal 8MHz oscillator. <S> You can easily verify this in the data sheet or on this website which is a great tool for figuring out the correct fuses: http://www.engbedded.com/fusecalc <S> You would normally define the MCU frequency in the MAKEFILE, but I'm not sure how that works with Arduino. <S> Then, you wouldn't need to specify the baud rate (-b 19200) as this would be figured out by the programmer and AVRDUDE. <S> If you really can't communicate with the device at all any more, then you may have to use a HVSP to reset the fuses to default. <S> I have built one for this purpose.. <S> it is not that difficult if you know much of anything about the AVR devices. <S> Here is a website detailing some of the steps: http://www.simpleavr.com/avr/hvsp-fuse-resetter <A> This should be perfect for supplying the damaged device with a clock from the working Arduino. <S> If still problems, try supplying slower clock (for example 1 MHz) <S> RSTDISBL and SPIEN <S> - I recommend you never touch these fuses - else you will need high voltage serial programming to recover (been there)
Looking at the fuses section of the datasheet, these fuses might interest you: CKOUT - outputs the devices clock on CLKO pin.
How to hook up an FPGA to a component that has a different power supply? I recently programmed my FPGA with a logic analyzer core for the purpose of reverse engineering a crappy modem I have. I found on it what I think is either JTAG or TTL-serial pads. There are 4 blank holes and from what I can tell, 2 pins go to the processor and the other two pins go to power(3.3V) and ground. The ground pin I'm for sure is ground however. It has near 0 resistance with one of the pins from the power supply. (I assume it's connected through a ground-plane). All of my measurements with a multi-meter seemed to say nothing exceeds 3.3V off of these pins Now, my problem: I want to hook an FPGA up to this to figure out what this port actually does. The FPGA is hooked up to my computer and gets it's power over USB. I tried measuring with a multimeter what the ground difference is(GND from FPGA to GND of modem) and I got back a surprising result. There appears to be a difference of about 20-23V.. I sure don't want to hook my 3.3V FPGA up to this with that kind of voltage. So what exactly should I do? I assume the difference is because the power supply of the modem is not grounded(no third prong) How do I safely hook my FPGA up to this externally supplied modem without frying the modem or my FPGA? <Q> The 20v voltage which you see across 2 chassis is high impedance sourced from mains. <S> The schematics is a diamond shaped bridge fromed by 4 capacitors, real and parasitic. <S> Top and bottom of bridge is mains. <S> Horisontal of bridge is your voltmeter. <S> Shoulders of bridge is this small ceramic UL certified capacitors, capacitive coupling of power cable to chassis, intercoil capacitance of power transformers. <S> There is also an inductive background. <S> The non-zero figures on voltmeter are caused by asymmetry. <S> But in your case you use something home brewed in combination with insulated device: modem is insulated by design with output transformer. <S> So, no easy solution. <S> First class solution is creating lab grade ground using real earth and adding isolating transformer. <S> Only after this you can tie grounds. <A> If you measure the voltage between non-connected devices the voltage can be anything. <S> If either of the devices runs off a battery it will probably be 0V. <S> But for two mains powered devices there's a parasitic path via the power supplies and the mains. <S> That's static voltage, it can't supply any power. <S> If you don't trust it, connect the two grounds via a 1k\$\Omega\$ resistor, and measure the voltage across it. <S> It should be (near) zero volt. <S> Ground is the reference level of your circuits, and connecting them is the only way that a 3.3V for one device is also 3.3V for the other. <S> Except for a few rare cases, if there's one connection to be made between the circuits, it's ground. <S> Everything else will be properly referenced on both sides. <S> To be clear: don't leave that 1k\$\Omega\$ resistor there. <S> Grounds should be connected with an impedance as low as possible. <S> Even lower! :-) <A> There are other ways to approach the problem, such as getting your two devices to use a common ground, but the most robust is to use some sort of isolators made for this kind of purpose on the signals between the your devices. <S> For example, here are some lists of digitial isolators and optical isolators at digikey.
If your equipment (power supplies) is generally trusty, you can tie grounds safely, so the few microamperes AC will be shorted, and it will resolve the problem. Check the local electrical code as well.
Voltage requirements for charging Nokia phone I have an old Nokia phone which charges fine from the adaptor, but refuses to charge using a USB charging cable. Note that this isn't a normal USB cable, as you can see from the picture, it's got a USB A connector at one end, and a Nokia DC jack at the other. What's strange is that even if connect this cable to a beefy 5v power supply, the phone still refuses to charge. I know that power is getting through because I can measure the voltage at the phone end of the cable, and the phone seems to notice when I connect the cable, but still won't charge. Do Nokia phones have some nasty trick they use to prevent unlicensed chargers working with them? <Q> The old Nokia phones using a 2mm charging connector will refuse to charge if the supply is not current limited. <S> I don't have my schematics handy right now <S> but the circuit I used was based from LM317. <S> EDIT: <S> Here's the schematic for the charger I built (page 22 of the LM317 datasheet ): <S> I replaced the 1ohm resistor with a 0.82ohms 5W resistor to get around 300mA of current (which falls within the limits in the Nokia datasheet). <S> Also instead of 1.1Kohm, I used a 5Kohm trimmer <S> so I can adjust the output voltage to 5.5V. Supply voltage <S> is 12V <S> so make sure to mount the LM317 on a decent heatsink. <S> I have over-sized capacitors for input and output as I only have 2,200uF 25V available at that time. <S> Here's a photo of the kludge charger: <A> On the internet I found a very interesting document, the " Nokia 2-mm DC Charging Interface Specification ". <S> According to Page 17 - "Charger identification method" some voltage levels are banned: Over 9.3V - Illegal voltage. <S> 5.5V to 9.3V - Standard charger. <S> 5.2V - 5.5V - Illegal voltage. <S> 4.65 V to 5.20 V - Special charger. <S> Under 4.65V - Illegal voltage. <S> But this is not the whole story, also you need limit to current (like in this answer ), not more than 950mA and not less than 200-300mA, depending on the voltage level. <A> i was once experimenting with old nokia, trying to charge it from various sources. <S> I noticed, that voltage has to be more than 6V (didn't try to discover the upper limit :) <S> what voltage is at your USB charger cable output? <S> i was successfull charging my phone form 9V battery without current limiting.
I can't point you to any reference/datasheet but from my experience in building a home-brewed charger, you need to limit the supply to deliver around 100mA.
What is the point of Buffers like this in Programmers? So this is a schematic for an AVR Programmer seen here: http://www.sparkfun.com/products/9825 On the bottom you will see a 74AC125 which is a Quad Buffer with Tri-State Outputs. I've seen quite a few buffers like this on programmers.....but im not exactly sure what they do? Im assuming whatever "CTL" is controls the "state" of the buffers.....but what exactly is the point? Why can't you wire it directly to whatever Port Line (Serial or w/e). Or does this have something to do with Impedance (Which Im not sure I STILL quite understand). Is it because the Signals are coming out of the ATTINY2313 (or w/e MC is used) too fast and they need to be slowed down? I see this often when using a USB port of Serial Line....that one of these "Buffers" is used. What would happen if it wasn't there? Or is this all just some sort of Serial Protocol Im guessing? <Q> First, there's no need to assume anything. <S> It's extremely easy to find a datasheet for this sort of part. <S> The schematic clearly shows the CTL signal going to the output <S> enable inputs of the part. <S> The signal must be low to allow the buffer to operate. <S> When enabled, a low on the input produces a low on the output, and a high on the input produces a high on the output. <S> Generally, a bus buffer like the 74AC125 is used for improving drive capability. <S> Some micros cannot source high current from their digital outputs, and need a buffer to effectively drive their loads. <S> Buffers can also be used for logic level shifting - your micro may be a 3.3V part, and your external logic may need 5V logic levels. <S> A buffer takes care of this translation for you - the buffer can be powered from the higher rail, so that a 3.3V H input becomes a 5V H output. <S> A buffer also protects the digital output lines of the micro from external 'badness' (short circuits) - even though most micros do protect their I/O lines, it's much easier replacing a buffer IC than it is to replace and reprogram a micro. <S> In terms of delays, the buffer isn't like a memory buffer in the computing realm - it doesn't inherently store data so that it can be transmitted more slowly. <S> It does introduce a propagation delay, so the output signal is delayed in time compared with the input signal (but at the same data rate) - a phase delay instead of a baud rate reduction, so to speak. <A> From schematic, we can see that the buffer can be powered from the target board or from the programmer. <S> In case of small voltage differences lower than 0.5 V between the target board and the programmer's power supply, the buffer will stop current going from one power supply to another. <S> The other use is to enable or disable the output to the programming header. <S> In order for programming to work, the programmer's microcontroller needs to sink current on the pin connected to the CTL line. <S> What this allows us is to use the JP2 connector to work with programmer's microcontroller and since signals are shared between JP2 and JP3, the buffer allows us to use JP2 and not interfere with JP3 while using it. <A> This programmer supports both (a) programming 5 V targets, and also (b) programming 3 V targets -- in particular, 3 V targets that are not 5 V tolerant. <S> a b <S> c <S> In this particular application, the 74ACT125 buffer provides logic level shifting. <S> One side of the buffer is connected to MCU in the programmer (running at 5 V levels) and the other side of the buffer (and the VCC of the buffer) is connected to the cable leading to the target board. <S> Some target boards run at 5 V, other target boards run at 3 V levels.(The 74ACT125 seems to be running slightly out of specification in this application -- I'm not sure why the designer didn't pick an alternatives such as the 74HC4050, TXB0104, or 74LVCC4245 ).
I think that the buffer is there to provide a little bit of isolation between the voltages of the programmer and the voltage of the target board.
Least expensive way to plug in a microcontroller into 120V (without wall wart or batteries) I need to be able to power a Atmega168 by plugging it into a wall. The circuit is a little bit more complex but not too much. The Atmega168 needs between 1.8V and 5V at 200mA. The ideal solution needs to be contained all on the PCB board. No wall warts or batteries. What is a good strategy or set of components that will allow this to be done safely and inexpensively? I'm new to the area but I have heard things about switched-mode power supply. Also, efficiency is not very important as long as it is not hot to the touch. <Q> If it needs to be safe you can't get around a transformer for isolation from the mains, and you'll probably end up with the classical linear power supply: You probably can change a few things here. <S> You say the AVR can work on 1.8V. <S> How about the rest of the circuit? <S> If 1.8V is enough there too you could use a lower voltage transformer. <S> (Make sure the whole circuit can work at 1.8V. <S> You can' use LEDs, for instance.) <S> Digikey lists a 3.15V/600mA, but this isn't a PCB mount, otherwise it would be ideal. <S> 3.15V AC combined with Schottky diodes for rectification <S> give you more than 3.5V input to your regulator, which could be almost any LDO that can supply 200mA. <S> (If you use a higher transformer voltage you'll have to use a different LDO, since this one is rated at 6V in maximum.) <S> This is the standard setup for a linear power supply. <S> It may look a bit complicated, but you can't go more simple than this. <S> The wall-wart is a nice alternative, why are you against that? <A> ( Mouser ) <S> MYRRA 47122 <S> ( Newark ) Or else build a wall wart into your device. <A> An elegant solution may be to use an USB wall wart like these: and supply your circuit via the USB (like the Teensy). <S> Then encase everything in the same box, letting the plug out. <S> DISCLAIMER: <S> I know that this is an off-the-shelf solution, but I like it for two reasons: <S> Safety: <S> it will (hopefully) be certified, so you need only to deal with 5 V, leaving the problem to the manufacturer; <S> Price: these plugs are found in places like dealextreme for down to 1 $, and mine is working well until now. <S> If you make your own, only the components will be more expensive, and your time also. <A> A safe mains rated switchmode power power supply is quite a complexdesign. <S> Have a look at this teardown of an iphone charger as an example. <S> In that article the author mentions a switchmode Samsung cube charger for about $6this charger may be a good option (possibly removed from its case and mounted on your PCB).
I don't know if these are inexpensive enough, but the simplest - and safest - way would be to use a commercial pcb mount power supply module like these: RECOM Power RAC01-05SC I've purchased commercial equipment that had a wall wart mounted internally by means of cable ties, with wires soldered to the wall wart's prongs.
Why isn't it dangerous to put finger in light socket? This is in reference to "Why three prongs?" . Why does this hold true: "Curious kids might still stick their finger in a light socket and receive a shock, but the unwanted current was directed through the length of their finger and caused no danger of heart-stoppage." <Q> The context of the statement in the question is the important thing. <S> In simple terms, current takes the path of least resistance (actually current is inversely proportional to resistance, so a less resistive path will draw more current for a given potential). <S> The statement in question was made in the context of an ungrounded (i.e. no earth connection, totally floating) <S> AC power system. <S> As the article explains, you an loosely think of your feet as being at Earth potential. <S> You can model a child's finger as a resistor. <S> This is NOT <S> the case in modern (or even not so modern) wiring, as is explained further in the article, so please don't take this statement out of context, as you can easily DIE these days by sticking your finger in a light bulb socket that is not GFI protected. <S> The more likely hazards are better protected though, it's a trade-off. <S> Read the whole article. <A> My father received a 33 kV shock and survived due to this effect. <S> He was working at an electrical substation and climbed up a ladder to work on a transformer. <S> Unfortunately the wrong transformer was switched off and he climbed up a live one instead. <S> As he reached up, a spark went into his palm and out through his forearm to the aluminium ladder. <S> The spark set his overalls on fire which put him in the burns unit, but from the elbow up he had no ill effects from the electrical shock. <S> Note that you should not rely on this to survive a high voltage shock. <S> He was very lucky to survive. <A> I heard it explained to me that when working with power in the walls, it is best to keep one hand in your pocket. <S> That way, electricity flows down your side and to the ground instead of across your heart, to the other arm, then to whatever else you were holding to get to the ground. <A> Reiterating what's been said, and adding some clarification: Electric current across the heart is really what is lethal. <S> Current as low as 1mA directly through your heart is enough to be lethal (see "Ventricular Fibrillation" here ). <S> If current doesn't travel through your heart, though, electric shock is most dangerous with its indirect effects (such as Optimal Cynic's father, who received severe burns from the heat created in the shock).
The danger of heart stoppage is reduced because the voltage goes down to the ground and little or no amperage crosses the heart. The potential difference between the two sides of the child's finger is much much less than the potential difference between either side of the child's finger and the Earth potential, so current will simply flow through the child's finger rather than its heart.
Why do Arduinos ship w/ 16MHz crystal instead of 20MHz? Why do Arduino boards ship w/ 16MHz crystal instead of 20MHz? They are spec'ed for operating at 20MHz, after all. I guess there are a few advantages to running more slowly (lower power consumption, longer life), but I must be missing something. <Q> I'd buy into the answer on the Arduino Forum: <S> The original ATmega8 Arduino ran at 16MHz, which was the top rated clock speed for the ATmega8 cpu used. <S> When "upgraded" to ATmega168 (with a 20MHz top cpu speed), the clock was left at 16MHz (probably) because the designers thought that more people/code would have backward compatibility issues with a new clock rate than would benefit from the extra 25% cpu performance. <S> I certainly think they were right... <A> Actually, one of the best reasons I've heard is that the UART can perfectly match 1 Mbit and 2 Mbit rates when running at 16 MHz, but not when running at 20 MHz. <S> There are a number of devices that have 1 and 2 <S> Mbit UART inputs, such as the Dynamixel line of robot servos. <A> So if you have a 20 MHz crystal connected to the XTAL pins, you have to use the Full Swing Crystal Oscillator which will consume more power (or use no crystal at all).
A third point is that the Low Power Crystal Oscillator of the ATmega168 and ATmega328 is not working above 16 MHz.
Soldering a wire to a small MOSFET pin I have this small mosfet with pins that are about 1mm in length that I need to solder to wires that are maybe 3 times larger than the pins. Should I just drop blobs of solder on it or is there a better way to approach this problem? <Q> I'd check out Proto-Advantage . <S> They have a lot of nice SMT to DIP/SIP boards that are pretty cheap. <S> Like Madmanguruman mentioned, it's far easier to properly solder the components to a board and utilize a plated through-hole for your wire. <S> Here is a board I found on their site that might work for you assuming the MOSFET you're using is a SOT-23 package. <S> They have plenty of boards for other packages as well. <A> You need to support the larger wire some other way than soldering to the pins. <S> That wire can transfer enough strain to rip the pins off the part. <S> For soldering to the SOT-23 pin, I like small-gauge heat strippable magnet wire. <S> Heat strippable means no nicks in the wire from stripping. <S> Radio Shack sells a set of three magnet wire sizes, the smallest of which works well for this application. <S> Here is an example: <A> You could also pick up one of these for $0.95 from SparkFun. <S> It's a little SOT23 breakout board . <A> RadioShack carries PCB kits. <S> Cut the PCB into 1x1" segments and draw a shape like the attached image on it. <S> Etch it, then drill holes from the underside to solder wires in. <A> Ideally you'd have a breakout board to prototype this, but if you don't, this is what I've done for quick prototyping of small SMT ICs. <S> Use small wire: 30AWG wire wrap. <S> Hold the part securely in a "helping hands" device or a small vise. <S> I use a small Palmgren drill press vise as my general purpose soldering vise since it's not too big (about 3"x5") and heavy enough (about 5lbs) <S> so it doesn't slide around on the table. <S> Wrap the wire once or twice around each lead and solder it in place. <S> I use .031" <S> (?) diameter solder for this. <S> Now you can connect this very thin wire to a larger wire, such as 24g <S> that's easier to work with. <S> Alternately, you can solder the wire wrap wire to a protoboard to anchor the part in place for further use. <A> Some people seem to be very handy with enamel coated wire: Alternatively you can use wire wrap wire. <S> 0.25mm and 0.4mm are standard diameters, and the Kynar insulation is easier to strip than enamel. <S> (Real Engineers do that with their teeth.) <A> At my workplace, we've designed little PCBs that have standard footprints much like the SOT23 MOSFET you're showing, with short traces that go to <S> reasonable-sized plated through-holes. <S> These are very useful for bench experimentation and doing rework on early prototypes, because the surface-mount device is securely soldered, the holes provide some mechanical support for the wires and the whole thing can be glued or RTV'd down without adding appreciable height. <S> It's almost impossible to reliably solder a wire to a small SM device, especially when the wires are much bigger than the part leads. <A> ...or you could do what @insta suggests by just taking a knife and scratching a pattern on copper clad board, then solder wired to that board. <S> SOT-23 is huge compared to some other packages like SC70 or MSOP.
I suggest you glue the wire down, or wire-tie it etc, then make a small jumper wire to connect to the SOT-23 part itself. Make a little breakout board.
How to compare mAh and Wh When looking at consumer electronic devices with batteries I sometimes see the battery capacity listed in Wh (watt hours) and sometimes in mAh (milliamp hours). I would like to be able to compare the two different metrics and I'm wondering how to convert from one value to the other. <Q> The Simple Answer DC Power is defined in terms of W = 1 <S> V <S> * 1 <S> A - that is, the power that is delivered by sustaining 1V potential with 1A of current. <S> Thus, a battery pack that can deliver 5400mAh, that is 5.4Ah, while sustaining voltage of 10.4V (this happens to be running in my laptop right now), can in theory deliver up to 5.4 * 10.4 = 56.16 <S> Wh = 56160mWh. <S> The Complicated Answer <S> The above get a lot more complicated with different battery chemistries, and with different measurement methods. <S> Firstly, the mAh rating can depend on the actual current draw - in general, the more current you draw, the less capacity the battery has, but there are exceptions at both ends of this guideline (if you draw too slowly, self discharge affects your measurement, and if you drive quickly enough, the battery gets warmer, and if it doesn't break, it tends to perform better). <S> Also, the voltage across the battery changes with the load - this is at least simple, the more current you draw, the lower the voltage across the terminals (this is due to internal resistance). <S> Finally, some devices are essentially dumb loads (battery powered tools), and draw as much as they can from the battery.. and some devices handle voltage and current changes in a more intelligent manner (mostly laptops and other DC/DC converters). <S> This means that for dumb loads, you are more concerned with mAh ratings (perhaps measured until battery voltage remains above some usable threshold).. since this can be used to calculate time-to-empty (which is really what you or your users are after), and dumb loads are approximately constant current/constant resistance loads. <S> For smart loads, the discharge controller (DC/DC converter) would actually try to drain constant power - <S> the lower the voltage, the more current it drains so that it can continue outputting constant power on its business end. <A> Simply put, Wh, or Watt-hours, is the measure of voltage <S> * Amp-hours . <S> In the case of the batteries you're looking at, you typically see mAh as the quoted battery capacity figure. <S> So, for example, a typical AA Ni-MH rechargable battery has a nominal cell voltage of 1.2V . <S> If you find one with a capacity of 2,000mAh , it would have a 2.4Wh rating. <S> For example: A 90Wh battery that has a voltage of 12V. Divide 90 by 12, which gives you 7.5. <S> Multiply by 1000, and you now have the mAh rating of 7,500mAh. <A> I realise this is an old question <S> but hopefully I can provide a useful answer for today's lithium cells which have a nominal voltage of 3.7 V. Power = <S> Current <S> * Voltagetherefore: <S> watt hours = <S> amp hours <S> * 3.7 V <S> So if you have a battery with a mAh rating of 26.8 <S> Ah then it has 99.16 <S> Wh (26 * 3.7). <S> (Assuming the cells are in parallel) You may be able to do a similar calculation on multiples of 3.7V.
If you want to take a Wh rating and convert it to mAh, divide it by the voltage of the battery and multiply that by 1000.
How to rebuild Ni-Cad battery pack for power tools I have some cordless power tools which all require a certain 12V nickel-cadmium battery pack.My battery packs are dead, but the good news is they're held together with screws, so I took them apart to have a look. The bad news is the cells inside are all shot; they have the little crystals on the outside telling me they're done. So, the dead cells are going to the official hazardous waste drop-off site. What should I replace them with?I've wired up battery packs for RC cars and stuff before, and I'm confident I can put it back together properly. The problem is I'm having a hard time finding the nicad cells now. did they stop making them? I see a few for sale and they're like $3-5 per cell now (I need like 50 of them). Is it possible to salvage the good cells from several different dead ni-cad packs to create one working battery? <Q> What should I replace them with? <S> I've wired up battery packs for RC cars and stuff before, and I'm confident I can put it back together properly. <S> The problem is I'm having a hard time finding the nicad cells now. <S> did they stop making them? <S> I see a few for sale and they're like $3-5 per cell now <S> (I need like 50 of them). <S> Nickel-Cadmium (NiCd) cells are falling out of favor, because Cadmium is environmentally unfriendly and usually not compliant with RoHS. <S> NiMH and NiCd have similar characteristics <S> (more thorough comparison of NiMH and NiCd here ). <S> You can buy both NiCd and NiMH cells from industrial electronics distributors. <S> Here, for example. <S> Is it possible to salvage the good cells from several different dead ni-cad packs to create one working battery? <S> It depends on the actual packs and how you're planning to charge. <S> In a general case, I wouldn't mix and match used cells of unknown pedigree. <S> It wouldn't produce the best results, probably. <S> I would buy a uniform batch of new cells. <S> p.s. <S> Of course, when you say "power tools battery pack", most folks knows what you're talking about. <S> However, a photo of your tool's battery pack would help this question a lot, especially if you've already disassembled it. <S> Please post it if you can. <A> This does not have to be overly pretty to work - as long as you value functionality above looks. <S> I tried attaching one of the industry standard 12V 7Ah "brick" batteries as used in alarm systems, to a drill whose battery pack had dies. <S> While the 7Am 12V battery was heavier than the original <S> I was agreeably surprised at the comfortable "heft" that was achieved and how usable the drill was. <S> YMMV*. <S> Another "solution" which may suit depending on circumstances is to make a short cord to a battery pack with a quick remove connector on the drill. <S> This is of course not as convenient as true cordless but is far more flexible than amains powered drill. <S> NiCd cells can be bought as Nick notes. <S> The big things for a long life are to NOT overcharge them and to not run any cell "flat". <S> The latter really requires you to stop discharge before any cell has a chance to be exhausted. <S> More on that if of interest. <S> I have heard of people refitting drill packs with LiIon cells BUT <S> that is a task for the brave and competent. <A> You could do with a bunch of new cells, but they are not produced equal, so the same applies. <A> The motors and electronics of the cordless drills are rated usually at a very wide range of input voltages. <S> Source: I opened my 12 V drill and the motor was rated up to 18V. With this in mind, the best way to upgrade battery packs is to buy a 1500 mAh 4S LiPo cell, producing 12-16 V, and to adapt the connector of the drill to the usual LiPo bullet connector. <S> The new battery should fit inside the original battery pack. <S> If you buy a 2000+ LiPo pack (4S to get 12-16 V) then it won't fit and you need some trick to connect it. <S> Keep the balancing connector outside the battery pack, you need it for charging/balancing. <S> Advantage: you can buy as many LiPo packs as you want and, as long as your arrangement in the plastic holder is well done, you can swap them easily.
If you scavenge cells from different corners, thay will have different characteristics, some will charge earlier than other, then overcharge, some will discharge earlier than other, then overdischarge and eventually your new battery pack will be dead again. A "trick" that can work extremely well is to meld a 12V sealead lead acid (SLA) battery with the drill connection part of your old battery pack. Nickel-metal hydride (NiMH) are replacing NiCd. You need to find a matched set of NiMH cells, these are available from various sources on the net.
Power supply with opamp and BJT transistor I am studying for my EE exam but I couldn't quite get how this circuit works. Source Assume R1 = R2, Vout = 10V Vref = 5v. This is stable as it is, and when Vout decreases for a reason below 10V, - input of opamp becomes less than Vref that output of the opamp becomes higher, thus allowing current to escape to ground rather than going to the Load, which decreases Vo more. Where is the thing I am missing? If I assume an ideal opamp, + and - inputs are equal. Vref = 5V Because of voltage divider rule Vo = 10V. But I am not sure if that's the explanation. Edit: There is also a reversed one. I think this is the correct form, when ref is connected to - input, but I am puzzled seeing two different examples. <Q> "If I assume an ideal opamp, + and - inputs are equal. <S> " <S> That's not automatically true! <S> Equal inputs are not a property of the ideal opamp! <S> You can have different input voltages even with feedback, think the positive feedback of the Schmitt-trigger. <S> The diagram would probably have been easier to understand if they would have drawn the pass transistor's symbol, instead of that rectangle. <S> Like Olin says, that transistor will be a PNP . <S> \$I_{GND}\$ is the PNP's base current, and the collector current to output is proportional to that. <S> So increasing \$I_{GND}\$ won't draw that away from the output, but instead increase the output current. <S> What you describe would happen if the pass transistor were an NPN . <S> In that case \$I_{GND}\$ would indeed be taken away from the pass transistor's base current, and an increase in \$I_{GND}\$ would result in a decreased base current, and therefore decreased emitter current to the output. <S> In that case the inputs of the error amp have to be switched. <S> (Add a resistor to the error amp's output to reduce the amp+transistor's transconductance. <S> Without it, even with real-world components, a 1nV input change may result in a 1A output change, and it may oscillate. <S> (Murphy: your amplifier will only oscillate if you haven't foreseen it.)) <S> edit <S> (shunt regulator) R4 is an important component. <S> If the input voltage is constant then regulating the output voltage means keeping the current through R4 constant. <S> If the load decreases the transistor will draw more current to keep the total current constant. <S> That's not efficient. <S> Load regulation: if the load current would rise the drop across R4 will increase, and the voltage on the non-inverting input of the opamp will decrease. <S> Then the transistor will conduct less to balance the risen load current. <A> Your explanation is basically right: Assume R1 = R2, <S> Vout = 10V Vref = 5v. <S> This is stable as it is, and when Vout decreases for a reason below 10V, - input of opamp becomes less than Vref that output of the opamp becomes higher, thus allowing current to escape to ground rather than going to the Load, which decreases Vo more. <S> The thing you seem to be missing is that letting a little current "escape" to ground where the schematic shows Ignd makes PassXsistor pass more current from Vin to Vout. <S> Basically PassXsistor is meant to be a PNP transistor. <S> A real circuit would have a few other details, but the basic scheme is correct. <S> Another way to put this is that Ignd is the control signal to the PNP pass transistor. <A> The two pictures in the question show two fundamentally different concepts. <S> It appears that you are confused by these two configurations. <S> The first picture (with the funny box labeled PASS XSISTOR) shows a series regulator . <S> The PASS XSISTOR acts like a variable resistor providing current to the load, dynamically regulated by the OpAmp. <S> Think of PASS XSISTOR as the upper part of a voltage divider and the load (and R 1 , R 2 ) as the lower part of this voltage divider. <S> (Note that I GND usually is very small compared to the load current I <S> L and does not have anything to do with the main idea behind a series regulator.) <S> In the second picture ("hihthtiittti"), Q1 acts as a load paralleled to the actual load (R L ). <S> This is called a shunt regulator . <S> R4 is the upper part of a resistive voltage divider, Q1 and R L (and also R 1 , R 2 ) are the lower part of this voltage divider. <S> Both regulators try to maintain a stable voltage across R L . <S> The series regulator does this by putting a variable pass element (usually a transistor) before the load (in series to the load), the shunt regulator uses a variable pass element in parallel to the load (it shunts the load). <S> This link has a good and simple picture showing only the most basic differences between the two types.
You have to construct the right negative feedback loop to get the inputs equal.
What does it mean to "assert a pin"? From the XBee/XBeePro product manual page 24 ( link to pdf ): Sleep Modes enable the RF module to enter states of low-power consumption when not in use. In order to enter Sleep Mode, one of the following conditions must be met (in addition to the module having a non-zero SM parameter value): Sleep_RQ (pin 9) is asserted and the module is in a pin sleep mode (SM = 1, 2, or 5) The module is idle (no data transmission or reception) for the amount of time defined by theST (Time before Sleep) parameter. [NOTE: ST is only active when SM = 4-5.] What is meant by "asserting a pin"? <Q> De-asserting a pin means setting it to its inactive state . <S> If a pin is <S> active high (which it is, in your case), then asserting it means setting it to logic high (usually 3.3V/5V) and de-asserting it means setting it to a logic low (0V). <S> On the same page of the datasheet you've linked there's Table 2-04 which shows that Asserting pin 9 <S> (Sleep_RQ) means setting it high : <A> It means that the active level is applied . <S> In the manual active level is indicated between brackets ("high"). <S> That's the common standard for GPIO (General Purpose I/O), but lots of signals are often active low, like \$\overline{\mathrm{CS}}\$ (Chip Select), \$\overline{\mathrm{OE}}\$ (Output Enable), \$\overline{\mathrm{UB}}\$ (Upper Byte). <S> Asserting \$\overline{\mathrm{CS}}\$ means make that line low. <S> (The overline indicates active low logic). <A> To be a little bit more precise, (de)asserting a pin usually means that you must have a transition from one state to an other. <S> From active to inactive if you de-assert the pin. <S> From inactive to active if you assert it. <S> So, assuming you must assert (active high) a pin: <S> either it is currently low (i.e.: inactive) <S> , you only have to set it <S> high <S> (i.e.: active), <S> but if it is already high , you must first set it <S> low <S> in order to set it high again just after that.
Asserting a pin means setting it to its active state .
Simple and safe solution to control a power plug with Arduino or PC What solutions are available to control a power plug (or even if possible a light socket), i.e. turning it On and Off? I have looked for xbee/zigbee solutions but there doesn't seem to be a solution available for European power sockets (and so few solutions even for US sockets). A wired solution including an Arduino is OK for me. I want it to be easy to use (as for zigbee I'm ok to learn how to use it), and safe (I don't want to connect or solder things because it's 240V, I don't want any risk with the electrical installation). <Q> I would suggest two options. <S> First - and this involves a small amount of wiring and soldering - using a PowerSwitchTail II . <S> This is a very safe way of switching mains voltage. <S> There is adequate isolation, it is safely cased and tested. <S> A number of the protocols are documented in various places. <S> The only issue with these is that you have no sure way of knowing if the switch is on or off. <A> This is how you control a relay. <S> A relay gives you proper isolation from the mains, and with the appropriate relay you'll be able to switch more than a kW at 230V. <S> The relay will need more current than the Arduino can supply. <S> That's where transistor Q1 comes in. <S> The transistor multiplies the input current from the Arduino (the "on/off" at the left) by about a factor 100 and uses that higher current to activate the relay. <S> edit <S> An SSR (Solid State Relay) is even simpler, but usually a bit more expensive. <S> (This one seems to be very low priced, at USD 3.50 at Digikey.) <S> This SSR connects via a resistor to the Arduino, that's the two left pins, and the other pins are the switch. <S> This SSR can switch up to 1A. <A> How about this : You connect a 5V power supply, and the 4 inputs to 4 of your Arduino's outputs, and you're done. <S> USD 16.50. <A> Perhaps X10 is what you need? <S> X10 is a standard for communicating through the power lines of your house. <S> This way you have have your Arduino send data into one power socket, which will be read by another device attached to a light fitting. <A> I'm using these devices Gembird / Siver shield Power manager. <S> Check this short video . <S> They work brilliantly well, even from Linux, and come in various flavours (USB, WLAN, ...)
If you really want to do no wiring or soldering at all, then I would suggest finding one of the common 434/868/915MHz (depending on region) remote controlled sockets using a basic OOK protocol, and buy a simple 434MHz transmitter.
Using Mic from 10 feet away for voice recognition I'm trying to use a mic from 10 feet away. Background: for my senior project I would like to talk to a computer to run scripts, but I want to talk to the mic throughout the house. So I need to be able to speak from about 10 feet away to a mic in the ceiling, and have it go to the computer, where the computer will execute the scripts based on the voice commands. Due to my inexperience with op amps and audio signal design, what would be a good way of amplifying the signal, and what would be a good way of filtering the signal? The Quality is important, because the voice recognition will work better with better quality mics, and I might be talking over the phone with the mic. Budget is also important. because i have to build 4 to 5 of them. Any Suggestions also for how to approach the problem are also welcome.Thanks <Q> The problem with a microphone 10 feet away for voice recognition isn't just volume or amplitude, but also multi-path interference (or room reverb). <S> Sound reflecting off of the walls, floors, furniture, etc. is much weaker than your voice when the mic is up close. <S> Not so when the mic is far away. <S> This multi-path interference can change and even cancel out portions of the spectrum of your voice, and in a manner that changes anytime you move or face a different direction, which makes voice recognition more difficult. <A> if the mic is 'far away' from your recording device,you need a low impedance signal, for short: build a amp en place it as near as possible by the mic. <S> a mic to line amp / mic preamp circuit is suitable for that. <S> the amplified signal goes to in your case your computer.also like <S> Russel McMahon says: "directional microhones" & "shotgun microphones";you can place more directional mic's and sum them together, or use a shotgun mic. <A> Since your question is very general, I can only guess as to what guidance you actually need. <S> Here's a start. <S> Due to my inexperience with op amps and audio signal design, what would be a good way of amplifying the signal, and what would be a good way of filtering the signal? <S> Amplification and filtering often go by the single term signal "conditioning". <S> Given that the human voice has a range of about 300Hz to 3.4kHz ( according to Wikipedia ), it would seem that a bandpass filter would be sufficient to reject frequencies outside this range. <S> An active bandpass filter, one with active electronics (usually op-amps), allows you to amplify your signal as well (since op-amps are just that, amplifiers). <S> This could take some of the weight off a separate amplifier circuit, which you may need to boost your signal to usable levels. <S> Here's a good link to active bandpass filter topology and analysis . <S> This link makes good arguments for both cascaded filter design (first section) and multiple feedback design (second section). <S> Cascaded design uses three stages which combine to create an active bandpass filter: a highpass filter, an amplifier, and a lowpass filter. <S> This approach gives you a very flat passband, which makes it good for wide ranges like our 300Hz to 3.4kHz. <S> If you implemented this method, I would perform the lowpass filtering first , because the most prominent noise in your system will likely have high frequency content, and you don't want to amplify that before filtering it. <S> The multiple feedback design also has its pros. <S> For example the issue with doing lowpass filtering first (described above) is negligible. <S> However, it is best used for narrow passbands, which 300Hz to 3.4kHz is not. <S> I'd recommend the cascaded approach above.
Solutions might include using multiple microphones and DSP processing to determine and partially cancel any multi-path distortion, or perhaps robotically aimed directional microphones that can follow your position in the room.
Can I transfer data wirelessly to the inside of an aluminium can? My problem is that I have to control (turn on and off) one LASER that is placed inside an aluminium can (not like soda can, but one 2 mm thick). So the question is if there's any way to do that wirelessly. I've been thinking about Bluetooth and Zigbee but in my initial research I've found data may not be able to 'go through' the aluminium. I've been thinking about IR, but it may not fit my idea because I have a camera shoting pics of the can, so the IR led may affect the images. Any thoughts on that? Any other solution? Is there some tech that I could look for that would suit my problem? Thanks in advance <Q> Sound waves (or ultrasound) should be able to get through the can. <A> Simple solution: Big coil outside and reed contact inside the can. <S> A strong magnetic field should be able to penetrate 2mm alu. <S> Might need some experimentation to learn what is "strong enough". <A> You can make the can/casing the antenna. <S> Create a design where the cylinder is cut/sectioned midway its length. <S> Join/mate the halves mechanically in some fashion (say threaded) to provide a hermetic seal. <S> This allows you to easily assemble into and access the contents of the casing. <S> Make sure though that the halves are electrically not connected to each other (the mating parts made of plastic, and the seal made of a rubber gasket) and with a very thin distance between the halves. <S> The two halves can now be used as a radio dipole antenna . <S> The entire length of the cylinder is one-half the wavelength for the signal. <S> This idea will work if your application will have the cylinder length in some convenient radio frequency.
Use a speaker and microphone (or ultrasonic transducers ).
Does solder being or not being uniformly thin and shiny really indicate reliability of the circuit? I'm currently reading an article ( in Russian ) and the author compares two devices (hard disks) of the same model one manufactured by Company A and the other manufactured by Company B. One of the things he compares is how solder looks like on the boards. Company A device board has soldered parts looking like this: and this is claimed to be "low quality tin-coating". What I see is that solder spots are not shiny and the solder layer is thinner near the spot edges and thicker far from the edges (a bit concave). Company B device has soldered parts looking like this (that's exactly the same area of the board as on the Company A device): and this is claimed to be "high quality tin-coating". What I see is that solder spots look shiny and the solder layer looks having uniform thickness across each spot. So to me the first board just looks neater. From what I know about soldering once the surfaces have been properly degreased with soldering flux and the solder was melted properly the connection will be just fine regardless of how shiny and neat looking it is. However the author claims that the Company B device is of higher quality and should be preferred because of (among other factors) the "better quality" of tin-coating. How reasonable is such claim? Can device reliability be judged based on such tin-coating analysis? <Q> I've said this before, and I'll say it again: <S> Even before lead-free solder <S> the shine wasn't a reliable indicator. <S> More reliable than lead-free solder, but not reliable enough for most people. <S> Here are some things that I look for when evaluating the quality of the solder: <S> Consistency: <S> Do all the solder joints look the same? <S> If not, it indicates a variation in the solder process and thus it is more likely to have problems. <S> Wetting <S> /Wicking: <S> Did the solder melt evenly and flow onto the mating surfaces, or does it look like the solder beaded up like water on a newly waxed car? <S> Solder that is beaded up could have problems, and hidden cracks under the bead. <S> Smooth finish: <S> I'm not asking if it is dull or shiny, but rather is it smooth or are there lumps in it? <S> Lumps are a sign of uneven or incomplete melting. <S> Conductive Flux: <S> This one is rare, but important. <S> Some types of flux are conductive, but not everyone is aware of this. <S> Sometimes a board will be reworked with conductive flux but the flux will not be cleaned off correctly (water for water soluble flux, etc.). <S> Check that the proper flux was used in the proper way. <S> Note: <S> Some flux leaves a residue and this is OK as long as the residue is not conductive even though it might look bad. <S> Cracked Solder Joints: <S> Often this can only be seen using a microscope, and sometimes not even then. <A> It used to be a lot easier before RoHs soldering processes came into vogue. <S> To me, all solder joints with lead-free solder look dull, and look quite a lot like a poorly-done conventional SnPb solder joint. <S> (I guess I'm showing my age now) <S> IPC-A-610E is the 'official' criteria for judging acceptance of solder joints. <A> The case can be of comparing 2 completely different technologies: traditional solder paste printing with stencil printer vs electroplating by deposition of solder with help of electrolysis through openings of photoresist mask. <S> The difference can an order of magnitude in amount of solder deposited. <S> If the board is made with electroplated deposition technology, then it can be much more recent and perhaps superior in quality. <S> What can be possibly invented in close future is some sort of pick-and-place of individual leafs of solder foil created by some precise CNC chopper on the fly.
How shiny the solder looks is not a reliable indication of the quality of the solder joint.
Wireless Sensor to Internet Looking for a low cost implementation to post ambient temperature readings from a sensor to servers via a COTS router. 1) Have a temperature sensor connected to a micro controller which sends data via a Wifi Module with a TCP/IP Stack to servers2) Have a temperature sensor communicated via Zigbee to a coordinator that is plugged into a router and communicates with the servers. Would like to keep the cost of the solution below $20. Another constraint is the battery life. Wifi modules with TCP/IP consume more power and cost more. What particular devices/chips/microcontrollers would you recommend to solve my data communication problem and fit within my budget? <Q> I would use a Digi Xbee on the sensor to pass the information to a Connectport X2, which has either ethernet or wifi. <S> The Xbee is a Zigbee radio with a simple serial interface. <S> The X2 has a Zigbee radio and an IP connection and runs python. <S> There are several tutorials on how to get one working. <S> This one looks like a good place to start. <A> If you're not in a hurry, you can wait for the new Electric Imp kits. <S> The developer kits should be coming out soon. <S> (Says "end of June, 2012" on the website). <S> http://electricimp.com/docs/gettingstarted/devkits/ <S> The Hannah: <S> The hobbyist board even has the temperature sensor built in. <A> If you click on Support/API and then go to hardware, they have a lot of information on the various hardware that is compatible with their service. <S> And they have libraries for controllers like the Arduino.
Pachube / Cosm, which is now called Xively , is a service/platform/API for posting sensor data to the web.
What's the purpose of such weird wiring inside this smart card? Here's a scan of a stripped MIFARE Ultralight smart card That's some plastic film with (I assume aluminum) foil wiring acting as the antenna for both powering the chip and providing radio communications. Two things look suspicious. First, there's a wide stripe on the right (pointed to by the arrow) - a wide carefully engineered stripe of metal not connected to anything. Second, note what happens between points A and B which I connected with a dotted line. There's a metal stripe going from B leftwards to the card perimeter, then downwards to the end of the "tunnel" crossing the wires and that end of the tunnel is also connected to the stripe that goes to point A. So it looks like the stripe from the "tunnel" end to point B can be eliminated by simply connecting points A and B and thus saving some metal. Why are these two seemingly useless elements of wiring present in the circuit? <Q> This stripe is a patch antenna , which is nothing else than a wire, printed on a PCB or similar, that radiates like an antenna. <S> While there is theory about microstrip (patch) antennas, they're not as easy as dipoles or "normal" antennas to analyze for human beings, anda great part in their design is done numerically. <S> They can easily be considered black magic . <S> I'm trying to understand If AB are really connected or not: at a first glance <S> I'd say that tey are not connected, but the rounded areas are the pads to connect the ends of the antenna to the transceiver. <S> It would be consistent with the dark path going to A. Or, but this may be or may not be: some patch antennas are made of two "independent" radiating elements, of which one or both is feeded by the signal; these elements interact together like a Yagi antenna, providing a more directional radiation. <S> So it also may be possible that there are two different loops, but it's only an hyphotesis. <A> I will add to Clabacchio's "maybes". <S> As he says, the stripe at right is probably a resonant element of some sort that couples to the main loop and modifies its properties in a way that they hope will be advantageous. <S> The loop in the bottom left corner (shown below) will be a coupling loop that provides transformer action between the main loop and the load. <S> The main winding is 6 turns (it looks like 5+ but nature does not allow partial turns). <S> Coupling between the single turn loop (image extracted below) and the main loop gives a 6:1 voltage transformation and a 36:1 impedance transformation. <S> Use of an impedance transformer between a resonant circuit and a driver or receiver is common as it more easily allows high impedance high Q resonant circuits with relatively higher voltages. <S> Such designs must deal with distributed inductance and capacitance, affects on impedance of the interturn spacing and substrate material and much more. <S> Large amounts of experience, skill, time and some luck are usually involved in quite simple looking designs. <A> simply connecting points A and B and thus saving some metal <S> The amount of metal is definitely not the concern when it comes to routing traces on high frequency boards. <S> Trace length (relative to wavelength) is very important since it affects phase shift. <S> And loop area affects coupling. <S> You can't think of traces as conductors ideally connecting nodes on the circuit schematic. <S> They are antennas, delays, resonant microstrips, inductors. <S> A lot of RF theory goes into waveguide design.
The unconnected strip on the right is likely a reflector element, which doesn't receive any current from a direct connection but is electrically coupled with the rest of the patch to improve the radiation properties or the input impedance (these antennas are very sensitive to resonance ). The "tapping point" will be part of the black magic that Clabacchio refers to. Presumably the designers found it useful to do this.
How to make XBee sleep? Arduino Fio with XBee radio. I have read the XBee manual (pg. 24-25), trying to figure out how to put it to sleep, but what I tried did not work. Then I found an example sketch using XBee sleeping, and I have condensed the code into this: #include <avr/sleep.h>#define XBEE_sleepPin 6void setup() { Serial.begin(57600);}void xbeesleep() { Serial.println("sleep"); pinMode (XBEE_sleepPin,INPUT); // put XBee to sleep digitalWrite(XBEE_sleepPin,LOW); // Setting this pin to LOW turns off the pull up resistor, thus saving precious current}void xbeewake() { Serial.println("wake"); pinMode(XBEE_sleepPin,OUTPUT); // Set the "wake-up pin" to output digitalWrite(XBEE_sleepPin,LOW); // wake-up XBee delay(1000); //make sure that XBee is ready}int i = 0;void loop() { if (i==0) xbeewake(); else if (i==5) xbeesleep(); Serial.println(i); i = (i+1) % 10; delay(2000);} I have connected a wire from the digital port 6 to the DTR port on the Arduino, which I believe is connected directly to the DTR/SLEEP_RQ pin on the XBee. According to the manual, when sleeping the XBee should ignore all input via the serial connection. But it still transmits in the periods where it is supposed to sleep. Here is the output from the console monitor: wake01234sleep56789wake0 Any idea what is wrong with my setup? Or just advice how to make the XBee sleep? <Q> First of all you have to configure your XBee with atsm = 5 and <S> atdi7 = 0. <S> then is better to use one 10k resistor between pin 6 and dtr/ <S> sleep_rq <S> and finally when you want the XBee to sleep do not let the program to print the numbers from 5-10. <S> This is your code updated: <S> #include <avr/sleep.h>#define <S> XBEE_sleepPin 6void setup() { Serial.begin(9600);}void xbeesleep() { Serial.println("sleep"); delay (3000); pinMode (XBEE_sleepPin,OUTPUT); // put XBee to sleep0 digitalWrite(XBEE_sleepPin,HIGH); // <S> Setting this pin to LOW turns off the pull up resistor, thus saving precious current}void xbeewake() { Serial.println("wake"); pinMode(XBEE_sleepPin,OUTPUT); // <S> Set the "wake-up pin" to output digitalWrite(XBEE_sleepPin,LOW); // <S> wake-up <S> XBee <S> delay(1000) <S> ; //make sure that XBee is ready}int <S> i = <S> 0;void loop() { if (i==0) <S> { xbeewake(); } else <S> if (i==5) <S> { xbeesleep(); } if (i<5) { Serial.println(i); } <S> i = <S> (i+1) % 10; delay(3000);} <A> I have executed the following code on my Arduino Uno <S> #include <avr/sleep.h>#define XBEE_sleepPin 5void setup() {Serial.begin(9600);}void xbeesleep() {Serial.println("sleep"); delay (3000); pinMode (XBEE_sleepPin,OUTPUT); // <S> put XBee to sleep0digitalWrite(XBEE_sleepPin,HIGH); // <S> Setting this pin to LOW turns off the pull up resistor, thus saving precious current}void xbeewake() {Serial.println("wake"); pinMode(XBEE_sleepPin,OUTPUT) <S> ; // <S> Set the "wake-up pin" to outputdigitalWrite(XBEE_sleepPin,LOW); // wake-up XBeedelay(1000); //make sure that XBee is ready}int <S> i = <S> 0;void loop() {if (i==0){ xbeewake();}else <S> if (i==5){xbeesleep();}if (i<5){Serial.println(i);} i = (i+1) % 10; delay(3000);} <S> And It behaves as expected. <S> Note that if you are using Xbee Shield then you would have to change settings on your module. <S> All you have to do is open Xctu software and change the option D7 to Do Low[4]. <S> The reason why you have to change this option is that when xbee goes to sleep it turns CTS pin high, which in turn resets your arduino therefore your code is not being executed. <A>
Ticking the upload the latest firmware checkbox in x-ctu usual fixes the problem but you should ensure that all your xbees use the same firmware version.
My MOSFET operated solenoid circuit destroys my Arduino inputs I made a series of PCBs to power some solenoid valves that use an external power supply. I switch them with BS170 MOSFETs using an Arduino as gate signal.I based it a solution by Jason S . This is an illustration of what my circuit looks like: On testing the PCBs, I noticed that most of them work fine, but some of them don't. No problem, probably a soldering thing. However, those faulty ones did manage to destroy two Arduino digital pins!On one, I get a constant voltage of 5 V, and the other one outputs 0.2 V when I send a HIGH signal to it, and 0.5 V when I send a LOW signal. Strange stuff. So I guess the faulty circuits somehow caused (some of) the 16 V to flow through the Arduino, destroying them. How do I protect the Arduino in this scenario from too high current? I know about zener diodes , but I have no idea how to place them to protect the inputs. Technical information: 1/4" NPT Electric Solenoid Valve 12-Volt DC, 12VDC, N/C, RO, Air, Water BBTF BS170 (MOSFET ) datasheet <Q> Your valve is rated at 500mA at 12V. <S> If you supply 16V it will draw somewhat more than 500mA. <S> Assuming it is a resistance, it will draw <S> 667mA. <S> The absolute maximum current for the MOSFET you used is 500mA continuous. <S> Anything above absolute maximum ratings may destroy the device. <S> This is probably why you are seeing reliability problems. <S> There is no guaranteed failure mode for MOSFETs, so I'm not surprised that it would fail in such a way to damage the Arduino outputs. <S> As Jason mentioned in the linked answer, BS170 is a poor choice of MOSFET. <S> You need a better one. <S> Choose one in a TO-220 case that is rated at several amps. <S> You also need to make sure the Vgs is rated for 5V logic-level drive. <S> Which diode are you using? <A> The circuit is fine in theory. <S> Improvement in practice is required. <S> Adding a gate-source zener diode of say 12V (> Vgate_drive) is a very good idea indeed in all circuits with inductive load. <S> This stops the gate being driven destructively high by "Miller capacitance" coupling to the drain during unexpected or extreme variations in drain voltage. <S> Mount the zener close to the MOSFET. <S> Connect Anode to source and Cathode to gate so that the zener does not usually conduct. <S> The 10k gate drive resistor (as shown) is large and will cause slow turn off and on and more power dissipation in the MOSFET. <S> This is probably not a problem here. <S> The chosen MOSFET is very marginal in this application. <S> Far far far better MOSFETs available ex stock at Digikey include: For 26c/10 Digikey IRLML6346 <S> SOT23 pkg, 30V, 3.4A, 0.06 Ohm, Vgsth = 1.1V = gate threshold Voltage.. <S> NDT3055 <S> 48c/10 TO251 leaded 60V, 12A, <S> 0.1 Ohm <S> , Vgsth = 2V <S> RFD14N05 <S> 71c/10 <S> TO220 50V, 14A, <S> 0.1 Ohm, 2V Vgsth. <S> ADDED <S> SUITABLE MOSFETS FOR 3V GATE DRIVE: <S> System just trashed my longer answer : <S> -(.So - MOSFET MUST have Vth (threshold voltage) of no more than 2V to work properly with 3V3 supply controllers. <S> None of the suggested FETS meet this requirement. <S> They may work after a fashion on the present load but are underdriven and overly lossy and the solution does not extend well to larger loads. <S> It seems that IRF FETS in size range concerned that have Vth (of Vgsth) <S> <= 2 volts ALL have 4 digit numerical codes starting with 7 except IRF3708. <S> OK FETs include IRFxxxx where xxxx = <S> 3708 6607 <S> 7201 <S> 6321 7326 <S> 7342 <S> 7353 <S> 7403 7406 <S> 7416 7455 <S> 7463 7468 <S> 7470 <S> There will be others but all the ones suggested seem to have Vth = 4V or 5V and are marginal or worse in this application. <S> Vgsth or Vth needs to be at least one Volt less and ideally several volts less than actual gate drive voltage. <A> Your valve is rated for ~ <S> 500 mA. <S> A BS170 is rated for 500 mA too, but that is the sales-pitch figure. <S> I would use a (much) higher rated FET here, 500mA through a TO92 makes me nervous. <S> And you have a 1k gate resistor, which is a good idea in most cases, but it might cause the poor FET to switch too slowly to survive the 0.5A. <S> What diode are you using? <S> It must be rated for the 0.5A, so a 1n4148 won't do. <S> I am not sure, but it might actually get more than 0.5 because the moving part of the value might cause an even larger spike than a plain coil would. <S> In your picture you have the value return current flowing past the Arduino ground connection. <S> I would cange that to a star: connect the arduino ground to directly to the power supply. <S> Or much better: use an optocouple to isolate the high-current circuit from the Arduino (and use two separate power supplies). <A> Since the solenoid power supply and the Arduino power supply are separate, this scenario could happen (unless you guarantee by design that the Arduino is always on first.) <S> Is the MOSFET actually so far from the solenoid? <S> If so, it should be moved much closer. <S> Move it so that the drain directly plugs into the protoboard strip where the red wire goes to the solenoid and the diode. <S> Then make a short source connection to the GND strip. <S> It's better to have a longer gate signal loop (at low power) vs. a long loop that carries power. <S> You could move the Arduino closer to the solenoid as well, keeping all those loops short. <A> The circuit as illustrated looks fine, provided the only ground connection between the Arduino board and the negative terminal of the +16 supply is the short blue wire. <S> On the other hand, it's possible that accidental shorts could cause bad things to happen. <S> It's hard to guess exactly what might have happened without seeing how the actual problematic boards were laid out. <S> If you are pushing the specs of your MOSFET, it could easily fail in such a way as to sent +16 out the gate, but if the resistors are as illustrated I would expect the Arduino should be pretty well protected. <A> First of all, you need ultrafast switching diodes not these cheap 2n4001-4 diodes, when using motors or coils. <S> The faster the switching, the greater BEMF is created. <S> Also use a 914 switching diode to the mosfet gate from the arduino, and a 10k pull/down resister from gate to ground.
You should have a gate-source resistor on your MOSFET so that the gate cannot float up if the Arduino output is high-impedance.
How to call AT command on XBee from Arduino I am trying to set the SM (sleep mode) register on the XBee radio. These registers can be set with so called AT Commands, listed from pg. 28 in the XBee/XBee Pro Product Manual. This can be done using the X-CTU desktop application, either by typing the AT commands in the built-in terminal or by editing the values in a list and then click "Write". But is it possible to modify these registers on the fly from a sketch running on the Fio? <Q> Make sure you are sending the necessary characters first with the required timing. <S> The default is + <S> ++ <S> After Xbee replies "OK" you can send your AT commands. <S> As Swanand said don't forget the 0x0D <S> at the end <A> First of all, I never ever used an Arduino in my life <S> but I have worked on XBee. <S> Yes, you can configure an XBee module on the fly. <S> XBee accepts AT Commands. <S> So the same commands you send from X-CTU are valid if you connect XBee to microcontroller serial port which is configured properly (in most cases, 9600 baud 8-N-1) and write over it. <S> Put your command in an array [AT] and write that array to serial port. <S> You are done! <S> Note: All AT Commands are in ASCII and don't forget to add carriage return at the end (0x0D.) <A> There you go. <S> void setup() { // <S> Open serial connection to the xbee specifying the baud rate. <S> Serial.begin(9600); // Define AT commands to rewrite the config once at startup // <S> + <S> ++ <S> -> Enters the AT mode // <S> ATWR - <S> > Saves the changes, ATAC doesn't work. <S> // <S> ATCN - <S> > <S> Exits AT mode <S> // <S> See http://widi.lecturer.pens.ac.id/Praktikum/Praktikum%20Mikro/XBee_ZB_ZigBee_AT_Commands.pdf <S> const char <S> *atcmds[] = { <S> " <S> + <S> ++", "ATNI Node_03\r", "ATWR\r", " <S> ATCN\r"}; // Write the commands to the xbee for(int <S> i = 0 <S> ; i < sizeof(atcmds)/sizeof(atcmds[0]); i++){ Serial.print(atcmds[i]); delay(1020); }}
Yes you can modify this on the fly.
How to read the current program from an Arduino? I acquired an Arduino PCB with an ATmega2560 , already programmed with the Arduino bootloader and some program. I do have the sketch , but before fiddling with it, I'd like to backup the current binary that is in the controller. As most Arduinos, it's connected to the PC using an USB-to-serial converter connected to TX0 and RX0 and there is no ISP interface. Apparently there is code for reading in the Arduino bootloader , but I have no idea which tool to use to access it as there is no menu item in the Arduino IDE. What software do I need to read the program from the Arduino? <Q> I've dumped a memory from Duemillenova with ATMega328P with the following command: avrdude -C <S> avrdude.conf <S> -v -v <S> -v -v <S> -p <S> atmega328p -c <S> stk500 -U flash: <S> r:"c:/arduino.hex":r -P\\.\COM2 -b57600 <A> Does the Backup AVR with avrdude thread answer your question? <S> Basically you can read all memory from an AVR as long as the protection fuse isn't set. <S> This is the setup I use for ATtiny's and ATmega's. <S> On the board shown: 11 = <S> MOSI <S> 12 = <S> MISO 13 <S> = <S> SCLK <S> Refer to the datasheet of the controller which exact pin to use. <S> There are quite a few websites on Internet writing about programming AVR's using an Arduino, eg. <S> : http://hlt.media.mit.edu/?p=1229 <A> As far as I can see form the Arduino bootloader source code <S> , there's no way to 'dump' all memory from it. <S> The bootloader does support a 'monitor' mode which allows you to dump one memory byte at a time. <S> However, as per the source code comments "/ <S> * monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */" <S> As such, I guess you're out of luck if you don't want to use ISP, <S> change the bootloader or upload a sketch to do it. <A> I thought there was a menu option for that <S> but I'm not finding it right now. <S> If you have an ISP programmer, you can use AVR Studio to Read the memory image off the chip and save it off in a HEX file, that would allow you to restore it through the same means. <S> Edit <S> In response to your comment - that's easy! <S> You need to assimilate two diagrams worth of information to pull it off. <S> The first is the Arduino / ATMega2560 Pin Mapping. <S> The second is the ISP Header / AVR Pin Mapping: Armed with these two pictures, you should be able to see how to wire it up. <S> Run a wire from DIG50 to Dragon ISP header <S> pin 1 <S> Run a wire from VCC to Dragon ISP header <S> pin 2 <S> Run <S> a wire from DIG52 to Dragon ISP header <S> pin 3 <S> Run <S> a wire from DIG51 to Dragon ISP header <S> pin 4 <S> Run a wire from RESET to Dragon ISP header <S> pin 5 <S> Run a wire from GND to Dragon ISP header <S> pin 6 <S> With those in place, you should be able to use AVR Studio to read the Hex file off the chip - let me know if you need more guidance. <A> The Arduino bootloader is a variant of the original STK500 protocol (1.x) . <S> The character 't' (ASCII 0x74) is the "Read Page" command. <S> But at best I reckon it will take some fancy timing to pull it off.
So perhaps it is possible to pull the program out through the serial port via the bootloader using AVRDUDE ...
Arduino in car: capacitor for extra 3 sec of power I want to install an Arduino Uno in a car, powered by a consumer 12V->5V car voltage regulator plugged into the lighter socket. The socket is switched, i.e, there's no power when the motor's off. When I turn off the engine I'd like to keep the Uno powered for extra ~3 secs. Can I use a capacitor in parallel to the Uno to get the extra 3 secs of power once the motor's off? How would i determine the capacitance? Should the cap be placed before the volt. regulator (i.e. directly on car's 12V) or after volt. regulation (on the regulated 5V)? Would I need some diodes to go with it? I don't want to put the Uno on the car's unswitched circuit, because it seems wasteful to run the Uno 24/7 off the battery just so it can be used for extra 3 secs when the motor's off. Thanks. <Q> Use the battery's 12V directly instead. <S> The capacitor's value will depend on the Arduino's power consumption. <S> The Arduino webpage doesn't say what the Uno consumes, so you can't say right away what capacitor value it needs. <S> In any case it's not designed for low power. <S> I checked the datasheet for the voltage regulator , and that alone already uses 6mA. On the schematic <S> I can see two microntrollers: <S> an ATMega16U2 running at 16MHz, and an AtMega328P , also at 16MHz. <S> The former may consume up to 21mA, the latter says 9mA at 8MHz, so it's safe to say 18mA at 16MHz. <S> We already have 45mA, let's round it to 50mA for the other components. <S> If a capacitor is discharged at a constant current, then \$ \Delta V = \dfrac{I <S> \cdot <S> t}{C} <S> \$ <S> You start at 12V, and the Arduino needs a minimum of 7V, <S> so \$\Delta V\$ = 5V <S> , I was 50mA and t = 3s. <S> Then \$ <S> C = <S> \dfrac{I <S> \cdot <S> t}{\Delta V} = <S> \dfrac{50mA <S> \cdot 3s}{5V} = <S> 30 <S> 000\mu <S> F \$ <S> That's the minimum, I would pick a 47 000\$\mu\$F/25V capacitor. <S> Add detection for power off, so that you can switch off all unnecessary outputs which also may consume current, a relay for instance. <S> A 50mV drop means 50mA consumption. <S> Also add a TVS (Transient Voltage Suppressor) at the Arduino's power input; a car's 12V is extremely dirty. <S> Add the diode <S> clabacchio mentions. <S> A series resistor of 10\$\Omega\$/5W will charge the capacitor in 1.5s when applying power. <A> An alternative to using a capacitor is to connect to the permanent supply but to use a timer to power down or disconnect after a suitable delay. <S> The circuit can be arranged to repower the Arduino via the switched circuit when power is next switched on. <S> Current drain when off can be essentially zero. <S> When power is switched on supply to the Arduino can be from switched or permanent supply as required. <S> As Clabacchio notes, if a capacitor is used, the holdup time = <S> t = <S> C x V <S> / <S> I or C <S> = <S> t <S> x I / V where t = holdup time. <S> V = allowed drop in Volts and C = capacitance in Farads. <S> eg for 3 seconds, 50 mA, <S> 5 Volt allow droop C = <S> t <S> x I / V = 3 x 0.05 / 5 = 0.03F <S> = 30 mF = <S> 30,000 uF. <A> 3 seconds at - <S> let's say - 25 mA is 75 mC (Q=I*t) <S> , that at 12 V are stored in a 6.25 mF capacitor. <S> $$ <S> \left <S> ( C = \dfrac{Q}{V} \right) <S> $$ <S> The problem is that the voltage will decrease linearly if you drain a constant current, and below a certain voltage your Arduino will turn off. <S> If you put the capacitor before the voltage regulator it will store more charge for the same capacity value, and - more important - the regulator will allow a wider voltage range, so you'll be able to use better the capacitor. <S> Since the Arduino accepts 7-12 V supply, you have a 5 V range to have the capacitor discharge. <S> Again, 75 mC over 5 V means 15 mF, so with a 20 mF capacitor you should be able to keep it alive. <S> Note: <S> I don't know what your Arduino should do, so <S> the power that it will consume; size your capacitor accordingly. <S> About how to connect it, I'd suggest a resistor and a diode in the lighter socket side, to prevent too fast charge of the capacitor and to avoid its discharge towards the lighter socket. <S> So, summarizing, if I is the average current absorbed by your Arduino, 7-12 V is its supply voltage range <S> , the minimum capacitor size you need will be approximately: $$ C = <S> \frac{Q}{\Delta V} = <S> \frac{I <S> \cdot t}{\Delta V} = <S> \frac{I <S> \cdot 3s}{12V-7V} = <S> \frac{3s}{5V}I <S> $$
You can use a capacitor, but you need quite a big one depending on how much your Arduino consumes. Don't use the 12V\$\rightarrow\$5V regulator, the Arduino needs at least 7V in. If you want to know exact what the power consumption is, add a 1\$\Omega\$ resistor in series with the power supply and measure the voltage drop.
Looking for a mechanism similiar to a watch's stem in rotary encoder type form The watches stem can be pulled out at two different levels to provide two sets of adjustments of the date and time. Is there something like that in the form of a potentiometer or rotary encoder? <Q> An example of one like this. <S> Note that I think some rotary encoder classify the outputs of the rotary encoder themselves as push/pull <S> , so this may confuse searching. <S> As stevenh comments, you may want three levels - free spinning, time at first level and then date. <S> I have one seen a potentiometer on an piece of sound equipment with this functionality, although the neutral position was in the middle, with the in/out being spring return. <A> I've never seen this kind of part before, but it is certainly possible to make (or print if you have access to FDM). <S> It basically amounts to mounting two pots concentrically with their shafts facing each other. <S> Place a gear (beveled or not) on each shaft. <S> Then your knob has a shaft with a gear on it of compatible pitch. <S> Pull out <S> and it engages one, push in and it engages the other. <S> And users will not pull it off. <S> I'd recommend beveled to facilitate the engagement point, and there are probably way nicer ways to deal with this interface. <S> Another option that's possibly better is to use a friction plate interface (simple rubber might work for you). <S> Then you have no engagement usability issues and the user can smoothly spin one pot or the other. <S> Use springs to set a bias so it's normally in the middle, or engaging one of the pots. <A> I don't know what the mechanical device would be. <S> I can imagine you would have to make your own, but as far as a nice IC to help you would be a magnetic contactless rotary encoder. <S> The AS5030 is one of such ICs.
Yes - many oscilloscopes and other pieces of test equipment have rotary encoders with push/pull switches on them.
Interfacing static ram to fpga I while ago I asked this question about interfacing static ram to an fpga for the purposes of a vga frame buffer I wanted to make as a little hobby project. It became clear to me at the time that the project was too difficult for my level of knowledge (as I'm basically a c++ programmer and knew little about electronics) but since then I've built a few smaller cpld based projects so now feel I know enough to look at the project I want to build again :) I'm thinking of using this memory chip as it seems to fit my requirements. The data sheet indicates that I can read a data byte every 10ns and that I have to set up the address a minimum 10ns before I want to read the data. It has a "Data Hold from Address Change" time of 3ns. This implies to me that assuming a 10ns clock I can simply set the address lines each clock cycle, and read back the data from the previous address. That the data output will be valid at or before the next 10ns clock, and will remain valid for at least 3ns after I change the address , so it's safe to read it. Is this a reasonable thing to so (setting the address at the same time as I read back the data from the previous address). From looking at the data sheet it seems so. This is the fastest it would work, I could also use a slower clock if pushing the timing to the limit like this was a problem, I just wanted to understand if I'd understood the data sheet correctly. <Q> I assume you're looking at "Read Cycle No. 1". <S> Now you have to worry about the FPGA side, which has its own setup/hold times and delays. <S> If you have enough frequency headroom on the FPGA you don't need to worry much about this beyond basic timing constraints; the tools will abstract things away to some extent. <S> But eventually you will find something that needs to be micromanaged, so it helps to start thinking about these issues now. <S> I suggest completing the HDL side of your project (read those timing reports) before finalizing your hardware design. <S> Operating an external 100 MHz interface on budget FPGA families is probably going to require some care. <S> You can start low and slow, though, like a few tens of MHz, before really getting your feet wet. <A> Regarding simulations, building your own SRAM model would be a useful learning experience <S> - timing checks can be simulated as described in this link <S> Alternatively, the Hamburg VHDL archive has some models of SRAMs which might be useful and/or instructive. <S> Once you have built your test bench and got it working on your HDL code, you can also generate a post-PAR netlist and use that in the testbench. <S> This model will have some actual delays modelled (and timing requirements), which will give you some confidence that you are getting something useful at the end. <A> You seem to understand the SRAM side pretty well, so I won't touch on that. <S> Coming from CPLDs, which don't have many flip flops, you may not be familiar with pipelining. <S> Essentially, it is the act of inserting flip flops into the logic path in order to reduce the cycle time. <S> Considering that your FPGA will be sucking down 800 MB/s, you will almost certainly need to pipeline your design in order to achieve timing closure. <S> Consider calculating 2x+1. <S> This is two operations, a multiply and an add. <S> If you try to do both operations in a single clock cycle, it might take 20 ns (value pulled out of thin air for convenience) for the signal to work its way through both the multiplier and the adder. <S> However, if you pipelined it so the multiply happens in one stage and gets fed to a flip flop, and then the add happens in a second stage, then you can reduce your clock period to 10ns, since it only takes 10ns for the signal to propagate from one flip flop to the next. <S> I would recommend starting WAY slower, if you have 10ns access time <S> then I would begin with something much safer, like 100ns accesses. <S> Just make sure that you can read and write a bit pattern to RAM and then echo that pattern out to a scope. <S> Once you know you can read and write to the RAM correctly, then you start adding your pipeline stages, while still keeping the 100ns accesses. <S> This step is just to make sure that the data is propagating through the pipeline correctly, as it's very easy to be off by one stage. <S> Your goal here is to add enough stages that the timing report indicates a 10ns clock cycle is feasible ("achieving timing closure" in the parlance). <S> Once you get enough stages in the pipeline and they are working correctly, then ramp your clock speed up.
Yes, that's the correct interpretation of the datasheet.
ARM Cortex (M3-M4): manufacturer and development IDE I would like to do some MCU programming this summer and I've already had some unfortunate experiences with the STM32F4 DISCOVERY board, particularly the fact that it came without any (free) software which would allow unlimited use (more than the 16KB or 32KB from both Keil and IAR). Currently I'm also planning on buying a few ATTiny and ATMegas for smaller projets, as well as an ISP programmer and a JTAG debugger. That would point me towards Atmel as far as costs & IDE are concerned. I read a piece of this other discussion: ARM Cortex-M3 development tools? and I've seen that I tried something that had been pointed out there. I used the CodeSourcery toolchain as well. Under GNU/Linux the only library that worked (for me) was Chibios . I setup Eclipse with the gnuarm plugin. Maybe I just didn't do it the right way (or maybe I didn't understand correctly what it is for). Also uploading the code (4KB) took like 5 minutes. It wasn't that bad, but debugging was very far from stable (lots of error messages that I should analyze as soon as I have time: for now that's a secondary problem). I'd liked to try out Coocox but it didn't let me upload the code (I needed the hardware interface I suppose, their chap JTAG interface). The question is therefore: is there any manufacturer that actually supply a software free to use without limitations on lines of code or size of code ? For now I only found Atmel which now includes support for both ARM and AVR in their Atmel Studio 6 based on Visual Studio 2010. ST and NXP don't seem to offer any. TI seem to offer their CCStudio[Code Composer Studio] but it also has a limitations on the maximal size of code that can be produced. I'd have no problem in doing it in GNU/Linux (in fact I'd prefer to), but I would like it to be well supported under it. I'm wondering if the other manufacters offer something more: the ARM architecture in itself (Cortex M3/M4 or others) should be pretty much standard. What differentiate one MCU from another are the peripherals around it, if I understood correctly (and I'm hoping some manufacter other than Atmel is actually providing some software along, which is not code-size limited)? I'd be particularly interested in high speed ADCs (and MCU's frequency as well), but I've seen on some catalogues that it doesn't change that much from one manufacturer to another. Just a curiosity: if I want to send data from MCU to PC using serial communication (for instance, USB), does the MCU have to be VERY fast if I want to transfer data a full speed (say 480Mbit/s for instance needs what: 480MHz ?) ? I'm open to suggestions. Thank you very much in advance. <Q> It's based on a Cortex-M3 microcontrollers: NXP LPC1768 . <S> It has an online compiler/IDE. <S> Programming language: <S> C/C++ <S> As a downside, the microcontroller has a preprogrammed bootloader which takes up some space in the program memmory. <S> On the other side, you don't have to spend additional money to buy a programmer. <A> At the risk of sounding like a broken record... <S> PSoC5 is your answer! <S> (It's amazing how many times PSoC is the answer) <S> The PSoC5 MCU has an ARM Cortex M3 core, and a bunch of other brilliant features that practically no other MCU has. <S> Unlike other MCUs, setting up the peripherals is as fun as eating ice cream, and you can even create your own in Verilog! <S> The IDE is pretty good, and totally free. <S> It's not too expensive. <A> Not sure why Maple dev boards are not that popular but they are very easy to use: LeafLabs <S> They pack an ARM Cortex-M3 running at 72MHz with many I/O and peripherals. <S> Best of all, they are compatible with the Arduino IDE which makes them very easy to program. <S> There is no limitation that I know of other than what the microcontroller itself is limited to. <S> LeafLabs has ported the open source Arduino IDE such that it is specific to their dev boards. <S> You also have the option of NXP's mBed LPC1768 , as pointed out by m. <S> Alin. <S> It also has an ARM Cortex-M3 running at 96MHz. <S> I have used it before and it's quite powerful. <S> It has an online IDE and compiler on their website which means you have to be connected to the internet if you want to code it <S> and/or program the board. <S> NXP also provides a very useful API and lots of reference code. <A> Try EM::Blocks. <S> It is based on Code::Blocks and works great. <S> I had test code that they have on the EMB site up and running on STM32F4Disco boardin about 10 minutes including the instal <S> and I'm a complete bonehead. <S> There are no limits and has most of the features of Keil and supports all the currentSTM32Fxxx parts which CooCox doesn't. <S> Don't waste your time with Eclipse. <A> I used mBed for prototyping and emBlocks in case I need to dig further - e.g. add offset to flash memory in case <S> I make custom bootloader that will require my main program to be started at a certain offset. <S> I usually use STM32 Nucleo board which comes with STLink programmer to make quick prototypes. <S> emBlocks also have nice debugger that support my favourite debugger the Segger JLink. <S> Using mBed, moving from the nucleo board to custom board is a breeze, simply connect the SWD interface from the STM32 Nucleo board, remove all the jumpers, and you can drag and drop binary files from computer to your custom board via the STLink. <S> In case of mBlocks, you can use it programmer interface - it can detect the STLink.
A platform that has free compiler/IDE comes to mind: mBed platform . The Development Kit is great, and full of features and comes with the programmer, which you can use for your future projects.
Thoughts on Kickstarter project, USB Based Variable Power Supply For Small Projects I am new to electronics and am still just learning. I saw this project on Kickstarter for a small USB based DC power supply and was wondering what some of the more experienced people thought of it. I am considering buying two for experimentation/hacking at home. Is this a good idea or should I be considering an alternative product? Link to the Kickstarter project: http://www.kickstarter.com/projects/210251816/usb-based-variable-power-supply-for-small-projects-0 . UPDATE: It is closed and didn't meet funding but was relaunced here http://www.kickstarter.com/projects/210251816/usb-variable-power-supply-for-small-projects-relau . <Q> Here's my thoughts, and hopefully I'll be able to swing this back around to be design centric rather than shopping centric. <S> The whole USB thing really isn't interesting. <S> It uses USB for power only, so <S> basically USB is an over-glorified wall-wart. <S> Having the ability to power it off of a computer isn't a huge benefit compared to the voltage and current limitations it gives. <S> The voltage regulator is a linear regulator with a pot for adjusting the Vout. <S> Any halfway competent hobbyist could hack something together in 30 minutes. <S> 10 minutes for someone that is experienced. <S> They would also likely use a better heat-sink to the max power is higher. <S> And using some leftover wall-warts from "the box of orphaned wall-warts" makes this super cheap. <S> If you hacked something together using spare parts lying around then you might spend US$5 and it would work just as good. <S> The 7-segment display is a waste. <S> It is useful, sure, but there is so much more that could have been achieved with that micro-controller. <S> Here's how I would have designed that device to be much more useful: <S> Use a micro-controller with an actual USB interface. <S> Using a small app on the PC you could control the output voltage and monitor the output voltage and output current. <S> It could implement some sort of programmable overvoltage/current protection as well. <S> Controlling multiple vout's with sequencing or other simple "waveform generation" could be very useful. <S> The power supply itself would be a switching regulator based on a SEPIC topology. <S> This way the output could be either a higher or lower voltage than the input. <S> The output voltage/current is controlled from the micro-controller. <S> It is actually fairly easy to control the output voltage. <S> Output current is a little more difficult, but not impossible. <S> If a low-noise output is required then I would follow the SEPIC regulator with a programmable LDO regulator. <S> Again, the output voltage would be controlled by the micro-controller. <S> Usually the LCD output would be about 0.5v lower than the output of the SEPIC. <S> In this way efficiency is still mostly high, but the output noise would be very low. <S> Then I would design a similar device, but instead of a programmable supply it would be a programmable load. <S> USB controlled. <A> Without USB negotiation you can only draw 100mA from Vbus. <S> 500mA is only allowed after the device asks the host if its OK. <S> This design has no USB end point at all and no current limiting (except the regs internal limiter) <S> so it breaks specifications if it tries to draw > 100mA whenever it wants. <S> It also doesn't have detection for USB Charging Ports so it can draw full power whenever it wants from VBus rather than when it is safe to do so. <S> Additionally there is no inrush current limiter but a pretty substantial input capacitance. <S> Again the host better have ample protection. <S> In general this is a pretty dangerous device to use unless your really sure your host port has good solid current limiting. <S> I wouldn't plug this into an USB port I cared about continuing to work afterwards. <A> A good power supply will have its outputs isolated from mains ground. <S> This power supply does not, as far as I can tell. <S> A good power supply will go to +5V, because that was once the most commonly-used supply for digital circuits and is still popular. <S> This supply does not. <S> A good power supply will have an adjustable current limit, for powering things like LEDs, and for safely powering up new circuits for the first time. <S> This circuit does not have an adjustable current limit. <S> Also, $14000 for this design? <S> Any competent hobbyist could do better than this.
This is a bad and dangerous design.
Cheap PIC programmer, must be Linux compatible I'm comfortable with working on Arduino based projects, but I'm looking to start experimenting with PIC programming. How would I go about building my own pic programmer? I thought there must be a way to save money compared to something like this one I found online. <Q> Compared to AVRs, PICs have a variety of twisty little variations in programming algorithms and interfaces, which require careful study of each "programming interface" document. <S> Been there, done that (up to a limit). <S> Unless you are in it for the thrill I would not recommend it. <S> Get yourself a kit or a pre-built programmer. <S> I sell one, Olin sells a few, and there are the PICkit2 and PICkit3, and the various clones of these two. <S> Take your pic(k). <S> I would recommend a type that is at least capable of in-circuit programming. <S> Unless you are into selling programmed PICs, ex-circuit programming is almost useless. <A> Buy it, it's less than a tenner! <S> The parts alone will cost you more than that. <S> Plus the amount of time you spend trying to get it working will make you wish you'd bought it. <A> Why not use your Arduino as a PIC programmer? <S> http://arduino.cc/forum/index.php?topic=92929.0 <S> https://sourceforge.net/p/ardpicprog/home/Home/ <A> If you happen to have a serial or parallel port on your computer, you can use PicPgm . <S> It supports several really simple programmers, and can program nearly all Pics (up to PIC32). <S> I built a TLVP (parallel port programmer using just a HC573) recently to program a '2550 - worked without problems. <S> I used it once to program a PIC16F876, but had no success with the '2550 mentioned above. <S> So these programmers can be build very cheap, but if you only have a USB port, you might want to go with the ebay one you found. <S> It doesn't get any cheaper than that. <A> I recommend the PicKit2 . <S> It's only $30 <S> and I've had great experiences with it on Windows. <S> It supports pretty much every major PIC you could think of <S> (in case you ever decide to move to a different part). <S> Though it's not formally supported on Linux (by Microchip) <S> it looks like it works fine <S> and you can download the GUI from the website here . <S> There's a newer version (PicKit3) but that one is more expensive and this one seems just as capable for what you describe you're doing. <S> You'll probably spend more than $30 of your time getting anything else to work.
The simples programmer I could find is the one from Lothar Stolz.
I2C extender or repeater? I am developing a dolly-pan-tilt system, where an Arduino is connected via I2C to three independent rotary encoders for positioning. Having read a few posts on this site and elsewhere, I am aware that I2C has a limitation regarding distance of the cables for correct signal transmission. My issues/questions are the following: SDA and SCL wires ought to be twisted, although some think they don't need to?I am thinking of using a twisted SDA/SCL for each function, dolly, pan and tilt movement, which sit very close to each other on a 24pole flat ribbon cable.So, twisting is probably adequate as well as an I2C repeater, as the distance between the Arduino controller for the dolly encoder is around 2.20m, the distance for the panning encoder is about 1.80m and the tilt encoder is closer with 0.60-0.70cm. However, I have seen mention of I2C repeaters as well as extenders: which one is better suited as they seem to both be doing the same? I2C extender: P82B715 I2C repeater: CPC5902G by Clare What is truly the difference and advantages between the two ICs?Also, I read somewhere, that the overall distance between the master and his I2C slaves ought to be considered, in my case: adding up the above mentioned distances 2.20m+1.80m+0.70m for all three movements, and not consider them independently towards the microcontroller; —is this valid? As unfortunately all three I2C cable pairs are right next to each other (distance between each line is 1.26mm) on the ribbon cable followed by the GND line, it can still get noisy as thereafter are the cables driving the DC motors +/- @ 12V and up to 2A.I did my calculations regarding wire capacitance concerning the ribbon cable AWG (28), based on this website and ended up with 38.51pF for 2.5m of cable. The datasheet of my encoders demands though to remain below 10pF, in order to ensure correct operation! <Q> Where did you get the idea that SDA and SCL lines should be twisted? <S> This is the second worst thing you can do to I2C communication next to cutting the wires. <S> With slow enough communication you probably won't even need repeater/extender on 2.5m. <S> Especially, if this a 5V system. <S> Just untwist those I2C lines. <S> If you have some spare lines on the ribbon cable try to put some GND lines in between I2C (non-twisted )pairs or even between SDA and SCL of same channel. <S> EDIT: there is a way where twisted-pair might come in handy for I2C. <S> It is where each of the two signals is transmitted differentialy (some kind of 4-wire I2C). <S> Driving I2C-bus signals over twisted pair cables with PCA9605 transmits SDA bidirectionally over a twisted pair of wires. <S> Sending I2C-bus signals via long communications cables with P82B96 or PCA9600 explains the advantages of transmitting SDA using a unidirectional "4-wire driving method". <A> Don't twist SDA and SCL together. <S> Do put a ground wire between motor supply and digital signals. <S> If possible, put the digital signals inside a shield. <S> You may need to run two cables in parallel -- one for digital signals and one for the motor. <S> Also make sure you are using separate digital and analog ground. <S> I2C is VERY sensitive to noise. <S> A repeater will not help, since it just makes the good signal stronger, without making the noise weaker. <S> If the noise is strong enough to cause false edges, it will also be strong enough for the repeater to detect edges and amplify them. <A> Having a long cable has two effects. <S> The first is additional capacitance on the bus. <S> The second is propagation delay. <S> As an example a CAT-5 cable adds about 18pF/ft of capacitance, and has a propagation delay of about 0.6ft <S> /ns. <S> Compared to other types of digital busses I2C is pretty slow. <S> The added capacitance of a few meters of cable is probably negligible given that Table-6 of the I2C specification <S> 3.0 says you can have as much as 400pF on each line SDA/SCL. <S> The propagation delays introduced by a few meters of cable is also probably negligible given that Table-6 of the I2C specification <S> 3.0 allows the rise times of the SDA/SCL signals to be up to 1us. <S> Overall you probably don't need to add a repeater. <S> You may be misreading your encoder datasheet. <S> 10pF is the maximum pin capacitance allowed for someone designing a chip that connects to the bus. <S> In your case since you are constructing the bus itself not a chip you probably just need to keep the total on each line under 400pF. <S> Twisting them together will capacitively couple them and cause cross-talk that will make your communications less reliable (meaning clock pulses showing up in your data and data bits in your clock). <S> You may however twist SDA and SCL each to their own separate ground wire if you wish. <S> This will improve noise immunity at the expense of a little extra bus capacitance.
Twisting is suitable for differential lines such as CAN or RS485/422. I certainly would not twist SDA and SCL together since they are completely separate digital signals, not a differential pair. Shielding SDA and SCL may also be helpful.
What happens if usage current exceeds DC adapter current rating? I have a DC adapter 5 V, 350 mA. I'm using this adapter to be fed into a 3.3 V regulator which powers up my bluetooth device and a few LEDs. My question is: what happens if I source 300 mA from this adapter or if I use all of 350mA or even exceed it? Will it run out of juice or will it get hot? <Q> Best-case scenario, the adapter has a foldback circuit, which causes it to drop the output voltage substantially and shut down your attached equipment. <S> This is unlikely unless you've specifically bought and paid for an adapter with this added feature. <S> Worst-case scenario, the adapter heats up until it catches fire and burns your house down. <S> Likely scenario, the adapter runs very hot and eventually fails, after years, months, or days, with or without damaging your attached load. <A> Most voltage regulators have a current limiter, so it probably will run out of juice. <S> Additional safety measures usually includes thermal protection, which either shuts down the output voltage completely, or further reduces output current. <S> kaputt <S> causing a short, worst case scenario a fire. <A> As long as the 3V3 regulator that you are using is rated to withstand the maximum voltage that the adaptor outputs then from no load up to any value <= <S> Iout_max <S> the adaptor itself should be very fine. <S> The 3V3 regulator will dissipate power of Power = <S> V <S> x I = <S> (Vin - 3v3) <S> x Iin. <S> If Vout is a steady 5 Volts then at 350 MA the regulator will dissipate (5V - 3.3V) <S> x <S> 0.35A <S> ~= 0.6 <S> Watts. <S> You need to ensure that there is enough heatsinking of the 3V3 regulator to handle the maximum dissipation experienced. <S> Modest heatsinking will usually be enough to handle that level of dissipation. <S> A phone charger may have constant current mode when overloaded. <S> An electronic supply, which is what you have, based on it being very light weight, will be regulated, so that Vout ~+ Vrated, across most of the load range. <S> At 0% to 100% of rated load it should run well. <S> If you load it very heavily it will dissipate up to all energy internally or about 5+V x 350 mA or say up to 2 Watt. <S> Most electronic supplies have overload protection and will progressively shut down if they get too hot. <S> In the worst realistic case , if very heavily overloaded, Vout will drop below nominal and you MAY be able to make it catch fire but most manufacturers try to not let that happen.
If the output is unregulated (rare nowadays) the transformer will get hot, and go
Cabling ideas for a moving sensor I'm looking for ideas on cabling a sensor that is undergoing cyclic motion in a way that will avoid fatigue failures in the cable. The sensor is an accelerometer mounted on a shaft that rotates through ~375 degrees and back at about 15-60 RPM. The shaft is around 100mm diameter. It might go through ~250,000 cycles in the sensor life. It's okay for the cable to fail if it goes through more than 375 degrees. What's the best type of cable to use so that the repetitive winding and unwinding won't cause failures? Bonus points if the solution is (a) cheap, and (b) avoids lots of slack cable flapping around. Alternatively, anyone with good ideas on how to accurately measure the motion of a church bellis welcome to put them forward. By "accurate" I mean better resolution than 0.5 degrees in the motion of the bell, bonus points for measuring angular acceleration directly. <Q> Use an FFC cable . <S> Arrange it in a spiral, with your accelerometer in the centre. <S> Alternatively, use a longer FFC, and arrange it like this if you want lots more rotation: <S> YouTube video of revolving cable chain. <S> This application uses cable chain, which is better, and can take whatever cables you want. <S> It's more expensive, but still affordable. <S> 2.4ft of chain is less than 20 GBP from RS . <S> You can arrange the chain in the spiral form as I have shown in my purple rendering. <S> If you're really strapped for cash, you may be able to get away with simply wrapping your cable around the axle a couple of times in a helix. <S> This spreads out the bending motion of the cable along the spiral length, so that no one part of the cable is bending much. <S> We do this in our robots where there's absolutely no room for any solutions involving cable chains. <S> And, while those robots don't usually do 250,000 cycles, we have never seen a cable fail in this situation. <A> you can even increase the radius of the shaft by using a flat pulley and mounting the strip to the perimeter of that. <S> None of the electronics has to move this way, and its simpler to decode the position. <S> Avago have some smt reflective quadrature encoders that are like 3-4$ that should be more than adequate. <S> Linear magnetic encoders are also possible. <A> It will prevent the copper of your wire to make sharp bends, which would cause them to break. <S> Cable conduits have a better longevity than copper. <S> Pay special attention to the connections of the conduits. <S> The cable should go straight into the conduit. <A> Answering your 'alternatively' question. <S> There are plenty of non-contact, high resolution rotary sensors around. <S> How about these magnetic, Hall effect based sensors from Renishaw ? <S> These consist of two parts: one is a simple magnet, which goes on the rotating part, at the end of the axle. <S> The other is the stationary part, which has all the wires. <S> They're a little bit expensive, but keep running just about forever. <S> Alternatively, you can buy just the electronics from inside, or just teh chip itself: These are pretty nice, and have a 13-bit resolution across 360º, giving a resolution of 0.044º.
Use a cable conduit . As the bearing ends are closed, why don't you wrap some linear encoder strip around the perimeter of the shaft, then use a fixed encoder to read it. As ThePhoton mentioned, you must use strain relief at each end of the cable, otherwise you're liable to get fatiguing there.
Ideas for tracking individuals in a building I apologize if this question is inappropriate for this forum, but I'm coming up short in my research. The problem is as follows: I would like to find a network of devices capable of tracking people moving between key areas of a building, and capable of integrating with a REST endpoint upon proximity triggers. E.g. when any person passes a wall-mounted reader within 5-10 feet, an http POST can be sent to a local server. I had envisioned being able to accomplish this task with RFID-tagged ID cards and large-proximity wall-mounted RFID readers with some kind of USB-ready software. However I was unable to find such a system with my google-fu. Does anyone have any experience in this general area, or have an interesting thought on a potential home-brew solution? I welcome any and all advice, thank you very much for your time! <Q> Systems such as this one use actual wrist worn transmitters with proximity constrained receivers located at various points in the building, typically at doors and elevators. <S> The receivers are configured to detect a wrist worn tag when it is within about 3 meters. <S> In your case a system like this could get expensive quite quickly (for a given value of 'expensive'...) since you'd want receivers in many places. <S> It might give you some ideas though. <S> There are several companies that make similar systems and target the same market. <S> None of these have quite what I would describe as a network back-end as you describe, but that's the easy part. <S> (Speaking as a software developer who has recently integrated one of these into something very much like this.) <S> The RFID badges that I'm familiar with need to be within about 10cm of a sensor to trigger it, and are expected to be used intentionally, i.e., to unlock a mag-lock and allow access to a room, etc. <S> My impression is that you'd like to track personnel movement without requiring the personnel to have to think about it. <A> What you are describing sounds a lot like what Radianse makes. <S> Check out the general system diagram . <S> The system basically consists of small battery-powered RFID tags, receivers at known fixed locations throughout the building, and software on a server that puts it all together and figures out what's where. <S> This is dumped into a database that applications query and can get real time notification from. <S> By the way, I designed the receiver shown in the middle of that picture and wrote firmware for some of the tags. <A> I am not aware of any commercial solutions, but this is a typical application for sensor networks. <S> One of the nice examples is TI Chronos [ http://processors.wiki.ti.com/index.php/EZ430-Chronos ], which is a kit consisting of wrist watch with programmable radio, and a USB transceiver to go with it. <S> In the simplest case, you'll program watch to transmit a beacon every few seconds (perhaps with with reduced power <S> -- default settings will give you ~100 feet indoors), and setup receivers everywhere. <S> You'll want to have small Linux boxes with ethernet port and USB port for each receiver to receive beacons and translate them to POST requests. <S> Alternatively, use peoples' existing computers (this worked great at university/lab, where we could just ask people to plug the receiver into their work PC). <S> If someone had lots of time to spare, she could use real sensor OS such as Contiki or TinyOS and setup a proper mesh. <S> This will significantly cut down on number of computers used -- the receivers would forward messages to a single "sink" node. <S> That would save on cost of small Linux boxes. <S> Alternatively, if one had hardware development experience, she could design receivers to hang from single RS485 bus. <S> Or make transmitters smaller -- there are lots of options with sensor networks. <A> Maybe it's not just the solution itself <S> but I find it quite hard to solve this with RFID. <S> I mean solve it in a cheap way. <S> The RFID readers that can read the tags from meters are really expensive <S> and I think an authentic solution would let the people just walk where they want and not require them to show their tags every step. <A>
If the building is relatively large, you could set up WiFi hotspots in different sections of the room, and assuming everyone carrys a smartphone, detecting the SSID of the router its connected to would give you a general idea of where everyone is.
How are RF signals amplified? So this may be a terribly stupid question but since my RF knowledge is fairly limited I'm asking it anyway. Let's say you have an AM signal that's 5Vp-p at some frequency. To amplify this can you simply scale up the voltage and send it to the same antenna? Also, are antenna's rated for a certain power input/output? I'll try to clear up my question somewhat. I am only asking in regard to transmission, assuming the system works at low power levels and all matching is at acceptable limits. <Q> An RF amplifier is similar in concept to an audio amplifier but built with components suitable for RF frequencies. <S> Because of the higher frequencies involved, the impedance levels of RF amplifiers are generally much lower than for audio amplifiers in order to avoid the effects of parasitic capacitors and inductors. <S> Often 50 ohms is chosen as a common impedance level. <S> Thus RF amplifiers are usually specified as providing a given output power level into 50 ohms. <S> RF antennas are designed to present a 50 ohm load at their input over their operating frequency band. <S> When you say " same antenna ", I assume you mean the use of one antenna for receiving and transmitting. <S> This is usually the case in mobile transmitters and requires some form of transmit/receive switching so that the transmitter signal does not get into the receiver. <S> Power is not a concern when the antenna is used for reception but it is important for transmission. <S> Because of the skin effect, in which high frequency currents tend to flow towards the outside of a conductor, high power antennas can be made out of tubing rather than solid material. <A> Interesting and very valid question. <S> If you have 5V signal source with zero internal resistance loaded to antenna seen as 50 \$\Omega\$ resistor, then you pass power of 0.5Watt. <S> Say if you double the voltage using transformer 1:2, the power will be 2Watt. <S> And so on. <S> In this case you do not need amplifier. <S> The practical problem is that the real signal source has non zero impedance. <S> Typically 50 \$\Omega\$. <S> So transformer 1:2 will make increase not in voltage terms but in impedance terms. <S> The load will see the change as the source is now 100\$\Omega\$ of internal resistance. <S> So original voltage was 10V in the unloaded 50\$\Omega\$ source to reach 5V on 50\$\Omega\$ load. <S> Same 10V with transformed 1:2 load will see 50\$\Omega\$ load as if it was 25\$\Omega\$ load without transformer. <S> The voltage will drop to 10*(25/75)=3.333. <S> So power will be 0.44.. <S> Watt instead of 0.5 watt. <S> The loss of power as "reflected back" loss is caused by impedance mismatch . <A> A HF antenna has a specific impedance, for instance 50 \$\Omega\$ or 75 \$\Omega\$. <S> That's important if you want optimal power output. <S> The amplifier has an impedance too, and you can prove that the antenna gets the highest power when both impedances are equal. <S> This graph shows the antenna power as a function of impedance for a 50 \$\Omega\$ output impedance amplifier. <S> You can see that the power output is indeed at a maximum for a 50 \$\Omega\$ antenna impedance.
The conductors used in the antenna must be sized to handle the transmitter power just like the conductors in an audio speaker must be sized to handle the output of an audio power amplifier.
The manufacturing and grading of families of microprocessors Intel produces families of seemingly similar microprocessors. For example, the Core i5-3320M (2.6 GHz, 3 MB cache), the Core i5-3360M (2.8 GHz, 3 MB cache), and the Core i7-3520M (2.9 GHz, 4 MB cache). Does (or likely would) Intel produce processors like these three on separate manufacturing lines; on the same manufacturing line, but in separate runs on different days; on the same line all in one, indiscriminate run, and only later -- at a test stage -- grade the processors, sort them by grade, and assign them model numbers accordingly; or in some other way I do not understand? All of these seem plausible to me except maybe option 1, but what seems plausible to me may have little to do with how a firm like Intel actually manufactures parts. Please feel free to construe the question broadly. I am most curious to learn the basics of how such manufacturing is organized in modern practice. UPDATE @Shantam gives a better word to use with the search engine: binning, rather than grading. Searching with @Shantam's word, one finds @nik's interesting comments three years ago on Superuser.com: Actually, manufacturers are a smart lot. They 'bin' their produces into different levels of failures. A partly failed cache in a processor instance could become the 'lesser cache, cheaper version' instead of going into the trash bin. Works quite well with the amount of failures seen in fabrication and the surface area of such memory modules (entire cores are 'wired down to sell the instance as a lower range processor -- the Phenom X3?). Nothing wrong in this, and the overclockers are happy to know such things. The overclocker angle goes this way, if a processor cannot run (heats up) beyond certain frequencies, it is binned to a lower freq target. You get a E6300 C2D (which an overclocker can push up to a higher one with better cooling and maybe good luck on the manufacturers strict 'binning' policies that might have erred towards the lower frequency bin. <Q> Most microprocessor manufacturing (along with countless other devices) undergo the process of binning: all similar products are made at once, and depending on their performance, are placed into "bins" (groups) of similarly performing products, and then packaged and sold accordingly. <S> You can tell when a processor is part of the same "line," by looking at the core codename, or if that is not specific enough, the features of the core (as mentioned by embedded.kyle, the i5 doesn't have hyperthreading, but the i7 does, even though both in question are "Sandy Bridge"). <S> Sometimes a higher-end processor that fails can still be sold as another. <S> An example I know first-hand is that the M0 steppings of the old Northwood-core Pentium 4's (130nm process) were actually failed Gallatin-core processors (which was the core for the P4 "Extreme Edition"). <S> Similarly, a lot of people had/have luck unlocking extra cores, caches and shader units on various CPUs and GPUs. <S> For example, it is quite common to be able to buy a mid-high range video card (take for example, the AMD Radeon 6850) and flash it with the BIOS of the higher-level card (the Radeon 6870, in this case) and gain the extra things that card has (some extra shader cores). <S> This also has to do with binning during the manufacturing process. <S> This sort of thing drives overclockers to take good note of the stepping, place of origin, and batch number of their processors. <S> When word gets out that certain batches of processors are overclocking better than their not-as-potent brethren ( same CPU, mind you, just made at a different time or place), they become more in demand. <S> If you're interested more, definitely search "CPU Binning," or read up at some forums. <S> I'm a member at www.overclockers.com, and the forum there is quite welcoming and has a wealth of past and current knowledge (along with an abundance of fantastic members). <A> The i5-3320M and the i5-3360M would probably fall under Option 3. <S> They are most likely being produced using the same die and testing determines the highest stable frequency that they will run at. <S> It's these minor manufacturing differences that can also explain why two identical setups that are being overclocked cannot achieve the same frequency. <S> Even the same model chip will have manufacturing differences from one lot to the next, and to a lesser extent, one chip to the next. <S> When you push the limits of the chip, these differences become more noticeable in that they affect the chip more. <S> For instance, I've read of a few people being able to run the same processor as I have stably at frequencies above 4.4GHz. <S> However, I, and most others that have tried, have trouble running anywhere above 4GHz. <S> Though there are also differences in cooling solutions and peripherals to take into consideration, all else being equal, I doubt I'd be able to attain 4.4GHz because of luck of the draw. <S> I didn't get a "perfect" chip. <S> If you hunt around on overclocker forums, you can read a lot more about this. <S> In terms of manufacturing processes in general, Option 3 is also how resistor tolerances are determined. <S> All 1KΩ resistors come off the same line. <S> They are then tested and packaged at 5%, 1%, and 0.1% tolerances depending on how they test. <S> The i7 is a different die and could fall under Option 1 or 2 though most likely Option 1 in order to keep up with demand and reduce costs. <S> Any time you have to shut down a line to change out a die, you're losing money. <S> For an outfit like Intel, it's cheaper to run separate lines. <A> Two example from an older era, but interesting in context: <S> The 80486SX was an 80486 with an intentionally destroyed FPU, probably salvage from 80486DX that had faulty coprocessors. <S> The 80487 was a complete 486DX, and mainboard circuitry disabled the 486SX completely when a 487 was plugged in. <S> Any classic 40 pin 8051 <S> (ROM/OTP) microcontroller can be (and likely has been, if there was overstock of 8051 with unwanted code loaded into it) perfectly sold as an 8031 - it behaves as an 8031 if you wire it up like an 8031. <S> This also applies to the 80C517/80C515 and to many chips in the 8096/80196 family.
In the case of Intel processors (AMD is similar), generally processors within the same line are manufactured together, and are binned according to their stable clock frequency. Minor variations in manufacturing process will lead to some chips not being able to run stably above a certain clock frequency.
Using car charger for small sealed-type lead-acid batteries I want to charge a couple of small (1Ah 12V) sealed-type lead-acid batteries. I have a Bosh KL 1204 car battery charger. The charger's nominal current is fixed at 2.3A, while on my batteries it is said "Initial charge current <= 0.39A. Is it possible that I use the said charger for the said batteries? If so, what are the steps to modify the charger to suit the batteries? <Q> Is it possible that I use the said charger for the said batteries? <S> No, the car chargers current will likely damage your battery. <S> If so, what are the steps to modify the charger to suit the batteries? <S> In theory, a resistor or incandescent light bulb in series to the battery could work. <S> I however suggest charging the battery by connecting it to a constant voltage (13.8 volts for a 12 V battery). <S> A bench power supply then can limit the charging current to 0.4A. <S> This method is obviously simple but comes with a price: It is slower than other methods and can decrease the batteries capacity over time. <S> But I really like it because you don't have to worry about overcharging the battery. <A> $ <S> $ \mathrm{2.3 A > 0.39 <S> A} $$ End of story. <S> Whereas other rechargeable batteries most often use a fixed current, lead cell batteries are charged with a fixed voltage, combined with a current limiter. <S> Usually current limit is 1/10 of the battery's capacity (/h), so a 1 Ah battery is charged at 100 mA maximum. <S> You can use the charger if you place a 100 mA current limiter in series with it. <A> If you can find an internally limited regulator limited at a lower current, that would be even better. <A> I have used a simple method for a number of years,Connect a 2.2 Watt (12Volt) dash board type lamp in series with the battery on a 12 Volt charger,The light limits the current and indicates what is going on. <A> I want to charge a couple of small (1Ah 12V) sealed-type lead-acid batteries. <S> I have a Bosh KL 1204 car battery charger. <S> The charger's nominal current is fixed at 2.3A, while on my batteries it is said "Initial charge current <= <S> 0.39A. <S> As your charger was designed for a car 12V battery, it has same voltage parameters for your tiny 12V battery. <S> You will need to adapt & check a few steps: <S> Limit inrush current to I< 0.39A . <S> If you use a 12V x 5W lamp as current limit resistor, it has the advantage of being a non-linear resistor and maximum current will be even better controlled than using a conventional (Ohmic) power resistor. <S> Check <S> if “final” battery voltage is < 14.4V. <S> This is important, as your battery charger would be expecting a much larger battery and there is a non-negligible possibility that it’s “idle current” would not be voltage-limited to 14.4V. <S> If it goes above 14.4V, then do NOT use your charger. <S> Check <S> if charging voltage is reduced after a given time at V </= <S> 14.4V. Check and annotate voltages (and currents) periodically along first charging cycle, then estimate charged accumulated energy (V x I x time_interval). <S> Most probably, if your charger detects a lower current to charge up to absorption voltage of 14.4V, it would terminate this absorption mode/stage and enter a floating mode with reduced final voltage of 13.8V , a safer voltage to leave your small battery connected and unattended. <S> If not reaching this lower voltage , then you now know that you should not leave the battery being connected to the charger for longer than the time necessary to archive 40% more than your rated capacity; in your case, 1.4AH. <A> As many members here have explained in depth about the charging process I’m not going to re explain it again. <S> But to say in simple terms don’t use the charger you have. <S> It will destroy the batteries in no time. <S> I have had made this mistake in the past. <S> It’s a matter of time before the lead plates breakdown and settle to bottom on battery case causing a short to occur. <S> If you see the leaflet <S> that’s comes with the small lead acid battery <S> you will see the manufacturers say that you should charge at C/10 regularly and for an occasional fast charge C/4. <S> In your case C/10 would be (1000mAh/10=100mA charging current) is the recommended one. <S> Btw 1Ah=1000mAh. <S> If you want some good life out of it you might want to stick with this rate. <S> Get a 12V charger with this rating or even a cheap bench top power supply (you can easily find on eBay) <S> can get the job done. <S> But I think you will have a hard time finding a charger below 500mA or 1000mA at 12V.
So most probably YES you can charge using this charger if and only if you limit the charging current to the battery. The easiest thing would probably be to use something like a LM317 because of it being cheap and its quite low maximum current.
Understanding of Relays and associated circuitry I needed a simple understanding of how this circuit works. I understand everything about this circuit apart from the diode. I also know the function of the diode is to protect the transistor but from what exactly? Is it something to do with back EMF from the coil? I'm not too sure. Also I needed to confirm if the relay will function correctly with a 9V supply (regulated or unregulated). The datasheet of the relay is attached here and the part I'm going to use is '40.61' on page 20 of the datasheet. Also any tips for making this circuit work more efficiently. Note I am going to use the relay for no more than 16A at 230VAC at 50Hz. Thanks <Q> The defining characteristic of coils (or more precisely, inductance ) is that they prevent the current from changing fast. <S> When you rapidly close the transistor, the coil will increase the voltage across itself as much as it is necessary to ensure that the current continues flowing. <S> Without the diode, the voltage generated by the coil would be high enough to destroy the transistor. <S> With the diode, only the voltage drop across the diode would be generated (0.7V to 1V usually) by the coil. <A> First the diode. <S> An inductor resists to changes in current. <S> So if you switch off the transistor the relay coil will try to keep the current flowing, it becomes a current source. <S> If there would be a low resistance path that would only create a low voltage, according to Ohm's Law. <S> But if there's no way out for the current the voltage will rise to several tens of volts, and destroy the transistor. <S> The diode provides a low resistance path where the current is drained to the positive power supply. <S> BTW, a Schottky diode is a better choice here. <S> R1 and Q1 look OK. <S> The BC546B has an \$\mathrm{H_{FE}}\$ of 200 minimum, and with a 5V input you have 1 mA base current, so the 200 mA collector current is more than sufficient. <A> Voltage difference between terminals of coil when current is changing is defined as:U= <S> L*di <S> /dt <S> If the the rate of current change is high, you will have a very large voltage spikes that will sooner or later "fry" your transistor. <S> Reverse biased diode is used to clamp these voltage spikes so that you transistor is safe <S> and you don't have to use transistor with high voltage ratings. <S> As an added protection I would add small value resistor between coil of relay and transistor. <A> This is a subtle difference from what I'm reading in the other answers as voltage spikes. <S> Given my lab and field experience, I would lean more towards the purpose of preventing voltage spikes with the intent of preserving the transistor.
I remember from technician school that diodes are often placed on the coil of a relay or solenoid to prevent "bounce", which in the class, implied the coil might throw more than once when switched on.
UART & USART - What's the difference In the office I hear these terms thrown around as if they are the same. My understanding is that USARTs can deliver the clock signal along with the data. Are there any other differences? What are the advantages and disadvantages of each? <Q> UART = <S> Universal Asynchronous Receiver Transmitter <S> USART = <S> Universal Synchronous Asynchronous Receiver Transmitter <S> A USART can act in Asynchronous mode just like a UART. <S> But is has the added capability of acting Synchronously. <S> This means that the data is clocked. <S> The clock is either recovered from the data itself or sent as an external signal. <S> The data is regular and bits synchronize with the clock signal. <S> No start and stop bits are used. <S> This allows for a higher baud rate when operating synchronously because bit timings have a certain guarantee and more bits can be used for data instead of as headers. <S> Whereas a UART has an internal clock signal and data on the bus can have somewhat sloppier and aregular timing. <A> That's it, synchronous communication is clocked, while asynchronous is self-timed. <S> The asynchronous UART's main disadvantages: transmitter and receiver have to be set to or agree on a common bit-rate. <S> timing must be accurate to at least a few %. <S> Microcontrollers require a crystal based or calibrated RC clock. <S> Synchronous communication doesn't have these disadvantages, and doesn't need a fixed clock frequency. <S> I2C for instance, allows a slave to slow down the clock if it's too fast, by stretching the master's clock pulse. <S> Main disadvantages: uses a separate line for the clock clock pulses <S> are shorter than a bit time, so the required bandwidth is wider than with NRZ UART. <A> UART - UART requires only data signal. <S> In UART, the data does not have to be transmitted at a fixed rate. <S> In UART, data is normally transmitted one byte at a time. <S> In UART, data transfer speed is set around specific values like 4800, 9600, 38400 bps ,etc. <S> UART speed is limited around 115200 bps. <S> Full duplex. <S> USART - <S> In USART, Synchronous mode requires both data and a clock. <S> In USART’s synchronous mode, the data is transmitted at a fixed rate. <S> In USART, Synchronous data is normally transmitted in the form of blocks <S> Synchronous mode allows for a higher DTR (data transfer rate) than asynchronous mode does, if all other factors are held constant.. <S> USART is faster than 115kb. <S> Half duplex. <S> For more details please refer to the following link :- http://www.firmcodes.com/difference-uart-usart/
UARTs require start and stop bits and Asynchronous data is only synchronized with the start and stop bits.
Can a capacitor be used for overvoltage protection? I'm replacing the capacitor for a start motor that had previously burnt up. I'm new at this. I previously referenced the following questions about replacing caps with higher ratings than spec'd: High Voltage Capacitor, in a low voltage system? Can I swap an electrolytic capacitor with one with a higher voltage? selecting voltage rate for capacitors The general consensus from the answers above, is that it's best to run a bit higher, typically 1/3-2/3 over. My motor's cap is spec'd at 250vac. I'll be running 120vac, where my motor is spec'd at. I can only find 440vac's readily available. My question is, with LARGE voltage differences above a spec'd capacitor/equipment rating, is there not risk of damaging equipment not rated for those potential maximum overages? For instance, a 440vac cap may let 400vac by, whereas a 250vac cap would in theory have already failed. In essence, do capacitors act as potential fuses during surges and should one take this into consideration when trying to protect equipment behind them? <Q> Capacitors may fail open, short, or somewhere in between; unpredictability makes for poor protection. <S> And I've personally seen overvoltaged caps emit flames. <S> You should spec all your components such that its voltage rating is at least the highest voltage you expect them to ever see, plus some safety margin. <S> If its unexpected voltage spikes you're concerned about, you can use more capacitance on a DC link to limit the voltage rise, or MOVs on an AC line connection. <A> A capacitor is not a fuse. <S> Unlike a fuse it is undocumented how a capacitor fails. <S> What I mean to say is:- when a fuse fails, it breaks the circuit and the circuit it safe.- <S> when a capacitor fails, it may either break the circuit or short it. <S> To prevent a capacitor from failing you shouldn't exceed its rating. <S> If the voltage applied is lower than the rated voltage, then you don't have to worry. <S> Higher voltage rating is always better, but it increases price too. <S> In your case a 440 \$V_{AC}\$ capacitor will do just fine. <S> A 250 \$V_{AC}\$ capacitor would do just as wall at a lower price. <A> In essence, do capacitors act as potential fuses during surges and should one take this into consideration when trying to protect equipment behind them? <S> That's a novel question and a reasonable one. <S> I don't think that I've heard it asked before. <S> While it is conceivable that a capacitor could be used in that way, it would be such a "soft" protection system that it would be liable to be of very little use. <S> Devices which are intended to provide protection are very well developed and usually reasonably well priced for what they do. <S> Fuses have exceedingly well defined current-time characteristics when used as intended. <S> Contactors, circuit breakers, earth leak / residual current devices all are generally designed and built to good tolerances. <S> Zeners are some what "soft kneed" but this is accepted as part of the overall low cost. <S> MOVs varistors Tranzorbs gas-discharge tubes and the like stand in the noise spike gap with well defined accuracy and capability. <S> Polyfuses are a very blunt and poorly defined tool but still serve a valuable role. <S> Lightning fast (literally if needed) clamps and interrupters are available, crowbars are as fast as you want to pay for. <S> Capacitors in power equipment are usually not a low cost part and already form part of a larger provide protection system by surge and spike suppressing and blocking and removing noise and sometimes providing a clamp that each a current trip may work against. <S> Given all this it is better to let custom designed parts with guaranteed performance meet this requirement in a close to optimal manner, leaving the capacitors to also do their intended job well. <S> FWIW - <S> my advice re electrolytic caps in large DC systems <S> is that they last best when run very close to their maximum rated voltage. <S> Unlike eg tantalum caps, they are highly resistance to occasional modest over voltage exposure. <A> There are fused capacitors that incorporate an internal fuse so that the fail mode for a short circuit is known to be open. <S> These are typically used in aerospace applications where failure mode analysis is serious business. <S> But I've never seen one at the ratings you require.
Relying on a capacitor to fail in an overvoltage condition in order to protect some other equipment is a bad design practice. As the other answers have mentioned, capacitors can fail in a multitude of ways.
How do I identify which point is Live and which point is Neutral of a 2-pin plug? I have a 2-pin plug that was not label which is Live and which is Neutral. I do not want to damage the electrical device and was wondering what should I do in order to test and find which point is Live and which point is Neutral? The 2-pin plug look something like the following: <Q> A plug doesn't have polarity, it completely depends on the wiring of the socket. <S> It has a neon light inside which connects via a high resistance to the contact at the end. <S> If you try it on the neutral it won't light because the neutral is at the same potential as ground. <S> edit <S> Well, that's how the classical tester works. <S> Cybergibbons points out that this one is probably a non-contact tester (because it doesn't go deep enough in the socket?). <S> Anyway, those detect the electrical field emitted by the phase's voltage. <S> They're battery operated to power the LED. <A> Assuming a US standard electrical system, polarized plugs/sockets have two different sizes in the plug blades. <S> The neutral blade is the larger blade and the hot/live blade is narrower. <S> If it is live, you'll measure the line voltage. <S> If it is the neutral, you should not measure any voltage. <S> Note that these voltages can easily be deadly if you are not using proper measurement techniques. <S> You can significantly reduce risk, by turning off the circuit you want to measure with a breaker, connecting your meter (set to the proper scale) and then closing the breaker. <S> Read the meter without touching anything and then open the breaker to remove the meter probes. <S> Youtube video showing usage of electrical circuit testers <A> The picture shows a european plug. <S> The two pins are the same and it does not matter which way round it is used. <S> If it did matter then there would be a third pin or socket to provide polarisation.
You can test it by measuring the voltage between the terminal in question and an earth ground using a voltmeter or voltage tester. To check the socket all you need is this two dollar tester: If you insert in in the live pin and touch the metal dingus on the back of the tester, there will flow a very small, safe, leakage current to ground which is enough to light the neon light.
clock signals in computers and machines Why do computers have clock signals and clock rate, while ordinary machines do not have them? And why is clock so fundamental in CPU and mainboard? <Q> "Time is what keeps things from happening all at once." <S> - John Wheeler (1911-2008) You don't want to run things unorganized. <S> Everything in a microcontroller happens consecutively, in discrete steps. <S> Getting a byte from RAM to a register: put address on address bus. <S> Tick. <S> Assert RD line. <S> Tick. <S> Latch data from databus into register. <S> Tick. <S> If you would do this all at the same time, you would latch the data before the RAM had time to put it on the bus. <S> This kind of limitations occur all the time, and they are the limiting factor for a controller's performance. <S> Note that some mechanical systems use a mechanism with a similar function: <S> A watch's escapement also ensures that things happen timely, and even in an analog clock, in discrete steps. <S> (Personally I count the escapement, along with the zipper and the wood screw, to some of the Truly Great Inventions.) <A> Very Short and Inadequate Answer: <S> The clock signal is fundamental because it allows for both signal coordination between circuits and for synchronized machine state changes. <S> Read up on Digital Circuits. <A> Most machines require that some types of operations happen in some particular sequence. <S> A gear train, for example, requires that each gear move in such a fashion as to make room for an approaching tooth, before that approaching tooth arrives. <S> In many cases, such as with the gears, the part of a machine which requires certain events to happen in a particular sequence will be very tightly coupled to the part which enforces that sequence (e.g. the proper interleaving of one gear's tooth with another gear's groove will be enforced by the adjacent teeth, which are of course rigidly attached). <S> The easiest way to satisfy all of the above requirements is to design parts so that they will function reliably if run at some particular speed, and then run them at that speed. <S> It's helpful to think of a computer as an assembly line. <S> The number of products produced per hour will be set by the rate at which they conveyor moves products from one station to the next. <S> Using a conveyor whose speed is the same throughout a factory will ensure that no workstation will have product arrive before there is space available. <S> Increasing the speed of the conveyor will increase the rate at which products are produced, provided that each worker is able to complete his part of the production in time. <S> If the conveyor is sped up too much, however, workers may sometimes fail to complete their tasks properly, thus creating product defects. <S> Note that if one particular step in the process takes longer than two other adjacent steps elsewhere in the production, it may be helpful to either split the longer step into two steps (which would require more workers, but allow increased production), or join the shorter adjacent steps into one (which would not increase production, but would reduce the number of workers required to achieve it).
What makes computers different from other machines are the facts that (1) there are a lot more parts that have to be synchronized than is typical of most machines, (2) the maximum speed at which parts of a computer can be driven is faster than the maximum speed at which they will function reliably, and (3) it is often desirable to run computers at the maximum speed where they will function reliably.
How do I debug a Arduino Uno with gdb on a Linux pc? How do I debug (source code single step) a Arduino Uno with gdb on a Linux pc?Please note that I do not like to use AVR Studio in wine or VirtualBox. Question 1: Physical connection How and what do I connect to the Uno board? My guess is that since the Uno board is populated with a ATmega328, single step source code should be available?I also guess that I can use either a AVR JTAGICE mkII or a AVR Dragon over the ICSP header? Question 2: GDB server Then I noticed that there is some projects like AVaRICE that seems to provide a jtag to gdb function, but there may be other projects? Question 3: Where is the elf? And if I get it up and running, where does the Arduino IDE hide the generated output like the elf file with debug symbols (there should be one)? Or do I need to generate a classic Makefile that just uses the Ardino libs? I tried to find some info on what/how to use, but I have only found those clues that told me what I could do. Can someone push me in the right direction? <Q> You can find the compiler artifacts by holding down the shift key when clicking the compile button in older version of the IDE (read < 1.0). <S> In newer versions (read >= 1.0) <S> there's an option under the preferences dialog for displaying verbose output during compilation (see screenshot). <S> With verbose output the folder where all the compiler outputs end up is printed (repeatedly) in the console. <S> That should get you started at least. <S> On a side note, there was all sorts of chatter on this subject on Arduino developers list earlier in June 2012 <S> and somebody posted an announcement to the Arduino developers list on an improved / integrated way of GDB debugging for Arduino, but I haven't investigated it much further. <S> I guess the project is called VisualMicro (?). <S> It looks like it's been built as a Visual Studio plugin <S> so might not be helpful to you in a linux environment, and it's in beta on top of that, but I'll let you decide. <A> You can use it by its own (requires you to write a small console application for your particular hardware configuration) or from within Simutron GUI environment , where you can define your hardware configuration via schematic capture. <S> Note: with these tools you don't have a physical connection as all hardware is simulated. <A> This is answered in a linux journal article referenced in a similar question: Jtag debugging AVR . <S> Basically, using avr-gdb and simulavr in tandem, you can run your software on a choice of AVR microcontrollers through the simulator, while using GDB to step through and observe the executing code. <S> Hope this helps!
Simavr AVR processor simulator now provides a good GDB server for AVR firmvare debugging, including Arduino.
How to tell polarity expected of a DC barrel jack? I'm sure this information is somewhere around the internet, but I can't find it. I have a device that takes a DC barrel jack. I don't know the polarity it expects though. There is a marking though. It looks like this: ___--- 12VDC I'm 99% sure it's a symbol to indicate the polarity, but which is it? Positive inside or positive outside? <Q> Unless there is a figure like below, or some wording like "positive centre" then you can't tell. <S> or: A supply can use positive or negative centre, as Olin says there is no standard. <S> This is why you get the polarity switches on many of the universal DC supplies. <A> The solid line is meant to show ground and the dashed line 12 V DC in your case. <S> Usually these then go to a symbol that shows one being connected to the outside ring and the other to the center. <S> Much of the time though nothing tells you. <S> There is no standard, so the only way to know for shure the polarity of a power supply is to measure it. <A> Use a multimeter on ohms measurement. <S> The negative terminal of the barrel connector will be shorted to ground plane on the PCB, or the chassis, and when you connect one test lead to the negative terminal of the barrel connector and the other to chassis/PCB ground, the multimeter will read 0 ohms. <S> If you can't open the case and there is a battery compartment, you can place your test leads across the negative battery terminal and the barrel socket. <A> Open up the device trace some circuit board traces and look for clues. <S> For instance: polarity of electrolytic capacitors, or wiring of three-terminal voltage regulators, or the direction of diodes (but you have to understand the circuit for that one: sometimes diodes are reverse biased on purpose). <S> If you see a diode which is connected squarely between the power rails, then it is reverse biased. <S> The stripe end (cathode) of the diode is then on the positive rail. <S> It provides a bypass path for incorrect polarity. <S> Then you can check for continuity between the tip or ring of the power connector and that pin, either with your multimeter, or by tracing the board and wiring. <S> There may be additional clues inside the device, like silk-screen markings on the circuit board such as VCC, GND, or other polarity indications. <S> The circuit board might have an obvious ground plane, whose continuity can be traced to the connector.
If there is any integrated circuit which is clearly marked, and you can find the data sheet, then you can determine which of its pins is ground. I suggest checking the polarity of the barrel conector before you overload your device & it blows up.
How do I make a transistor turn on at a certain voltage? I have made the following circuit: When power is applied, C1 charges up and the LED lights up. When power is disconnected, the LED gradually dims. It turns off when C1 reaches around 1.5V. I'm trying to get another LED to turn on when the first LED turns off. So basically, I want a circuit to turn on when the capacitor has below 1.5V: I am using a SS9014 Transistor (it says something else on the diagram). I'm not too familiar with reading transistor data sheets, so I have no idea of the conditions that make a transistor turn off. Is it a certain voltage or is it a certain amperage that makes it turn on? If it's a certain amperage, then I could just adjust R2 to make LED2 turn on when C1 is under 1.5V right? What is that amperage? If it's not amperage that makes Q1 turn on, then it must be voltage. I assume the voltage is less than 1.5V because 1.5V can turn it on. What are my options in this situation? Is there a way (or possible a 4000 series IC?) to reduce the 1.5V from C1 to the minimum voltage that makes the base turn on Q1? If so what is that voltage? Sorry if my question is confusing. Feel free to ask questions in a comment. <Q> With bipolar transistors it's the current that controls the transistor, not voltage (though there is a minimal voltage). <S> So, increasing the base resistor (R2) will make the transistor turn on at higher voltage than 1.5V). <S> If you want the LED to turn on when the voltage is below 1.5V * <S> that is, invert what it is now) <S> then you can do it like this: <S> Now when the transistor turns on, it shorts out the LED so the LED goes dark. <S> When the base current drops below a certain level, the transistor will turn off and the LED will turn on. <S> You may have to find a suitable value for R1 so that the LED turns off completely when you want it to turn off. <S> The power supply voltage (5V in my circuit) does not really matter, as long as R2 is suitable for the LED. <A> As I understand it you want to go one LED brighter as the other goes dimmer. <S> I would use the following circuit : <S> The top part (Q1, D1, D2 and R1) are a constant current source. <S> The diodes create a 1.4 V difference, 0.7 V per diode. <S> The transistor's emitter-base junction also acts like a diode, and therefore also drops 0.7 V. <S> Then the other 0.7 V from D1 is across R1, so according to Ohm's Law the current through it should be 0.7 V / 35 \$\Omega\$ = <S> 20 mA. <S> That's the sum of the current through the LEDs. <S> The resistor will turn a voltage difference into a current, again Ohm's Law. <S> So by driving the CTRL input with a voltage that will create a base current, which will cause a current through LED D3. <S> As D3's current increases D4's current will decrease, because the sum of the currents is constant. <S> Remember that the base-emitter junction has a 0.7 V voltage drop. <S> CTRL has to go higher than that before there will be any current. <S> Above 0.7 V the current will change linearly with the control voltage. <A> You could use something like this: Your requirement of having one LED on while the other is off is achieved by Q5. <S> This transistor inverts the signal coming from Q2's collector, so either Q3 or Q4 are on. <S> Looking at this part (Q3, Q5, Q4) only, you could also turn the whole thing upside down, using NPN transistors. <S> The reason I chose PNPs was that I have signal coming from a Schmitt-Trigger (around Q1, Q2) that is referred to VCC, and Q3, Q5, Q4 being also referred to VCC, this is just right for PNPs. <S> Using a supply of 5V, this circuit turns on when IN reaches ca. 4 V <S> and it turns off when IN goes below ca. 1 V. <S> The resistors around Q1 and Q2 determine these levels. <S> If you don't need a Schmitt trigger or somewhat precise levels, you can omit Q1 and Q2 and start at the node at Q2's collector. <S> Notes: C1 will load the input quite heavily. <S> Omit or use a smaller value. <S> R17 and R18 are only required when you use the signals at Q3's and Q4's collectors as an input for more logic East of this diagram. <S> Enjoy simulating it (or even better: breadboarding it) and play with the values unit <S> it does what you need. <S> Exact transistor or LED types don't matter, pretty much anything will work.
A transistor is current controlled, but that's not always handy, and therefore we will often make it voltage controlled by adding a resistor to the base.
What condition may cause the plug or the power adapter to become very warm or hot? I know that using a power adapter for very long hours (probably more than 24 hours) can cause the plug of a power adapter (or even the power adapter itself) very warm or hot. However, I am interested to know what other situation(s) can cause the plug and/or its power adapter to become very warm or hot? (and would appreciate if answer can include on how to prevent or solve the situation) <Q> An equivalent formula for Olin's is Power = <S> Voltage \$\times\$ <S> Current and <S> Energy = Power \$\times\$ <S> Time <S> All substances have a heat capacity, which indicates how much temperature rises if you add a certain amount of energy it. <S> For instance, if you dissipate 10 W during 1 second temperature may rise by 1°C. <S> Another second and it rises by another degree. <S> So you would think temperature will keep rising as long as you use the adapter, but fortunately that's not true, as you also have experienced. <S> That's because as heat is added there's also some heat lost to the environment. <S> The higher the temperature difference between the adapter and the surrounding air, the more heat it will lose. <S> So with rising temperature finally you will reach an equilibrium where the amount of dissipated energy equals the amount of lost energy, and then temperature won't rise anymore. <S> So, this equilibrium depends on temperature difference. <S> If your adapter will go to 50°C in a 20°C room, it will go to 60°C in a 30°C room. <S> It needs the same difference to get rid of the same amount of energy. <S> In normal conditions you should be safe, but the adapter will no doubt fail quickly when used in a 85°C sauna. <S> That's the reason sauna's normally don't have electronics (I haven't seen any so far); they use the good old hourglass as timer. <A> Long term use doesn't cause the heat. <S> This heat simply comes from the current thru it <S> times its little bit of inevitable series resistance. <S> The exact forumulat is:  Watt = <S> Amps² <S> * <S> Ohms <S> For example, if you are running 10 A thru a adapter plug and it has a series resistance of 25 mΩ, then it will dissipate 2.5 W. <S> You will definitely notice that getting warm. <S> Whether that is a safety hazard depends on whether it can get rid of 2.5 W of heat without getting so hot as to catch fire. <S> The best way to determine that is to look at its rating. <S> Don't let more current run thru it than it is rated to handle. <A> When your plug or adapter becomes too hot, it is in an overload condition. <S> Then, some seconds or, at most, a few minutes will be enough to set it on fire. <S> Your adapter or plug will have reached its thermal steady-state after something like 15...30 minutes, given it is not connected to a load that changes its behavior after this amount of time. <S> If it is still within its limits after this time, it will remain fine even after days or months. <S> (cf. <S> thermal capacity)
The designers of these adapters know that they will get hot, and have accounted for a certain environment temperature at maximum power.
Why do temperature-voltage curves of all thermocouple types pass through the origin? Notice that the temperature in the graph is in °C, not even in °K. 0°C is the border between temperatures of water and ice under 1 atm pressure. Why do thermocouples give 0V voltage at a temperature of 0°C? Is there any relationship between water and thermocouples, are the thermocouples designed to behave like this, or is this just a coincidence? <Q> The temperature on the X axis is the temperature difference between the two thermocouple junctions. <S> That's not the absolute temperature. <S> If both junctions are at 0 <S> o C, the thermocouple voltage would be 0V. <S> If both junctions are at 100 o C, the thermocouple voltage would be 0V still. <A> The voltage in a thermocouple is a function of the difference between the temperature of the "hot" and "cold" parts of the thermocouple. <S> If there is no temperature difference then there is no voltage. <S> See Wikipedia about thermocouple for details. <S> That is why that in order to have absolute readings one needs to employ "cold-junction compensation". <A> The thermocouple voltage is from the difference in temperature between the sense junction and a reference junction; the reference junction always exists and may be the connection of the thermocouple wires to your voltmeter; note that brass, copper, plating materials all form additional intermediate junctions that cancel if they are at a uniform temperature. <S> Omega Engineering website has great reference documentation on thermocouples that explains all about reference and intermediate junctions. <S> http://www.omega.com/techref/ <S> There are many temperature compensation methods. <S> One is to put the reference junction in ice slush, a stable and known reference point. <S> Another is to produce a voltage to compensate for the actual junction temperature so that the measured voltage will be the "table temperature" with no offsets. <S> Another method is to use an above-ambient and stabilized junction temperature in which case a fixed offset can be used to compensate. <S> While this may all sound complicated, thermocouples are frequently used for extreme temperatures, and the accurate measuring or stabilization of a reference junction can be done with lower temperature electronic methods. <A> All the previous answers say that the voltage from a thermocouple is a function of the temperature difference between the hot and cold junctions. <S> This is a somewhat crude approximation, and is not entirely true. <S> For example, if the hot junction is at 100°C and the cold junction is at 0°C, the voltage will not be exactly the same as if the hot junction is at 200° <S> C and the cold junction is at 100°C. <S> For a type K thermocouple, the former will be 4.096mV and the latter 4.042mV. <S> The difference may appear to be small (about a 1% error), but it's not negligible in many cases. <S> By convention , thermocouple voltages are given with a cold junction temperature of 0°C (because it is easy to create a constant accurate temperature of 0°C/32°F with an ice bath). <S> Now, the voltage from a thermocouple with both ends at 0°C must be 0uV (should be obvious from thermodynamics/conservation of energy), so the graphs will always pass through 0 <S> (when 0 is selected as the cold-junction temperature!). <S> Graphs made with °F usually pass through 32, sometimes 75°F.
Thermocouple tables are based on the reference junction being at 0C (ice-point reference, a convention) so that is why the sense junction temperatures in these tables are all 0V at 0C.
How to interface a pH probe? I want to interface a pH probe. The Op-Amp I would like to use is INA128 . My ADC's range is 0 to 5 volts. pH sensor gives a voltage output that is ranged from -0.5 to 0.5 volts, for 0 pH to 14 pH respectively. Perhaps, I need to give an offset of about 2 volts to Op-Amp and set its gain to 2. If I do that, will negative voltages be substracted from 2 volts? <Q> Like miceuz says, what sets a pH sensor apart is its high impedance, which calls for a FET opamp or instrumentation amplifier for minimum error due to input bias current. <S> Next to the parts miceuz already mentioned I would add: <S> LMC6041 : the lowest cost opamp listed at Digikey with input bias current less than 10 fA <S> (2 fA typical). <S> INA116 : <S> the only InAmp listed by Digikey with an input bias current less than 10 fA <S> (3 fA typical, 2 mV offset maximum). <A> As far as I know, you need opamps with super low input bias current to interface pH probe. <S> This one has it at 10 nA, that's rather too big. <S> I was able to build one by using opamp with input bias current in femto-amperes range. <S> You are right about offsetting voltage. <S> AD549 is a good candidate <S> LMC6001 <S> -- I have based my design on this <A> I just came across this after going through my parts <S> bin looking for high impedance opamps. <S> It is possible to get away with a TL081I (30 pA <S> I believe). <S> However, response times are weak <S> so I imagine I'm on the edge of working. <S> I tried it with a 10 nA opamp and it didn't work at all. <S> The lower the better though, and instrumentation amps in general may or may not work. <S> For instance an AD622 didn't work for me <S> but it still has an input bias in the nA range.
I'd go by finding an opamp which has pH probe interfacing as typical application and implementing the given circuit.
Is ARM a microprocessor or microcontroller? I have been having a hard time trying to know if ARM is a microprocessor or microcontroller or something else? <Q> Neither. <S> ARM is a CPU architecture (more accurate, a family of related CPU architectures). <S> If you put that CPU (or anyother) CPU on a chip all by itself, you have a microprocessor (like they did in the age-old Acorn machines). <S> If you combine it with ROM (Flash), RAM and peripherals on one chip, you have a microcontroller (example: LPC2148). <S> Things can get a bit muddy when you combine the CPU with ROM and RAM, but also provide the data, address and control lines on the pins, so external memory can be added. <S> Such a chip is can be used either in microcontroller mode, or in microprocessor mode. <S> (example: LPC2478) <S> Nowadays smaller systems (up to 0.5Mb <S> Flash, a few 10's Kb RAM) are available as microcontroller. <S> Larger systems (typically running a Linux or something similar) are typically composed of a microprocessor with external RAM. <S> (ROM can be external too, or a small boot-rom on chip + an SD card or similar). <S> Examples: <S> The Raspberry Pi and other small Linux boards, the ESP8266, or open up any mobile phone, set-top box, modem/router, etc. <S> Funny note: <S> microcontrollers tend to be short on RAM, hence the run from Flash, which often limits their speed. <S> Microprocessors often have plenty RAM, have a slower Flash, from which the code and data is loaded into RAM for execution. <S> Nowadays (2015) <S> the term ARM is increasingly confusing, because it can refer to the company that makes the ARM designs, or to one of the designs. <S> (The ARM company itself does not make chips, it licenses its designs to chip makers.) <S> The recent Cortex 'family' of designs is sufficiently different from the old ARM designs that I prefer not to call it 'ARM'. <A> Technically, ARM is a microprocessor, or, more specifically, a microprocessor architecture. <S> The thing to understand, though, is that it doesn't represent a physical microprocessor, but the design that allows to build one. <S> ARM Holdings is a multinational semiconductor group that doesn't manufacture any CPU; instead, they design them and then sell the architecture under licensing. <S> The designs are used to build microprocessors as well as microcontrollers, but what ARM provides is just the core. <S> It's also wrong to say that it's a microcontroller, because it's the manufacturer that takes the ARM core and build all the peripherals around it. <A> Neither (and both) ARM is a company who license CPU cores. <S> The ARM core can be, and is, used by lots of companies to make both microcontrollers and microprocessors. <A> ARM is based on CPU architecture <S> so we generally call it has microprocessor when placed on a chip if ARM is combined with memories (RAM and ROM) on a single chip we can call it <S> has micro-controller <S> it has limited memory <S> but when coming to microprocessor RAM and ROM are connected externally speed will be more.
ARM is core for both microprocessor and micro-controller.
What could be causing this sine on 7810 output when powering BLDC fan? I'm powering a 12 V computer fan with a simple 7810 circuit shown here: When the fan is connected to the regulator, on the output I get this wave: When I zoom out in time, I get something that looks like this: For those who can't be bothered to click on the image, the distance between the peaks is almost 10 ms. When I zoom out a bit more, I can see that there is another wave here riding on top of those peaks like this: The higher top peaks have peak voltage of 13.4 V and the lower peaks are 12 V. The peaks on the bottom side which go together with 12 V peaks are 8.8 V and the bottom peaks of 13.4 V top peaks are 8.6 V. So any ideas what could be causing this? UPDATE Here's the input waveform with the output peaks: The input peaks are 10 ms apart and are in phase with AC line transitions, as expected since the AC frequency here is 50 Hz. The input is coming from a diode bridge rectifier. The input voltage is a bit high since I changed the original 1N4007 diodes with STPS2H100 Schottky diodes because I initially believed that one of the input diodes developed a short. I can't determine the exact relationship between the input and output wave. When I trigger by one of the waves, the other is flowing from left to right on the screen. <Q> This all looks perfectly normal and should be expected. <S> As the motor is commutating, the load it presents to a constant voltage changes suddenly. <S> The regulator can't change its output current quite that suddenly, so for a short time the voltage is out of regulation. <S> Then the regulator catches up and the output voltage goes back to being nicely regulated. <S> Again, this is all to be expected. <S> If you are just driving a motor, there is no problem here except perhaps for using a linear regulator to supply the motor voltage in the first place. <S> That is going to waste a lot of power as heat in the regulator. <S> Wasting the power may not be a big deal, but dealing with the heat often is. <S> The only problem is if you are trying to use this 10 V for something else where that ripple matters. <S> The first way to attack that is to use a larger output cap on the regulator. <S> 100 nF is very small, especially for something with high current transients. <S> Nowadays there is no point using something that small. <S> My minimum would be 1 µF unless the regulator would not be stable with that (in which case using a different regulator is probably a good solution). <S> Just because this regulator is specified to be stable with 100 nF minimum, it doesn't mean that's a good idea. <S> A better solution all around might be to drive the motor from the higher input voltage and use PWM to make the apparent average motor voltage what you want. <S> Beyond a few 100 Hz, the motor won't know the difference. <S> Some motors make audible whine at the PWM frequency, so often 25-30 kHz is used since it is just above the human hearing range. <A> About your update. <S> The two signals are totally unrelated. <S> It just happens that the fan's noise seems to repeat at about 100 Hz, so giving about 1 pulse per half mains period. <S> That they're unrelated can be seen from the fact that triggering on one signal, the other one won't remain in sync. <S> The speed at which the second signal moves across the screen is determined by the frequency difference between both signals. <S> It should be obvious that the fan's noise can't be in sync with the mains, since it's powered by a DC power supply which ideally has removed all reference to the 100 Hz at its input. <A> Spikes caused by sudden transients applied to ceramic capacitors can destroy electronic devices such as LDO regulators. <S> As several people have noted, some types of ceramic material exhibit piezoelectric effects which cause both audible responses and voltage spikes. <S> Assurances that all is well in the garden will be true in many cases, but not all. <S> A "filter" capacitor mounted near an LDO regulator is in an ideal position to be damaged by this effect due to short connection distances. <S> Some modern LDO's have very limited Vinmax ratings - perhaps 6V max for a 3V3 LDO). <S> Real world destruction has been observed in such cases. <S> Here is an extremely good tutorial on the characteristics of ceramic capacitors , the differences between the 4 EIA classes and the tradeoffs involved. <S> Note that very high capacitance ceramic caps, which are most likely to be used in power supply input applications, are the types most liable to cause problems due to piezoelectric induced spikes. <S> This comment by Kemet <S> PIEZOELECTRIC EFFECTS CERAMIC CHIP CAPACITORS (Singing Capacitors) is also extremely worth reading.
A ceramic capacitor that is excited by a sharp edge / rapid transition can produce voltage spikes which are high enough amplitude to destroy nearby circuitry. Look up the load transient response spec for the regulator.
Is it technically possible to divert a lightning into a moving vehicle as in "Back to the Future" movie? In "Back to the Future" movie the characters try to power the time machine installed into a car by diverting a lighting. They know that a lightning should strike the clock installed on a specific building at a specific moment of time. For the time travel to happen they need a huge jolt of energy and the car moving at 88 miles per hour. So they attach a thick wire (looks like a thick steel cable) to the clock and position that wire above the road at the height slightly greater than the height of the car, install a conductive rod onto the car and somehow connect that rod to the time machine. They drive the car to the wire so that the lightning strikes exactly at the same moment when the rod on the car touches the wire and so the lightning energy goes into the rod and into the time machine in the car. I always wondered whether this is practically possible (time travel aside of course). I expect the following two problems: for the whole thing to function the rod has to touch the wire at exactly the right moment and the electric discharge happens at about the speed of light which is damn fast TM , so precise enough timing can't be achieved without a computer but in the movie the car is being driven by one of the characters when the lightning strikes the clock and runs down the wire it will likely ionize the surrounding air and discharge into the ground underneath the wire before reaching the road The first problem can be solved by using a computer to drive the car. The second problem can perhaps be solved by insulating the wire everywhere except above the road. Neither seems to have been done in the movie. Are there any other problems in that electrical setup? Can it technically work? <Q> I have frequently considered what it would take to get lightning on-demand, though my application was to create a weird formation you see in sand when it is struck by lightning - called Fulgurite . <S> The way I've always figured that I'd do it would be to use a couple thousand feet of fine wire on a fast-payout spool, connected to a very good ground at one end. <S> You attach the other end of the spool to a model rocket with a BIG engine and when you have your thunderstorm, you simply launch several thousand feet of wire into the thunderhead. <S> You'd probably be much better off using a helium baloon, but a rocket is so much cooler. <S> The wire wouldn't have to be very thick. <S> Any wire is going to conduct better than air, which ionizes and becomes a better conductor in the first microseconds of a lightning strike. <S> I always figured that thin wire is a better conductor than any human that's ever been struck, so it should work - at least as far as getting the strike. <S> But you'd probably be doing this in a dozen thunderstorms before it ever worked. <S> Forget about getting split-second timing. <S> 88 miles per hour is about 130 feet per second. <S> In the movie they had at best - what - about 3 feet of slop? <S> That's + <S> - .01 seconds of error? <S> How were they supposed to know to that degree of accuracy when the clock tower was hit? <S> Was the pendulum fused by the hit at some exact, measurable angle that gave them the time of the strike to within a hundredth of a second... AND they happened to print that information on the brochure? =] <A> Yes it surely is. <S> People divert lightning all the time using fine wires dragged up into the sky, as user30997 suggested. <S> The Doc already knew approximately when the tower was going to be hit, so all he had to do was to give the lightning a nice length of wire to follow. <S> The mistake they made though was trying to get the car to touch the wire at the exact moment the lightning struck. <S> As you pointed out, they'd have to get the timing superhumanly accurate. <S> What they should have done was have a spool of fine wire in the car, paying it out as they drove away from the clock tower. <S> That way they'd only have to make sure that the car was travelling at 88mph when the lightning struck. <S> This would still have required timing accurate to a few seconds, and I don't know if the clock had a second hand. <S> Personally, I think he should have just carved out a nice little niche for himself as the inventor of Rock and Roll. <A> So you think this movie portrayed unrealistic physics? <S> Shocking! <S> Gee, that never happens. <S> Lightning will take whatever path it can to discharge. <S> It is often said that it takes the path of "least resistance", but it is usually hard to know what that is because there are so many unknowable parameters, like exactly how much charge is built up on surrounding objects, where the air might have just a little lower breakdown voltage due to pressure, humidity, rain content, and other factors, etc. <S> The net result is that general trends are predictable, but specifics usually not. <S> For example, a tall grounded conducting tower is going to get more lightning strikes than a nearby tree, but any one lightnening strike might still hit the tree instead. <S> There have been cases of blue sky lightning where the discharged travelled miles horizontally before hitting a very unlikely-seeming object, passing many seemingly better conduction paths along the way. <S> If the cable is uninsulated, then I'd expect the current to arc between it and the ground in several point. <S> A car driving over the end of the cable shouldn't be all that effected since the current wants to go into the ground. <S> If the top of the car were electrically well connected to the ground somehow, then maybe current would go thru the car, but it doesn't make much sense that lighting current would jump from a cable already lying on the ground to the car frame which doesn't provide a better path to ground than the cable already has on its own. <S> Like I said though, with good quality flux capacitors lots of things are possible.
However, a cable tied to a high conductor, like the clock in the story, should provide a easy path for lightning.
How can I easily connect to my breadboard circuit using USB? I'm looking to communicate with a circuit I have built on a breadboard. I would like to communicate using USB. Can anyone suggest an item that I can use to accomplish this? Are their any other considerations I need to take into account? I would rather not have just stick the USB wires individually into breadboard sockets. <Q> If you have a USB transceiver already on the breadboard <S> An example is here . <S> If on the other hand you do not have a USB transceiver and would like to communicate with your circuit by a UART port, then you need a similar item, but with a USB to UART converter chip: <S> To find items like this, Google for USB FTDI Breakout board. <S> An example is shown here . <S> After installing the FTDI Virtual COM Port driver this type or board will show up as a COM port on your computer. <A> I can think of two low level ways to communicate with a circuit - digital (either something is on or off) or analog (what voltage is at specific point). <S> To acomplish these tasks you need a microcontroller. <S> Microcontroller is a very small computer on a chip that has means to communicate to circuit and to humans. <S> There are some FTDI chips as suggested by justin, that can do digital communication too, there are loads of other microcontrollers and development boards, but arduino in general is the most friendly to beginners. <A> There are lots of usb bridge devices available here is an example of one that handles just about everything though you can get cheaper devices for specific protocols.
As i understand, you are not experienced in electronics very much, so i'd suggest an Arduino board - it's a board with microcontroller and other stuff that makes it easy to use. and you just need to connect USB somehow, they make little breadboard adaptors like the one pictured below: You can find these things buy Googling "USB breadboard adapter."
12V DC to 5V DC converter I got this circuit from internet. I don't know why the capacitors are installed in this circuit. Can somebody tell me the reason of these capacitors.. <Q> suha says stabilizing the voltage, but C3 is actually for stabilizing the regulator's control loop . <S> It's the control loop which causes a stable output voltage, not the capacitor. <S> Most regulators, especially LDOs will need C3 to prevent oscillations. <S> ESR (Equivalent Series Resistance) is crucial. <S> The graph from this document shows that for the given regulator a capacitor with an ESR of 1 Ω is needed; the document shows how oscillation occurs with a too low ESR capacitor at a 150 mA load. <S> The regulator's control loop makes that it has a certain response time, so a sudden load change may cause a short dip in the output voltage before the regulator reacts. <S> C2 acts as a buffer to catch those quick changes. <S> A <S> 100 \$\mu\$F C1 smooths the input voltage, which improves output ripple, but in general isn't required for the regulator's operation, though you will need a 1 \$\mu\$F capacitor again for stability, especially for LDOs. <A> Steven has explained the purpose of C3, but this circuit is missing the equivalent on the input side. <S> That is fine for bulk storage, but not so fine for providing a large sudden surge of current. <S> Note that "sudden" in the time domain is the same as "high frequency" in the frequency domain. <S> Perhaps the 78L05 is stable with a high ESR input cap, but that is usually not a good idea. <S> Ceramic caps meet the criteria well, but don't come in the large sizes that electrolytic caps do. <S> This is why you sometimes see a large polarized cap in parallel with a much smaller one, as with C2 and C3 in this circuit. <S> Nowadays, 100 nF is silly for the low ESR cap of something like a 78L05. <S> Long ago, that was about the largest ceramic cap you could get without paying a lot more. <S> Nowadays 1 µF and <S> even 10 µF at low voltages are readily available are reasonable cost. <S> I would put a 1 µF ceramic at both the input and output of the regulator, physically placed as close as possible with short and direct traces to the regulator pins. <S> 100 nF still has a bit better frequency response than 1 µF, but even the 1 µF of today are better than the leaded 100 nF of 20 years ago that this circuit was probably designed for. <S> When you get up over 100 MHz or so, you have to look at these things carefully. <S> For example, I used a specific model of 100 pF cap in a RF application once because it had the lowest effective impedance at the RF frequency of a variety of caps of higher values. <S> However, this is a specialty issue. <S> For something like a 78L05 regulator, just use 1 µF ceramic and be done with it. <A> They are used for filtering the noise and stabilizing the voltage. <S> C1 filters the input, C2 and C3 improve the stability and transient response.
Most datasheets advise you to put a low ESR cap physically close to both the input and the output of regulators. The problem is that C1 and C2 are both large caps that probably have poor high speed response and some ESR (Equivalent Series Resistance).
Microcontroller's JTAG interface and PCB I'm about to start making my own microcontroller circuit (using an Atmega series MCU, at least for the beginning) and I think I'm gonna get the AVR JTAGICE JTAG debugger & programmer.I also plan on making my own PCB lab at home so I was wondering - based on your experience - if it was better to use DIP packages or SMD (SOIC, TSSOP, TQFP/LQFP). As far as I understood DIP packages are preferred in the D.I.Y. sector, whereas SMD are better because they take less space and should be less sensible to electromagnetic interference (for instance with other ICs). Now to the question: if you need to (re-)program the microcontroller, which one would you use ? AFAIK there are two alternatives: Use a DIP socket soldered to the PCB and put the DIP MCU in there. Whenever I need to reprogram it, I take it out of the socket, put into an adapter-like board to JTAG, reprogram it and transfer it back to the socket Put a SMD component on the PCB and let a JTAG port accessible from the exterior (should be 20 pins, right ?). I'd also like to keep the circuit as small as possible, so are there any low-footprint headers with 20 pins ? Sorry but I don't know how they're called exactly. It doesn't need to be JTAG really: I can leave a low-footprint header there, go onto an adapter PCB with a cable and go to the debugger via the official JTAG cable. I think the first solution is the simplest and probably a bit cheaper. It should even be easier to solder.What do you suggest ? <Q> When you add a JTAG port to your PCB, you can use the JTAG to debug your software while the microcontroller is on your PCB. <S> This is a huge advantage and will speed up debugging. <S> The choise between between DIP and SMD depends on your soldering skills. <S> If you are able to solder SMD, choose SMD. <S> It's smaller and there are more different microcontrollers available with a SMD package. <A> No matter which direction you take, I would suggest using a socket. <S> That way, if you let the smoke out, replacing the chip doesn't require desoldering and resoldering. <S> The choice between DIP and SMD is all about what you are more comfortable with. <S> There is typically a larger variety of microcontrollers available in SMD. <S> But they are also more fragile. <S> Especially when used with a socket. <S> If you're taking the chip in and out a lot, you will most likely bend or break some pins. <S> The pins on a DIP are much more forgiving in this respect. <S> It's rare that you'll find someone taking a chip out of circuit and placing it in an off-board programmer these days. <S> I had to do it with old school PROMs in college. <S> But I haven't done it since. <S> You are much better off having the JTAG on the board itself. <S> @i.amniels mentioned in-circuit debugging being a huge advantage. <S> I will echo that sentiment as it cannot be said enough. <S> There are many different JTAG connector configurations. <S> The AVR one uses 10 pins. <S> And you really don't have a lot of say in the footprint of the header you can choose. <S> You have to match the pin size and pitch to your JTAGICE. <S> Atmel has a recommendation for the part number to use to interface to the JTAGICE. <S> I would just stick with that. <S> http://support.atmel.com/bin/customer.exe?=&action=viewKbEntry&id=2 <A> The first solution is clumsy. <S> You'll get tired of taking out the chip, programming it and then putting it back. <S> The best solution is to use in-circuit programming, weather or not you use DIP is irrelevant. <S> Atmel's implementation of JTAG requires only 10 pins, not 20. <S> The advantage over ISP is that you can debug your circuit. <S> If you have a lot of space on your PCB, you can just utilize a 2x5 0.1" header and be done with it. <S> I normally use a polarized connector to ensure I don't plug in the programmer backwards. <S> If you are tight on space, you can bring out some pads and use pogo-pins to connect the AVR to your programmer/debugger. <S> See this answer for more information regarding pogo-pins. <A> If you want to get reasonably serious about electronics you will have to tackle SMD at some stage anyway, so if possible I'd take this route. <S> You will have far more choice since many ICs don't have a through hole version anymore. <S> I would say hobbyists are using SMD a lot more nowadays, so I'm not sure if it's "preferred" still. <S> Either way as mentioned, program it on the PCB. <S> As far as the header is concerned it's unlikely all 10 or 20-pins will be needed signal wise, so you can probably get it down to around 5 pins if you check the pinout and datasheets. <S> Sometimes manufacturers sell different adapters for their programmers so have a look to see - for example <S> Microchip sell a handy pogo pin adapter for the ICD3, so you only need to hold it against a few pads on the board during programming. <S> If there isn't something available, make it. <S> I recently did this with an ARM uC from ST - <S> my Ride programmer comes with a ~20-pin header <S> so we made a little adapter for it to fit onto a 5-pin header to save space.
There are sockets available for both DIP packages and SMD packages. For AVRs, you can use JTAG or ISP.
When should one implement cold-junction compensation in thermocouple applications? Specifically, when using K-type thermocouples, what sort of accuracy expectations demand cold-junction compensation as opposed to simple calibration? Clearly there's no substitute for direct experimentation on the circuit in question, but short of that are there any general rules of thumb? I'm building a thermal immersion circulator, I want to hold the liquid temperature accurate to 1°C, so the thermocouple readings will need to be at least this accurate. <Q> ... <S> what sort of accuracy expectations demand cold-junction compensation as opposed to simple calibration? <S> An ideal thermocouple provides \$\mathrm{V_{out} = <S> k <S> \cdot <S> (T_{hot}-T_{cold})}\$. <S> The end result cannot be more accurate than the accuracy to which you measure or infer the cold junction temperature, and in practice will be somewhat worse and can of course be much worse. <S> Therefore, ALL thermocouple temperature measurements require cold junction "compensation". <S> "Compensation" is really shorthand for "determining the temperature of the cold junction with a level of accuracy that is appropriate for the application". <S> Compensation could consist of saying "this will be used in an air conditioned office which is temperature regulated to 20 degrees C - so that will be the cold junction temperature". <A> Thermal compensation is needed when you want to measure absolute temperature. <S> When you are reading a voltage produced by thermocouple, it's proportional to temperature difference between environment where the junction is and ambient temperature. <S> If you want to know the exact temperature of environment you are measuring, you have to add ambient temperature to temperature readings from thermocouple. <S> This can be done in several ways - analog or digital. <S> There are <S> analog cold junction compensation chips like LT1025 , which produce a voltage that is equal to voltage the thermocouple would produce if it's other end would be in ice water at 0C and the junction at ambient. <S> Then you connect thermocouple in series with the output of this chip and amplify it's output. <S> If you are using a microcontroller, you can get ambient temperature from a digital or analog sensor directly to microcontroller and add it to thermocouple readings in software. <S> This way you can use an opamp with low bias current and low offset voltage to amplify thermocouple output. <S> There are special chips from Linear Technology and Analog Devices for K-type thermocouples, that amplify thermocouple voltage to some usable level AND provide cold junction compensation out of the box: <S> AD8494 <S> AD595 <S> They both provide free samples. <A> A Fluke 2635A data bucket claims 0.1°C accuracy with type-K thermocouples. <S> An Agilent 34901A data acquisition card (used in the 34907A mainframe) also claims 0.1°C with type-K. <S> Both technologies use cold-junction compensation to achieve this accuracy. <S> (Fluke has their sensor in the instrument; Agilent puts the compensation on the card). <S> My experience with these data loggers is that there's usually only 0.1 or 0.2°C variation from thermocouple to thermocouple if they're all approximately the same length and welded/soldered in the same manner. <S> (I'm used to connecting anywhere from 20 to 60 TCs to a a unit under test for thermal characterization.) <S> I suppose the need for compensation would depend on how well the ambient temperature at the thermocouple terminations is controlled. <S> If it can vary by 10-20°C, you probably need to implement the compensation. <A> You have a cold junction, whether you want it or not. <S> It will be at a certain temperture when you did the calibration, and it will be at a certain (probably different) temparature when you do your measurement. <S> The voltage you measure will be proportionally to the temperature difference between your cold junction and the thermocouple. <S> If that amount is (far) less than your desired accuracy you can do without the compensation. <S> This will generally be the case if you measure relatively high temperatures with relatively low accuracy <S> the cold junction temperature is relatively constant. <S> I think your application does not fall within this category: you want 1C accuracy. <S> The best you can hope for the cold-junction temperature stability is 'room temperature', which will vary (much) more than 1C.
When you don't compensate for the cold junction temperature, the uncertainty (=error) in your calculated temperature will be as large as the uncertainty in your cold junction temperature (difference between the measurement situation versus the calibration situation).
Control speed of Nidec fan? First of all, sorry for my lack of knowledge in the subject. I have a Nidec TA450DC B35502-35 fan which I've installed in a large wooden cabinet where my computer and other electronics sit. This cabinet of course gets hot from all the electronics inside of it. The fan forces air in from the room and goes out through openings in the top of the cabinet. This fan has 4 wires: red (+12v), black (ground), and then blue and yellow. I'm using only red and black to give the fan full 12v power. Nidec Website The problem is since it's at max speed, it is way too loud. I have a simple toggle switch to turn it on and off. What I would like to do is replace the toggle switch with a knob to adjust the speed. I don't know how to use the other two wires to control the speed. What kind of knob do I need to get, and how should I wire it? The minimum setting of the knob should feed the fan with its minimum required power to spin at the lowest speed possible, and the highest setting should spin it at full possible speed. I don't have any problem with soldering a small circuit board together for this project, I just have no idea what schematic I need to put together. I've played with electronics and their components all my life but don't know nearly enough to even begin understanding how to accomplish this. It should be simple, right? Should I be using one or both of the additional wires for this, or should I use some method of adjusting the voltage? <Q> The yellow wire is a PWM speed sense that can be used to read the speed out of the CPU. <S> To control the fan's speed, you need to give it PWM: a square wave adjusted to the speed you desire. <S> This is doable with a microcontroller's PWM peripheral. <S> I'll direct your attention to this article: 4-pin Fan Pinouts <A> This should help you design a standalone PWM controller: From Nidec <S> This is a simple PWM controller directly from Nidec (so I can guarantee it will work with your fan, though it's also compatible with other schematics, as long as the schematic works for a 12VDC 4-pin PWM computer fan). <S> A 1k resistor, a 100k pot, two schottky diodes, a 555, and a handful of capacitors. <S> Simple circuit, all you need is a +5v (so a regulator shouldn't be too hard to run off of the 12V supply you're using for the fan). <S> From Overclockers Forums <S> ( The entire thread, many different schematics there for you, for different styles/applications ) <S> You'll note they are very similar circuits. <S> After building the circuit, you connect the fan's blue wire to the PWM Output of this circuit, then connect it to +12VDC and use a common GND with the circuit. <S> (Despite my constant use of Overclockers.com, I'm not trying to plug them. <S> It's just somewhere <S> I've seen a great how-to for how to build your own PWM controller, and the schematic is completely done out as well. <S> I'll try to permalink it here for you.) <A> I hope you got that cooler fan thing figured out as its been a while <S> but I couldn't help but see the lack of attention to the Question that these brilliant engineers gave you. <S> I wish I had the formal training they have. <S> I have this same fan <S> and I'm using it for other than mfgr. <S> intended applications as well. <S> First thing I wouldn't put a PC inside a cabinet to keep it cool, it needs all the cool outside air it can get. <S> ** <S> You were on the right track in the beginning, all you need is the Blk(-) and Red(+) wires in the harness. <S> Get a Dash-pot <S> (like a volume knob with off position, "clicks off at lowest setting") and a small capacitor to help start the motor <S> and that's all you need to throttle the fan inside your Electronics Cabinet between the 9-12 volts <S> , you can find new parts at local radio shack or use components from a scrape appliance (recycled parts). <S> Note that most power adapters true output is sometimes much higher than it says due to that fact it is intended to charge batteries, of say 12volts <S> it might actually push as much as 18 volts. <S> There are many ways to manage maximum output from installing a permanent voltage meter to just getting the specs for a voltage regulator to install inline between the power source and the dash pot. <S> That really is a nice fan, good luck.
The blue wire is a PWM control signal which can be used to adjust the fan's speed. A volt meter will help you there, you can put a mark on your control knob for the new 12volt while under a load setting for each perspective 12v power adapter you might use.
Flexible-PCBs: what data is needed for manufacturers? Can someone explain more about how you generate data for flexible or flexi-rigid PCBs for manufacture? Do I just make more layers and export more gerber files? Is there anything I need to keep in mind when sending these to be manufactured? I've made a decent number of medium-complexity 2-layer boards and had them manufactured by producing gerber files. I use Pulsonix, but am familiar with Eagle as well. <Q> Mostly the same stuff as for rigid FR4 boards. <S> Material will often be polyimide or polyester. <S> Of course you'll want to bend the PCB, so check with the manufacturer what the minimum bend radius is for different thicknesses. <S> In general this radius is small, like 6 to 10 times the circuit's thickness for a double layer FPC, that's a couple mm, and shouldn't be a real limitation for most applications. <S> Also of contact areas , with data on finishing (like gold, and its thickness). <A> A flexible PCB is just a one- or two-layer device with a different material specification (polyimide instead of some sort of FR4). <S> The Gerber files are no different. <S> Flex-rigid-combinations are similar: You'll give them a pretty regular Gerber stack, as with rigid PCBs. <S> In addition, you send them a specification for the layer stack and tell them which layers are to be fabricated on polyimide. <S> Flex in the middle or your stack? <S> Flex on an outside layer? <S> Note (a) <S> : Talk to your PCB shop. <S> They will let you know what specification will work best for them. <S> Note (b): <S> A specification of the stack including all the details is a good idea even for rigid two-layer or multi-layer boards: T g of the FR4, thickness of the individual FR4 cores and prepregs, finish (HAL, ENIG, ...) <S> copper thickness for each layer, ... <A> I am not a PCB design engineer, but I am working in PCB industry. <S> To manufacture a board, we generally require Gerber data. <S> We will need the following: A gerber layer for every physical layer, including solder masks, and an NC drill file with drill tool sizes. <S> Excellon format is the most common drill file format. <S> Gerber data should be in ASCII format, preferable in imperial units, with a preferred precision of at least (2,4). <S> The drill file should be the same precision as the gerber data. <S> We can use RS274D data with an aperture table, but RS274X is preferred, as it is the latest standard. <S> Metric units are acceptable with a preferred minimum precision of (3,3) A readme file and fab drawing are recommended. <S> A sample readme.txt file is available. <S> If the board is multilayer, we will require the layer order. <S> The readme should also have any other information not in the file set, such as material type, copper thickness, etc... <S> All the data files should be put into a single archive file, <S> *.zip files are the most common. <S> We need this for error protection for anything sent through the internet. <S> It's best to name the *.zip file after the part number of the board (ie LCDDriver.zip)
An additional Gerber layer with the dimensions for the entire PCB and the parts that are flexible might help. Provide drawings of stiffeners , and their material (often FR4).
How can I measure the charge of a rechargeable cell? I'm using a bluetooth keyboard which need four AAA batteries. After the cells are charged (at least according to the charger), the keyboard still doesn't work properly; there is a green LED that should stay lit for a few seconds, but it's red and blinking instead. I'd like to know if the cells are actually charged. The battery specification is: AAA, 1.2V, 1000mAh. Once charged, my voltmeter reads 1.43V on each cell. <Q> How can I measure the charge of a rechargeable cell? <S> I'd like to know if the cells are actually charged. <S> The battery specification is: AAA, 1.2V, 1000mAh. <S> Once charged, my voltmeter reads 1.43V on each cell. <S> You cells are fully charged. <S> I assume that they are NimH (Nickel metal Hydride) cells but that voltage would also indicate full charge for NiCd cells. <S> I use a nominal figure of 1.45 V / cell at 25 degrees C as end point when actually charging. <S> If they measure 1.43V/cell when off charge that is even higher than I'd usually expect. <S> If that is an on-charge figures at end of charge it indicates full charge. <S> A system intended to operate from NimH cells should work down to 1.1V/cell in all cases and ideally down to 1V cell. <S> When lightly loaded (say C/10 load or less) <S> NimH cells will operate at about 1.2 V across the major part of their discharge cycle. <S> The keyboard should load them to far less than C/10. <S> Likely options in order of decreasing probability are Your bluetooth keyboard is faulty <S> The red light indicates some other problem such as a lack of link connection from the "dongle" (aka receiver) that it connects via. <S> The keyboard needs Alkaline cells (but it should work on well below that voltage even with alkaline cells). <S> Thoughts: <S> I assume that the keyboard has a USB connected "dongle" which plugs into a USB port on your PC. <S> You do not say if this worked previously. <S> If it was working and now isn't then a fault somewhere seems likely. <S> If you have not rebooted the system try doing so. <S> Try to minimise connection of other equipment which may cause interactions. <S> Sometimes other equipment plugged into the same USB hub causes problems. <S> Sometimes even equipment plugged into another USB port on the PC can cause problems . <S> On some occasions a device will "enumerate" on one USB port and then not operate on any other port. <S> Did the device came with drivers and did you load them? <S> Try it on another PC. <S> Is there a channel setting option which has been accidentally altered (most unlikely with Bluetooth). <S> Do you have other Bluetooth or wireless based equipment in use which may be interfering? <A> There is a possibility that the cells are damaged or just had to many charging cycles, so their internal resistance has become to large. <S> This means that your multimeter still reads a voltage of 1.4XV after charging, but any significant load current leads to a breakdown of that voltage. <S> You could check that by measuring the cell voltage under load (say: about 100mA). <S> The resulting voltage drop gives you an estimate of the internal resistance ( this page talks about 0.17 ohms for a new, charged AA NiMH cell). <A> Sounds like the cells are probably okay. <S> Measure the voltage with the batteries plugged and the keyboard switched on to make sure. <S> If it's still good then there's something else wrong.
Or just use a 10-50 ohm resistor across the battery and test the voltage.
How do I open a rectangular hole on a metal case? I'm working on a case design. There is rectangular switch. I am trying to open a rectangular hole on the metallic case to fix it in there. I'm not doing a good job, if it goes on like this it looks like I'm going to ruin the case at all. How do I open this hole? Picture #1 Picture #2 Dimensions of the rectangle is 20.0mm x 25.4mm. <Q> There is the tool exactly for this, named nibbler. <S> They sell it for $10 in Radioshack. <S> Specialized hole punch for specific shapes: <S> For most advanced holes there is a special drill even <A> You are doing fine. <S> If you don't have an expensive punch, or even a nibbler, you can do a perfectly acceptable job with a drill and file. <S> I have done many cutouts like this. <S> The secret is patience. <S> Start each dilled hole in an indentation made by a pin punch so that the drill bit does not wander, and don't try to drill right up to your line. <S> One of the first exercises I did as an apprentice machinist was to file something to within 0.001 inch tolerance. <S> It's not as hard as you may think, but it can't be rushed. <S> Use a good file and clean it from time to time with a file card. <S> Aluminum in particular, being soft, will tend to gum it up. <S> Any slight imperfections in your hole (perhaps up to 1 mm, but you can do MUCH better than that) will be covered by this if your original layout lines are good and you are careful not to make the hole any larger than it needs to be. <A> I installed a very similar switch (single not dual) into an Altoids tin. <S> I used a Dremel with a cutoff wheel. <S> Very easy, it took two minutes. <A> As always, it's all about having the right tool for the job. <S> Without tools it's impossible, and with better and better tools, it becomes easier and easier. <S> You're not doing badly so far, but you seem to have drilled some of the holes quite far from the line. <S> That didn't help. <S> Option 1. <S> Keep drilling, preferably with holes nearer the line. <S> Use side cutters to damage the metal between the holes, then man-handle the metal out with a screwdriver and / or hammer. <S> Clamp your panel upright in a vice, and use a coarse file to square up the hole. <S> Option 2. <S> Drill a large hole at two opposite corners, and use a small saw blade to cut each edge. <S> Then file it to shape. <S> Option 3. <S> Option 4. <S> If you want to spend some money on tools, you can do a lovely job with a hand operated milling machine. <S> You can get nice little ones on eBay for a few hundred bucks. <A> Depending on how perfectionist you are, this way it will take somewhere between a long time and a very long time. <S> I would have my front panel made by a service like Front Panel Express . <S> With hobbyist tools you can't get the same quality and accuracy. <S> (I noticed your fixing hole is off center.) <S> They can work with aluminium up to 10 mm thick, or acrylic or a custom material. <S> You can download a front panel designer software from their site to create your design. <S> (Disclaimer: I'm not affiliated with FPE) <A> I agree that a jig saw is the best method if the panel allows the frame to swing, and I recommend the type in the picture, with an adjustable frame, rather than one that has to be squeezed to tension the blade <S> -- I find that type very difficult to control. <S> This one is easy as you can undo the wing nut and shorten the frame, loosen the clamp screws and insert and clamp the blade, then extend the frame and tighten the screw. <S> Drill a small hole, just big enough for the blade, in each corner, so that you can turn the blade easily for the next side. <A> I would have went for: Starting by drilling holes just like you did, at the corners of the designated box. <S> Using a jigsaw I would have cut the main lines of the box, careful not to pass the lines. <S> Slightly less is fine - that's handled by the next step <S> Using a ( file tool , I would have completed the cut rectangle to fit the exact shape/size good luck and enjoy it!
Use a dremel with circular cutting disc, then file to shape. You'll note that the switch has a flanged edge.
Dead or alive: Operational transconductance amplifier My first experience ever with an operational amplifier was with an LM3900 from a Philips experiments kit and these kits date from a long way back in time, when I was a young boy in primary school. I rarely see designs with operational transconductance amplifiers. Are these type of devices (not necessarily the exact type mentioned above) still being produced, newly designed? Is it worth the effort to design a new circuit with them or are they soon to be remembered in melancholy? <Q> Not quite dead, it seems. <S> Though Digikey lists only 49 of them, out of a total of 30 300 operational amplifiers, that's not even 1 %. <S> Several datasheets are at least 5 years old, but the TI OPA861 datasheet had a recent update a year ago. <S> The good old LM13600/13700 also seems to be still alive: still available from two different manufacturers: NJR (datasheet 2006), and TI (née National, datasheet 2004). <S> The OPA861 lists as typical applications <S> : • Video/Broadcast Equipment • Communications Equipment • <S> High-Speed Data Acquisition • Wideband <S> LED Drivers • <S> Control Loop Amplifiers • <S> Wideband Active Filters • Line Drivers <A> The reason because they are not very common is simple: their principle of operation (taking a voltage and giving a current) is not obvious to the most, and many people don't even know of their existance. <S> Moreover, it's part of the world of analog electronics, which will always be present, but it's being confined to a smaller range of applications than in the '70s and before. <S> So it makes sense to use them if you need them. <S> I remember of a question where the ratio of two voltages were used to set the gain of an amplifier: in that case, an OTA could be used to give the current that sets the gain of another amplifier. <A> As stevenvh mentions, the LM13700 is still in production and has a huge number of possible analog applications, such as: Voltage-controlled filters Voltage-controlled amplifiers <S> Voltage-controlled oscillators <S> Voltage-controlled resistors <S> Voltage-controlled capacitors <S> Voltage-controlled inductors <S> Voltage-controlled phase-shifting Logarithmic/exponential amplifiers <S> Analog multiplication <S> Automatic gain control <S> And lots more. <S> It's probably not going anywhere anytime soon. <S> The only downside is that it's kind of sluggish ( <S> 2 MHz GBP IIRC.)
They still exist, and make sense for a number of applications, like the ones listed.
GUI library for HMI Cortex M Hi I am basically using cortex m3 series of processors for our application. I am looking for some GUI library that can be used for HMI. Is there any GUI libraries available? I recently heard about Qt. Is it a library written in C? Can I be able to port it to keil or IAR or Eclipse or any IDE? Or can you guys provide some other GUI library suggestions? Thanks! <Q> Using Qt in a microcontroller project is infeasible. <S> It requires megabytes of RAM and ROM and a full-fledged OS. <S> There is support for embedded systems but it is limited to Nokia phone OSes, embedded Linux and Windows CE. <S> See storage requirements for embedded Linux for example (note that these aren't RAM requirements). <S> Qt has been used successfully on ARM9, ARM11 and Cortex-A systems such as FriendlyARM boards, BeagleBoard etc. <S> (note that many of these have OpenGL ES hardware acceleration, too). <S> Extra convenient support for Raspberry Pi is upcoming . <S> If you actually need Qt, consider an ARM CPU-based (as opposed to a MCU-based) system running Linux. <S> If you do need to run a GUI on a microcontroller, see the answer linked to by embedded.kyle for realistic alternatives. <A> Open-source Embedded GUI Library <S> https://littlevgl.com <S> Powerful building blocks buttons, charts, lists, sliders, images etc Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling <S> Various input devices touch pad, mouse, keyboard, encoder etc Multi language support with UTF-8 encoding Fully customizable graphical elements Hardware independent to use with any microcontroller or display Scalable to operate with little memory (80 kB Flash, 10 kB RAM) <S> OS, External memory and GPU supported but not required Single frame buffer operation even with advanced graphical effects Written in C for maximal compatibility <S> (C++ compatible) Simulator to start embedded GUI design on PC without embedded hardware Tutorials, examples, themes for rapid GUI design Documentation online and offline Free and open-source under MIT licence <A> I would stick with Qt. <S> It's actually a C++ library. <S> Keep in mind you need an embedded OS (Linux/Windows CE). <S> There are plug-ins available for Eclipse and Visual Studio. <S> Possibly others. <S> There are also some non-free alternatives mentioned in a similar SO question: https://stackoverflow.com/questions/2997648/gui-library-for-microcontroller <A> Just take a look at this article on Microcontroller Central . <S> Rich Quinnell mentions "... <S> I saw a demonstration of Java applications running on an STM32-F3 MCU..." <S> Probably what you are looking for?
LittlevGL is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
Can anyone identify the microcontroller on an HC-SR04 The HC-SR04 is a popular, and very inexpensive, ultrasonic ranging device and I'd like to modify one to change its functionality. If I can identify the controller I might be able to reprogram it, or at least replace it with one I can program myself. The controller is a 14 pin SOIC and has pin 4 Vcc, pin 11 Gnd, Xtal between pins 5 and 6, and I think pin 7 might be a Reset. It has no markings at all on it, so the manufacturer obviously doesn't want me to know what it is. The pinout doesn't seem to match any 14 pin PIC, or Atmel chip that I can find. Is anyone familiar with this device or care to make an educated guess as to what the microcontroller might be? <Q> And yes, it has OTP ROM. <S> Manufacturer's page: http://www.emc.com.tw/eng/8bit_gpio_ds.asp <A> The processor on the HC-SR04 is EM78P153A. A man named Emil has done a lot of work recently (2014) on the HC-SR04. <S> http://uglyduck.ath.cx/ep/archive/2014/01/Making_a_better_HC_SR04_Echo_Locator.html <S> Here is schematic he has derived on the HC-SR04 : <S> (edit : <S> I posted this because it gives an up close view of the analog section on the receiver portion) <A> It will be very difficult to find out what it is. <S> The things you can be reasonably sure of is that it will be very very cheap (in high quantities), 8-bit, and if made in the far east a popular micro there. <S> Maybe an 8051 of some sort. <S> Rather than trying to find out the micro used, since you have the transducers there I would just use them to make your own version, either by adding a little PCB to the existing one or moving the transducers onto a new one. <S> There a quite a few tutorials on how to make your own around: PIC sonar PIC sonar 2 <A> It seems like you are referring to something like this schematic: <S> This is the datasheet for the stc11 series 8051 compatible microprocessors . <A> I don't think this is exactly what you are looking for as the controller (a PIC12C508) is a 16-pin SOIC. <S> But it seems like a similar product. <S> Maybe it will put you on the right track. <S> Or maybe you could use one of these instead as you would have the full schematic. <S> It is 3x as expensive as the HC-SR04 <S> but I think a known PIC would be easier to modify than a brand-less micro. <S> http://www.robotstorehk.com/srf04tech.pdf
I think it might be EM78P153A microcontroller or something from that family, at least the pinout seems to match.
Get number of set bits in digital logic As an exercise, I am trying to design an implementation of Conway's Game of Life in simple digital logic. I could do the whole thing by minimizing a 9-Variable function, but I imagine that will still be fairly large. One of the core elements of the algorithm is determining how many of your 8 neighbors are 'alive'. Given 8 inputs, what is the easiest way to determine how many are set? Particularly I need an output that is high when 2 are set, and an output that is high when 3 are set. My main idea now consists of a PISO shift register, a counter, and a 3:8 decoder, but I pretty much need a microcontroller to drive all of that. It does not seem like that complicated of a function. Maybe a 256x2 ROM would work as well, but my searches haven't turned up any of that kind of part. I know that any pic with 10 IO could do this trivially, but I want to implement it in as minimal a way as reasonably possible. <Q> You might find the various algorithms on Fast Bit Counting enlightening. <S> The last two: Nifty Parallel Count and MIT HAKMEM Count might well be easy to convert into gates. <S> See this page for a good explanation of how it works. <S> You could do this using gates hardware. <S> Use four 1-bit adders to add pairs of bits together. <S> This gives you four 3-bit numbers. <S> Add these in pairs using two 3-bit adders. <S> This gives you two 4-bit numbers to add using a single 4-bit adder. <S> This leaves you with a 5-bit value, but you can ignore the top bit. <S> Then use two 4-bit comparators to test for the values 2 and 3. <S> For minimal parts count, why not do it <S> Analog? <S> Then simply use two comparators set to detect the voltage levels that 2 or 3 bits will produce. <S> That's only 6 parts: <S> The 8-resistor network will produce a voltage between 0v (for 0-bits set) to 5v (for 8 bits sets). <S> 2 bits will produce 0.5v. <S> 3 bits will produce 1.56v. <S> With 0 or 1 bits, the output will be 00. <S> With 2 or 3 bits, the output will be 01. <S> With 4 or more bits, the output will be 11. <S> Added: Thanks to DavidCary for an excellent suggestion. <S> After a lot of calculating, I think I have found a set of resistors that work, but you should carefully check my calculations first. <S> Here I am using comparators with open-drain outputs <S> and I think I have managed to get it to have a single output. <S> Low means dead next round, High means alive next round. <S> The nice thing is that this circuit only has two more components than the other circuit. <S> They're all E8 series resistors, so should be possible to get hold of. <S> Also, R6 should have been a higher value, like 4.7k or something. <A> What is minimal? <S> The microcontroller is just 1 part, and can produce the result with a minimum delay (< 1 \$\mu\$s). <S> At 54 cent the ATTiny20 is the cheapest microcontroller with 10 <S> I/ <S> O at Digikey. <S> The lookup table is also just 1 part, and is faster than the microcontroller. <S> Forget about parallel EEPROMs, they're expensive. <S> Use a byte-wide parallel Flash . <S> This one is 512 kByte, that's 2000 times more than what you need, but it's the cheapest solution (1 dollar). <S> And you can add 6 more 1-bit functions for the same price. <S> You can also use a CPLD . <S> Write the function in VHDL or Verilog as one long SOP (Sum Of Products) statement, and let the synthesizer create the logic. <S> The shift register <S> is OK if you can wait for the result; this is the slowest solution. <S> Finally, you can do it with logic gates , but you'll spend a lot of time to reduce the SOP to its minimal form if you want to go all basic. <S> Rocketmagnet has the right idea using adders, but his numbers are off: a 1 bit half adder gives 2 bits out, not 3. <S> So adding the outputs of the half adders two by two requires two 2-bit half adders, giving two 3-bit results. <S> Use a 3-bit half adder to get the 4-bit result. <S> Using 1-bit full adders you'll need only one 2-bit adder. <A> Hybrid parallel-sequential circuitry is apt to be much more compact than purely-parallel circuitry. <S> For example, if you adjust the rules so that a 3x3 box will turn the cell in the center dead if there are fewer than three live cells or more than four, and turn it live if there are exactly three live cells (the behavior under these new rules will match the original), one can simplify the logic by doing a two-step sequence: tempVal[x, <S> y] = orig[x-1,y] <S> + orig[x,y] + orig[x+1,y] ' Two-bit sum of three one-bit numbersorig[x,y] = <S> LiveDeadFunc(orig[x,y], tempval[x,y-1] <S> + tempVal[x,y] <S> + tempVal[x,y+1]) <S> The array <S> tempVal[x,y] has two bits per cell; the latter operation sums together three such numbers to produce a value 0-9 (though all value exceeding four are equivalent), which can then be used to compute a single-bit live/dead status for the next generation. <S> BTW, an alternative to doing an arithmetic sum in the second stage and examining the value would be to convert tempVal[x,y] into a one-hot representation, and then explicitly check for one of the nine combinations of values that would yield three cells, or one of the twelve that would yield four.
Create a voltage divider with one resistor on top, and your 8 inputs connected to the bottom by 8 resistors in parallel.
Optocoupler/relay type for isolating two DC circuits I have recently started experimenting with an Arduino and would like to control a seperate circuit (for example, a small and cheap digital video camera powered by battery) from my arduino. Basically my plan is to solder two wires to either side of a tact switch on the target device's PCB. Since I am new to the world of electronics and do not wish to risk any possible damage to my Arduino, I would like to isolate the two circuits from one another. I have done some research to figure out how to switch one circuit from the other and the options I have come across are relays and optocouplers. I think I prefer the idea of using an optocoupler because they are small and completely separate the two circuits. I can also order some free samples to try them out. My understanding of optocouplers is that I would not need to connect the ground of the arduino to the ground of my target device (operating on it's own battery source). Is this correct? Also, considering I plan on using this to control only low voltage DC circuits, what would be a good choice of optocoupler? I plan on ordering several so that I can use them for various breadboard experiments where needed. Thanks <Q> Here's the pinout of a fairly typical optocoupler - 4N35: <S> Arduino gets connected to the pins on the left side, the target device is connected to the pins on the right side. <S> You are correct - the two devices should not share a common ground. <S> On the Arduino side, wiring and controlling the optocoupler is as simple as wiring and flashing a LED. <S> You just need to place a current-limiting resistor in series with either the anode or the cathode. <S> For example: PIN -> <S> R_limit - <S> > <S> Anode ... <S> Cathode -> GND. <S> Resistor values between 330 ohm and 1k ohm should be OK. <S> At the target device, the collector pin is connected to the node with higher voltage and the emitter pin is connected to the node with lower voltage. <S> When the optocoupler is activated, the transistor at its output starts conducting, effectively closing the circuit. <A> You don't have to worry if \$V_{CE(SAT)}\$ is low enough, collector dark current too high, and <S> CTR high enough, things which need attention when using an optocoupler. <S> This reed relay can be controlled directly from the Arduino's output (needs only 5 mA). <A> Optocouplers are not designed to both conduct significant current and (while doing so) drop a very low voltage. <S> I suggest you opt for a relay. <S> There are several topics here on driving a relay from a microcontroller pin, or you can use an existing relay shield. <A> Optoisolators are fine for switching low current, low voltage DC circuits. <S> However, if you're thinking of supplying the power for the camera or other device via the optocoupler, I think you'd be better with a relay - it will provide isolation between the circuits and the output is just a mechanical switch with an easily understandable current/voltage rating. <S> In any case, I think you should read up on what "isolation" means, if you're interconnecting any kind of mains powered equipment, even if they have a low voltage output. <S> Both relays and optoisolators have limits on how much isolation they can safely provide.
If the circuit on the target device does not require too much current to trigger, using an optocoupler will probably work fine. For switching a button on a camera I would opt for the relay: just like a button it can switch anything and has a low on-resistance.
Do 3G and phone calls(gsm) use the same antenna in a mobile phone? When I disable "3G or EDGE" (cellular data) connection from my smart phone's settings, I can still make a phone call. Do phone calls and cellular data use different antennas and frequencies in a mobile phone? Or it is just an inner arrangement? I mean do the cellular voice and data networks use different antennas? <Q> Your connection to the cellular network, no matter the "G", always uses the same antenna. <S> You can see this in a teardown of whatever phone you have. <S> For instance, here is a teardown of my phone: HTC Thunderbolt Teardown <S> In the last photo, you can see that the LTE and EVDO antenna is one and the same. <S> This also handles your 2G connections as well even though they all operate on different frequencies: Cellular Frequencies <S> What you are doing when you disable your data, is shutting off the modem in the chip that talks on a particular frequency. <S> Each cell phone has several modems. <S> For 2G, 3G, 4G, Bluetooth, etc. <S> Since the "Gs" are similar in the way they operate, they can use the same antenna. <S> Bluetooth and WiFi operate very differently and require different antennas as can be seen in the teardown. <S> 2G connections provide voice and text and, since it's the oldest, has the widest coverage. <S> 3G provides voice (GSM only, see below) and data on the same frequency, and, in some model phones, at the same time. <S> 4G provides data only and voice is either done by falling back to a different communications model (frequency/"G") or via voice over IP. <S> So when a 3G or 4G signal weakens in a particular area, there is usually a 2G signal to fall back onto but it will only provide voice and text. <S> There are some interesting notes in the Wikipedia article on 4G if you search for the word "voice". <S> Such as: <S> EV-DO is not designed for voice, and requires a fallback to 1xRTT when a voice call is placed or received. <S> And: Since the 2.5G GPRS system, cellular systems have provided dual infrastructures: packet switched nodes for data services, and circuit switched nodes for voice calls. <S> In 4G systems, the circuit-switched infrastructure is abandoned and only a packet-switched network is provided, while 2.5G and 3G systems require both packet-switched and circuit-switched network nodes, i.e. two infrastructures in parallel. <S> This means that in 4G, traditional voice calls are replaced by IP telephony. <S> Another thing to note, is that while voice requires less bandwidth, it requires a continuous connection. <S> Whereas data can be packetized. <S> A good discussion of how voice and data share the network (when both are available) is available in the following article on Using data versus voice in an emergency <A> No. <S> But the division of labour has nothing to do with Data vs Voice. <A> Actually, most phones support several different frequency bands which they may use for different carriers or different parts of a given carrier's network or different services from that carrier. <S> An obvious demonstration of this is that the two main US GSM carriers - AT&T and Tmobile have tended to use different frequency bands for their highest speed data offerings. <S> Often, phones sold through a carrier will only support the bands actually used by that carrier. <S> This can mean that even if unlocked, a phone on the "wrong" network is only able to make voice calls and used low-rate data, without access to the high-rate data service of the "foreign" network. <S> And it's not just a US problem - there was a case recently where a deceptive advertising claim was leveled against a certain tablet because it's "4g" capability was incompatible with the networks in a particular country where it was allegedly being sold as a "4g" device. <S> Given that the difference in frequencies can be up to a factor of two, it's not inconceivable that different antennas - or at least different antenna modes/matching networks would be used for the different bands, though cost and size pressures would point towards minimizing components (designing antennas to match disparate frequency bands has a long history). <S> On the cell-site end, there would probably be even more likelihood of having distinct components.
The cellular voice and data go over the same channel and therefor use the same antenna. Often the up and down links are at different frequencies, so different antennas (or at least different performance characteristics) are used.
How to diagnose crosstalk I am completely new to electronics, and am trying to learn by building an electronic drum set. I've found lots of examples online of circuits to condition the output from a piezo to be read by a controller (a Netduino in my case). The circuit I'm using looks something like this. A Piezo (connected from the drum to my breadboard w/ some cat5 cable) A 470k resistor in parallel A Schottky diode in series (on the + line) A Zener diode in series (3.3v on the + line) A 1M resistor in parallel A 0.1uF capacitor in parallel A Netduino analog pin (and the ground line connected to the Netduino ground pin) I currently have 6 of these circuits attaching to the 6 analog pins on my Netduino. The circuit is doing a great job of both not missing any hits on the drums as well as giving a pretty good dynamic range of velocity/volume readings. The problem is that when I strike any of the drums very hard, I'm getting some nasty crosstalk (i.e. I hit one drum, but multiple drums are signalled). I've been stuck on this for a few weeks now and have tried tweaking the circuit in every way I can think of, but can't seem to fix the issue. The closest I can come is to put a voltage divider at the end of the circuit. This does remove the crosstalk, but at the cost of significantly less dynamic range (i.e. no matter how hard I hit the drum, I don't get more then around half of the max ADC readout value). I've checked and double checked that everything is connected to the same ground. The Schottky should be keeping any negative signal from getting to the Netduino, and the Zener should be making sure I'm not getting anything above the 3.3v that the Netduino wants. I think an oscilloscope would probably help a ton in figuring out what's going wrong, but as this is my first electronics project/experiment it's a little hard to justify a couple hundred dollar purchase to the wife ;) Can anyone point me in the right direction for figuring out what's going wrong? EDIT: Here is my attempt at a schematic. I've just downloaded Eagle and am not entirely sure how to use it, but hopefully this is close enough to give the idea. The piezo symbol on the left doesn't look right to me, but that's what Eagle gave me. EDIT #2: Per several requests below, here are some pictures of my circuit (slightly updated from several peoples suggestions). Also, I've included some pictures of the drums. The drums use a special "screen" drum head that makes very little audible sound. There is a small piece of foam that transfers the drum head vibrations to the piezo. <Q> A real schematic would help!! <S> I don't think the crosstalk is something in your circuit, but rather is acoustic. <S> The other drums act as microphones and pick up the vibrations of the drum you're playing. <S> The only solution I see is to add antisound to the other drums' signal, but that requires that you have a very good idea of the amplitude and phase of the signal you want to cancel. <S> edit <S> (re your comment) <S> If hitting a disconnected drum doesn't give you crosstalk, then it doesn't seem to be acoustic after all. <S> I want to have a look at your wiring. <S> If the wires between drums and microcontroller are very long and very well coupled (like intertwined), with the high impedance you have this may cause minor crosstalk. <S> Not so much from the resonance sine wave, but from the fast peak when you hit it. <S> But this should only give a small "tick" sound, not the typical drum. <S> So how did you wire it up? <S> Try to use separate wires for each drum. <A> I'd recommend to change the zener placement as shown to have the effect you intended; this has nothing to do with your problem, though. <S> As stevenvh mentioned, it's improbable that you have electric crosstalk from such an arrangement, but if you want to be sure a shielded cable from the drum to the arduino would help. <S> But in the most probable case, in which it's an accoustic effect, consider dealing with the problem in software. <S> It's almost impossible that you hit two drums at exactly the same time, even if you're using both hands to hit simultaneously two different drums. <S> So how about simply considering as a valid hit at any given timeslice only the strongest input, and ignoring the others? <S> BTW, to confirm that the problem is really accoustic, try to disconnect one drum and hit it to see if it still produces an input in the other (connected) drums. <S> EDIT: revised according to comment below <A> I think your trigger level for deciding a drum was hit is too sensitive. <S> You need some level below which you figure the drum was not intentionally hit. <S> That is probably what the zener in your circuit was intended to do, but you have it wired backwards so that it only adds a small threshold instead of the over 3 V as intended. <S> However, a zener is rather a hack for thresholding. <S> You say this is going into a microcontroller, so I would lose the zener altogether and do the minimum thresholding in the micro. <S> This is assuming that a maximum whack results in just about the full A/D voltage range. <S> Adjust the second resistor (next time put component designators in your schematic) to get the right maximum volume, then adjust the firmware to ignore peaks below a certain level.
The signal should be a high peak voltage (high dV/dt), followed by a quickly decaying sine (the drum's resonance).
Why do thunderstorms knock out power? It isn't like lightning strikes the wires. And surely the whole apparatus is designed to be water-proof. So what is it that causes power outages during thunderstorms? <Q> Considering the number of lightning strikes on or near power lines, power going out as a result of one is actually quite rare. <S> These cable are then periodically grounded at poles. <S> Lightning is a massive current surge, and sometimes stuff happens. <S> It's not economical to protect against every last lightning scenario, so the systems are designed to keep on going with most lightning strikes. <S> However, just the right strike at just the right place at the right time can still cause excessive current someplace, which trips a breaker, which shuts down power for a while. <S> Breakers on intermediate distribution lines usually reset themselves after a few seconds a few times in a row. <S> This is why you are more likely to see power blip out for a few seconds after a lightning strike than a real outage a crew has to come out and fix, which will take 10s of minutes to hours. <S> Actual outages due to lightning are actually more likely due to lightning making a tree branch fall accross a intermediate feeder line, which then shorts the line and causes a breaker to trip. <S> The big cross country high voltage transmission lines are quite well protected against lightning, and you very rarely hear of a outage caused by a strike to them. <S> Usually lightning outages are geographically small since it is the intermediate feeders (a few kV to a few 10s of kV) that are effected by tree branches and the like. <A> Actually it's not terribly uncommon for lightning to strike the lines, but they have lightning arrestor protection that shunts it to ground. <S> What you're most likely wondering about is induced current. <S> The power lines act like an antenna and lightning strikes cause electromagnetic disturbance across a wide range of frequencies. <S> Just like a radio station transmitter induces a current in your radios recieving antenna, the same thing happens to power lines during a lightning strike. <S> The induced current can be VERY large momentarily and sometimes it's enough to blow the transformer or breaker on the lines. <S> That's the simple answer anyways, there is a lot of physics behind it if you're really intereted. <A> The other answers cover the main points, however there are a few other minor factors: A lightning strike not hitting the power lines can still raise the local ground potential, possibly moving it far enough away from the "unaffected" power lines that various systems trip out. <S> The EMF/radio waves can induce currents on plenty of things, a lightning strike is a massive transient that will get picked up by anything with a wire in it - including power lines and phone lines (which look a lot like massive antennas in RF terms, and massive antennas are massively sensitive ). <S> Additionally, first-hand experience of the telephone network shows that any large network of wires strung around the countryside (over or underground) is very much going to act as a lightning magnet as it's more conductive than most of the rest of the countryside hence offers a really attractive pathway to any stray electrons, plus it usually leads somewhere a long way away with a more attractive potential to head towards. <S> Also, someone somewhere will always have connected part of your network to a nice big tall thing, be it telephone pole, pylon, lamp-post, cellphone tower, etc. <S> etc.
Overhead power lines do have cables that run above them mostly for the purpose of catching lightning strikes.
PLL - why compare phases not frequencies I have a question about PLL's. The aim of PLL is to get two signals with the same frequencies (there can be a shift in phases, as I understand). So, in this case, why do you use a phase detector to compare phases, and NOT just compare frequencies? thank you <Q> In most cases, the best way to tell if the frequency of the feedback waveform precisely matches the frequency of reference waveform is to observe whether the two waveforms maintain a fixed phase relationship. <S> If the frequency of the feedback waveform is slightly higher than that of the reference wave, its phase will to lead that of the reference wave form by an increasing amount each cycle. <S> Likewise if its frequency is lower than the reference, its phase will lag each cycle. <S> If the reference waveform is reasonably stable, trying to maintain a phase lock will yield a very stable frequency lock. <S> There are times when maintaining a phase lock is difficult or counter-productive, such as if one needs to generate a stable frequency whose long-term average matches that of a "warbling" reference. <S> In that case, the fact that a frequency-locked loop wouldn't track the reference frequency as tightly as a phase-locked loop would not be a disadvantage, since the whole purpose of the loop in that case would be to avoid having the warbling in the reference passed through to the output. <S> In general, though, the tighter response of phase-locked loops is preferable to the looser response of frequency-locked loops. <A> From a more theoretical angle, frequency is the time derivative of phase. <S> Equivalently, phase is the time integral of frequency. <S> So, when a phase detector is used to control frequency via a VCO, there is an integration around the loop. <S> Or, roughly speaking, a low-pass filtering effect. <S> As supercat points out, the advantage gained is the rejection of "warbling" or even glitches in the reference. <S> Many years ago, with a freshly minted BEE, I used a PLL to solve a problem where glitches on the backplane clock, due to, for example, hot plugging cards, (this was a digital loop carrier), caused a particularly sensitive card to "lock up", dropping any active call in progress. <S> The PLL rejected the glitches, producing a stable clock for the line card, that, on average, was frequency locked to the backplane clock. <A> and if using data, the frequency of the signal may not be easy to extract. <S> Also the presence of glitches causes errors. <S> The reality is that F detect gives faster capture time due to lack of positive feedback when a cycle skips to become positive feedback for Type <S> I phase detectors such as exclusive OR gates or diode or transistor multiplier phase mixers. <S> but these are more immune to glitches and ignore false transitions. <S> Edge sensitive detectors be they phase or cycle count or frequency detect <S> are not immune to glitches and not a good match for noisy input signals but very useful for PLL frequency scaling with wide range input frequency error for clock synthesis where analog or Type I phase detectors have more difficulty in wide capture range without increasing bandwidth and gain of loop. <S> My favorite PLL was to capture noisy data on a TV unused vertical blanking interval (VBI) <S> The data was simple 4Mb <S> /s NRZ for one line of data every field. <S> or 1/120th of a sec for NTSC. <S> The VCXO was converted to a sawtooth signal and the data was analog broadcast where noise could be present. <S> The data was filtered to be raised cosine to eliminate ISI and differentiated to product one shot pulses which would sample the phase of the Sawtooth signal and then hold until the next bit transition. <S> It was stable enough to stay in sync from field to field but could correct phase error within 1%. <S> We used it to cyclically broadcast executeable games for TRS-80's VIC-20's in the early 80'S so that it appeared to be a 2 way modem that was only a server sending all the games to be selected quickly( small files back then) <S> The Phase detector signal using S&H circuit always produces an error signal that is the duplicate of the signal being sampled... in my case a sharp Sawtooth signal. <S> At zero phase error. <S> the data edges lined up with the middle of the Sawtooth. <A> From mathematical point of view phase detectors don't compare the phases of signals. <S> Usually phase detectors produce non-linear functions (e.g. sin, sawtooth, bunch of pulses) which in some approximation depends only on phase difference between two signals. <S> Complicated non-linear dynamics of the hole system (VCO + phase detector + filter) <S> forces phase-locked loop to synchronize frequency of the VCO to the input frequency. <S> Different modification of PLLs are used to improve performance characteristics ( Hold-in, pull-in, and lock-in ranges of PLL-based circuits: rigorous mathematical definitions and limitations of classical theory. ) <S> to synchronize frequencies faster and in a more robust way. <S> One of the most popular phase detectors is Phase Frequecny Detector (PFD) is designed to use frequency difference of the signals to improve these characteristics. <S> Good mathematical overview of analog PLL models is given in Phase-Locked loop: nonlinear models and limitations of the classical theory
I think the main reason is that phase can be measured instantaneously in almost zero time, whereas frequency as in Type II phase detectors built into many PLL libraries and PLL chips requires at least one clock cycle.
Why does an antenna trace have this shape? I'm wondering why an antenna has a board trace that follows a certain "squiggly" shape. This doesn't have to apply to only antennas; I'm sure that there are other components that have changing paths for various reasons, but the antenna usually retains this shape. You can see it on the right in this picture. What is the significance behind a trace like this? ( source ) This question might be related to electromagnetics, but I think the answer should be simple enough. EDIT: I should clarify that I'm looking for explanations dealing with radiation and impedance. Also, any comments on why a design like this would not be efficient for a high-frequency system would help. <Q> This is referred to as a meander antenna, which is a specific type of folded dipole. <S> Advantages: <S> Improve omnidirectionality <S> Smaller space requirements <S> Disadvantages: <S> Tuning becomes more critical Losses are higher than a standard dipole <S> The Freescale App note, " <S> Compact Integrated Antennas " gives a brief overview of several options, included the meander, for on-PCB antennas. <S> It doesn't give specific design parameters. <S> A 1982 dissertation, " Meander Antennas " provides some guidance on the mathematical models used to understand and design meander antennas, but goes rather deeper than most EEs will want to venture for simply designing an antenna. <S> The reality today is that most PCB antenna design of this type is usually done with the aid of an antenna design CAD package. <S> The antenna performance depends on not just the physical layout, but also the materials used, and the shape of those materials, for the PCB substrate, copper, and mask. <S> The software still has some limitations, and so extensive testing is done to validate and tweak the design once it's fabricated. <S> An example of free antenna analysis software is 4nec2 <S> which can evaluate many types of antennas. <S> When designing a meander antenna, start with a trace the length of the ideal dipole, fold it into the desired shape and space, then perform numerical analysis to determine the radiation pattern and efficiency. <S> Some CAD software has wizards that can help you choose an optimal pattern for a given space, but I have not yet seen a book or guide that gives optimal pattern information that can be applied generally to meander antennas. <A> An antenna needs to have a certain length to work well at a given wavelength, which is determined by the frequency. <S> Though it is far from as simple as that, the exact shape and surroundings also play a role, as they influence the electric and magnetic fields the antenna should emit. <S> Unless you want to study antenna design you can think of it as black magic. <S> Edit: I think the meandering shape it mostly to get a longer antenna into this small space. <S> The OVC3860 chip is for Bluetooth audio, so it runs in the 2.4GHz band, with a wavelength of about 125mm. <S> From the 0.4mm pitch of the OVC3860 <S> I estimate the length of the antenna trace as 34mm, which is about 1/4 of the wavelength (actually somewhat more, because the signal will propagate at a speed slower than the speed of light in the trace). <S> This is a fairly normal length for a single-ended antenna. <A> Pure guesswork here, as I'm no EM guy, but: The length of the antenna will be dependent on the wave-length of the signal being sent. <S> If designed to do so, this interference would result in a standing wave phenomenon along the line. <S> Now, this is where I think that the squiggly shape has to do with helping to amplify the EM waves sent through superposition of the waves at calculated fixed points along the line. <S> Possibly at the peak of the standing waves.
As a result of the termination (open at one end) of the antenna, there will be reflected waves coming back down the line and this will result in interference .
Measuring input current of opamp I want to measure the current that goes into a noninverting opamp input. I've setup my experiment as follows: I can't measure the voltage drop across the 10M (R1) resistor directly since my DMM has an input impedance in the megaohm range. So, i have to measure the voltage on the ouput of the opamp. R2 is a potentiometer, so the gain is not exactly 4, and V1 is 1.19V. When I connect the input to voltage source of 1.19V, I get 4.04V on the opamp's output. When I connect the input via the 10M resistor (R1), I get 3.64V on the output. Now, my gain is: $$4.04/1.19 = 3.39$$ so, voltage that the opamp sees when connected via the 10M resistor is $$3.64/3.39 = 1.07V$$ this means, I have a voltage drop across the resistor R1: $$1.19 - 1.07 = 0.12V$$ so, the current into opamp's input is $$0.12V/10M = 12nA$$ Am i doing it right? Another question is: Could 12nA leakage current go thru a home made PCB that was vigorously cleaned from flux residue? LMC6001 has a stated input current in femtoampere range, it might be that it was overheated while soldering and went kaput. But first, I want to be sure that I'm doing the measurements the right way. <Q> No, you are not doing this right. <S> The gain of the opamp circuit is not R2/R3, but (R2+R3)/R3. <S> Your gain is therefore (400 kΩ)/(100 kΩ) <S> = 4. <S> I'm using the values in your schematic because I shouldn't have to go looking elsewhere. <S> If you don't like that, put the real values right on your schematic next time. <S> You see a change of 4.04V - 3.64V = 400 mV on the output by switching in the 10 MΩ resistor. <S> Divided by the gain of 4, this means a 100 mV change at the opamp positive input. <S> By Ohm's law, (100 mV)/(10 MΩ) <S> = <S> 10 <S> nA current thru the resistor, which is the opamp input current in this case. <A> First, you are putting 18V on an op-amp with an absolute maximum supply voltage of 16V, which is ummmm.. not very good practice. <S> 12nA would be an excessive leakage current unless you are doing something really silly, but I can't judge whether you've done something silly like cleaning the board with something that leaves a residue. <S> Try +/-5V. <S> I would suggest paralleling the 10M resistor with a low leakage capacitor such as an MLCC NP0 ceramic or film type to prevent noise from affecting the reading. <S> 10nF should be sufficient. <S> There are two unknowns in your circuit with the switch closed- the op-amp Vos and the gain, assuming your meter and the 1.00V source are both perfectly accurate. <S> You will need more information to separate the two. <S> Set the 1.00V source to zero with the switch closed to get the output offset voltage. <S> Your circuit is not capable of measuring the expected input current of 10fA <S> (\$10^{-14}A\$). <S> I suggest a much higher gain, and using a much higher value resistor. <S> A gain of 100 and a resistor of 1G will give you 1mV output, which should be measurable to within ~1%. <S> Get rid of the 1.00V source and measure the output with the resistor shorted and not shorted. <S> Keep the time constant of the capacitor/resistor reasonable <S> so you don't have to wait all day for it to settle. <S> (maybe 500pF-1nF for 1G). <A> In this case, Input Offset voltage should be taken into account as some portion of amplified Input Offset Voltage will also be present in the output in both the cases(when SW1 is connected directly to supply and when connected through resistor). <S> Here is my solution(including the offset <S> voltage).![Offset Voltage is present at the non-inverting input at all times.][1]
Your concept is good but your calculations are flawed. The excessive supply voltage could be a factor too.
Feeding 2*5V to a 12V fan? How would I amend a 12V fan to take 2*5V? The 12V fan has 2 wires on it. one would take 12V the other GND. I'd like to be able to feed it 5V and 5V, instead of just 12V. What do I need to do it? I'm a geek but not an electronics geek..so if there is terminology, please use it but tell me what it means.. <Q> You can't make 10 V from two times 5 V unless they are completely separated. <S> In that case you can place them in series. <S> Buck types deliver a lower output voltage than the input, boost give a higher output voltage, so you want the latter. <S> 5 V in to 12 V out is a piece of cake for a boost switcher. <S> Keep in mind that you can't fool the laws of thermodynamics: if your fan would need 200 mA, for instance, that's 2.4 W, then the 5 V supply has to deliver that too, and 2.4 W at 5 V is 480 mA, not 200. <S> Make that probably 600 mA <S> because there's still some losses in the switcher. <S> example <S> So check how much current (or power) <S> the fan needs at 12 V, and that the 5 V supply can deliver the required power. <S> edit <S> If you want to power a 1.2 W fan from your USB port you'll need more than 240 mA from it, probably around 300 mA. <S> A USB port can deliver up to 500 mA, but that has to be negotiated with the host (part of the USB software protocol). <S> Without negotiation you can only get 100 mA, and that's not enough. <S> Further reading Powering electronics from the USB port , TI application note <A> I've been running several 12 V fans for years at 10 V and so far, so good. <S> If you try to do the above and the sources are not isolated, expect a short circuit, sparks and possibly a loud bang and melted cables. <S> The simplest way to determine if the sources are isolated is to test them with a multimeter. <S> There should be no connection between their negative pins. <S> If there is, you can't use them directly. <S> If you're not certain about the sources, provide us with more information and we might be able to help. <S> If the sources aren't isolated, you may have to use a boost converter to increase the voltage. <S> If the single 5 V source doesn't have enough current, you may be able to connect the two sources in parallel to provide more current, but we'll need more information to be able to tell you how safe the connection is. <A> (I'm guessing this is a PC style fan? <S> Why are you trying to do this - what effect do you want to achieve?) <S> Power doesn't really work like that. <S> You might try feeding it 5V on the 12V wire, this may cause it to turn slowly. <S> Otherwise you'll need a suitable DC-DC converter module ("boost converter") - these are available already built. <S> If your computer has a -5V rail which is capable of supplying suitable current, then connecting the fan across the +5V and -5V should make it turn. <S> But I can't think why you'd do that.
If you have two isolated power sources, connect them in series and the fan will most likely work fine. The best way to get 12 V from 5 V is to use a switcher , or SMPS (Switch-Mode Power Supply). Switchers can be very efficient (little power lost), and therefore often very compact as well. So basically connect the positive side of one source to the negative side of another source.