text
stringlengths
83
79.5k
H: Output voltage when turned off I have a DAC (datasheet available here) that has a SLEEP mode (see page 14). When SLEEP mode is activated, my oscilloscope reads an output voltage of about 1.65V on each output, which is about half of the supply voltage if 3.3V. I want to check that this output voltage makes sense, but the datasheet doesn't seem to provide the information. (It specifies that the output current is turned-off, but that's it.) AI: The opamp output you are seeing is normal. If we examine the circuit, starting with the opamp non-inverting input. We assume the input is infinite impedance so we first work out what voltage it's seeing: We work out the bottom of the divider: ((R139 + R141) || R142)) = 1/(1/269.9 + 1/1000) = 212.54 ohms. The top of the divider is R327 1k, so the voltage at the centre is: 3.3V * (212.54 / (1000 + 212.54)) = 0.578V So the non-inverting input sees 578mV. Now we look at the inverting side. We know that if the non-inverting input is 578mV, the inverting side must be at 578mV too. We also know that if the DAC outputs are off, then effectively the input is 0V, and the input resistance is R140 + R137. So the input resistance is 269.9 ohms, and the feedback resistance (R326 || R136) is 1k || 1k = 500 ohms. We assume the inverting input has infinite resistance, so we are left with a voltage divider. With 0V at one side of the voltage divider, 578mV in the middle, the top side should be 0.578 * (269.9 / (500 + 269.9)) = 1.65V, which is what you are seeing.
H: How to sharpen blue LED voltage-to-current knee at 3.0 V? I want to use blue LED as simple 3.0V nominal vs brownout indicator. It will be mounted on tiny proto board and will be plugged into rails or other various parts of breadboard. I want to make same plugs for 4.9V and 1.8V. The LED is bright at 5mA 3.2V. And it is still visible at about 2.2 V but very dim. I want it to shut completely at about 2.8V and stay bright at 2.95..3.1V. How can I improve sharpness (steepness) of threshold with any amount of simple BJTs, resistors ? Thank you. Answer: as accepted, but with more details for 95% sharp threshold near 3.0V. Green trace is jump of output voltage on collector of T2, when power is reaching 3V -5%. Blue trace is a normal diode + resistor current for comparison. Red trace is power voltage. Scale is 3.3V for voltages. For simplicity, consider milliseconds are percents of voltage nominal. Update after physical implementation: The resulting threshold is 2.92V=dim, 2.96V=bright. The resistors were slightly changed (no 91K in stock), so R1=23.5K(2x47K parallel), R2=2K, R3=82K, R5=270), LED=blue smt one from dead HP laptop. AI: You don't mention it but the best solution is a comparator, which is easy to set the toggle level of. A BJT counterpart is the transistor Schmitt-trigger: This website has detailed examples of the required calculations for the thresholds. A third option is a simple NPN transistor with a 1:4 resistor divider, so that above 2.8 V in the transistor conducts and switches on the LED. The higher the HFE the sharper the corner point. That has nothing to do with the transistor's Ic-Vbe curve, but because of the higher HFE you'll reach the point where the current limiting resistor takes over more quickly. Without the current limiting resistor you would still have a current that varies with the voltage, giving a transition region you don't want. If you want you can make a Darlington of 2 BC337-40s, that should give you an HFE of at least 62000. Don't forget to adjust the divider to 1:2 for that.
H: How to charge Polymer Lithium Ion Battery that comes with the Lilypad Development Board There is a Lithium Polymer Ion Battery that comes with the Lilypad Development Board from Sparfun. Does anyone know if the battery charges if we plug in the battery to the Lilypad Arduino and connect the Lilypad Arduino using the FTDI at the same time. The battery specifications are in the URL below: http://www.sparkfun.com/products/731 Here is the link to the Arduino Board which takes power via the 6pin FTDI or via a LiPo battery connected to it: http://www.sparkfun.com/products/10274 AI: Yes, it will charge the battery. It has a MCP73831 Li-Ion charge controller IC for this purpose. Note this refers to the Lilypad Arduino Simple board only (the one you link to) - the "Lilypad Arduino Main board" does not appear (from a quick look at a pic) to have anything in place for charging a battery.
H: Estimating costs for producing and implementing RFID systems What type of RFID could I attempt to emulate myself easily for projects in a classroom. There are many technologies that are available and I am having a hard time selecting an RFID system that would both allow a demo of RFID and and best cost effective for a teachers budget. RM: I understand the question to be as follows. Azin should comment or edit to suit. The company that I work for want to know how much does it costs to produce RFID tags and readers, and the typical end user cost for implementing overall projects including the costs of tags, readers and related equipment. It is possible that building tags and readers from components would be most cost effective due to our circumstances but this would depend on the cost of component parts and the volume costs of available finished readers and tags - so I need to be able to get a feel for actual component costs so useful comparisons can be made. An example system which sounds similar to the sort that we would like to implement is the one installed at St Charles Sixth Form College in West London, England. I have been unable to find any costing data on such systems. The St Charles College system is mentioned on a number of websites including here and here {Wikipedia} but does not seem to be mentioned on the school's website. ... St Charles Sixth Form College in West London, England, started September, 2008, is using an RFID card system to check in and out of the main gate, to both track attendance and prevent unauthorized entrance ... . AI: It's actually fairly cheat if you know how to do it, this isn't something I'd recommend for someone new to electronics though. You could probably build a decent reader for under $5. Why not look at prebuilt readers and tags like the following: Seeedstudio Reader Seeedstudio Tags ADDED The following mainly covers DIY tags. If still interested after reading this ask questions and we can talk about DIR readers. The price of RFID tags is usually low enough that it is economic to buy them complete BUT you can "roll your own" and there may be advantages in doing so. For a very raw DIY approach the Microchip MCRF355 IC datasheet here allows you to bild receiver coil etc. BUT these ICs are not readily obtained and the datasheet is dates 2002, so I'd consider them a learning exercise. A 13.56 MHz RFID design guide from Microchip found here and dated 2004 shows how the above IC can be employed and gives valuable insight into general principles. [Antenna Circuit Design for RFID Applications - Mrcrochip AN710](Antenna Circuit Design for RFID Applications) provides extensive antenna design and performance information. Highly valuable. As an indication of how small RFID tags can 'bee'. Related to a paper by Dr. Whitehorn and colleagues which I have not yet located. A moss carder bumblebee, Bombus muscorum. NXP Forum Mifare RFID / NFC system - more complex than you want but useful. Demo board related to above $88 TI "Tag It" transpoonder inlays $US0.35/5000. This the sort of thing that you compete against when considering making your own tags. See below. Texas Instruments Tag-it™ HF-I standard transponder inlays consist of 13.56-MHz high-frequency (HF) transponders that are compliant with the ISO/IEC 15693 and ISO/IEC 18000-3 global open standards. These products offer a user-accessible memory of 256 bits, organized in eight blocks, and an optimized command set, available in five different antenna shapes, with frequency offset for integration into paper, PVC, or other substrates. The Tag-it HF-I standard transponder inlays are manufactured with TI’s patented laser tuning process to provide consistent read performance. Prior to delivery, the transponders undergo complete functional and parametric testing, in order to provide the high quality that customers have come to expect from TI. The Tag-it HF-I standard transponder inlays are well suited for a variety of applications including, but not limited to, product authentication, library, supply-chain management, asset management, and ticketing/stored value applications. Tag insert Related Tag insert - Related Added: Here is an immensely informative application note from a company with a number of potentially relevant products. ib technology quad reader tag is usful for its nicely minimal circuit diagram plus wealth of application information. But wait, there's more (from the same people). home page Range of reader modules Reference design kits ..... one example Evaluation kit Datasheets and application notes looks very useful
H: Keyboard USB cable reconnnection I've just tried to repair my keyboard's usb cable as it has been damaged right where it goes into the keyboard. I've cut out the bad part of the cable and reconnected the wires. I've tried it and all is working well but I've used tape (lots of it :D). So it is possible that at some point the wires inside the USB cable will mix and my question is what is the possible damage due to that. For example is there a possibility of a short circuit damaging my motherboard? I've read somewhere that USB 2.0 and above needed to have short circuit protection as a standard, but I wanted to ask just to be sure. Thank you! AI: USB ports should be capable of surviving short-circuit, but unfortunately, there are motherboard manufacturers which interpret the standard in different ways. Some will simply turn off the port, others will allow limited current to go through the port, some will have no protection at all. Unfortunately, if you're the owner of one of the badly designed motherboards, there's no safe way for you to test what would happen.
H: Flyback diodes issues and pull-in & hold current issues in this Relay circuit Although this may be a basic question but I'm still struggling with it. In this schematic, two zener diodes D1 and D2 are connected back-to back across relay coil L1. The BVds = -30V for Q1. Can I use 15V(Vz = 15V) zeners for D1 and D2 instead of 5.1 V zeners? Will the relay coil or contacts can get damaged during turn-off of relay? If required, I'm using this relay (5V DC Standard Coil). Also, to reduce steady state current consumption of relay coil, I wanna use the RC ckt shown aside in schematic. As soon as Q1 turns-on, uncharged capacitor temporarily appears as a dead short, causing maximum current to flow through the relay coil and closing the relay contacts without chatter. As the capacitor charges, however, both the voltage across and the current through the relay coil decline. The circuit reaches steady state when the capacitor has charged to the point that all the current through the relay coil is moving through R1. The contacts will still remain closed until the drive voltage is removed. Which is the best place to put this RC ckt - section marked 'A' or 'B' in schematic. Will it make any difference? Section-B seems to me the best choice, as when Q1 turns-off, capacitor C1 can discharge via R1 through ground. How will C1 discharge when instead I place RC ckt at section-A? Am I missing something here? Does putting this RC ckt has any side-effects? Any better solution? Please correct me if I'm wrong or missing something? UPDATE1 on 2012-07-09 : Say in above schematic I have 6V DC Standard coil(see datasheet above), 48.5 ohm relay. And take C1 = 10uF say. Assume that R1C1 ckt is placed at section-A in schematic above. The power supply is at +5V. For a Drop of 3V(Hold-on voltage) across relay coil, the current must be 62mA approx. through coil. So drop across R1 at steady state is 2V. For a current of 62mA through relay coil at steady state, R1 must be 32.33 ohm. And charge on C1 is 2V x 10uF = 20uC, at steady state. Now in this data sheet, the operate time is given to be 15ms worst case. From above data we have RC = 48.5ohm x 10uF = 0.485 ms. So, as soon as Q1 is turned on, the C1 will be almost fully charged in 2.425 ms. Now how do I know that this duration of 2.425 ms is sufficient for relay to make its contacts close? Similarly, as soon as Q1 is turned-off, due to back emf generated and clamped to 3.3V by zener D2(Vz = 3.3V) plus diode D1 drop of 0.7V, the voltage across C1 will be -2V + (-3.3V - 0.7V) = -2V. But charge on C1 is still 20uC. Since capacitance is constant, so charge must decrease as voltage across C1 decreased from +2V to -2V instantly after turning off Q1. Isn't it violation of Q = CV? At this point, the current that is flowing through relay coil due to back emf will be 62mA in same direction as was before turning-off Q1. Will this 62mA current will charge or discharge the C1? The voltage across C1 is 6V as soon as Q1 is turned off right? I didn't get how currents will flow b/w R1, C1, D1, D2 and relay coil as soon as Q1 is turned-off. Can someone throw light on these issues? UPDATE2 on 2012-07-14 : "Current in an inductor will not change instantaneously" - While there is a flyback diode D1(Say, D1 is not zener but a small-signal or a schottky diode, and zener D2 is removed in the schematic above), as soon as Q1 is turned-off, will there not even be a current spike(not even for few usecs)? I'm asking this becoz, if there is a current spike then the amount of current that will flow during this spike(say > 500mA in this case) might damage the flyback diode if I had selected a diode with max peak forward current rating of around 200mA or so only. 62mA is the amount of current that is flowing through the relay coil when Q1 is on. So, will the current through relay coil never exceed 62mA - not even for a moment(say for some usecs) after Q1 is turned off? AI: You can place the RC either at the B side or the A side. When components are placed in series the order of them doesn't matter for the working. About the diodes. When you switch off the relay it will cause a (possibly large) negative voltage on the FET's drain, and a flyback diode is used to limit that voltage to a 0.7 V diode drop. So the diode(s) don't serve to protect the coil, but the FET. Using the zeners will allow this voltage to go to -5.7 V or -15.7 V if you'd use the 15 V zeners. There's no reason for taking risks here, even if the FET can handle -30 V. So I would just use a rectifier or signal diode, or even better a Schottky diode. edit re your comment You can indeed use a zener (combined with a common diode, D1 doesn't have to be a zener) to decrease switch-off time, and Tyco also mentions it in this application note, but I don't read it as if they insist on it. The scope images in the first link show a dramatic decrease in switch-off time, but that measures the time between deactivating the relay and the first opening of the contact, not the time between first opening and the return to the rest position, which will change much less. edit re the 6 V relay and the RC circuit Like I says in this answer you can operate a relay below its rated voltage, and since its operate voltage is 4.2 V the 6 V version of your relay can also be used at 5 V. If you use a series resistor not higher than 9 Ω you'll have that 4.2 V, and then you don't need the capacitor (keep an eye on the tolerance for the 5 V!). If you want to go lower you're on your own; the datasheet doesn't give a must hold voltage. But let's say this would be 3 V. Then you can use a series resistor of 32 Ω and you'll need the capacitor to get the relay activated. Operate time is maximum 15 ms (which is long), so as the capacitor charges the relay voltage shouldn't go below 4.2 V until 15 ms after switching on. Now we have to calculate the RC time for that. R is the parallel of the relay's coil resistance and the series resistance (that's Thévenin's fault), so that's 19.3 Ω. Then \$ 3 V + 2 V \cdot e^{\dfrac{- 0.015 ms}{19.3 \Omega \text{ C}}} = 4.2 V \$ Solving for \$\text{C}\$ gives us 1500 µF minimum. Re switching off: You can't violate Q = CV, it's the Law. Your clamping voltage is 3.3 V + 0.7 V = 4 V. That means that when you switch the FET off the low side of the capacitor momentarily will be pulled to -4 V, and quickly rise again to 0 V. The high side is 2 V higher, and will simply follow that 4 V drop while the capacitor discharges through the parallel resistor. The capacitor won't even notice the drop. The discharge time constant is 1500 µF \$\times\$ 32 Ω = 48 ms, then the capacitor will discharge to 20 mV (1% of its initial value) in 220 ms. The 62 mA won't charge nor discharge the capacitor. We often apply Kirchhoff's Current Law (KCL) to nodes, but it also applies to regions: Draw a boundary around C1 and R1, and you'll see there's only one path to the outer world since the way to the FET is cut off. Since the total current has to be zero there can't be any current through that unique connection. The coil has to take care of the 62 mA on its own, and it does so by using the loop formed by the zeners.
H: Supplying ac to a dc circuit So a while ago, i was stumbled upon a post what will happen to the dc circuit when we supply ac to it. Lets assume the ac has the same voltage as the dc. We know that ac switches direcions so there will come a tome it is positive, zero and negative. If the ac is in its positive voltage, the dc circuit will work fine. By the time it approaches zero voltage, no current will flow and so thr circuit is not functioning. Now what bothers me is the negative voltage applied. What really happens on the inside? Technically speaking. Lets say the dc circuit can be jus any device like a piano, laptop, etc Thanks AI: Circuits designed for a particular DC voltage are very unlikely to work correctly with AC, even at the same voltage. There is a very good chance the circuit will be damaged by the negative half-cycles of the AC power. There are some exceptions to this, but they aren't really "circuits". A incandescent lightbulb works fine with AC or DC, and so does a resistive heater. Beyond that, you're heading for trouble. Some devices that require DC power may have protection built in so that they at least don't fry with AC provided or the DC power is hooked up backwards. This is usually in the form of a "idiot diode" in series with the positive DC power lead. It simply blocks anything negative so that it can't cause harm. Another approach is a fuse followed by a clamp. If the input voltage is backwards or too high, it shorts the power leads together and blows the fuse. Cheap consumer devices that come with their own power supply are less likely to have protection. They also then come with a warning in the instructions to use only the provided power supply. If you hook up something on you're own, they are off the hook. That's a perfectly legitimate thing for a manufacturer to do when the final sell price needs to be as low as possible. Added: I meant to say this earlier, but had to quit and do something else. AC of the same voltage as DC will not only have large negative voltages, but also positive voltages greater than the DC level for part of the cycle. If the AC is a sine wave, the peaks will be at ± the square root of 2 times the RMS voltage. For example, "12 VAC" sine power will go as high as +17 V and as low as -17 V at the positive and negative peaks of the cycle.
H: Will a TIP42 suffice for this project that calls for a BC559 (transistors)? Im building a Nintendo 64 USB adapter as outlined in this guide. For the transistor, it calls for a BC559. At RadioShack, the most similar one I could find was a TIP42. Will this work for this particular project? I thought I was mainly looking for something with an emitter-base-voltage of 5V, which the TIP42 has. The power-dissipation collector-emitter-viltage and the collector-base-voltage are all higher on the TIP42 (or at least it looks so), but I thought those were more "maximum" sort of things. If you haven't noticed, I'm new to all this. This is my first electronics project and I'm a bit clueless, but I learn by doing. AI: No. TIP42 is a power transistor. It might do the job, but I think h(FE) is just too low and it is way too expensive. You want a general purpose PNP transistor like BC556, BC557, BC558, BC327, BC328, ... Important parameters are: power dissipation; collector current; current gain (hFE) collector emitter voltage;
H: Replacements for a 4006 IC? Im building a Nintendo 64 to PC adapter as outlined in this guide. It calls for two 4006 ICs. RadioShack did not have this type, but I was told the following two would work: LM339 or a LM324. Will either of those suffice for the project mentioned above? AI: Don't listen to these RadioShack guys, giving such advise is a shame to the shop! The alternative devices you mention are entirely different. The 4000-series are digital devices and 4006 specifically is a digital shift register, both LM's are analog devices called comparator and opamp repectively. These 4006 chips are pretty standard and shouldn't be too hard to find in a decent electronics shop.
H: Schematic for N64 controller to PC adapter confusing I'm working on this currently. I'm a bit confused as to how this tutorial expects me to connect it to the controller. It just shows the controller plug with the three holes. How exactly do I connect the wire into that? It says the left hole is a ground wire. The bottom wire, is that referring to the middle? Is the wire to the left referring to the left hole? Sorry for all the questions. Probably the last for now on this. AI: I would interpret the schematic like you: left (1)is ground, the middle one (2) connects to R1/R3/R4, the right one (3) connects to DB25-9.
H: Where should I put the fuse in this circuit ? Critic the design I've the following circuit , that used to measure the current through shunt resistance , The circuit have analog & digital ground , the terminals 1 ,2 ,3 are for AC source . I need to protect this circuit from shorts . So where's the right place to put the fuse ? & how to know that this is the right place ? Will be a fuse on the digital side and the analog side ? any other recommendation for this circuit ? I found out that 7805 voltage regulator is getting hot fast . Edit #1 :- R3 is shunt resistor with 200 u ohm resistance AI: I would put the fuse between pin 1 of the terminal block and R3. Directly after pin3 is probably just as good. I hope R3 is not realy 10k? And I hop you are aware that the circuit before the 7805 is tricky, and may cause 'interesting' side effects, like a shocking voltage on the terminal block pins after you disconnected the mains? I would expect at least a bleeder resistor over C3 (but maybe I am too pessimistic).
H: how to test isolation of DCDC convertor? I have an isolated DC-DC convertor which boasts a 1.5kV isolation. I have a PCB made along with the additional components it requires. How can I test it? AI: I assume that you have from 1 kV to 2 kV available as required for testing. If your question includes "how do I generate 1 kV" or similar please make this clar in the question. All available data and a photo would help. Non destructive testing may be difficult. If you insert only the components that are relevant - eg those that cross the isolation barrier, and then apply a high voltage via suitably high resistor and monitor current, you can get a reasonably good idea of whether you have leakage. As a system rated at 1.5 kV should protect against somewhat more than the rated limit you can do a pass/die test with 1 kV. As above you can feed the HV via a high value resistor to limit current flow if breakdown occurs. Breakdown does not have to be destructive to anything on the isolated side BUT it's very easy when you are applying 1.5 kV to have a proportion of it turn up where it shouldn't. IF the part is from a reputable manufacturer then you are really testing your PCB. Soldering in a dummy device so that solder etc is the same in real and dummy systems and then cuttin the dummy away so only its leads are left will give you a PCB that closely resembles your finished product.
H: Newbie question about compatibility My project looks like it's perfect for the combination of Sainsmart Arduino UNO and the 8-channel 5v Solid State Relay Module. It's a kinetic artwork with eight, AC-powered light circuits. Three questions: Are these two boards compatible? That is, can the UNO's digital outputs interface directly to the Relay Module's inputs? It looks like the UNO needs a 9v supply and the Relay Module needs a 5V supply. Can these two boards operate correctly with a single DC supply? By some chance, does the UNO board offer a 5V DC output that could power the Relay Module? AI: OK, now at least we know what you're talking about. They are compatible in the way that you can directly connect the Arduino output to the relay module's input. Arduino's logic is 5 V, and the module needs 2.5 to 20 V input to drive the relay. So that's OK. The Arduino needs at least 6 V input (7 V recommended), but the circuit works at 5 V, and that 5 V is also available on the power connector, at the bottom of the picture. Connect this 5V and the ground next to it to the relay module's power connector, and up to 8 of the digital I/O's shown at the top to the relay module's logic inputs and you're in business. edit vicatcu explains that the Arduino can also be powered from the USB input, and that's true. But the relay module will draw up to 160 mA, and that may be more than your USB port will supply. The Arduino itself also needs around 50 mA. edit 2012-07-09, re jippie's comment The Arduino Uno's LDO voltage regulator can supply 800 mA, which should be sufficient for Arduino + relay module, together about 200 mA. At 6 V in the LDO will dissipate 200 mW, and that's no problem, but at 15 V in that becomes 2 W, and that may be too much for the NCP1117's thermal protection. After all this is an SMT device. So it's advisable to use an as low as possible input voltage, or use a separate 5 V wall wart to power the relay module.
H: Voltage and Current Limiting Circuit I'm a newbie to circuit design, so I think I'm either really lost or over thinking this (most likely the former). I need a circuit that will act like a current limiting power supply, which I can design in a specific voltage (20mV) and current limit (100mA) across multiple independent outputs. Each of my outputs will likely be shorted or see very low resistance. So far, I've looked ICs that can provide a constant current source, but none are in the current range I need. I've looked at voltage regulators, but I'm not sure how I could limit the current from them. The most promising thing I've seen so far is using a two transistor current limiter, like this: Source: Wikipedia Is is likely to work? If I have multiple circuits like this (connected to the same VCC and GND), would it still work as intended? Is there a much better way to approach this problem? AI: An assumption need to be made which you may wish to clarify. If you want 20 mV at UP TO 100 mA then none of the circuits will work without both a current control and voltage control function. The following circuits deal with current control. These can be used to feed a standard 20 mV voltage regulator circuit. If Iload is < Icurrent_limit then the VR works as desired. If Iload tries to exceed current limit then VR is starved of current. So ... Your circuit will work but is relatively low quality - it depends on the Vbe of Q2 being well defined - which it tends not be be.Steven says that the top transistor needs more than 20 mV Vbe, which is true BUT if you set the current of choice and IF the load drops 20 mV at that current then Q1 will assume whatever Vce is required to drop 20 mV across the load. Original circuit. Not marvellous - Much better are circuits similar to the one below from here. I've modified this slightly but left their values in place as this is to give an idea only. The system turns Q3 on until V_Rsense = Vref. So I_constsnt-current = Vref/Rsense. Vref can be divided from some input voltage as shown using a divide ratio to suit. . You can provide a variable voltage from a pot or a microcontroller etc if desired to vary the current. Note that this is a current sink with the load being supplied from some V+ of choice. Need not be the same V+ as Vcc = BPS+ https://www.google.co.nz/search?q=current+source&hl=en&safe=off&prmd=imvns&tbm=isch&tbo=u&source=univ&sa=X&ei=K2P6T_iZEOijiAfU4JjlBg&ved=0CGAQsAQ&biw=1536&bih=864 Similar but with MOSFET and uC drive This is similar but uses the voltage across R1 to provide a high side current source. From here but he says it's copied from "The art of electronics". Note again that Vref is the HIGH side voltage across R1. ie Icc = Vref / R2 = [V+ x R1/(R1+R3)] / R2 Some thoughts from Maxim from here. Many related thoughts from all over
H: Is there a standard Ethernet Connector? I am looking for a PCB mount RJ45 connector. I find that there are about 10-12 types of RJ45 connectors( 6pin, 8 pin, 10 pin, 12 pin, 14 pin ). Even the PCB footprint is different for some connectors with same number of pins. If there is no standard connector, I would like to know the most popular one. I concerned about the availability and cost of the connector. AI: RJ45 is an 8-position 8-contact jack, so every plain RJ45 connector that has a different number of contacts is not an RJ45. But many connectors have contacts for additional features like shielding or built-in indicator LEDs. Ethernet requires tranformers between the RJ45 connections and the driver chip. These transformers can be built into the connector, in which case the hybrid connector-transformer can have more PCB contact pins. Note that the specs (turn ratio's) of these transformers depend on the particular driver chip. Sorry, there is no standard ethernet connector part. If you are concerned about long-term availability choose a part that has pin-compatible equivalents from at least one alternate manufacturer, and check whether the big suppliers (mouser, digikey, farnell, etc.) all stock these parts.
H: How to detect surges in the main AC Electronics have a habit of breaking in my house. In the last 2 years or so, I had 3 desktops, 1 monitor, 4 cellphones going dead. They are not completely dead like they won't turn on. But in the case of cellphones, one of them end up showing only white screen at max brightness, and cannot be turned off. While another's capacitive touch screen stopped working. Just recently, my 8 months old Macbook Air is playing up and unable to charge every now and then. I haven't found a definite fix, but shutting it down and restarting, or unplugging the power cord a few times seem to do the trick... sometimes.... Being a student in Computer Systems Engineering, I am curious and suspect if it might be something to do with the nature of my house that's affecting these electronics. The first thing I thought of was surges or spike from the main AC power supply. As far as I understand, these, unless large enough, don't usually immediately kill electronics. Instead, they put strains on the system and results in significant shortening of life span. And shortening of life span is exactly what I have witnessed. So I was wondering, are there relatively cheap and convinient ways for me to test my theory about spikes through the main? Or any other possible problem that might be taking place? Obviously I can just be extremely unlucky, but I'd prefer to do some research and testing first, you know, engineer style. AI: Your appliance failures may well not be maians spike related. Fitting surge suppressors to your outlets where expensive equipment is used sounds like an extremely good idea. These can be relatively cheap and a DIY solution is to use MOVs which are as good as many cheaper commercial offerings. Below is a circuit and description from patent GB2231672 This is "a bit basic" but could potentially do an OK job of doing what you want. A detector for detecting spikes on a mains electricity supply and for counting the number of spikes occurring during a period of time includes a zener diode (Z2, Z3) connected in series with a resistor (R4) and a counter (IC1) having an input connected across the resistor. The zener diode and resistor are connected in series to the mains supply and the zener diode has a breakdown voltage of a magnitude such that under normal conditions it does not breakdown but upon occurrence of a spike in excess of a predetermined magnitude the zener diode breaks down and provides an input to the counter. http://worldwide.espacenet.com/espacenetImage.jpg?KC=A&CC=GB&FT=D&NR=2231672A&date=19901121&locale=en_EP&flavour=firstPageClipping This interesting combination circuit from here detects spikes in a similar manner to above but also adds "flutter" and noise". They drive LEDs but you could add a counter or other monitor. Note that unisolated connections to mains can kill with ease.
H: SIM card: Detected when the card is removed I have an STM32 with a SIM card reader. For some reason the DETECT pin interrupt is triggered when the SIM card is removed, as opposed to when the SIM card is inserted. What could be going wrong here? AI: Possible reasons I can think of: the card detection switch switches from Vcc instead of ground, so that the logic is inverted and a falling edge becomes a rising edge and vice versa. there's contact bounce, generating both types of edges. Solved with an RC filter.
H: Control speed of brushless DC motor Assuming I have a brushless DC motor which externally exposes only a + and - terminal. (I.e. I do not have access to the windings and hall sensor directly.) Is there a way to control the speed? With a brushed DC motor one could just reduce the supply voltage. Am I correct in assuming that this is not really an option for a brushless DC motor that will give a lot of range? I am thinking that most likely the internal commutation control circuit is powered using a voltage divider: if one reduced the supply voltage, the internal control circuit would experience low voltage dropout, right? AI: It depends on the motor. Here are three cases I've seen. (1) Generate a rather slow PWM signal. I used 100Hz. It was a small fan and it varied speed rather nicely. (2) Fans with lots of smarts inside (I tore one apart and there was a Microchip PIC in there). It had a power-up delay of 100-200 milliseconds. That means that when your operating frequency approaches 5-10 Hz, the fan is off 100% percent of the time (it never completes the power-on). You can run pulses around 5 Hz or less, but it sounds ridiculous and you don't get much control. (3) I put a big capacitor across the output in an attempt to convert the output pulses to an average dc level. Fan had an internal commutation circuit alright, and when I reduced the voltage, it would draw more current in an attempt to keep going the same speed! So you couldn't really control it that way, either.
H: Is there a way to miniaturize cell-phone power adapter Is there a way to miniaturize a cell-phone power adapter to be not bigger than 1-3 cubic centimeters? Is there a way to do so by using more expensive parts or something like that? I'm talking about usual cell-phone power adapters that transform 110 AC to 5V 1 A DC. What are the limitation if it is not possible? AI: Is there a way to miniaturize a cell-phone power adapter to be not bigger than 1-3 cubic centimeters? ... -> 110 AC to 5V 1 A DC. Apart from the mechanical and connector issues, yes, it is possible to make the devices smaller. Will it be expensive? oh yes! For a space mission this is a "just do it" requirement. For a consumer device, if you have to ask the price you can't afford one. [But, if you order 10,000 and pay in advance, I'll happily provide them for a few hundred dollars each]. The single most obvious method is to increase the frequency used by the SMPS (switched mode power supply. At present typical modern devices use frequencies from high 100's of kHz to low MHz range. By increasing rhe frequency to 10's of Mhz the inductances needed in transformers become utterly minimal and inductor size is a non issue. You are then faced with actually making a device work efficiently at these frequencies and accommodating the electronics required in the available volume. Making it work is "just a matter of engineering" [tm] :-). ie given enough $ you can provide devices capable of minimal switching losses at far higher frequencies. Synchronous rectification and resonant techniques and ... . Component size is also not a major issue. One IC of minimal size, a few power devices (MOSFETS probably for switching an rectification) with the inductors already a non issue size wise. Noise filtering is at the multi MHz range so also small. For 5V, 1A = 5W output and say even only 80% efficient overall heat dissipation required = 5W x 0.2/0.8 = 1.25W = acceptable for a device of that size given the right outer housing. At 90% you need 550 mW heat dissipation.
H: Relay with arduino/microcontroller, diode needed? I know that you have to place a diode in parallel with a relay to use with i/o on microcontroller. Would you have to do the same with a relay board such as...... http://www.sainsmart.com/module/acce...-pro-mini.html http://www.sainsmart.com/module/acce...p-arduino.html AI: If you're still talking about the relay module from your other question, the answer is no, the diode is not required. This uses solid state relays which don't have a coil. It's that coil in an electromechanical relay that causes a voltage peak when switching off, against which the transistor has to be protected. If you would be referring to one of the other modules using electromechanical relays, like this one, those have a protection diode on board.
H: Question about relay module I just discovered a Sainsmart 4-Channel 5V Relay Module for PIC ARM AVR DSP Arduino MSP430 TTL Logic, I don't know how to make links, so I copy the URL here. http://www.sainsmart.com/arduino-pro-mini.html .Maybe the moderator can edit it a little bit. And I have a question. I'm in need of an array of isolation relays for a project, and wonder if I can use this device by simply providing a +5v VCC and contact closures between GND and INx. Thanks for your help a lot. AI: Per the specifications at the meb page linked in the question, the control input is a simple series curcuit: VCC is connected to a resistor (limits the current through the remainder of the series) which is connected in sereies with an optoisolator diode, which, in turn, is connected in series with a LED indicator. The optoisolator, (and consequently, the relay) and the LED will be turned on if 5V (more or less) is applied between VCC and INx. So, yes, the device may be controlled by contact closures between INx and ground as you indicated. Alternately, the INx terminal could be connected to an open-collector or open-drain driver circuit to allow for uC control. A coulple of things to keep in mind: the circuit driving the INx must be able to handle (sink) 20mA, per the device description. if you want to isolate the relay coil drive voltage from the optocoupler VCC, you will need to drive the node labelled JD-VCC with another 5V supply, connected between JD-VCC and ground. (In this case, the first 5V supply would connect to VCC only - this supply's ground would not be connected to the relay board. When the contact connected to the INx pin is closed, a return path will be formed through the INx pin.)
H: How to connect a SPCO relay? I have a relay SRM-1C-SL-5VDC. I am trying to switch the load On/Off using this relay. I am not sure how to connect it correctly as there its not mentioned clearly in the datasheet. Which pin on the relay am I supposed to connect the Load? I have uploaded my schematic below. Pin 1 on the two pin connectors is the 'Live' rail and pin 2 is the 'Neutral' rail. The footprint for the relay is shown below: AI: Your "Live" (the phase) enters at P1-1 and leaves switched at P2-1. So from there you go to the load, whose other side you connect to the neutral. It doesn't seem that the neutral connects on both connectors serve any purpose, except perhaps that they avoid that you have them just lying around. So that could be a safety measure. edit The numbers agree with the numbering in your schematic, so don't be misled by the pin arrangement on the relay: the three pins on the left are not the contacts! The diagram shows the connections, with the contacts for the relay unpowered, so the bottom contact is NC (normally closed), the top one NO (normally open). The dashed outline suggests that this is bottom view, but you can make sure by using your multimeter and measure the resistance between the center left pin and the ones on the right. The one which measures zero ohm is the normally closed contact, you want the other one and the center left.
H: Variable resistor with odd upper limit I have a device that is controlled by connecting a resistor between two of its connectors. The resistor can take any value between 0 and X, where X is an odd value. (E.G. X=1523ohm) Does anybody have an idea how I can realise a circuit whose resistance can be varied manually between 0 and X? There must not be the possibility that due to user error the resistance is larger than X! Many thanks. Edit 1 To clarify: I do not have a variable resistor but am looking for a circuit that has a variable resistance with an odd upper limit. Variable resistors have standard upper limits, e.g. 100 ohm, 1kOhm, etc. but not 1523 ohm... AI: Like gbarry says. The next higher value you find in the Digikey offering is 2 kΩ, so you would need a 6386 Ω resistor in parallel. That is between one end and the wiper, not across the full resistance. 6386 Ω is also an odd value, so you may want to compose that using different standard values as well. Now the 1523 Ω, how precise does that have to be? You represent it in 4 significant digits, that's 0.1 %. Potmeters are often 20 %, more precise ones can be pretty expensive. So our 2 kΩ can be anywhere between 1600 Ω and 2400 Ω. In the first case your parallel resistor should be 31650 Ω, in the second 4170 Ω. That's a wide range. You could use a 33 kΩ trimming potmeter. Use a multiturn is you want to get the 1523 Ω really precise. Note that placing another resistor over the potmeter's wiper distorts its linear characteristic. The greenish curve shows the resistance as a function of the rotation in % for a 2.2 kΩ resistor parallel to a 5 kΩ linear potmeter. The purple curve shows that resistance for the 2 kΩ potmeter plus the 6386 Ω, so that's not so bad after all. The rule for the most linear characteristic is to have the ratio resistor/potmeter as large as possible.
H: Measuring the phase difference between two signals I'm looking for an analog method of measuring the phase difference between two signals operating at frequencies in the range from (0 - 20 MHz). I'm wondering if there's an IC that does that or a specific circuit that converts the phase difference into a voltage signal. Thank you very much AI: With more specifics on input and output Voltage range, a better answer can be provided. To measure phase, as Steven says assuming they are equal amplitude and linearity you can subtract but this is a time-variant signal not DC phase output, so one might use a Peak Detector to rectify that signal to mix the result to generate a DC voltage for Phase difference. The amplitude needs to be normalized (the same) so linear slicers or limiters are used as well as XOR gates ( which is a logic gate that also works here as a mixer/phase detector for logic level signals. THere are many other ways too such as edge detect, S&H sawtooth clock and Time Interval counters. .. A better way that I suggest is the 4046 PLL chip. Do you want 0~180 deg = 0 to Vdd? then use TYPE I "XOR gate" chip or 0~360 deg then use the Type II edge detect phase detector. CMOS 4046 PLL chip is very easy to use, and has been around since mid 70's, when I first used it.
H: Diode fails open The question asked is the following: The book says that the correct answers are: \$V_{limit}\$ = 0V, \$V_{diode}\$ = 5V. I don't get why it ended up like that. My intuition says that, "fails to open" means not functioning, and so no forward current flowing in the diode. In that case, the voltage across the resistor is 10V and the voltage across the diode is 0V. AI: No current is right, because your circuit is interrupted, and you need a closed circuit to get current flowing. And when there's no current through the resistor there won't be a voltage drop across it neither, per Ohm's Law: Voltage = Current x Resistance. So 0 V across the resistor means the full 10 V is across the diode (not 5 V!). If the diode would fail shorted, there wouldn't be a voltage drop across the diode, and the full 10 V would be across the resistor, giving (again due to Ohm) 10 V/ 1 kΩ = 10 mA.
H: Calculating resistance in decibel In EMC there is an equation for charactristic impedance (If I am not wrong) that is defined as: $$Z_w = \frac{E}{H}$$ As you know \$E\$ is expressed in Volts and \$H\$ as Ampers. I had the exam today and for sake of confusion of students, the teacher brough this values in dB. But I actually needed this value in pure ohm (no dB) to solve the next part of question. The values were: \$E = 100\frac{mVdB}{m}\$ and \$H=80 \frac{mA dB}{m}\$ I am not sure if I did correct, but I went ahead and did this: $$Z_w = 20\log\frac{100}{80} = 1.93 \Omega$$ Is this the correct? If not, how to handle this? This is really confusing, in our study book the same question is presented by just E and H in normal way! for example E is 50mV/meter and H is 40 mA/meter...either I am so stupid or teacher is a troll! UPDATE First, Thank to all for the feedback. I asked my teacher the correct soloution and it appeard to be solved in this way: $$Z_w=\frac{E}{H}=\frac{10^{\frac{100}{20}}}{10^{\frac{80}{20}}}=10\Omega$$ AI: Is this the correct? No. If not, how to handle this? Simply convert the E and H values from dB to \$V/m\$ and \$A/m\$ respectively. Although the notation you've used isn't conventional, it's pretty clear what it means. The E field is 100 dB referenced to \$1mV / m\$ and the H field is 80dB referenced to \$1mA / m\$ Now, when converting a voltage or current to dB, you take \$20 \ log\$ of the value divided by the reference unit. So, in the case of the E field, to convert from dB, you divide 100 by 20 to get the exponent of 10 and then multiply that by the reference unit: \$100 dB (\frac{mV}{m}) \rightarrow (10^{\frac{100}{20}}) \frac{mV}{m} = 100\frac{V}{m} \$ Similarly, for the H field: \$80 dB (\frac{mA}{m}) \rightarrow (10^{\frac{80}{20}}) \frac{mA}{m} = 10\frac{A}{m} \$ Now that you have E & H in familiar units, you proceed as usual to find the characteristic impedance. A more sophisticated approach would be to recall that division becomes subtraction of logs. You do have to be careful of reference units though. The difference of the logs is \$20 dB (\frac{mV}{mA})\$ which gives the same result as the procedure above: \$10 \Omega\$
H: What gives some flash memory a higher speed rating than other flash memory? What gives some SD/MMC cards a much higher speed class rating than other SD/MMC cards? Why are some solid-state "disks" (SSDs) much faster than other SSDs? I'm hoping that I can take at least some of ideas for storing data faster, and apply those ideas to a data logger design I'm working on that stores (often bursty) data to a few flash chips. (Ideas that involve re-designing flash memory cells and fabricating new flash chips to work faster are interesting, but are not as useful to me since, alas, I don't own a fab). AI: In addition to the fact that some flash devices are capable of writing more bits in parallel, another factor affecting speed is the way in which garbage-collection is performed. One of the biggest sources of slowdown on flash drives stems from the fact that most flash devices do not allow 512-byte pages to be erased and rewritten; instead, they require that erase operations operate on much larger areas (e.g. 32KB or more). If a device is asked to rewrite block 23, it will find an empty page, write "I am block 23" along with the new data, then find the old block 23 and mark it as invalid. If the number of empty pages gets too low, the device will check whether there's any erasable block which don't hold any valid pages. If not, it will find one which has very few valid pages, and move each page to a blank page in some other block (invalidating the old ones as it goes along). Once a block has been found which doesn't have any valid pages, that block can be erased, and all its pages added back to the pool of blank ones. Many schemes can be used to keep track of how pages are mapped and determine which blocks should be recycled when. It's possible to design fairly simple schemes that can be implemented on a small micro with limited RAM, but performance may not be great (e.g. it may have to repeatedly read through the flash to identify blocks for garbage collection, and may place data blocks without regard for whether they're likely to become "obsolete" soon). Conversely, if the controller has a generous amount of RAM available, it may be able to do a better job of identifying which blocks should be garbage-collected when, and may also be able store blocks of data with other blocks that will have similar useful lifetimes. Incidentally, I consider it unfortunate that solid state drives have not standardized on some sort of file system at the controller level (meaning that rather than asking for block #1951331825, software would ask for blocks 4-8 of file #1934129). A flash drive which knew how information was stored in files could make much better decisions about which data should be placed together than one which simply has to deal with seemingly-independent writes to various sectors, and could also do a more effective job of ensuring data integrity under adverse conditions.
H: What is the acceptable current draw on pin #9 on a VGA connector? I'm trying to appropriate the 5v that comes into an LCD monitor on pin #9 of a VGA connector to power a microcontroller with some sensors, and LEDs. I've found a discussion on this topic on a cached forum thread from EEEforums. While there are references to standards it only discusses a monitor on an external power source and not a locally powered monitor. How much current can I draw from this pin reliably? AI: It's hard to find out, since you have to pay for the required standard documents from VESA. It's possible that there is no fixed value, and it's different for different graphics cards to implement as they choose. Since (I think) it's required to power the EEPROM in monitors for PnP, I'd say there may be a minimum value of ~10mA ("covering" all versions). However, looking around I think up to around 100mA will probably be safe. Here are some links that support this: http://www.vesa.org/vesa-standards/standards-faq/ - See bottom 3 questions. Discussion of USB power from VGA port specifically this quote: I found this from http://www.circuitprotection.com/04Databook/C17_video_(133).pdf : “Devices that comply with the DDC host system standard typically provide supply voltage on pin #9 of the standard 15-pin VGA connector. The voltage is 5V ±5% and supplies a minimum of 300mA to a maximum of 1A.” but for DVI: Per the DVI spec R1.0, the “+5V signal is required in a DVI compliant system… the power pin must be able to supply a miniumum of 55mA and the monitor may not draw more than 50mA.” To be on the safeside, don’t do this hack on your DVI port. Maxim demo board that runs from VGA power (using ~10mA)
H: Why does micro USB 2.0 have 5 pins, when the A-type only has 4? What is the extra, 5th, pin on micro usb 2.0 adapters for? Here is an image with the different connectors. Most of them have 5 pins, but the A-type host only has four. (source: wikimedia.org) AI: It's for On-The-Go, to select which device is the host or slave: The OTG cable has a micro-A plug on one side, and a micro-B plug on the other (it cannot have two plugs of the same type). OTG adds a fifth pin to the standard USB connector, called the ID-pin; the micro-A plug has the ID pin grounded, while the ID in the micro-B plug is floating. The device that has a micro-A plugged in becomes an OTG A-device, and the one that has micro-B plugged becomes a B-device. The type of the plug inserted is detected by the state of the pin ID .
H: MC34063A: Why am I overclocking this chip? I've decided to get some experience with DC-DC converters and I've obtained an Onsemi MC34063A DC-DC converter. From documentation I've got the datasheet, the AN920 application note and the Excel worksheet. The datasheet mentions one more application note, the AN954/D, but I can't seem to find it anywhere. The idea was to step-down 12 V to 5 V with currents of up to 500 mA and 50 mV ripple. So I read the formulas in the datasheet, the application note and the worksheet and did some calculations. I took the \$V_{sat}=1.3 \mbox{ } V\$ , from the datasheet maximum value, I'm using 1N5817, so at 1 A, \$V_{F}=0.45\mbox{ } V\$, minimum input voltage, if I take the variation to be 10% is \$V_{in(min)}=10.8 \mbox{ } V\$, output voltage \$V_{out}=5 \mbox{ } V\$. Using the formula from the datasheet, this gives me \$\frac{t_{on}}{t_{off}}=1.21\$. I've selected the frequency for the converter to be 89 kHz, because it's supposed to nicely fit a \$220 \mbox{ } pF \$ capacitor, but more on that later. Next, \$t_{on}+t_{off}=11.24 \mbox{ } \mu s\$ which gives me \$t_{off}= 5.09 \mbox{ } \mu s\$ and \$t_{on}=6.15 \mbox{ } \mu s\$. All this gives me \$C_t=246 \mbox{ } pF\$, so I'll use \$220 \mbox{ } pF + 22 \mbox{ } pF=242 \mbox{ } pF\$. Next, I've got the \$I_{pk(swich)}=1 \mbox{ } A\$. The sense resistor is \$R_{sc}=0.3 \mbox{ } \Omega\$, so I'll use 3 times 1 \$\Omega\$ resistor and connect them in parallel. Next is the minimum inductivity \$L_{(min)}=28 \mbox { } \mu H\$. Next, there's the output capacitor \$C_o=28.1 \mbox{ } \mu F\$. Finally there are the output resistors. The formula is \$V_{out}=1.25(\frac{R_2}{R_1}+1)\$. I picked 4 times \$10 \mbox{ } k \Omega\$ resistors. One for \$R_1\$ and 3 in series for \$R_2\$. Now let's take a look at the application note and see if they did anything different there: Well the formula for the \$R_{sc}\$ is a bit different and gives me \$0.263 \mbox{ } \Omega\$ as the minimum sense resistor value. Now let's see the Excel worksheet: New parameter \$ \frac { \Delta I_{L} } {I_{l(avg)} } \$ appears there and the worksheet says: For Maximum Output Current it is suggested that ΔIL should be chosen to be less than 10% of the average inductor current, IL(avg). This will help prevent Ipk (sw) from reaching the current limit threshold set by RSC. If the design goal is to use a minimum inductance value, let ΔIL = 2*IL(avg). This will proportionally reduce output current capability. Well, I'm not sure what to do here, but high current output sounds nice so I put it to 6% and the worksheet gives me the minimum inductance of \$ 920 \mbox{ } \mu H\$. It so happens that I have a 1 mH inductor in my junk-box (DPO-1.0-1000) so I decide to use it. Finally, I have the schematic: Now if I understand the operation of this device correctly, the timing capacitor is used to provide clock which is fed to the inductor as needed. If the sense resistor has too high voltage (meaning overcurrent condition) or the consumption is too low, clocks are skipped. As far as I can see, there should be no way for the chip itself to change the frequency set by the capacitor. My problem seems to be the switching frequency and the way it changes with load. The regulator is in the documentation said to work up to 100 kHz and I'm seeing some strange results on the oscilloscope. I'm measuring the waveform on the diode and on the timing capacitor. Here's how it looks like with no load: As far as I know, this type of wave should appear because the regulator is skipping cycles and it should be normal. Next, I have the load with some LEDs drawing around 200 mA. Note that the frequency is a bit high. I expected 89 kHz and lower (since the circuit is on a breadboard and I expect there to be parasitic capacitance from neighboring rows), but it's 99.6 kHz, which is right on the limit of normal operation. Here is what happens when I connect a microcontroller board flashing some LEDs. The frequency is more than twice the maximum operating frequency of the regulator. Using a \$ 1 \mbox{ } \Omega\$ resistor and another power supply, I've determined that the highest instantaneous current from this board is 294 mA, so it's well within the limit of the 500 mA I designed this for. The output ripple is 680 mV peak to peak, so it seems to be more or less fine and the voltage is around 4.9 V, so it too seems to me more or less normal. So any ideas what's going on with the frequency here? I've tried with various different timing capacitors and they all give similar behavior and none of them give me the calculated frequency. UPDATE Here's the oscillogram of the output using the springy type ground lead connector and bare probe tip synchronized with the peak of greatest magnitude : UPDATE About the frequency, I found some 10 Ω ceramic resistors and tried loading the supply with one of them (which should give me a 500 mA load), but I still get the high frequencies and it seems to be related somehow to current limiting, from what I can see. When I connect the resistor, the maximum current I can get is around 370 mA. I've experimented with different values of the sense resistors and with increased resistance of sense resistors, the frequency increases. Here's an example of the \$C_t\$ waveform with 1 Ω resistor: and here's with 0.5 Ω sense resistor: AI: The breadboard may be causing issues, check your layout (especially the feedback section) Also, it's possible the inductor you are using is not suitable - it says it's only rated up to 100kHz, so it's SRF (self resonant frequency) is probably pretty low. It may be causing instability. Try changing it to one with a higher SRF (e.g. >500kHz), but still with suitable current capability. I did mention the output cap below but abdullah is right about the input cap being important. It does depend on the load, but the whole loop from in to out should be as small and low impedance as possible, ideally using a ground plane. On a breadboard that's "difficult" ;-) If the frequency problem is not there with a steady load, I think as Kit says it's an output filtering issue, since the switcher won't be fast enough to adapt to high di/dt changes on the output and there's no "reserve". Increase the output filter capacitance and see if the ripple drops, if it does that's almost certainly the issue. EDIT - Ah, I see you tried it with a resistor on the output. In that case it would seem it's not the filtering. At this point I think I would use a different method of prototyping that's more suited to a switching regulator. Also use another chip just in case. Either etch a board or use dead bug style, or stripboard with very careful attention to layout. If the frequency is still too high I would assume it's part of it's operation and not covered correctly in the datasheet - if this is the case then an e-mail to OnSemi is in order to see what they have to say. EDIT 2 - Okay, after more reading I think the sense resistor (possibly combined with the inductor issue mentioned above) may be causing the current sense to trip too often and increase the timing capacitor charging slope. This will likely appear like the oscillator is switching faster. A relevant quote from the App note: When this voltage becomes greater than 330 mV, the current limit circuitry provides an additional current path to charge the timing capacitor CT. This causes it to rapidly reach the upper oscillator threshold, thereby shortening the time of output switch conduction and thus reducing the amount of energy stored in the inductor. This can be observed as an increase in the slope of the charging portion of the CT voltage waveform as shown in Figure 5. Your oscillscope waveforms seem to agree with this description. Also, if you haven't tried changing the inductor, do this and see how it goes, plus you could try not using the current sense (i.e. just connect to input voltage)
H: How to wire AC power to an integrated DPST switch? I have an IEC C14 power connector (like those on PC power supplies). The connector has an integrated DPST switch, however the power pins are not connected directly to the switch-- I have to do that myself. My first question is: Why have a DPST switch? Why not just a single pole that I wire to the line voltage? The second question is: Which side to I wire the hot wire to? One set of the pins on the switch are divided by a small plastic divider. Here is a picture: IEC C14 connector AI: Both contacts have same rating so unless there is a designated marking or colored screws for convenience, they can be interchanged. In some countries this universal PSU could be coming off a Y or delta 3 phase output rather than single phase to neutral. So DPST is universal but not needed for single phase. Also minor current comes off unswitched line due to Common mode filter Cap to ground. (0.5mA rms max)
H: frequency modulation I hope this is a pretty easy question for you guys. I know for frequency modulation (FM) for fundamental frequency you have the expansion $$output = J_0(\beta)V\cos(\omega t)\pm J_1(\beta)\cos((\omega \pm \omega_m)t)+... $$ I am wondering what is the equivalent for the third Harmonic? is it $$output = J_0(\beta)V\cos(3\omega t)\pm J_1(\beta)(3(\omega \pm \omega_m)t)+... $$ or $$output = J_0(\beta)V\cos(3\omega t)\pm J_1(\beta)((3\omega \pm \omega_m)t)+... $$ thanks for your input. AI: That would really depend on where the harmonic distortion is occurring. If it is downstream of the modulator, then it is the first - ie, the modulation spread is multiplied. In the easy-to-image case where the harmonic distortion were coming from an RF power amplifier this is what you would get. If it is upstream such that the harmonics are present going into the modulator, then the second, only the center frequency is multiplied. In simple cases, the FM modulation is applied to the source oscillator, but it is also possible to apply it afterwards, for example by mixing with a modulated local oscillator signal. However, there are likely to be filters following the mixer which may substantially suppress the harmonic content.
H: Polarity of unmarked smt electrolytic capacitor I have a kit with three capacitors, described in the parts list as "10uF 25V SMD 1206" and shown on the circuit diagram as polarised (an open rectangle and a filled one). Seen through the transparent side of the package they are pale brown or orange, and appear to be unmarked, although there is an offset hole in this side of the package. (Possibly a circle on the component itself -- I am reluctant to remove them from the packaging until I am ready to solder them in place.) So, my question is: how do I determine the polarity of these items, or does it not matter, i.e. they are self-polarising in circuit? By the way I have no trouble hand soldering this size of SMD. AI: It sounds like they are ceramic caps, in which case they are unpolarised, so you can put them either way round - here is a photo of a typical ceramic cap (no markings): If they look something like the one below (with markings), then it will be a polarised tantalum (the dark line indicates the + side): If the schematic does show a polarised cap but it does turn out that you have been given unpolarised caps, then I would mention it to the vendor so they can correct it. If they really are unmarked polarised (extremely unlikely) then a possibly destructive method of testing for polarity is to gradually apply a current limited voltage (e.g slowly up to ~25% of rated voltage, limited to ~10mA) in both directions across the cap whilst measuring current - if polarised and the wrong way round you should start to see a steadily rising current flow. Can be done with a bench power supply, and put a shield of some sort over the cap just in case it decides to detonate ;-) I tested with the bench supply, above ~7V across reverse polarity with a 100uF/35V aluminium electrolytic, the leakage current rises above 1mA (measured using bench display) and quickly starts to accelerate upwards. I also just tested this with a multimeter in series with the bench supply (more sensitive than the bench supply measure) measuring current across the same capacitor: Using 5V with correct polarity produced ~1uA leakage. With 5V and reverse polarity the leakage started at around 25uA and gradually got higher, after around 30 seconds it was at 50uA. Even at 3V it was reasonably obvious which way round it was - the reverse leakage was at least twice that of the correct polarity. I don't think this sort of low voltage testing should do the capacitor any harm. Here is an excellent study by NASA, who seem to think many of the reverse bias ratings are rather conservative. To quote part of the summary: Some lots of 35 V and 50 V rated capacitors survived 200 and even 8900 hours of reverse bias testing (RBT) at voltages up to 40% of rated voltage (VR). However, the survival rate was not 100% and the behavior was judged to be lot related. The conclusion made by G. J. Ewell that the existing manufacturer guidelines are extremely conservative concurs with the results of the testing performed at Hughes in 1988. In that work it was shown that some capacitors could withstand reverse voltage up to 25% of VR with very little degradation occurring below 15% of VR. In all cases healing began to occur after 5 minutes of the application polarity being corrected. These experiments suggested that while solid tantalum capacitors can survive substantial reverse bias without failure, this behavior significantly varies from manufacturer to manufacturer.
H: Accellerometer and arduino lillypad and wearable projects I have just bought an Arduino Lillypad and an MMA8452 accellerometer board and i have few questions: 1) Power supply on lillypad I know that working with accellerometers is a little bit dangerous: if you plug them to 5v instead of 3.3v you can burn them! So, before to plug and burn anything i want to ask if i have to do something to be sure. In normal Arduino board there are a physical pin to move for having 3.3v (or something that doesn't burn the accellerometer). 2) Physical disposition of resistors I heave read in MMA8452Q_Example.pde (download here): SDA and SCL should have external pull-up resistors (to 3.3V). 10k resistors worked for me. They should be on the breakout board. and i'm thinking about what is the best way to put the resistors on such a tiny boards: i'm not good in soldering and i don't want to ruin the board, and i can't use a breadboard because it is a wearable project. what is the best? using some male pin strip (*)? Or shall i try to cut a little piece of Perfboard and solder over it? And how put the resitors near the accellerometer? or they could be also near arduino lillypad pins? What can you advice me? I am quite totally new to electronics so any kind of advice or documentations is a valuable help. (*) male pin strip http://eval.3dpublisher.net/showmodels/TraceParts/Parts/10-05032010-135382/Pictures/10-05032010-135382M.gif AI: The resistors don't have to be on the accelerometer board. As long as you don't intend to make the connection many meters long it doesn't really matter, so they may be as well placed on or near the Lilypad. Be sure to run the Lilypad at 3.3 V as well. The Lilypad will only pull the lines low, and let the pull-up resistors set the high value, so there won't be 5V on the accelerator's inputs, but the 3.3 V may be too low for the Lilypad's inputs if you run it at 5 V. In most cases it won't be a problem, though. If you can, run the Lilypad at 3.3 V, otherwise have a look at this question to read more about it.
H: Determine the orientation of an ESD protection chip I have an ESD protection chip that has been unsoldered from my board, and for which we have lost the orientation. (I.e. we don't know where pin 1 is - the little dot has gone.) Because of the symmetry of the IC's package, there are two possibilities for the orientation. Is it possible to use a voltmeter or scope to retrieve the orientation of this part? AI: Check the diagram in the datasheet, this chip is 'just' a bunch of 5..7V zener diodes. If you use a low voltage (<5V) you can test the diodes. If your multimeter uses a low voltage you could even use it to measure the resistance: pins 1-2 should have a low resistance in at least one direction, much lower than 4-5. But the fact that the dot has disappeared makes me wonder whether the chip should still be trusted. Note that this is a protection chip, so soldering it in and checking that the device works is no guarantee.
H: Recommend good kits to Newbie I have $50 to spend on an arduino hardware. I've looked around at some intersting kits. I found a kit that might be what I want, http://www.sainsmart.com/sainsmart-mega2560-board-3-5-tft-lcd-module-display-shield-kit-for-atmel-atmega-avr-16au-atmega8u2.html So far that costs $55. Are there any better offer or combination? I have some motors with gear boxes and potentiometers that I used for school projects which I can recycle. I know that I'll need resistors but I don't know how many of which resistances. Is there anything else alike sensors etc. that I might need or you think would be fun or good to learn with? I dont mind extending the budget if I have to. AI: Find out what you want, maybe by looking around at stackexchange and see which questions get your attention. After you narrowed down what you want to do (now), check the shield list for arduino to find something appropriate to build upon.
H: Brushless motor controlled via current source math model I'd like to model a brushless motor's (BLDC) dynamic response using Matlab. I'm controlling the motor by an Elesctonic Speed Controller (ESC). I'd like to derive a transfer function of such a circuit with shaft's angular speed being its output (as here) and with current being its input. I'm powering the whole plant using a constant 11.1V battery source. In the picture above, one could write equations for the electrical part of the model as: \$ L \frac{di}{dt} + Ri = V - K \dot{\theta} \$ (1) with K being the back-emf constant and the mechanical part can be modeled as (Newton's second law): \$ J \ddot{\theta} + b \dot{\theta} = Ki \$. (2) It's easy to connect those two equations and derive a transfer function \$ \frac{\dot{\theta}}{V} \$. I'm also expecting it must be possible to derive a transfer function of the form \$ \frac{\dot{\theta}}{i} \$. I imagine I could solve my problem by substituting \$ V \$ for \$ i \$ in equation (2) - I just don't know how. AI: If you are driving the motor with a known voltage, the page you linked to gives you the answer so I assume you want to drive the motor with a controlled current. Since the motor's torque is proportional to current, you can forget the resistance, inductance and back-emf constants. \$T = K.i\$ and \$T=J\ddot{\theta}+b\dot{\theta}\$ this can be expressed as \$s(Js+b)\theta=Ki\$ (from your linked article), so \$\theta = \dfrac{Ki}{s(Js+b)}\$ and \$\dfrac{\dot{\theta}}{i} = \dfrac{K}{Js+b}\$ Of course any current source has a finite voltage compliance, so you will also need to compute the voltage as a function of current to ensure that the current source stays under control.
H: Using relay to control Using a relay, if I found a 12v source on the ps3 motherboard that was on only when the ps3 was on. Could I attach a 12v relay switch to it and the connect some LEDs that run off another power supply so that when the ps3 turns on the LEDs do too? Thanks AI: You could do that, but instead of using the PS3's power to control the relay it's maybe more efficient to drive the LEDs directly with that. Standard red LEDs are about 2 V, then you can place 5 of them in series and add a current control resistor in series to fix the current at 20 mA. A relay would probably use double of that. That being said, and though it's not likely that the PS3's power supply wouldn't have 20 mA to spare, you better use a transistor controlled by the PS3's power (doesn't have to be 12 V) to switch the externally powered LEDs. In that case you hardly load the PS3's power supply. The 5 V comes from the PS3, the 12 V is the external power supply. You'll have to tie the grounds of both power supplies together.
H: Microcontrol port for lcd Ihave modify an existing lcd library, it only works on DDRA for exmple if i change: Update error Fixed: I have found the error in the code assembly delay was too short for port B, C and D. by changing delay time i was able to use all ports. Im using a AVR ATMEGA16. i have also wiring the pins correct to databus lines. #define DDR DDRA #define PORT PORTA #define PIN PINA #define RS_PIN 0 #define RW_PIN 1 #define E_PIN 2 to this nothing happens #define DDR DDRC #define PORT PORTC #define PIN PINC #define RS_PIN 0 #define RW_PIN 1 #define E_PIN 2 here is the link to library and this is what i have changed. p.s it doesn't give any warnings or error #include "lbl_lcd.h" #include <avr/io.h> /* One byte delay loop, one loop costs 3 cycles. */ void _lcd_delay_8(uint8_t t) { asm volatile ( "\n" "L_dl0%=: subi %0,1" "\n\t" " brcc L_dl0%=" "\n\t" :: "r" (t)); } /* Two byte delay loop, one loop costs 4 cycles. */ void _lcd_delay_16(uint16_t t) { asm volatile ( "\n" "L_dl1%=: subi %A0,1" "\n\t" " sbci %B0,0" "\n\t" " brcc L_dl1%=" "\n\t" :: "r" (t)); } #define DDR DDRD #define PORT PORTD #define PIN PIND #define RS_PIN 0 #define RW_PIN 1 #define E_PIN 2 uint8_t lcd_read_command(void) { uint8_t command; DDR|=1<<E_PIN|1<<RW_PIN|1<<RS_PIN; // control bus output DDR&=~0xF0; // databus input PORT|=1<<RW_PIN|0xF0; // R/!W= 1 (Read) and Pullup inputs PORT&=~(1<<RS_PIN); // RS=0 _lcd_delay_us_small(2); PORT|=1<<E_PIN; // E=1 _lcd_delay_us_small(1); command=PIN&0xF0; // read high nibble PORT&=~(1<<E_PIN); // E=0 _lcd_delay_us_small(2); PORT|=1<<E_PIN; // E=1 _lcd_delay_us_small(1); command|=PIN>>4; // read low nibble PORT&=~(1<<E_PIN); // E=0 return command; } uint8_t lcd_read_data(void) { uint8_t data; DDR|=1<<E_PIN|1<<RW_PIN|1<<RS_PIN; DDR&=~0xF0; PORT|=1<<RW_PIN|1<<RS_PIN|0xF0; // R/!W= 1 (Read) RS=1 and Pullup inputs _lcd_delay_us_small(2); PORT|=1<<E_PIN; _lcd_delay_us_small(1); data=PIN&0xF0; PORT&=~(1<<E_PIN); _lcd_delay_us_small(2); PORT|=1<<E_PIN; _lcd_delay_us_small(1); data|=PIN>>4; PORT&=~(1<<E_PIN); return data; } static void wait(void) { while (lcd_read_command()&0x80); } static void pos_pulse_E(void) { _lcd_delay_us_small(2); PORT|=1<<E_PIN; // E=1 _lcd_delay_us_small(1); PORT&=~(1<<E_PIN); // E=0 } void lcd_write_command(uint8_t command) { wait(); DDR|=1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0; // controlbus and databus output PORT&=~(1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0); PORT|=command&0xF0; // all control signals low RS=0 R/!W=0 pos_pulse_E();// write high nibble PORT&=~(1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0); PORT|=command<<4; // all control signals low RS=0 R/!W=0 pos_pulse_E();// write low nibble } void lcd_write_data(uint8_t data) { wait(); DDR|=1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0; PORT&=~(1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0); PORT|=(data&0xF0)|1<<RS_PIN; // RS=1 other control signals 0 R/!W=0 pos_pulse_E(); PORT&=~(1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0); PORT|=(data<<4)|1<<RS_PIN; pos_pulse_E(); } void lcd_init(void) { DDR|=1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0; _lcd_delay_us(15000); PORT&=~(1<<E_PIN|1<<RW_PIN|1<<RS_PIN|0xF0); PORT|=0x30; // all control signals low RS=0 R/!W=0 pos_pulse_E(); _lcd_delay_us(4100); pos_pulse_E(); _lcd_delay_us(100); pos_pulse_E(); _lcd_delay_us(100); PORT&=~0x10; pos_pulse_E(); _lcd_delay_us(100); lcd_write_command(0x28); lcd_write_command(0x06); lcd_cls(); lcd_cursor(true, true); } void lcd_cls(void) { lcd_write_command(0x01); } void lcd_home(void) { lcd_write_command(0x02); } void lcd_cursor(bool cursorOn, bool cursorBlinks) { lcd_write_command(0x0C+(cursorOn?0x02:0)+(cursorBlinks?0x01:0)); } void lcd_goto(uint8_t row, uint8_t column) { if (row<2 && column<16) { lcd_write_command(0x80+row*0x40+column); } } uint8_t lcd_get_row(void) { wait(); return lcd_read_command()&1<<6 ? 1 : 0; } uint8_t lcd_get_column(void) { wait(); return lcd_read_command()&0x3f; } void lcd_putc(char data) { lcd_write_data(data); } void lcd_puts(char *s) { while(*s) { lcd_putc(*s++); } } void lcd_puts_P(const char* PROGMEM s) { char c; while ((c = pgm_read_byte(s++))) lcd_putc(c); } AI: The "obvious" possibility is that something other aspect of your software is trampling on PORTC and/or DDRC. However, I think your problem is a tiny bit more subtle. Did you notice that PORTC has JTAG pins in it? You had better be disabling that interface somehow or not much about that port is going to be "General Purpose." The easiest way to do this is to disable the JTAGEN fuse. C.0 and C.1 are the TWI pins as well. Make sure you haven't got the TWI interface enabled or again this won't work. That is to say - make sure that TWCR bit 2 is cleared (reads 0). That is the default state, so unless you are doing something with I2C in your system this seems like an unlikely possibility. The code is also using soft delays, maybe you have more capacitance on your PORTC pins or something. You could try making the delays longer....
H: MCP3909 Energy metering IC , How to use the HFOUT in it? I'm using the Microchip MCP3909 Energy metering IC, How to use the HFOUT in it ? note: HFout supplies a frequency output proportional to the average active real power . This frequency should be sent to the meter on HFOUT pin which access a Timer/Counter in MC and according to number of Pulses I should measure power and use it The problem is that I couldn't reach the correct relation which determine each pulse represents what amount of watt? Documents: MCP3909 datasheet Reference Design User's Guide AI: From the Reference Design User's Guide, page 42: "The meter constant is typically given in units of impulses per kilo-watt hour. As an example, the calibration output frequency of CF, METER_CONSTANT = 3200 imp/kWh or 6400 imp/kWh" Section 5.1.1 on page 41 describes the calibration procedure. edit Also had a look at the datasheet, and on the same page 20 Mike refers to there's this equation: Channel 1 is the voltage sense channel, channel 0 is the current sense. Multiplied, including the current sense amplification you get instantaneous power. Input voltages are converted relative to a reference voltage, so you have to divide both channels by that (the denominator). HFc is a constant you can program by setting F0, F1 and F2, as per the table in Mike's answer (page 20 of the datasheet). Note that this gives you a frequency proportional to power. Integrating this over time means counting periods of that frequency gives you a measure of consumed energy, and that's where the 3200 imp/kWh from the Reference Design User's Guide comes in. edit A concrete example. Let's suppose you want to measure energy of a 230 V/ 10 A device. Maximum input for the voltage channel is 660 mV, so we choose a 1:1000 divider for that. At a gain of 1 for the current channel maximum input voltage is 470 mV, so we can choose a 10 mΩ shunt for that, which gives us 10 mV/A. We use the internal Vref of 2.4 V, and set F0, F1 and F2 to 0. Then for a 230 V/ 10 A input we get \$ HF_{OUT} = \dfrac{8.06 \times 230 mV \times 100 mV \times 1 \times 109.25 Hz}{(2.4 V)^2} = 3.516 Hz \$ That's for 2300 W, or 1.529 Hz per kW. For 1 kWh we'll have \$ \text{pulse count} = 3600 s \times 1.529 Hz = 5503 \$ That's 5503 pulses/kWh.
H: Effective number of bits of 14-bit ADC I have a 14-bit ADC. However, looking at the datasheet (see table 2 on page 5), the effective number of bits (ENOB) is always less than 12 bits. Why is my the DAC claiming to be a 14-bit ADC when it only has 12-bit accuracy? What is the point of having two extra bits if they are meaningless? AI: You've been bamboozled! 14-bit is marketing speak, and the hardware also gives you that, so they'll say you have nothing to complain about. Just above ENOB in the datasheet it gives SINAD (Signal to Noise and Distortion) numbers. That's 72 dB, and 1 bit corresponds to a 6 dB level, so that 72 dB is indeed 12 bits. The 2 lowest bits are noise. It's possible to retrieve data which is lower than the noise floor, but it needs very good correlation, which means it has to be very predictable.
H: Cheap temperature sensing with MCU I am looking for a cheap solution for sensing temperature with a MCU. My requirements are: 2 channels temp range: 30-35°C temp resolution: 1-2 K cable distance (MCU -> sensor) 10cm - 2m are acceptable relative temperature between two channels is sufficient, no absolute temperature is required My starting point is two thermocouples with thermocouple amplifiers, but this seems to be overkill for my application. Thermocouples run at 10$ at Radiospares, amps at 5$ which would cost 30$ just to estimate a temperature. What is a good direction to look for a cheaper solution. NTCs? Edit 18 July 2012 After stevenvh extended his answer to show the high degree of linearity that can be obtained with NTCs, I invested some time to reconsider whether NTCs are not a better solution. I am not sure however that I am able to follow stevenvh in his reasoning on the error that can be obtained with NTCs on the cheap compared to semiconductor chips. To get the temperature with an NTC the following functions come into play: transfer function \$ H_{T_a\rightarrow R_{NTC}}(R_{25},B_{25/85}) \$ converting the ambient temperature to a resistance the voltage produced by the voltage divider \$ H_{R_{NTC}\rightarrow V}(V_{excitation},R_{NTC}, R_{lin}) \$ AD conversion \$ H_{V\rightarrow bits}(V, V_{ref}, \sigma_{conversion}) \$ linear curve approximation: \$ H_{bits\rightarrow T_{est}}(bits, \sigma_{approx}) \$ The error sources the I see are thus: NTC value errors: 1% each for the \$ R_{25} \$ and the \$ B_{25-85} \$ values: total about 2% 1% for the linearisaton resistor value and let's say 0.5% for the excitation voltage source For a PIC16F1825 the internal reference voltage used for the ADC has 6% uncertainty. In addition, the ADC itself has integral, differential, offset and gain errors each of the order of 1.5 lsb. At 10 bits, the latter combined are at most 0.5%. As stevenvh demonstrated in his answer, the linear approximation has an error of merely 0.0015% in the range of interest. The error in the estimation of the temperature will thus clearly be dominated by the error of the ADV voltage reference and the errors in the resistor values. It will clearly be in excess of the 6%. The error due to linear approximation is utterly negligible as stevenvh pointed out. An uncertainty of 6% at 300 Kelvin is equivalent to an temperature error of 18K. The temperature chips have an error of about 1K. At 300K this corresponds to an uncertainty of 0.3%. It would appear to me that it is out of the question to beat this with an NTC without extremely careful calibration and performance verification. The uncertainty in the linearisaton resistors, the excitation voltage or the ADC each viewsed in isolation push the uncertainty of the NTC solution above this. Or do I have a major mistake in my reasoning? At the moment I am convinced that NTCs can be a high-precision temperature sensing solution but on the cheap it would appear to me that their performance will be a shot in the dark. AI: 1-2 degrees is an easy resolution (even when you mean accuracy, which is not the same!). I would consider LM75 and it various clones, or a DS1820/18S20/18B20/1822. Microchip has a lot of temperature sensors, including LM75 clones for < $1. The voltage output versions are cheap, but I would prefer a digital one.
H: How a capacitor works I have an AC capacitor from the ceiling fan. When I connect its end to a socket (AC line 110V), it gets charged (as touching the terminals produces a spark). But at this point I am unable to understand this mechanism because I have read that capacitors don't charge storage for AC and act almost like a short circuit at t(0+). [neglecting the phase shift and assuming frequency above 50 Hz]. Could someone please explain where I am going wrong? AI: Capacitors do store charge. In fact, that's basically what a capacitor does, with the added characteristic that its voltage will be proportional to the amount of charge it has stored. A capacitors doesn't store AC, but it does store whatever charge is on it given the voltage at the time it was disconnected. Since the AC voltage can vary from zero to fairly high peaks, it is somewhat random what the capacitor will be charged to. The peaks of the AC line is the square root of 2 times the RMS voltage. For example, 115 VAC has peaks of ±163 V. A capacitor could get charged to anywhere in that range.
H: EPROM Replacement Strategies We have a system that uses OTP (one-time programmable) EPROMs, specifically the AT27C256. We would like to replace this EPROM with an EEPROM or Flash chip such that we can make our units field upgradeable, more serviceable, etc. Obviously, we want this change to require little to no hardware modifications. These EPROMS are currently the code storage for an 68HCP11 micro. It looks like the AT29C256 would be a viable option, as we could use it with only one pin change (change Vpp to WE_N). However, it appears that these chips are not made any more and sourcing is very unreliable, especially as we need ~70K of them. As such, we're looking at any other reasonable options. We've considered adding a daughter board that sits on our EPROM's footprint (PLCC32) and contains another flash chip (AT28 series?) along with whatever conversions are necessary to make it work with our HC11 micro. We've also considered adding an FPGA to the daughter board between the micro and flash such that a series of "magic" reads can perform writes to the chip, but this seems to be getting a bit excessive for a problem many others must have solved. It would, however, allow us to not use jumper wires on our existing boards. What have others done in this situation? AI: I'm seeing <5MHz clock rates listed for that micro, so I would be very tempted to get a modern micro with a high enough pin count and 32K bytes of spare internal flash, and emulate it in software. With a 3-wire serial port hanging off the end of course! Major challenge I see would be 5v - 3.3v conversion. You could probably do it with series resistors, assuming that the output of the 3.3v micro is enough for a reliable read by the old micro (which it usually is, if you aren't in a high-noise environment) If the clock is low and you don't need the full capacity, you might be able to use an ATMEGA328 running at 5V. I guess another challenge would be insuring that the add-in comes out of reset first, though you could fix that with a jumper wire to hold the main processor in reset until the new device comes out of power-on-reset. Of course another option if the processor is socketed is to emulate the processor rather than the EPROM.
H: How to calculate self-discharge time of capacitors given the leakage current? Say I have a Maxwell BCAP0005 supercap (2.7V, 5F), which has a leakage current of 0.015mA. I'd like to estimate the time it takes to discharge to a certain voltage. I've tried applying a formula for constant current discharge, $$ t = \frac{C}{V_\text{initial}-V_\text{discharge}}I $$ So, for $$V_\text{initial}=2.7V, V_\text{discharge} = 0V, C = 5F, I = 0.000015A$$ $$t = 900,000\text{ sec (10.4 days)}$$ And if $$V_\text{initial}=2.7V, V_\text{discharge} = 2.0V, C = 5F, I = 0.000015A$$ $$t = 233,333\text{ sec (9.7 days)}$$ But this seems like an oversimplification. For example, is leakage current constant? Does the ESR affect the discharge time? What other assumptions need to be clarified? AI: In practice the leakage current specs in the datasheet are only an approximation. Hopefully they will give you an upper bound, but that's about all. The real self-discharge time will vary greatly depending on just about everything. It will of course vary from cap to cap, but also by temperature, age, and lots of other things. Also, your circuit may be the biggest "leaker" of them all. Your circuit will also have a "useful lower voltage limit", which will also vary depending on everything. Basically, some of your PCB's might stop functioning when the cap reaches 2.0v, but other PCB's might work down to 1.6v. Simply put: the only way to be half-way sure about the self-discharge rates will be to build up a bunch of prototypes and test them. While that will be the most accurate way to figure that out, there will still be a lot of variations and future batches of your PCB's might discharge faster or slower than what you measured initially.
H: How safe are pre-charged supercaps compared to pre-charged batteries? How safe is it to transport and sell pre-charged supercaps with a system? I'm designing a solar-powered system and I'd like to use something like a Maxwell's BCAP0005 supercap (2.7V, 5F) to store the energy. Even with a supercap charger circuit, it could take 80 secs to charge up. It's been suggested that I could package the system with the supercap pre-charged to save time on the first use. This sounds reasonable because there are systems that come with pre-charged LiPo's; but I've heard anecdotally about safety concerns with large capacitors. Added: Thanks to people who pointed out that a supercap may self discharge in a period of under a day, making the question about shipping charged caps somewhat moot. Please address matters relating to self discharge in my new follow up question How to calculate self-discharge time of capacitors given the leakage current? AI: How safe are pre-charged supercaps compared to pre-charged batteries? I'm designing a solar-powered system and I'd like to use something like a Maxwell's BCAP0005 supercap (2.7V, 5F) to store a lot of energy. This supercap is far less energetic and far less dangerous than a battery pack of 2500 mAh AA cells or even than an individual AA cell. The supercap that you have chosen would produce a burst of power for a fraction of a second that slightly exceeded what you would usually get from a modern 2500 mAh NimH AA cell - but it would then be fully discharged. A single AA cell would however produce somewhat less power but for many minutes. A single cell or a few of them in a battery would be quite capable of creating very high temperatures and starting a fire. The supercap could be used to start a fire only with great difficulty. Some supercaps or ultracaps are far more capable than this one. Some can be used for eg automobile starting. " .... pants on fire" - almost: On "a few occasions" I have come close to setting my trouser pocket on fire or of burning myself with the temperatures generated by (stupidly) carrying a number of AA NimH cells (under 2000 mAh capacity) plus coins and keys in the same pocket and having a conductive path form. Removal of the cells from the pocket suddenly becomes one's sole and overwhelming priority with removal of trousers a close second choice. This is not an experience that I intend to replicate in future :-). On such occasions some coins or keys achieve temperatures well above their safe handling level in a few seconds. The supercap chosen as an example could not achieve this result. First, let's look at the energy capacity aspects: By any normal meaning of the term, a 2.7V, 5F capacitor will not store "a lot of energy". If all the energy in the capacitor was available it would provide E = 0.5 x C x V^2 Joule. For a 2.7V, 5F capacitor E = 0.5 x 5 x 2.7^2 =~ 18 Joule. By comparison a 2500 mAh AA battery will provide about E = V x Ah x 3600 Joule = 1.2 x 2.5 x 3600 = 10,800 Joule. So the 5F supercap will store about 18/10,800 =~ 0.17% of the energy in the battery. Also, whereas the battery will be able to deliver almost all this energy in a typical application, the supercap will need extra effort to recover energy as the voltage approaches zero. Discharge safety: Where a supercap is useful compared to a battery is in it's ability to charge rapidly and to discharge rapidly, and to do so over many more cycles than a battery can with little loss in capacity. in SOME cases this rapid charge & discharge capability is large compared to that of a typical battery, and is extremely large compared to that of a battery when expressed in terms of their total capacity. However, the example that you have chosen, and all the other members of its family, are far "wimpier" than some super/ultra caps. The data sheet available here shows internal resistance of 170 milliohms suggesting a short circuit current of around 2.7/0.17 =~ 16A when fully charged, and the typical short circuit current is shown as 16A at 65C and 14A at 85C. As temperature would rise rapidly and equivalent voltage (once de-shorted) would fall very rapidly under short circuit (as at 18 J gross capacity the s/c discharge time would be well under 1 second) this capacitor would not produce vast amounts of energy (maybe 20 to 30W peak) and only for well under 1 second. A typical modern NimH AA cell contains much more energy and will deliver much much more power for much longer. For example a 2.5 Ah Nimh AA cell may be typically discharged at up to about 5A and may have a loaded discharge capacity in the 10A to 20A range for short periods at very reduced voltage. So it's output Wattage almost matches what the supercap will produce for a fraction of a second, BUT the battery will produce 10+ Watts for many seconds and 5+ Watts for many minutes.
H: Manuals for oscilloscope wanted I bought at Amazon Germany an oscilloscope SainSmart DSO203 NANO. Unfortunatedly it came without any manual. Do you have manuals for oscilloscope? Any help would be appreciated. AI: This appears to be one of those devices sold by many places with slight variations in name. Some general info including firmware (alternatives?) is at http://www.seeedstudio.com/wiki/DSO_Quad including an "Unofficial manual written by the community"
H: how switched mode power supply affect microcontroller functionality I am using a switch mode power supply RAC06-05SC to power up the microcontroller (ATMega16L) a wifi module (RN-131G) and a 5V relay. This power supply is already regulated (as stated in the datasheet) and it is regulated further down to 3.3V for the micro and the wifi module using a linear regulator. I am told that switched mode power supplies generate a lot of noise, and I am trying to use this with a microcontroller which will use the ADC. My questions are given below: 1. Does a switched mode power supply affect radio frequencies of 2.4GHz? 2. Will the supply abruptly switch off the power? 3. Will it effect the functionality of UART? 4. Will it effect an external oscillator? Or any thing else I should know? EDIT My relay schematic AI: In general you can assume that as long as the ripple is not too bad on a supply then it shouldn't cause an issue for functionality of an IC. In this case the datasheet gives a ripple of 100mV peak-to-peak, BUT you seem to imply that you're taking this voltage and further regulating it down. Passing a signal with a relatively small ripple and putting it through a linear regulator like a 7803 or an LDO will significantly reduce the ripple and cut back on switching noise passed through to the final circuit. So a ripple which is less than 5% of the expected voltage like this, being passed through a second line of regulation, should be fine for 95% of projects, even one using analog components like an ADC. Just make sure to have input and output filtering capacitors on the linear regulator, and not too much (2200μF is the limit for the power supply you gave) (maybe 47uF and 4.7uF (or 220uF and 22uF if you want it really smooth)). Because the ripple is so small this supply would probably be fine for digital operations if you were using a 5V compatible chip and you weren't doing Analog work, but I digress. So looking at the datasheet you provided, the operating frequency of the power supply is 132kHz. The chances that the noise from that is going to manage to produce harmonics in the 2.4GHz spectrum is pretty limited, especially at such small power outputs. Where you really have to start worrying about generated EMI is when you have isolating switching supplies, because these will pass power through the magnetic field, and the interface leaks EMI on most supplies I've used. Generally the higher-power the switching power supply the more noise it generates. I've had a 100Watt isolating switching power supply which put so much noise out I had 30V of noise on the frame of my robot, but that's way beyond the scope of this. I think you'll be fine with your usage! Hope that helps!
H: USB / Battery Switchover Circuit Background: I am a non-EE (an 0x11? :^) thrust into the world of embedded systems design. I started this project with a only college physics-level understanding of circuits, but I'm gradually learning. The design I'm working on consists of several sensors, an SD card, and a TI CC1111 SoC. The CC1111 includes an 8051 core, a USB controller, and an RF transceiver. My design is based on a reference USB dongle design provided by TI. The device will typically operate on battery power, using 2 AA batteries in series (or potentially 4 AA batteries in parallel pairs), unless connected to a USB port. I'd like the device to switch over seamlessly between USB and battery, without a microcontroller reset. I'm looking for a circuit to switch between the two power sources (batteries or USB bus). From what I can tell the simplest thing would be to use OR-ing diodes. The problem here is that I'd be wasting power (current x forward voltage drop of diode), and that's something I want to avoid. One option I'm considering is the LTC4412 power controller, recommended in answer to someone else's question. Question 1: Does this look suitable? One concern I have is the delay in switching over from USB bus power to battery power when the device is disconnected from USB. According to the LTC4412 datasheet, the turn-on time for the MOSFET gate can be up to 175 us. I don't want the CC1111 (or the digital sensors) to reset. Looking at Figure 1 in the datasheet (see too the discussion of bypass capacitors on page 5), the trick is to properly choose a value for the output capacitor, C_out. I calculated a value, but I'm not sure if my approach is valid. If you'll bear with me: The CC1111 is normally operating at 3V from 2 AA batteries. Suppose it could operate at only 90% of that (2.7 V). I use the current drawn by the load (my device) and the nominal voltage (3V) to come up with an equivalent resistance (V/I). Based on my measurements and summing currents taken from datasheets, the device can draw a current somewhere between 35 mA and 70 mA. This gives me an equivalent resistance in the range of 43 Ohms to 86 Ohms. If I want the voltage to drop to no less than 90% after 175 us (the LTC4412 gate turn-on time), then after doing the math I get a time constant (RC) of 1.66 ms. Using 40 Ohms to be safe, I come up with C > (1.66ms/40 Ohms) = 42 uF. Maybe add another 10% or 20% for safety, so say 50 uF. Question 2: Is that approach and calculation valid? I pulled that 90% number out of thin air. The CC1111 datasheet says that 3.0 V is the minimum voltage, so I'm not sure what I'm doing is kosher. Should I use some kind of step-up converter to get, say, 3.3V out of the batteries? Thanks in advance for your help (and for reading so much text). AI: No, like you already may have feared this isn't kosher. The 3 V is indeed the minimum, and the AA batteries' voltage will quickly drop below that. If you're using NiMH rechargeables you even get only 2.4 V, so that won't do, unless you can use 3 of them in series. (Don't use batteries in parallel like you mention in your question.) So three NiMH cells will give you 3.6 V. Fine. That 3.6 V is the maximum VDD for the device, so if you want to run it off USB power you'll need an LDO (Low Drop-Out) voltage regulator to get 3.6 V. The LP2981 is a good part for this. Now the switching. 175 µs seems like an eternity to me, but we'll have to live with that. Ben gave you already the right equation for a constant current discharge: \$ \Delta V = \dfrac{I \cdot \Delta t}{C} \$ or \$ C = \dfrac{I \cdot \Delta t}{\Delta V} \$ NiMH cells have a fairly constant 1.2 V, which only drop to below 1.1 V when they're nearly discharged. So we can use that as a limit. With a minimum voltage of 3 V and a worst-case current of 70 mA you get \$ C = \dfrac{70 mA \cdot 175 \mu s}{300 mV} = 41 \mu F \$ which is what Ben also found. If you think you won't go below 1.15 V then that would become 27 µF, so that's not going to change very much, but it gives you some headroom if you want to use a 47 µF cap. AndrejaKo rightly points out that electrolytic capacitors have large tolerances, usually -20 %, and then I would just go for a 68 µF/6.3 V cap.
H: what is transparent operation on rf? Whenever I am searching Rf module, I have seen transparent operation on some module.I have searched meaning of transparent operation, but I could not find anything. My questions are What is the transparent operation ? Why is it used in RF module ? What are the drawbacks of the transparent operation? AI: From this document: "When operating in transparent mode, the modules act as a serial line replacement." It means that the RF module hides the implementation of the transmission protocol from the user. Xbee for instance may use the Zigbee protocol, but appear to the microcontroller as a simple UART. To the user the cloud just hides the wire, while in reality it may hide any level of complexity, in this case a wireless Zigbee connection, including everything required to run the protocol: The "why" is obvious: the designer doesn't have to bother about the communication protocol, and just send and receive UART data as if his microcontroller were directly connected to the other controller. So, "Transparent operation" means hiding certain implementation details from the user, so that the system is easier to work with, yet with the same user functionality. edit about drawbacks Like Kellen already said one drawback may be cost, especially if you work at short range. (A kilometer wiring also costs money). Noise is not a problem if your RF modules are FCC or CE certified. RF even has the advantage that you have electrical isolation, which also may prevent noise issues.
H: Transistor With No Voltage to Base In the newest Make magazine, they show how to connect LEDs in line to speakers to have the LEDs light up when the speaker is playing music (pulse with the music). They say you may want to hook up the LEDs to a 9 volt battery in order for the LEDs to come on at lower volumes. They accomplish this via a transistor. I don't get how this works. The connections are as follows: NPN transistor: Base goes to + lead from Amp Emitter goes to Negative lead of Amp and 9V battery Collector goes to cathode of LED Battery: Positive lead of battery goes to anode of LED (through resistor) Somehow, when voltage is applied to the + lead of the Amp (music is playing), this turns the LED on? I would have thought the LEDs would always be on, the connection goes + battery, LED, collector of transistor, emitter of transistor, - of battery. I thought that if a positive voltage was applied to the collector, with the emitter at ground, this would be a closed circuit? AI: The transistor may act as a switch or a variable resistor. If no voltage is applied to the base (more precisely: no current flowing into the base) then the switch is open. As base current is applied it gets amplified by the transistor into an N times larger collector current. The "N" is an important transistor parameter, called \$H_{FE}\$, and it defines the current amplification factor. For general purpose transistors this is often around 100. So if you apply a base voltage (you need a series resistor!) so that there will flow, say, 1 mA, then there will be 100 mA collector current if the circuit allows it. That means that other components may limit that current to a lower value. Let's assume your LED has a 2 V voltage drop, that will be rather constant for that type of LED. Then assuming the transistor is fully conducting (no voltage drop between collector and emitter) you'll have 9 V battery voltage - 2 V LED voltage = 7 V across the resistor. If we choose a resistor value of 350 Ω then, according to Ohm's Law we have a current of 7 V/ 350 Ω = 20 mA through that resistor and therefore also through the LED. (20 mA is a typical current for an indicator type of LED.) So, while the transistor would like to draw 100 mA, the resistor will always limit that to the lower 20 mA. You don't say what the signal from the amplifier is. Is that a line level (500 mV) or a speaker output level (3 V for 1 W)? In the first case the voltage will be too low; a transistor's base has to be at 0.7 V minimum before current starts to flow. If you use the speaker output you can use a 1 kΩ resistor in series with the output to limit the base current. Also place a diode (1N4148) in anti-parallel with the base: cathode to the base, anode to ground. This prevents too large negative voltages across the base, which would destroy the transistor.
H: Grounding Shielded Panel-Mount Connectors I'm building an amplifier in a conductive metal chassis. The general grounding plan is to have an audio ground, a power ground, and a digital ground that converge at a single point on the chassis. However, my audio connectors are all panel-mount, so the shield of the connectors get grounded by contact when mounted. Technically, should I insulate them from the back panel and wire the ground connection? Practically, does it matter whether I insulate them or not? AI: Yes you should insulate the chassis ground also, from the ground star connection at the Poewr Supply. The chassis should be connected to Earth terminal, right on the Power Input, thus all signals after the transformer should be isolated from the chassis. Yes it matters if you insulate, because insulation from Earth avoid some "hum" noise often found in poorly designed Audio Electronics.
H: I2C minimum clock speed and reliability Is there a minimum clock rate specified by I2C? I know the most widely used clock rate is 100kHz and there is a "fast" mode of 400kHz supported by some devices, and a faster yet mode supported by other devices (I think 1MHz?). Since the SCK signal is generated by the master I presume one could operate at a much slower speed than any of those - is there a lower bound in practice? To what extent do slave devices care about the clock rate (e.g. is it common for them to have short timeouts)? The reason I'm asking is that I'm wondering if could possibly run I2C over a longer distance (e.g. 20 feet) to program I2C EEPROMs reliably in a production tester setup. I'm assuming it won't work reliably over that distance at the standard data rates. Am I off-base entirely in thinking that slowing down the clock speed will improve reliability over longer distances (e.g. is it really a question of drive strength and rise/fall times)? AI: No, there is no minimum frequency, minimum clock frequency is 0, or DC. See the specification, page 48. But you will have to pay attention to rise and fall times. Those are 1000 ns and 300 ns maximum, resp. And a longer cable, with some capacitance will influence edges, regardless of frequency. It's that capacitance, together with pull-up resistances that will determine rise time. Fall time is not a problem because the FET which pulls the line low has a very low resistance, and then the fall time time constant will be very low as well. So we're left with the rise time. To get a 1000 ns rise time on a 200 pF cable your pull-up resistors shouldn't be larger than 2.2 kΩ. (rise time to 90 % of end value.) The graph shows maximum pull-up resistance (in Ω) versus cable capacitance (in pF) to get 1000 ns rising edges. Note that I2C devices don't have to sink more than 3 mA, therefore at 3.3 V the bus capacitance shouldn't be higher than about 395 pF, otherwise the pull-up resistance would have to be smaller than 1100 Ω, and allow more than the 3 mA. That's the greenish dashed lines. For 5 V operation the allowed capacity is even 260 pF, for a 1667 Ω pull-up value (the purple dashed lines).
H: Soldering PCBs directly together I am attempting to replace an old PLCC32 part that was directly soldered to the board with a new part of undecided form. We will definitely need an adapter as we have not been able to find a PLCC32 part that does what we need. I cannot use a PLCC adapter plug because there are also height restrictions. We are considering building a two-sided adapter board that has pads on the bottom side that match the PLCC32 layout on the current board, with the new layout on top. Theoretically, the adapter board would be soldered directly to the old board and the new chip on top of the adapter. However, I have not seen any examples of soldering two PCBs directly together in this manner, which makes me think it is a likely to be a bad idea. Can anyone comment on this sort of custom adapter? AI: No problem. I had to look for a picture that illustrates the technique: You make a PCB with plated through holes on the PLCC's pads, so at a 1.27 mm pitch, and mill the four sides so that you get the half holes like in the picture. These are easily solderable on the old PLCC footprint, it's an often used technique, called castellation. A picture of a complete board: and another one: or this one from a question posted 1 minute ago: You get the idea. You'll have to find a part which fits inside this small PCB, but given the miniaturization of the last years that may not be a problem. edit 2012-07-15 QuestionMan suggested to make the PCB a bit larger so that the PLCC's solder pads are under it. For BGAs the solder balls are also under the IC, but that's solid solder balls, not paste, and I don't know how solder paste will behave when squeezed between two PCBs. But today I bumped into this IC package: It's the "Staggered Dual-row MicroLeadFrame® Package (MLF)" of the ATMega8HVD, and it has pins under the IC as well. This is 3.5 mm x 6.5 mm, and weighs a lot less than the small PCB. That may be important, because thanks to the low weight capillary forces of the molten solder paste can pull the IC to its exact position. I'm not sure if that will also be the case for that PCB, and then positioning may be a problem.
H: About SPICE: Should I use transient analysis or DC linear analysis? My question is specifically linked to an exam problem where I had to find a function in terms of time for the current on a capacitor and a resistor. The circuit was very simple: A current time-variant current source in series with 2 subcircuits, each composed of a capacitor and a resistor connected in parallel. Please see the figure below: So, if I want to simulate this circuit with a SPICE software, should I run a transient analysis, a DC linear analysis, or some other type of analysis? If the current source was sinusoidal, I would use an AC analysis, but the current source runs a current numerically equivalent to t (in Amperes) where t is the time (in seconds) elapsed since the circuit started working. Below I have written my netlist file. While it is not a valid SPICE netlist, it illustrates what I am trying to do, focus on the current source Iin: CIRCUIT ANALYSIS C2 0 2 20m R2 0 2 3 Iin 0 1 {time} R1 1 2 2 C1 1 2 50m .TRAN 1us 100ms .CONTROL RUN PLOT V(1)-V(2) .ENDC .END If you tried to simulate this netlist, you would receive an error similar to the following (which I obtained using ngspice): Original line no.: 4, new internal line no.: 5: Undefined number [TIME] Original line no.: 4, new internal line no.: 5: Cannot compute substitute Copies=9 Evals=9 Placeholders=1 Symbols=0 Errors=2 How can I achieve this type of analysis? AI: DC analysis gives you the initial conditions DC steady state values only. You must do a transient analysis to see how the voltages and currents evolve with time. AC analysis is for small-signal sinusoidal steady state only; it is a frequency domain analysis. I believe you'll need to use a piece-wise linear (PWL) source for your current ramp.
H: how hard can it be to soldier and assemble Sanguinololu 1.3a without prior experience I'm interested in building a 3d printer myself. I need to get Sanguinololu 1.3a board. I saw two options on ebay, assembled and unassembled. Cost difference is quite large where assembled (DIY £35, built £58). I'm wondering exactly what challenges am I facing with this project? I have no prior experience in soldering, but I believe in curiosity and that fact that nothing is impossible. Would experience be worth it? Will I get some interesting skills that will go into my future electrical engineering career? (joking). Both kits available on eBay here (check dropdowns). AI: Soldering really isn't that hard, If you practice first, then you can be reasonably confident of doing a good job. If you're buying a 3D printer, then you must be fairly technically minded. Rule 1: Solder flows onto hot metal. It is practically repulsed from cool metal. To make a good solder joint, you must make sure the pin of the component and the pad on the PCB are hot. That's pretty much all the rules. It's all about the heat. Most of the soldering problems I see are have something to do with heat transfer. Now follows advice about following rule 1. Advice 1: Make sure the soldering iron tip is shiny. Shiny metal conducts heat well. Dull brown coating on the tip is a surprisingly effective insulator. Use tip cleaner. Touch the solder onto the iron. It should melt instantly. Advice 2: Touch the iron to the pin and pad at the same time. Get them both hot, otherwise the solder will flow onto one of them and avoid the other. Do not blob some solder onto the iron then try to wipe it onto the pin and pad. As Olin mentioned in the comment below, you should touch a little solder onto the iron and use that to conduct heat effectively onto the pin and pad. Then apply the solder to the pad. Advice 3: The way to be sure that the pin and pad are hot enough is to touch the solder onto them. It should melt immediately and flow beautifully onto the pin and pad. Advice 4: Lastly, if the solder is being annoying, behaving more like custard, it probably means all the flux inside it has evaporated. Wipe it off with the iron, wipe the iron clean and try again. Buy some vero board (strip board) and some cheap components to practice on. Once you're confident about making beautiful hot joints (you should be able to make about one every 2 seconds) you're good to go.
H: How to use Arduino Bluetooth module? I am trying to get my arduino working over wireless (via bluetooth). I would like to send serial signal though it via bluetooth, but I am having some difficulty getting the bluetooth module I purchased actually showing up on any of my computer's bluetooth scan. This is the skimpy datasheet for the module. It was made by someone in China (an individul, not a company - and that is why I do not really understand it) Any help as to how I can get this connected to my PC would be great. ---Thank you--- Here is the bluetooth module that I have... Here is the complete setup... AI: I have worked with this module before and found that it only appears in a scan if it is in "data" mode. To put the module into data mode you have to drive the mode pin low. However the datasheet neglects to tell you that the module wont actually switch into data mode until the reset pin is pulled. Try driving the mode pin low, pressing the reset button, and then doing a scan again. Something called "HC-..." should appear.
H: Relay trouble again I'm having trouble again with a set of relays. It is the small set that only has the two relays on the board. I've tried wiring them every way imaginable and they still won't work properly. The only way they will come on at all, is if I put my 5 VDC to the VCC terminal, and they will not actuate with the outputs from the controller. I've tried them with two different Arduino Uno's. I'm also not sure which is the proper placement for the jumper. I'm not sure what I'm doing wrong. Any help would be appreciated. AI: You will need to provide more details for us to be helpful. I can't tell from your question whether you are working with standalone relays or some relay that are already a part of a PCB. If it isn't soldered in place, test the relays by energizing the coil and testing for continuity with the ohm setting on your multimeter. To energize the coil, supply a voltage to the primary side and hook up the secondary side to your DC common, aka the ground. If it is a mechanical relay you will hear a click. Typically, relays use A1 and A2 for the primary/secondary sides of the coil and 11, 12, 14, 24, and a few different numbers for different contacts. All of the pins should be described in the relay's datasheet.
H: A quick question on relays I have a circuit that normally runs at 3-5v and then when triggered, it gets pulled to ground (around .1-2 mv leakage). I want to use this to trigger a relay to close a different low voltage circuit. Can I use the "Sainsmart DC 5V Relay Module for Arduino PIC ARM DSP AVR MSP430 TTL Logic" board to achieve this? AI: {With my specified input} can I use the "Sainsmart DC 5V Relay Module for Arduino PIC ARM DSP AVR MSP430 TTL Logic" board Yes. A low level input WILL operate this OK as long as it can provide enough current to operate the optocoupler. See below Please provide web links when asking about specific products. Your product is here The circuit diagram is shown below. A low level input WILL operate this OK as long as it can provide enough current to operate the optocoupler. Sainsmart may be able to advise how much current is needed. 10 mA is usually enough - occasionally more is needed and sometimes much less. R14 may need to be changed. The Vcc changed would ideally be the same voltage that you say is 3-5V so that there are no pronblems when the input is high.
H: How can I convert a 2 prong connector to USB? I'd like to convert this: http://www.parts-express.com/pe/showdetl.cfm?Partnumber=060-640&utm_source=googleps to a USB? An ideal solution for me because of cost would be to use an existing usb controller from a usb keyboard. I was hoping someone might help bridge the gap in steps. What is necessary to wire the connector to the usb controller? Any help whatsoever would be much appreciated. AI: This calls for an FTDI FT245R. FTDI has become the standard for interfacing USB in a simple way to microcontrollers and other digital I/O. The FT245R has 8 parallel I/O, so you can connect the switch with a pull-up resistor to one of those. edit You asked about this module: Looks good. You connect the switch as follows: VCC goes to VCCIO, Vout goes to one of the inputs D0..D7. I wouldn't solder directly to the module, but use a socket like this instead: That's it. The advantage over the RS232 interface is that you have 8 I/O at your disposition. The yellow jumper on the board selects between 3.3 V and 5 V for the I/O. This is important if you want to connect to a microcontroller or other external logic, but for the switch it doesn't matter.
H: A/D Beginner Question I want to just get an idea about the complexity of a hobby project before getting started on it. I want to use a sensor that outputs an analog voltage. However, I want to use an A/D convertor to convert this into a digital value and then feed this into a PC via USB. The analog voltage is between -5V to +5V. I would really appreciate any links/guidance in what I need to read more about? I'd be happy to clarify anything? A second question would be that if I need to provide power to the sensor, what circuitry should I be looking into? AI: All you need is a resistor divider: If Vin = +5 V then Vout will also be +5 V. If Vin = -5 V then the divider will set the output voltage nicely halfway between the two voltages, so that will be 0 V. So this scales [-5V, +5V] to [0V, +5V] for your ADC. To get the data in your PC you'll need a microcontroller with USB on-board, or a UART-to-USB bridge like this one. If you install FTDI's virtual COM driver on your PC the USB connection will serve as a transport channel for UART data. edit If your sensor only needs a few mA you can use this charge pump converter to generate the -5 V from the +5 V USB supply:
H: Minimum operating temperature - Outer Space? I've been looking at some microcontrollers and I've seen they've got some "weird" minimum operating temperatures, like -25 degrees or -10 degrees etc. But I can't really understand why there is a minimum, a maximum I do understand because everything melts down and breaks, the resistance increases making the signals too weak. But when you go to the cold side. Everything kind of gets better and better, the resistance gets reduced, everything gets more stable. But yet... the minimum operational temperature is -25 degrees... Why is it not 0 Kelvin? Because I was thinking about the mars-rover and other satellites, when they are behind the sun they are operating at nearly 0-50 kelvin, the mars-rover... according to wiki it gets as cold as −87 °C (−125 °F). And this is still very much more cold than -25 degrees. So, can anyone please explain to me why microcontrollers do have minimum operational temperature? The more thorough the better. AI: 2nd Edit! Modified my answer about semi-conductors based on jk's answer below, read the history if you want to see the wrong bits I modified! Everything gets weird within certain limits. I mean, sure, the resistance improves in conductors but it increases in semi-conductors, and that change effects how the IC works. Remember that the way that transistors work on the basis that you can modify their resistance, and if the temperature drops so low that you can no longer decrease their resistance, you've got an issue! Imagine that suddenly your semi-conductor essentially became a resistor... how do you control it? It no longer behaves the same way! Now I'm a bit confused at where you're getting the -25°C, as the industrial/military spec should put it at -40°C for the minimum operating temp. But for the space question, I can answer that as I work in a space lab! In general you have three thermal concerns in space: 1) In space, you only radiate heat. Radiation is a terrible way to get rid of heat. In the atmosphere, you conduct heat into the air around you which makes cooling a lot easier. So in space, you have to put big heatsinks on to get the heat into larger radiative surfaces. 2) If you have a component which doesn't generate heat, then space is happy to let you get really friggin' cold! In general, what you do is you have active heating elements to keep components which don't generate more heat than they radiate but have thermal limits. 3) Heat swings are common because you will exit and re-enter the sun's rays. Thus you need to have active thermal management where you have a big heatsink which can radiate heat when it's hot, and a heater for when it's not. You can also get extended temperature range devices which go lower and higher, but there's pretty much always a limit. Some of them are for where the cold temperature will crack the die because the metal will shrink more than the plastic (or vice versa) which is why they list limits for storage as well! The limit is mostly in materials. You also tend to get space-rated chips made out of ceramic for the packaging, which can also raise or lower the thermal limits. Anyway, I hope that explains it for you. I can try and answer any other questions, but I'll admit the physics of low-temperature semiconductors is not my forte! 1st Edit: Here's a link to a wikipedia entry about the idea that at lower temperatures there are fewer electrons which are excited enough to generate a current flow through a semiconductor lattice. This should give you a good idea of why the resistance becomes higher, and why 0 Kelvin would have never been an option.
H: High powered driver for 10W and 45W LEDs I have 8 x LZ4-00B200 (14V, 700ma operating) and 8 x LZ4-00R200(9V, 700ma operating) which I would like to wire off of one power supply. My problem is two fold. First, how should I organize the 16 LEDs? 16 in series? 8 in series in parallel with another 8 in series? I'm not sure what is best. Second, what driver can I use to power all 16 LEDs? I was looking at some of the LED drivers from Recom but I'm really not sure which one I need. I successfully designed a few lights with the Recom drivers using 8 LEDs but I couldn't design one for 16. Any help would be appreciated. I actively give up votes AI: The best thing is to make 8 strings of a 14 V LED in series with a 9 V LED. The LT3496 can drive 3 strings at maximum 750 mA from an input voltage of 3V to 24 V. So you'll need three of those for 8 strings. The application needs more components than just the common series resistor, but the latter isn't very efficient; you need a few volts drop across them to get a good regulation, so that's at least 8 x 1.5 W loss.
H: Radio with crystal oscillator Is it possible to make a 20 MHz radio with this by creating a circuit consisting of a battery, that crystal oscillator and an antenna? AI: No. It's not an oscillator, it's just a crystal. You'll have to build an oscillator with it yourself, which only requires a few components, for instance like this one with a FET: If you don't want to build the oscillator yourself you can also buy them for a few dollars. Then you don't have to worry about stability and such. The oscillator won't give you enough power to drive a 50 Ω antenna, but an HF amplifier following the oscillator will do the job. edit That gives you a "radio", but it just transmits a fixed sine wave(*), your 20 MHz carrier, no signal. For FM or PM you'll have to modulate the oscillator's frequency. AM can be done at the amplifier stage. CW (Continuous Wave) for instance just switches the carrier on and off. (*) The encased oscillator shown outputs a digital square wave, so you'll have to filter that, otherwise you'll transmit 20 MHz, 60 MHz, 100 MHz, etc.
H: Can I mimic Arduino Ethernet library through serial? I'm ordering an Ethernet Shield for a project I have planned, but before make the investment, I want to make sure the project will work. Eventually it will communicate with a website via ethernet, but I was wondering if I could test this through my PC, using it simply to route page requests, so that I can easily adapt it for the ethernet shield. AI: I'm not sure if the Arduino can do it, but you can look at the possibility of implementing SLIP. It's designed to layer TCP/IP over serial communications. You can configure a PC as the SLIP server, for the device to login and route packets through. Edit: Turns out there's an Arduino SLIP library that does that exactly!
H: Is an ALU a multiplexer? I'm studying digital electronics where the components ALU and multiplexer appear. To me the ALU seems like a multiplexer but it's not specifically mentioned that this is the case. Is it so, or why not? AI: No, it's not a multiplexer. A multiplexer would select one of both inputs, in an ALU both inputs may be used simultaneously, depending on the pending operation. ALU stands for Arithmetic and Logic Unit, and those are the types of operations it performs. If the operation calls for a left shift of register R1, then the second input is ignored, but you might as well have "add the content from RAM address 0x1208 to register R1", then both inputs are used. Before the add can be performed the RAM data must be fetched and placed on one of the inputs, and the content of R1 on the other. All in all an ALU can perform several logical operations, like adding, shifting, clearing, etc. It's a rather complex piece of logic which works on the operands on the inputs and the operation code. Operations like "clear A" are simple, but "multiply A and B" requires lots of gates.
H: One-clock increment operation in a three-bus CPU architecture In his chapter on CPU design, Edward Bosworth introduces the following three-bus architecture: One of the main design aims of this circuit is to be able to increment the program counter PC in a single clock cycle. According the the accompanying text, this is achieved by driving B1 from PC, B2 from the +1 constant register, asserting the add signal on the ALU and driving PC from B3: PC <- PC+1: PC -> B1, 1 -> B2, add, B3 -> PC The obvious question is then, how can the PC register drive B1 with one value while simultaneously loading another value from B3? I can come up with two possible workarounds, but both have obvious issues. The transfers do not happen simultaneously. For example, B1 is driven on the rising edge, whereas the signal is loaded from B3 on the falling edge. But then, when we stop driving B1 the signal would vanish on B3 in the absence of another register in the path. If you do use an intermediate register somewhere (in the ALU?), you really are just doing two-cycle increment using half-cycle cycles. The PC register is actually two registers, one for output and one for input, that are not connected when the register is loading. But then you would need some sort of "equalization logic" that could turn out to be non-trivial. So what is going on here? AI: Turns out I missed a crucial detail in the accompanying text, and the registers are indeed composed out of two (master-slave) sub-registers: The Use of Master–Slave Registers Note that the contents of the PC are incremented within the same clock pulse. As a direct consequence, the PC must be implemented as a master–slave flip–flop; one that responds to its input only during the positive phase of the clock. In the design of this computer, all registers in the CPU will be implemented as master–slave flip–flops.
H: Digital Dimmer With Microcontroller I want to build a digital dimmer for resistive Loads. I have found this circuit for that: The input voltage is 220VAC 50Hz. The red box in the picture is for Zero Crossing Detection. When the AC voltage crosses the zero, the Microcontroller will be interrupted an therefore detects the zero crossing. so you can reach to the required voltage by triggering the Triac after a specific Delay.Do you recommend this circuit? if so, please let me know if there is any IC to replace with the Red Box (shown in the picture) to detect the zero points of AC voltage (as my circuit should be as small as possible)? P.S. As I need this circuit to reduce the consumed energy of Loads, the circuit itself must dissipate at most 5 watts. AI: In the answers to this question is explained how you can do that complete zero-crossing detection circuit with just U1, R12 and 2 series resistors on the 220 V side. One solution uses a common optocoupler, the other one a Darlington optocoupler, which needs less current to drive the optocoupler's LED, so that's less power in the series resistors (less than 200 mW for the complete zero-crossing detector). This replaces the red box plus the rectifier at the left. edit dd. 2012-07-14 If an AC input optocoupler is too expensive, then you can use a common optocoupler with a 1N4148 in anti-parallel: You'll have the advantage of lower cost and wider offering. The LTV-817 costs only 10 cent in 1000 quantity, yet has a respectable 50 % CTR. For only 2 cent more you get the LTV-815, which has a Darlington output. Instead of 1 positive pulse every half period you'll have a positive pulse a bit longer than half a period. If the mains frequency is 50 Hz then one period is 20 ms. If then the positive pulse is 12 ms long you know that it covers two zero-crossings symmetrically. Since the zero-crossings are 10 ms apart there was one 1 ms after the start of the 12 ms pulse, and one 1 ms before the end. So you know that the next zero-crossing will be 9 ms after the end of the pulse. This is very easy in software and keeps BOM cost low. (end of edit) But watch out with the triac driver. The input is isolated from the mains through the optocoupler, but apparently they forgot that on the driver side, so the circuit is directly connected to the mains after all, and therefore possibly lethal! You need an optocoupler on that side as well. Typical application from the MOC3051 datasheet: Make sure to use a random phase optocoupler (like the MOC3051).
H: Why does the base-emitter voltage of a BJT decrease with temperature? According to Sedra/Smith Microelectronic Circuits, \$v_{BE}\$ changes by \$-2\text{mV}/\text{°C}\$. I cannot understand how this could possibly be the case given the equations I am familiar with. With all currents kept constant, we have: \$\large{i_E = \frac{I_s}{\alpha}e^{v_{BE}/V_T}}\$ To keep \$i_E\$ constant, any change in \$V_T\$ would have to be accompanied by a change of the same factor in \$v_{BE}\$, otherwise \$\alpha\$ or \$I_s\$ would have to change, which as far as I understand is not possible. So, how can \$v_{BE}\$ be inversely proportional to \$V_T\$? AI: \$I_S \$ is highly temperature dependent. As the temperature of the material increases, more electron-hole pairs are thermally generated, increasing \$I_S \$. Here's a link that gives the formula SPICE uses for \$I_S\$, albeit with a typo. Temperature appears explicitly in the exponential terms of the BJT and diode model equations. In addition, saturation currents have a built-in temperature dependence. The temperature dependence of the saturation current in the BJT models is determined by: The corrected formula is: $$ I_S(T_1) = I_S(T_0) \left[\dfrac{T_1}{T_0}\right]^{XTI} \exp\left[ \dfrac{E_g q (1{\rm\,V})}{k} \left(\dfrac{1}{T_0}-\dfrac{1}{T_1} \right) \right], $$ where \$E_g\$ is in electron-Volts, remaining quantities are in SI units, and \$XTI=3\$ unless the transistor model specifies otherwise. I believe that \$ I_S \$ is roughly cubic in \$ T \$.
H: Difference between drill layer, hole layer, and milling layer in Eagle What is the difference between the drill layer (44), the hole layer (45), and the milling layer (46) in Eagle PCB? AI: Drill layer (44) is used for pads (of through hole components) and vias. Hole layer (45) is used for mounting holes. Milling layer (46) is used for cutouts on the board, usually you can use the dimension layer (20) for that too.
H: Arduino has an input value in disconnected pin I'm new to arduino. Maybe is an elemental question... If I load this program: int mval = 0; void setup() { Serial.begin(9600); // set up the LCD's number of columns and rows: } void loop() { mval = analogRead(1); Serial.println(mval); delay(1000); } I get a value that varies between 300 and 400. When I think it have to be 0, being that there's nothing connected to that input. Any ideas?? It's an arduino UNO connected to my laptop via USB AI: You're getting something called "floating input". When you think about it, an ideal device for measuring input will have a very high input impedance, and thus will not remove very much electricity from the pin. So what happens is that random electrons float on to (or off of) the pin (either from electro-magnetic interference in the environment or from direct contact with something with a slight charge), and because it acts like a very high resistance connection to ground, this charge will drain off very slowly. Thus when you go to measure it, it looks like there's some voltage there! In general, you either hook this up to some device which provides a voltage, or you put in a pull-up or pull-down resistor and adjust your expectations on that pin. I hope that helps and if not I'm sure someone has a link to another person who has answered this question more competently (I see in the related section at least one near-identical question).
H: How can I correctly wire my switch into my USB-to-Serial adapter cable? Referring to this question: How can I convert a 2 prong connector to USB? I have decided to go with this solution: (2) You could use a cheap (from $5) serial to USB adaptor and wire the switch to eg the CTS line. This can be detected by a PC program. (answered by Russell McMahon) My questions are what type of wiring should i use? (links anyone?) I've decided to go with this adaptor: http://www.amazon.com/gp/product/B00404P0L6/ref=oh_details_o00_s00_i00 How would I connect the actual wires to the serial cable? from this video: http://www.youtube.com/watch?v=2MlJCMdD8MU (45 seconds) It appears I need to wire pins 1 and 4. But I can't seem to find the shown serial adapter that would let me solder the wires into a serial port. Does anyone know where I might get such an adaptor? Or could I just connect the wires directly into the serial port pins? Thank you all for your expertise and willingness to share. AI: You need one of these: This is the female socket which goes with the connector, it has solder pins. If you would want one for PCB mounting it would look like this: Note that due to the pin spacing it isn't fit for breadboard mounting.
H: Determining the beam frequency & EM-component that is emitted from the human eye (supposedly) I am interested of determining how much truth there is in a persons claims that our eyes emit a beam that can be detected by a device that he has built and patented. The person who invented the device is Colin A Ross (MD), a doctor specialized in trauma and its treatments. In a nutshell the doctor says that the feeling that we sometimes get, when someone is looking at us, comes from the fact that our brain emits an EM field through the eyes. The patent for the device that he has built has the patent number US 7806527 B2. A document describing the patent can be found here: http://www.rossenergysystems.com/Downloads/Patent_7806527-Electromagnetic-Beam-Detection-System.pdf A demonstration of the device is shown in the video at the bottom of this article: http://blogs.dallasobserver.com/unfairpark/2008/08/colin_ross_has_an_eyebeam_of_e.php The question I wanted to ask is: is it possible to determine from the patent what frequency the beam is and what EM-component the device reacts to? For example, whether the beam detector reacts to the magnetic component or the electric component? But the purported frequency is more of interest. Best regards, JJ Edit: thank you all who have responded so far. I agree with stevenh on the fishyness of the demonstration video and the confirmation bias that likely is the reason for the belief in the eye beam (we may in fact often feel that we are being looked at even when nobody is around us, but some people may forget these occurences). Thank you "Fake Name" for your interesting clarification on this issue. AI: that our eyes emit a beam that can be detected Humbug, bogus and nonsense. It's been proven in numerous tests that you can't feel that a person is looking at you. It's easy: person A is with her back to person B. On a time cue they both have to press a button, person A whether she feels B is looking at her, person B whether she's looking at A at that moment. We have the following situations: 1) 0 0 : Not feeling, not looking 2) 0 1 : Not feeling, looking 3) 1 0 : Feeling, not looking 4) 1 1 : Feeling, looking If this obstinate claim were true 4) should have a much higher occurrence than 3). Which it doesn't. In none of the tests the deviation from 50/50 was statistically relevant. Baloney, tosh, bunk. (10 minutes later) I watched the video. Tip: watch it first with the sound off, so you won't be distracted by snake-oil talk. Watch it later with sound. Without sound it struck me that Ross (is he really a doctor?) spends 2 minutes of this 5 minute video playing with some wires. That's called impression management, but in fact it's irrelevant. Then he puts in his earplugs and puts on his goggles. Then bends his forefinger a couple of times. And that, my dear man, was the demo. That was all!. He's doing something on his laptop (which we're not allowed to see), and that's probably in the impression management realm as well. I'm sure Randi's million is going to be safe for a long while still. (I often wonder who of those psychics are just frauds, and who actually believe their own story. Both of them exist) Further reading Confirmation bias
H: Measure AC Sine Wave amplitude with ADC I have created an AC sine way using a wien-bridge network. I would like to measure the peak to peak voltage of this wave using my microcontrollers ADC. I cannot just use this wave as an input to my Analog Input pin, as of course the electrical specification specifies no negative voltages, and I would only get a snapshot of the wave, and would have to take many measurements and take the max one. I am looking for some discrete components I can pass this wave through to get a simple DC voltage representing the Peak to Peak (or just the positive) voltage of this wave. AI: One way is to use a peak detector, but this has a diode voltage drop, which gives an error in the result. You don't say anything about frequency, but I'll assume it is much lower than the ADC's sampling frequency. I would use a resistive voltage adder to bring the full signal within the ADC's range. The resistive adder has the advantage over the capacitively coupled adder that you don't have to take frequency-dependent attenuation from the capacitor into account. Suppose the ADC has a 0 V to 5 V range, and your signal is maximum 10 V peak-to-peak. Then you want Vout to be 0 V for -5 V input, and as close to +5 V as possible for +5 V input. The latter means that R1||R2 should be much smaller than R3. The former means that R1 should be equal to R2: if the input is zero then there's no current through R3, and R1 and R2 form a resistor divider between -5 V and +5 V. So if we choose R1 = R2 = 1 kΩ and R3 = 47 kΩ then the output signal will swing between 0 V and 4.95 V. Now take enough samples to find the minimum and maximum values, and multiply the difference by 10 V/ 4.95 V, that will give you the peak-to-peak value.
H: what is the resistance of hydrogen? If I were to connect a bettery to the two sides of a container that contain only hydrogen gas, and its not dense (it's pressure is one atmosphere), what would it's resistance over the length of the container be? AI: Depends on the container's dimensions. Specific resistance is often expressed in Ω cm, which means that a cube with 1 cm sides of a 1 Ω cm material will have a 1 Ω resistance between opposite sides. At 1 atmosphere a gas is mostly empty space, with here and there a molecule. I don't think that hydrogen under those conditions will be much different from other gases (possible with the exception of noble gases). I expect a value of at least several 100 MΩ cm, probably a couple of GΩ cm.
H: Sainsmart relay output wiring I have a 2 Relay module from Sainsmart. http://www.sainsmart.com/arduino-pro-mini.html/ The output has 3 connections instead of just 2. I want to know which two of these three connections I need to wire up. I want to find this out without actually having to connect my final 240V cable. How can I do this? Is this possible with a multimeter? If yes, how? AI: There is a schematic available as one of the product photos on the page you linked: This shows that of the three contacts associated with each relay, the center one is the common connection, one of the others is a normally-open contact, and the third is normally-closed. Which of the actual physical pins is NC and which is NO isn't obvious from the photos and schematic, but there may be some indication in the silkscreen that isn't visible in the photos. In any case, it would be really easy to check by, for example, just hooking up a desk lamp or something through the relay on one or the other side. You could equally well (and more safely) use a multimeter to measure the resistance from either side to the center contact and determine which is NC and which is NO.
H: Intro Circuits Class Inductor question This is a question from my intro circuits class that I can't figure out the answer to: Of course it's very simple, but I had a professor who was incomprehensible most of the time, and my textbook doesn't have any examples similar to this. Would someone please either point me in the right direction to answer this or suggest a good and free resource for me to use to teach myself? AI: Since this is homework, I won't solve this completely for you, but I'll show you how to set up the equations: First question "a". Let's name the bottom node "ground", and the top node "node 1", and call its voltage "v1". Now for each of the elements you can write a branch equation: \$\dfrac{\mathrm{d}i_1}{\mathrm{d}t} = -\dfrac{v_1(t)}{3H}\$ (\$i_1\$ directed opposite of passive reference convention) \$\dfrac{\mathrm{d}i_2}{\mathrm{d}t} = \dfrac{v_1(t)}{6H}\$ \$i_R(t) = \dfrac{v_1(t)}{2\Omega}\$ You also have a node equation for node 1: \$i_1(t) = i_2(t) + i_R(t)\$ Given the initial conditions, you can also work out that the resistor current at t=0 is -1 A, and so \$v_1(0) = -1A \cdot 2 \Omega = -2V\$ From here you should be able to work out a solution for the different currents over time. Since you only have one storage element (the two inductors in parallel are equivalent to a single inductor with 6*3/(6+3) = 2 H inductance), you'll most likely end up with v1(t) decaying exponentially, and then being able to work out the individual inductor currents from there. For equation (b), follow the same method: write all the independent branch and node equations you can, then combine and simplify until you have a solvable set of equations.
H: What do these switch ratings mean? Current rating: 3A @ 125 VAC, 1A @ 250 VAC What can I read to understand these ratings better? What exactly does it mean? They're used to rate this Momentary N.O. Raised Push Button Switch. AI: revised 2012-07-15 Motor and solenoids loads create more arc and can reduce **life expectancy of the switch , so contacts are rated closer to load characteristics that generate arcs. The VA may be a reactive load but the arc is a real power drop in the switch which rises during turn-off before quenched to off state. Simple Voltage rating depends on gaps. Current ratings depends on material, pressure , contact resistance and lifetime testing. But complex loads, switches depend on a Safe Operating points that tend towards the VA product of the load. Since high current, it is safe to say not gold plated nor used with small signal DC. If so use cap discharge circuit to "wet" contacts on closure, eg low ESR cap with high R dc bias across contacts. Lower VA rating at higher voltage is normal. 3A @ 125 Vac, so VA = 375 1A @ 250 Vac, while current rating drops to 1/3, VA=250 is 2/3 of above There is a phoneme of a plasma condition during arc where the air ionizes and has a low resistance and the power dissipated in the arc depends on the motor or inductive load and voltage and time until the voltage drops near the next zero crossing. The duration of this arc can generate substantial heat and reduce life on contacts until quench voltage is reached. This is similar to all negative resistance switches including SCR's and transistors hence there is a sage operating curve. But for simple mechanical switches they use simple specs to match common loads for safe long life. If you need anything more specific for an answer , more design details are needed for you application in another question as I hope this is sufficient. 2nd edit THere are many design factors that affect ratings and certifications of the switch besides gap; Materials such as steel, silver, palladium, gold, nickel , beryllium copper, tungsten, are common ingredients that significantly affect price and specs. Secondly ruggedness and safety where the design must be reliable and fail safely for the user's sake according to CE/UL safety tests. These all affect the ratings. YOu may choose to use it for low voltage DC applications where safety is not an issue for the rating, but this is an agency required rating for safety and reliability. Just be mindful about sufficient wetting current is typically 10% of rating so apply a surge to de-oxidize the contacts when possible by design. Thirdly , there are contact bounce characteristics in all mechanical switches which creates arccing and depending on the back EMF of a motor, now generating power during no load conditions then receiving power when contact closes, you need to reduce current rating of the switch when voltage is increased to reduce this transient power dissipation in the switch. Trying to keep this answer brief is difficult, so my final comment is to consider bounce suppression snubber filters to reduce EMI radiation and also suppress arcing in switch, somewhat.
H: Help me interpret solenoid shopping info I'm trying to get a cheap pull-type solenoid that can operate for at least ten seconds at a stretch to serve as an electronically-controlled ward in a lock (for a wooden box) I'm building. I'm a novice and confused at my findings. Can anyone enlighten me?: This model touts a stroke length of 0.05 inches. Does that really mean that the shaft only retracts 5 hundredths of an inch? What's a "nominal" stroke? How is it different from a maximum stroke? (I'm looking at the table on this page.) If max stroke is specified but nominal stroke is listed as n/a, does that mean that nominal stroke length is 0? Lastly, any counsel on where to shop for the solenoid I need? I want a retraction of about 1/8 inch but could just as easily make use of 1/2 inch. TMI: My shopping criteria: cheap small >= 1/8" stroke length DC <= 12V AI: If it says the stroke length is .05 inches, then you have to assume the stroke length is .05 inches (50 mils). There is nothing ambiguous here. The nominal versus maximum stroke is less clear. It appears they are rating the solenoid for pulling in the nominal amount, but are saying that it can actually start further out. That will likely mean significantly less starting force, though. They are saying that this solenoid is meant to be used so that it is held the nominal distance out, but that it can mechanically go further. However, it's hard to trust what they say when the starting force is labeled in Ohms. Huh? I'd seriously wonder what else is wrong with that datasheet. I'd find a different solenoid, preferably from a different manufacturer.
H: Communication between multiple microcontrollers I'd like to start implementing a system consisting of N microcontrollers (N >= 2 MCUs), but I would like to know the possibilities to let them communicate one with the other. Ideally, (N-1) microcontrollers are placed inside the house acting as clients, while the last (the "server") one is connected to a PC via USB. The problems I have right now is how to connect these (N-1) microcontrollers to the "server". The clients MCUs perform very simple tasks, so it may not be a good solution to use ARMs to do such simple jobs just because they provide CAN / PHY-MAC. The communication will not happen more than once every few minutes for most of the devices and on demand for others. The speed is not very critical (message is short): 1 Mbit/s I think is WAY overkill for my purposes. The MCUs I plan on using are the following. Atmel AVR Tiny / Mega TI MSP430 ARM Cortex M3/M4 (Possibly Atmel AVR UC3 - 32-bit) I'd like to avoid PICs if possible (personal choice), simply because there are less possibilities to program them (all the above have more or less open source tools as well as some official tools). I know some ARMs provide CAN functionality and am not so sure about the others. Right now I came up with these possibilities: Simple GPIO to send data (say > 16 bits at HIGH to indicate start of message, > 16 bits at LOW to indicate end of message). However it has to be at a standard frequency << (frequency_client, frequency_server) to be able to detect all bits. Only need one cable per client MCU. RS-232: I think this is by far the most commonly used communication protocol, but I don't know how well it scales. I'm considering up to 64 client MCUs right now (probably more later) USB: AFAIK this is mostly like RS-232, but I don't think it scales very well in this case (though USB supports lots of devices - 255 if I remember correctly - it may be overly complicated for this application) RJ45 / Ethernet: this is what I'd really love to use, because it allows transmission over long distances without a problem (at least with shielded >Cat 6 cable). The problem is the cost (PHY, MAC, transformer, ...). I don't know if you can actually solder it well at home though. This way I wouldn't need a client MCU Wireless / ZigBee: modules are very expensive, though it may be the way to go in order to avoid "spaghetti" behind the desk RF modules / transceivers: I'm speaking of those in the 300 MHz - 1 GHz band, so they should be difficult to solder at home. The modules are all built-in, but they are quite as expensive as the ZigBee (at least the RF's modules at Mouser, at Sparkfun there seem to be cheaper ones). CAN? It seems to be very robust. Even though I don't plan to use it in automotive applications, it may still be a good alternative. I²C / SPI / UART? Again - better avoid "spaghetti" with the cables if possible PLCs are not really an option. Performance degrade pretty fast as the length increases and depends on the capacitance load of the power network. I think price-wise is about the same as Ethernet. Furthermore, which protocol would be "better" in case of simultaneous transmissions (let's assume the rare case that at the very same instant two devices begin transmitting: which protocol provides the best "conflict management system" / "collision management system"? To sum it up: I'd like to hear what may be the best solution for a distributed client system that do very light data communication, considering both flexibility (max number of devices, conflict / collision management system, ...), price, easy to make at home (soldering), ... I'd like to avoid spending 20$ on just the communication module, but at the same time having 30 wires behind the desk would suck. The solution I'm imaging right now would be to do basic communication between near MCUs by GPIO or RS-232 (cheap!) and use Ethernet / ZigBee / Wi-Fi on one MCU per "zone" to communicate with the server (expensive, but it is still a lot cheaper than one Ethernet module per each client MCU). Instead of cables it may as well be possible to use fiber optic / optical fibers. Though additional conversions are necessary, and I'm not sure if it'd be the best solution in this case. I'd like to hear additional details on them. AI: CAN sounds the most applicable in this case. The distances inside a house can be handled by CAN at 500 kbits/s, which sounds like plenty of bandwidth for your needs. The last node can be a off the shelf USB to CAN interface. That allows software in the computer to send CAN messages and see all the messages on the bus. The rest is software if you want to present this to the outside world as a TCP server or something. CAN is the only communications means you mentioned that is actually a bus, except for rolling your own with I/O lines. All the others are point to point, including ethernet. Ethernet can be made to logically look like a bus with switches, but individual connections are still point to point and getting the logical bus topology will be expensive. The firmware overhead on each processor is also considerably more than CAN. The nice part about CAN is that the lowest few protocol layers are handled in the hardware. For example, multiple nodes can try to transmit at the same time, but the hardware takes care of detecting and dealing with collisions. The hardware takes care of sending and receiving whole packets, including CRC checksum generation and validation. Your reasons for avoiding PICs don't make any sense. There are many designs for programmers out there for building your own. One is my LProg, with the schematic available from the bottom of that page. However, building your own won't be cost effective unless you value your time at pennies/hour. It's also about more than just the programmer. You'll need something that aids with debugging. The Microchip PicKit 2 or 3 are very low cost programmers and debuggers. Although I have no personal experience with them, I hear of others using them routinely. Added: I see some recommendations for RS-485, but that is not a good idea compared to CAN. RS-485 is a electrical-only standard. It is a differential bus, so does allow for multiple nodes and has good noise immunity. However, CAN has all that too, plus a lot more. CAN is also usually implemented as a differential bus. Some argue that RS-485 is simple to interface to electrically. This is true, but so is CAN. Either way a single chip does it. In the case of CAN, the MCP2551 is a good example. So CAN and RS-485 have pretty much the same advantages electrically. The big advantage of CAN is above that layer. With RS-485 there is nothing above that layer. You are on your own. It is possible to design a protocol that deals with bus arbitration, packet verification, timeouts, retries, etc, but to actually get this right is a lot more tricky than most people realize. The CAN protocol defines packets, checksums, collision handling, retries, etc. Not only is it already there and thought out and tested, but the really big advantage is that it is implemented directly in silicon on many microcontrollers. The firmware interfaces to the CAN peripheral at the level of sending and receiving packets. For sending, the hardware does the colllision detection, backoff, retry, and CRC checksum generation. For receiving, it does the packet detection, clock skew adjusting, and CRC checksum validation. Yes the CAN peripheral will take more firmware to drive than a UART such as is often used with RS-485, but it takes a lot less code overall since the silicon handles so much of the low level protocol details. In short, RS-485 is from a bygone era and makes little sense for new systems today. The main issue seems to be people who used RS-485 in the past clinging to it and thinking CAN is "complicated" somehow. The low levels of CAN are complicated, but so is any competent RS-485 implementation. Note that several well known protocols based on RS-485 have been replaced by newer versions based on CAN. NMEA2000 is one example of such a newer CAN-based standard. There is another automotive standard J-J1708 (based on RS-485) that is pretty much obsolete now with the CAN-based OBD-II and J-1939.
H: Power supply too weak, any danger? I have a car console that i wanna test on my work bench. It's rated at 10A DC max @ 12v, but I don't plan on driving any speakers, so the draw should remain fairly low. My power supply can only provide 3A DC @ 12 volts. If the console DOES exceed the 3A draw, will it just not function properly, or could i stand a chance of damaging my power supply? AI: It depends on the power supply. Some have protection against overcurrent, and some don't - it should advise in the manual/datasheet (if it has one). Most decent quality supplies will have some form of protection (current limiting, thermal cutout, fuse) and withstand at least temporary overcurrents, and a good bench supply should withstand an indefinite short circuit. Without knowing anything about your supply though, it's impossible to say. EDIT - so it's "a charger from some old gadget". In this case without opening it up you can't really tell what it will do if overloaded. Probably the output will just sag or trip off for a while, but it may do nasty stuff like overheat and catch fire if you're unlucky. However, if you are not running any speakers from the amp, I rather doubt you will use 3 amps. Depending on the amp type (class A, AB, etc) it may draw very little current when not loaded. This info may be (should be) available in the manual. I would test the quiescent current with a multimeter to see what it draws, it maybe possible to use the bench supply if the current is low enough - maybe do this to start with.
H: What does A x B mean when referring to wire strand count? Stranded wire is often specified using two numbers in the format A x B. For example, 16 AWG wire might come with a 19 x 29 strand count. What do the first and second numbers mean? AI: Vicatcu is right, the first number, being 19 is clearly the strand count. Common stand counts are 7, 10, 19, 26, 41, 65. The second number is the gauge of each strand. If you look up a table of AWG wire sizes, you'll see that 20 gauge wire has a cross sectional area of 0.518mm2, making a total cross sectional area of 19*0.518 = 9.842mm2. AWG 16 has a cross sectional area of 1.31mm2. Therefore I conclude that you mistyped the number. Perhaps you meant 19/29? AWG 29 is 0.0642mm2. 19 of those makes up 1.22mm2, which is very close to AWG 16. I more often see the strands specified with a / rather than a x. E.G. 19/29. Looking at a chart of available stranded wires, I see that 19/20 is an offered size.
H: How would I design a protection clipper circuit for ADC input? I'd like to be able to protect my ADC from input voltages higher than 5V. What's the simplest protection circuit I could build to have an output like shown below? AI: Probably the simplest is a simple zener limiter: This will also limit negative voltages to about -0.7 V, though this limit will not be well controlled. Edit: I show 100 Ohms at R1. This is just a default value. You want as high a value as you can use, given the bandwidth of the signal you're sampling and the input current needs of your ADC. The higher this resistance, the lower the current the zener needs to sink in an over-voltage condition, so the smaller (and lower-cost) the zener can be. You may want to add a capacitor in parallel with the zener so that it combines with R1 to form an anti-aliasing filter for your ADC. A lower cost option if you have a 5 V rail that can sink enough current, and you don't mind the limit value being slightly above 5 V: You can buy the two diodes in a dual package for exactly this purpose. If you want the limit value to be nearer 5.2 V than 5.7 V, use schottky diodes instead of regular silicon diodes. Edit 2 As Steven points out, there's a trade-off here. A zener will start to conduct slightly at low current levels, and the source you're measuring needs to be able to provide enough current to drive it all the way to 5 V to get the clipping you want. If you absolutely need to be able to get to 5.0 V before clipping begins, you may need to use, say, a 5.3 V zener instead of 5.0 V, and be sure your source can provide at least 10 uA. Then of course you aren't guaranteed to clip below 5.5 V. On the other hand, the diode connection to the positive rail (my second solution, whether using external diodes or the ones that are probably built in to your ADC inptus) will only work if there are enough loads on the 5 V rail to sink the current provided by the overvoltage source. In a low-power circuit, the overvoltage could end up driving your 5 V supply out of regulation and cause all kinds of unexpected behavior in other parts of your circuit. You can limit the current that needs to be sunk in the overvoltage condition by increasing the R1 value. But your ability to do that is limited by the bandwidth you want to be able to measure in your input signal and/or the input current needed by your ADC. It's also not true that the zener voltage "varies wildly with current". It would be more correct to say there is a small leakage current, on the order of 10-100 uA, below the zener threshold. Once the zener enters avalanche operation, the voltage can be very stable across decades of current. Here's the typical I-V of an On Semi zener family: Note that higher-value zeners have better stability than low-value ones. And of course there are also thermal variations (1-2 mV/K typical for the On Semi part at 5.1 V) to worry about if you want a very stable clipping voltage.
H: 8 channel 5v relay I bought an 8 channel dc 5v relay module for Arduino from an on-line store. When i power on my system, the modules become really hot. My connections are, Vcc to 24vdc Gnd to ground In(1-8) to the digital outputs of my arduino. Everything seems to be connected correctly. Another thing, when I tried pulling out the jumper connected between Vcc to JD-VCC, then powered it up; the relays and other components didn't turn hot, but the problem is that it does not respond to the digital inputs that I send from the Arduino.. ** We assume it is this module, please confirm. AI: If the heat came from the output (on the relay) you probably driving too much current through your relay, try add resistance to control the current to acceptable range. If the heat came from the ICs, double check your module connections. Note: Can help you better if you provide more information of where the heat came from and a link to the datasheet of the module you purchased.
H: What causes components to "jump" during reflow soldering? I've been using a hot plate technique (with a PID controller / thermocouple / SSR setup) to get into making SMD boards. I had an interesting experience earlier today, and I was hoping some more experienced individuals might be able to help me understand what caused it and what I can do to avoid repeat performances. I applied (non-lead-free) solder paste to my board using a stencil, put it on the hot plate (with a lid on), and started heating up the plate slowly (maybe 1.5 degrees C / second), to "soak" the board prior to turning it up to the melting point. Way before I got to the melting point (maybe around 110C), I witnessed an incredible phenomenon. A variety (but not all) of my components started jumping off the board like popcorn. Some (e.g. D-PAK voltage regulators) just kind of flipped over, others (e.g. 0603 resistors) literally propelled upward and bounded off the lid. In my earlier attempts I didn't see anything like this happen, and I'm not really sure what I might have done differently on this particular instance. Can anyone explain the circumstances under which this type of outcome might take place and what one can do to mitigate it? AI: The flux in solder-paste is indeed hygroscopic. I have experienced this same problem when assembling prototype boards with old paste. Over time, the paste seems to accumulate moisture, and pop more and more vigorously. The only solution I have found is to buy new paste. Refrigerating it does seem to extend the shelf-life, but it still goes bad. It may be possible to gradually warm the board with solder-paste and components to ~100°c and then holt it at that temperature for a while (maybe half an hour?), to try to drive out moisture, and then go directly to the actual reflow heat without letting the board cool. This is how they deal with components that are moisture sensitive, I just don't know if it would work for the solderpaste too. Really, solder paste is pretty cheap, just buying new paste seems like an easier solution.
H: Replacing SMD Fuses without access to schematics I'm curious to know if there is a sane way to determine the specifications of a blown SMD fuse without resorting to manufactures schematics / repair manuals. In my particular case there are no obvious markings on either the board or the component (naturally). AI: No. Even for an intact fuse it's impossible to find out its rating in a non-destructive way if there's no marking. If it's blown it's even less possible. You'll need the schematic to know the value. If you would reverse engineer the circuit to re-create the schematic you may have an idea of the value, but most often the designer has a certain range to choose from, depending on how cautious he is. But without schematic it's not possible.
H: Should I isolate grounds of an isolated DC/DC converter? If I use an isolated DC/DC converter, when designing the PCB, should I isolate the ground of the input and the ground of the output as shown below? I've never isolated grounds (except for AGND and DGND) but always used one single ground plane for the input and output grounds of any DC/DC converter as shown below: Is this practice not recommended? And when is it recommended to use an isolated DC/DC and when not? Thanks. AI: If you would connect the two grounds it's not really useful to have an isolated converter in the first place. It would be like two supply voltages on the same circuit, like +5 V for the logic, and +12 V for relays, or something like that. The two power supplies may also only share their grounds, but that way they're not isolated, not even if they would be otherwise floating, like batteries. Isolation is often for safety reasons, or to avoid ground loops, like Tony says. One reason for using an isolated converter may be to have a floating output so that you can reference it any way you want. If it's a 5 V/ 5V converter for instance, then connecting Vout to the input's ground will give you a -5 V at the output's ground. So if you had a good reason to have isolation, don't connect the grounds.
H: What are these banana plug connectors used for? These mate with one another (in the obvious male-to-female chain). They seem to be male-to-female banana plug adapters. Maybe I am being naive, but these seem useless. What are these useful for in practice? EDIT: They do not come apart, i.e. they are not banana plugs waiting to be soldered to wire. The only thing I can think of is that they're intended to be connector savers. AI: They look like they are adapters for shrouded banana plugs. As far as I can tell from your photograph, the red plugs have bodies which narrow after a ridge and the black ones have a uniformly narrower diameter. The narrow bodies fit inside the shrouds of the shrouded plugs.
H: How to use the LEDs on Sainsmart protoshield I have an Arduino Uno with a top-plugged SainSmart proto shield. There are 2 LEDs on the proto shield, but I don't know how to make use of these LEDs in a sketch. Are they directly controllable out-of-the-box, or do I first need to solder the LED leads to analog/digital (not sure which) outputs on the proto shield to make them accessible? And how to use the "S1" button? AI: So this is just a bare board with a few LEDs and buttons. jippie points out that series resistors are indeed included, as can be seen in the picture he linked to. (Thanks jippie.) The buttons don't have pull-up resistors so they seem to rely on the AVR's internal pull-ups for that. A schematic of the board would help. I would find it hard to believe there wasn't one included, or at least a link to the schematic on their site. On the top side LEDs and buttons don't seem to be connected to anything, so we need to have a close look at the bottom side. Can you post a sharp picture of that? It's unlikely that LEDs or buttons would be hard-wired to any of the I/Os, but the bottom row of the breadboarding area is possible. I marked two intriguing holes next to LED2. They're not vias, but more like the holes on the breadboarding area. They seem to suggest connections for the LED, but then where are the connections for the buttons? So I'd go back to the breadboarding area. Check if you see traces connecting to the holes on the bottom row. Once the connections are cleared up you'll have to wire up the LEDs from +5 V to a digital output of the controller. Making that output on the Arduino low will light the LED. The button goes between a digital input and ground. You can use the microcontroller's internal pull-up resistors, or use an external one. This goes form the input to +5 V. If the button isn't pressed the resistor pulls the input to +5 V, so you'll read a 1. When you press the button you connect that input to ground, so that will read as a 0. You can use a 10 kΩ for the pull-up. Button tutorial very basic circuits
H: Finding the current flowing in parallel circuit Lets say we have a circuit with a voltage source and a 5 ohm resistor. The voltage source is 20 v and so the current flowing is 4 amperes (according to ohms law). Now, we add a short wire in parallel to the resistor (you can think of it as having a resistor whose resistance is 0 cpne ted in parallel with the first resistor. Finding the current flowing in each wire is hard since as you can see, we first need the equivalent resistance. The equivalent resistance is (1/((1/5)+(1/0))) and it turns out to be 0. Now using the current divider formula, each current yields 0 ampere which is wrong. Thanks AI: If the equivalent resistance is zero then there's also no voltage across it, per Ohm's Law. Then the current though the resistor is 0 V/ 5 Ω = 0 A. The current through the wire can't be calculated this way since 0 V/ 0 Ω is undefined. Then the current will depend on the source's internal resistance. If that's 1 µΩ for instance the current will be 20 V/ 0.000001 Ω = 20 MA. If the source has zero resistance current will be infinite. Either way, applying this to the current divider formula gives for the resistor path: \$ I_R = I_{tot} \dfrac{R_{tot}}{R} = I_{tot} \dfrac{0 \Omega}{5 \Omega} = 0 A \$ For the wire we get again \$ I_W = I_{tot} \dfrac{R_{tot}}{R_W} = I_{tot} \dfrac{0 \Omega}{0 \Omega} = undefined \$ And we'll have to look at the external conditions to see how high the current is. Edit "Undefined sounds crazy to me" It is, and mathematicians aren't happy with it either, but there's no other way. Any real thing you try leads to contradictions. Even the 0 volt that I claimed. (I know, I lied, but that was because otherwise I'd get dizzy. Ah, what the heck, let's go for dizziness.) The voltage across the wire||resistor is \$ V = \dfrac{R_{PSU}}{R || R_W + R_{PSU}} 20 V = \dfrac{0 \Omega}{0 \Omega + 0 \Omega} 20 V = undefined \$ I can't help it. But let's for the sake of argument say it's 10 V. 0 V didn't get us anywhere, and it has to be between 0 V and 20 V. Then the current through the resistor is 10 V/ 5 Ω = 2 A. The current through the wire is 10 V/ 0 Ω = \$\infty\$ A. If we apply KCL: \$ I_{tot} = I_R + I_W \$ That's \$ \infty A = 2 A + \infty A \$ So far so good. But if we want t0 find \$I_R\$ from this we'll see that we can't! Despite the fact that we know it's 2 A. Let's try: \$ I_R = \infty A - \infty A = undefined\$ Yeah, right, I always say undefined. Why would it be, if we know the result? OK, you're asking for it. So suppose \$ \infty - \infty = 2 \$ Now we know that \$\infty\$ + \$\infty\$ = \$\infty\$, so \$ (\infty + \infty) - \infty = 2 \$ or \$ \infty + (\infty - \infty) = 2 \$ The value between the brackets is 2, that was our assumption. Then \$ \infty + 2 = 2 \$ Subtract 2 from both sides, and \$ \infty = 0 \$ which obviously isn't true. So our assumption was false. Now you can try with any number instead of 2 you'll always end up with a contradiction. So that's how we end up with undefined stuff and a dizzy head.
H: Unbalanced three phase system - Neutral fails/opens/disconnects - consequence? I have a very basic question about three phase system. I am not an electrical engineer hence I might not have a good understanding of the subject. So, please be bit lenient in answering and asking clarifications. My home receives a 220v (between one phase and neutral) 3 phase connection from grid. From the post comes 4 wires to our home. Each phase is connected to various loads in my house and since not all loads will be switched on, the three phase circuit will be unbalanced. So, if I draw a very crude schematic diagram with text: R--------L1---+ | Y-----L2---+ | | | B---L3--+ | | | | | N-------+--+--+ R, Y, B are the three phases, N is the neutral and L1, L2 and L3 are the loads (unequal resistive and inductive combined). What happens when the connection to neutral fails as shown by the following diagram? R--------L1---+ | Y-----L2---+ | | | B---L3--+ | | | | | N-- ---+--+--+ ^ | +------- Neutral disconnection Some say that the loads L1, L2 and L3 experience high voltages as they will be connected between phases rather than between phase and neutral. While some say that the entire circuit will self adjust and achieve a balance. Either way I am not clear. Could you just let me know which version is correct? Thanks. I had searched for this Google and could not come up with any suitable answer. Also this question also didn't help. AI: The circuit will both be at higher voltage (well the parts of it) and will self-adjust. The reasoning behind this is pretty simple: First, the phases are out of phase, or to explain it simply, their voltage peaks happen at different times, so while one is at its maximum voltage, the two other phases will be at lower voltage than the one at maximum is, so basically, the load will be at the voltage between phases. Since we don't have the neutral conductor, the current which was going through it will have to go through one of the phases and that's how the circuit will "self-adjust". You can see that from the simulation here. When the switch is closed, all 3 loads are at the same voltage of 5 V compared to the ground. Once the switch is open, the voltages at the loads will change. So the lightest load will drop the least voltage and the greatest load will drop the most voltage.
H: Interfacing HEDS 9700 optical encoder with AVR atmega32 I'm trying to interface an HEDS 9700 optical encoder using an HCTL-2020 IC (or anything else) with my Atmega ( atmega128, atmega32, atmega16, atmega8 or any AVR-family based microcontroller, don't matter for me ). But I don't know what should I do. I read datasheets of both devices. What pins from HCTL must connected to my microcontroller (and which one ?) ? Basically, I don't know what to do with this encoder. Please help me find out the way. Thanks. AI: If your encoder doesn't pulse too fast I'd do it without the HCTL-2020. There's nothing in it a microcontroller can't do. The HCTL-2020 is a parallel output device, for interfacing with an 8-bit microprocessor bus (probably from the Crimean War period). Data is on D0-D7 if the OE input is low. Since you have 12/16 bit of data you'll have to use the SEL input to select whether you want the HOB (High Order Byte) or the LOB (Low Order Byte). Use the RST input to reset the counter. So OE, SEL and RST are outputs from the microcontroller, D0-D7 are inputs. The HCTL-2016 outputs 2 square wave signals in quadrature, which is needed to tell the rotation direction. These go to the CH A and CH B inputs of the HCTL-2020. If you want to connect the 2016 directly to a microcontroller (saves you 9 I/O pins) you'll want them on pins which can give interrupts on changes.
H: SPI Flash: Half the bits are zero I have an STM32 driving two very similar SPI Flashes, an N25Q and an M25P. Strangely, while my driver copes with the N25Q perfectly well, the M25P is only "half" working. What happens is that when I write a page of bytes, and read that page back, the four MSB bits of each byte is 0, and the four LSB bits of each byte is correct. What could be causing half the bits to be 0? AI: Did you erase the affected memory pages first? For flash memory, you can change only 1's to 0's (the M25P data sheet from above states this explicitly on page 22, in the N25Q its on page 12). So if the M25P was filled with 0x0f's before, you would get exactly that result. When you use the same write command (0x02) for both, you should be fine. Using dual or quad mode would result in in 2 (or 4) bits wrong, but not half a byte. Since I suppose you program a whole page, I think this can't be stuck address bits. Other sources for the problem might be: missing blocking capacitor for the flash IC, or wrong SPI mode (which can cause strange results since then normally you read data exactly the moment it is changing). The latter one can be checked with a logic analyzer or a scope.
H: Recommended placement and routing of an RC Low pass filter What are the recommended placement and routing techniques for the following RC low pass filter circuit: I made an initial placement and routing that's shown below: Actually it's randomly placed and routed because I don't have any recommendations. Thanks. Edit #1: Thanks all, since no performance matters, I made a cleaner layout based on your suggestions that will also match the schematic placement: AI: For frequencies this low placement doesn't really matter. Switching R6 and C7 will make the layout somewhat cleaner though.
H: miniDIN - style connector with many pins I'm looking for circular connector with size of mini din with so many pins as possible. I'm building embeddable controller for Roomba vacuum cleaner robot, and I want to led as many pins as possible from microcontroller through this connector. AI: The maximum pin number you can have on standard mini din connector is 9. 9 pin mini din connector However, according to Wikipedia there are mini din connectors with more pins. Update HR12-14R-20SDL from Hirose connectors have 20 contacts in a mini din size.
H: Help Identifying Non-Standard USB Connector I need help in identifying a part and finding a source (if possible) for a non-standard USB connector... at least I believe it to be non-standard. I've attached a few pictures which are focused to the best of my abilities. The connector measures approximately .200" x .085" and has 8 positions. The 6 inner most positions are recessed maybe .030" further back than the two outside positions. This particular connector mates with a Nikon camera. It seems to be for USB and AV. Any thoughts? AI: This is called a UC-E6 cable. It looks to be non-standard enough that I can't find anywhere that sells the connectors, but it is pretty easy to find the cable.
H: Sound card CD audio in connector The typical name I see given is MPC, MPC2, or MPC-2, and the cables are readily available, but I can't seem to source the female PCB-side connector. Obviously, a 1x4 pin header would work just fine, but I'd like to use the locking connector if possible. This is what the cable looks like: (source: connectworld.net) AI: Updated link Is this what you're looking for? Part number 5-103639-3 from TE connectivity
H: How can I use a transistor as a switch? I'm trying to drive a DC motor using an external voltage source and control it using a transistor switch. It doesn't seem to be working during the simulation though. I know I must be doing something incredibly stupid. I have it built in circuitlab here. Thanks AI: Maybe what you want is something like this: Notice that the output is inverted relative to the control signal because when the FET is "on" it behaves as a closed switch making the motor run (assuming that L1 is you motor). I'm not sure why you have R1 in series with L1, I just leave it there.
H: Information on this keypad I receieved this 4x4 keypad in an electronics kit, but don't know what the pins (it has 2x5 pins), are, and can't seem to find a data sheet for it. Any info or help is appreciated! AI: Using the following keywords in a search engine> 4x4 keyboard 10 pin One quickly finds several solutions. Confirm that it matches your pinout using an ohm-meter or by following traces. Located here with software http://www.mikroe.com/eng/downloads/get/1215/keypad_manual_v100.pdf
H: Need 1-4 pins controlling 16pins logic level I have max four outputs coming from a PIC. I need these four outputs (or one serially) to simultaneously control 16 pins with a logic level. This is for a clock application. A BCD could accomplish this but I don't believe it is the correct way and no one stocks them. A set of latches could do this, but that would require me to individually latch each bit and reset when I need to switch the output. A demux could accomplish this, if one existed that would allow multiple output pins to be high at the same time. Serial to parallel demuxers looked perfect, but all I have found only permit one pin being high at a time. I'm looking for some type of IC. AI: The easiest way is to use one 16 bit shift register (or two 8 bit shift registers connected together). That would require only 3 pins. Data Clock Output latch You would need a 16 bit variable where you set or clear the bits, then you shift the data through the shift register, and then activate the output latch. You can use two 74HCT595