text
stringlengths
83
79.5k
H: How to mend a broken coil in a DC motor? I'm trying to repair a bread making machine (A Tefal/Moulinex OW500530). At the start of the program (kneading), it drives the brushed DC motor (ZYT4245-23) in short pulses every second. Now and then, the motor won't start. It will start again when I help it a bit, though. A bit further into the program, the kneading is constant (no longer in pulses), and once the motor is spinning, it seems to be working fine. I've opened up the motor and found out that the coils between two pairs of neighboring commutator plates seem to be broken; I measure about 50 Ohm between the other pairs of neighboring commutator plates, but between these, there is a very large resistance. There are about 20 commutator plates in total. Could I get the motor running again by simply short-circuiting those two pairs of commutator plates (soldering)? Is it safe? AI: If I understand you correctly, I think shorting the commutator plates for the dead pole to the adjacent working one (either side should work I guess) may actually be worth trying. With more than e.g. 3 poles it should be okay as you won't short across the input as the brushes touch both poles. Since your motor appears to have a lot of poles it may still work okay if one pole has to cope with twice the angle. At least there will still be field as opposed to it dropping out completely. Take advice with caution (i.e whatever you try, make sure you do it as safely as possible) as it's hard to be sure of anything in situations like this when you have no datasheet available with relevant info like winding connections. Before you apply any power, turn through all poles and test to make sure there are no obvious shorts where there shouldn't be (e.g. across the power input) and resistance doesn't change much from the 50 ohms you measured across the working coils. Of course, the sensible option is just to buy a new one (for actual serviceable use) as Olin says, but even then I'd probably still hack this one just out of curiosity ;-)
H: How do I debug an Arduino sketch? I started coding for Arduino very recently. And these bugs in the code are killing me. As there is no hardware debugger in the Arduino, serial.print() is my only resort. What are the methods/practices you implement to debug Arduino code? AI: Modularity is your friend. Write your main loop to do its thing by calling functions, which call functions, ..., until the level at which your functions would be simple. Start with the main loop and the next level down, make stub functions; either empty: function foo(){ ; } or fake: function read_temperature(){ return(95); } , that do nothing but return whatever the calling level needs for it to be able to continue. When that level works, move down a level and start filling in simple code that likewise calls stub functions. Gradually un-stub a function at a time until you have a working application. To debug a function that returns a bad value, or to create one without any influence from the rest of your application, you can build scaffolding - a simple sketch that just feeds the function some example values, and within the function, print out parameter values and some intermediate values, until you gain some insight into what part of the function is failing. I've even made faking-functions that prompt me on the terminal for a value to return. (Obviously this technique can only work if the system can tolerate the relatively glacial speed of us humans! Another use for scaffolding.) Stubbing works especially well to stand in for functions that interface to hardware, allowing you start bringing up the application before you have to dive into data-sheets, timing issues, and other minutiae (like, not having the parts!) that might otherwise stall your progress. Speaking of timing issues, toggling an output pin at a particular point in your program, such as entry to and exit from an ISR, gives you a square wave at the Arduino pin whose frequency or duty cycle can give you some insight into the internal timing of your program. The direct port-I/O form, e.g., PORTC ^= 0x01; , will distort the timing less than calling digitalWrite(). Useful if you have a 'scope handy, or one of the DMMs with the ability to measure frequency and/or duty-cycle. Similarly, you can use an analog output pin to output a numerical value to your meter from inside the program without disturbing the timing too much or bloating the code with the serial I/O functions. Use the direct I/O forms here, too.
H: Does there exist an internet-like peer-to-peer packet radio system? Has anyone designed a peer-to-peer communications networks system, which works almost like the internet, but wirelessly? I mean a system, which: you can connect the transmitter to an usb port and operate it with a laptop can be used to transmit data (for example, text messages) units will connect automatically to nearest units of same system, and generate a routing table, and therefore you can send your message anywhere in the network, so that other units will relay your message forward until it reaches its destination. The transmit power should be couple of watts (to get a range of couple of kilometers/miles per station) and the frequency band should be some legal band for free use (27 MHz, for example). A purpose for this kind of device would be estabilishing a communications system in an area facing a natural disaster or to help people communicate in countries where government censorship prohibits using the internet. As an electrical engineer, I know that this kind of system: is possible to build and the most hard part is to develop the protocol (communicating between two units is trivial, but how to get the message through multiple stations to its destination). But has anyone done it yet? AI: units will connect automatically to nearest units of same system, and generate a routing table, and therefore you can send your message anywhere in the network, so that other units will relay your message forward until it reaches its destination. What you are describing is a mesh network, or more specifically a wireless mesh network. So the short answer is yes, someone has done it already. As others have pointed out, radio amateurs implemented this over 20 years ago in a system known as APRS. To use APRS on the amateur bands require one to be a licensed radio amateur however. In the commercial space there are many companies offering mesh network devices such as Ruckus and Village Telco with their mesh potato for voice in the third world. Another vendor of low cost devices is Open Mesh. For amateur radio, the latest incarnation for high speed mesh networking is HSMM-MESH - HSMM-MESH™ is a high speed, self discovering, self configuring, fault tolerant, wireless computer network that can run for days from a fully charged car battery, or indefinitely with the addition of a modest solar array or other supplemental power source. The focus is on emergency communications. In its current form it is built using the Linksys WRT54GL wireless router and operates on channels 1-6 of the 2.4GHz ISM band, which overlaps with the upper portion of the 13cm amateur radio band. Other platforms and bands may be supported as development resources permit.
H: Determining Suitable Replacement Transistor? I have a toy which developed a short, and one of the transistors on the board is now fried. I've removed the shot transistor, along with the part of the toy which was shorting out, and everything else works fine. There are no distinguishing markings on the transistor - all I know is it comes in a SOT-23 package - and, I believe, there is a duplicate identical transistor in the toy (for a similar but separate function). I have a digital multimeter, and a digital oscilloscope at my disposal. I'm also aware of the type of DC motor this transistor was being used to control (so I should have some idea of the voltage it's required to handle). Based on this information, and with the tools I have available, how can I determine what a suitable replacement transistor would be? AI: Summarised_solution: General purpose high current, high gain SOT23 bipolar & MOSFET transistors are available at modest cost. These will work if the part is used as an on/off saturated switch and will probably work in other roles. Required polarity can be determined by a single measurement. SOT23 small signal transistor is usually - b c e for bipolar g d s for MOSFET as per diagram below. Measure voltage 2 to 3. If 2 is +ve wrt 3 then = npn or n channel. If reversed then pnp or p channel. A high current high beta npn or pnp will work in most bipolar cases. BC817-30 / BC807-40 are good. -40 means AVERAG current gan of 400. ie 250-600 range. 50V, 800 mA rated for thisFairchild example sold by Digikey Rbase of 1k to 10k should be OK. MOSFET N Channel needs low Vgsth. CES2310 utterly superb if you can get them. OR 36 cents /1 in stok at Digikey for this 2.6v Vgsth , 60V, 1.A continuous IRLML2060 But, Better! --> INFINEON BSS205 N !!! 20v, 2.5A, < 100 mohm Rdson at 2.5V Vgs. In stock Digikey 37 CENTS /1 No gate resistor needed. Use say 1K if desired. For P Channel use Digikey selector guide to select out specs of chouce then sort by price ascending in quantity 1. This is a truly marvellous part for amateur general use. Be ware of 20V Vds max but otherwise marvellous. eg 0.2V Vds at 1.5A at 2V Vgs. 500 mW disispation and 250 K/W mean due care needed thermally (as in all SOT23) BUT very low Rdson will keep it OK in many cases. eg 98% of these have < 80 milliohm Rdson at high temperature. At say 1A dissipation <= 80 mW for 20 C case rise on modest copper. If you MUST have 30V there is the very nice 41cents/1 IRLML6346
H: Will a 3 phase induction generator fight its own rotation? So in a 3 phase induction generator with coils for the stator and magnets for on the rotor, I am wondering if the the current induced in the coils would create a magnetic field that would oppose the rotation of the magnets on the rotor? AI: Yes, any generator will be subject to this effect. You can't get something for nothing, so the more current drawn from the coils, the larger the (opposing) magnetic field (counter mmf) and the harder the rotor will be to turn. If this didn't happen then the amount of energy required to turn the rotor would not change according to the load on the output, which would break the laws of physics.
H: How to prevent battery drain when loaded? I have a circuit consisting of 4 relays and 3 dc motors, with 4 diodes, resistors, and leds connected within. I have two 6 volts battery from the UPS. I need to obtain a negative voltage so I do workarounds with the two 6 volts battery so that the terminals are +6, GND, and -6 volts. The problem is, the battery gets drained (or the voltage supply decreases to 2 volts) when the circuit is fully constructed. Proper output cannot be obtained. (By the way, each component of the circuit perfectly works well) I am planning to have a separate voltage supply or battery for the relays and the dc motors. I wonder if this is the right thing to do. What can you suggest? AI: If you mean the (freshly charged) battery voltage sags when you power on your circuit, then it sounds like you are overloading the batteries (e.g. asking them to supply more current than they are capable of without significant voltage drop) You probably just need some bigger batteries (or fresh ones if the ones you are using are dead) A separate supply doesn't seem necessary unless you want to e.g. run the motors from a different voltage or keep things isolated for other reasons. In any case, if you have mentioned everything in your circuit then what else is there to power apart from the relays and motors? To confirm this, could you update your question with: The current draw of your circuit in it's various states (e.g. motor off, motor on low/high speed, etc) The model/datasheet for your batteries, or failing that what is printed on them. Also how old they are (or a rough estimate) Also a model/datasheet for the motors, and/or a schematic would probably help if you can manage it.
H: Reducing noise in audio circuit (optical pickup + op amp) I am building an optical pickup using a photodiode connected to a LM741 op-amp. My circuit is similar to this one: Except that I've added a passive high-pass filter after the output of the op-amp, to eliminate DC (since I am using 0V and +12V as my V- and V+, respectively). I use Rf=500K Ohm (is this way too much?). In addition, I have an LED adjacent to the photodiode that serves as a light source. The LED is powered by 5V and the op-amp is powered by 12V, both from a PC power supply. The photodiode and LED are connected to the circuit using a 2m long guitar cable ("PL"). The circuit works and produces audio signal when I modulate the intensity of the light shining on the photodiode, but my problem is that the signal is very noisy. I can hear/see two types of noise: Electrical noise similar to a noisy electric guitar pickup. I suspect that it originates in the long cable (or the tip of it, where the photodiode and the LED are conected) collecting ambient electromagnetic noise. This noise is present all the time, even when no light is shining on the photodiode. Another noise is present only when a signal is generated, i.e only when I modulate the light intensity. I suspect it is a result of amplifying thermal noise, since my gain is very high. I would like to know what is the best approach, or in other words where to start in my effort to eliminate the noise: Improving the signal to noise ratio at the source, i.e by optimizing the physical conditions (ambient light, precision of the position of the photodiode, etc.). Using a different circuit - I've seen many suggestions on the web and started with the simplest. Using a different op-amp, one that is more suitable as an audio pre-amplifier. Improving the shielding of the pickup itself, to eliminate electromagnetic ambient noise. Using batteries as power source instead of the PC power supply (I am thinking maybe part of the noise is coming form the mains). If none of the above, What would be your suggestion? AI: Several things: A long cable carrying the most sensitive node in the whole system is a bad idea. Carefully shield and then tightly couple the amplifier to the pickup. Then you can send the higher level lower impedance signal over the long cable. A 741 is a joke in this application. Look for a low noise opamp. There are amplifiers specifically for audio applications where noise matters a lot. Even a general purpose device like a TL07x will be lots better than a 741, both in gain and bandwidth. Applications that need good lineariry and frequecy response usually use a photodiode in reverse bias configuration. Think of it as a diode that leaks proprtional to light. Don't try to get all the gain in a single stage, particularly the first one. The first stage should take the little input signal and make is stronger and lower impedance such that it is much less susceptible to noise. The first stage amp can do this better if not run close to its gain-bandwidth product. You don't have to care about offset voltage since audio can be AC coupled between stages. The second stage can then make a nice strong signal that can be sent over 2m wire. Audio circuit design is mostly about thinking carefully about noise every step of the way. The bandwidth may be low, but the signal to noise ratio needs to be very high.
H: Handling audio (from mic to headphones) Right, I'm new to electronics, but this is what want to know: What do I need to take a mic input, and output it to some ear phones (standard jack, can be mono). I want to build a motorcycle intercom, here are some other requirements I have in mind: Volume controllable Turned off by a switch Also, if I have two inputs that I want to send to one output, is it as simple as joining those two inputs together and the connecting with output? Perhaps with a few diodes... I'm starting to guess here. Anyway any advice to nudge me in the right direction would be appreciated. Thanks, Ben :-) AI: Microphones don't put out much signal. You basically need a amp that has a voltage gain of a few 1000 and a low output impedance, like 8 ohms or less. You probably design the amp with 5000 voltage gain, then the volume control reduces that as necessary. A volume control is basically a variable attenuator. To make is switchable, just put a SPST switch in series with the power. No power, no output. Multiple signals can be summed in various ways. The cleanest is probably a "summing amplifier", which is just a inverting amp with one input resistor for each input source. This has the advantage that each source sees a resistive load to ground. One source can'b back drive another, although that may not be a big deal if the sources are buffered for that purpose. The design of a good audio amp could fill a book. I have to run now and am not going to write a book anyway. Look around for battery operated audio amp, microphone amp, headphone amp, etc. I'm sure there are lots and lots of circuits out there and maybe even whole devices. Mic amps and headphone amps aren't all that unusual. There are also small power amp modules that will be easy to use for the final stage if you want to roll your own. How about something like a MP3 player to drive the headphones. I'm guessing that those or at least some of those come with a line in or mic input. Look around. Good chunks of what you want should be available off the shelf, especially if you're willing to do a little repurposing.
H: Is this deal on anti-static foam too good to be true? Currently, my integrated circuits are free to bump around in one of the compartments in my parts organizer. I used to have a bunch of anti-static foam rectangles to keep them plugged into, but I threw them (the foam) out because I was annoyed that I didn't have enough to hold all my ICs (strange logic, right?). I found this deal on Amazon: http://www.amazon.com/Techni-Stat-Foam-Anti-Static-Pink-12/dp/B000PDJ5CQ/ref=pd_cp_hi_4 It's about $5, including shipping, and I get a square foot of material. Is this a viable solution to keeping my ICs safe? I haven't researched Techi-Tools too deeply but they seem like a legitimate brand. AI: Summarised_Solution: Pink foam is OK but not really intended for this purpose. Possibly the best deal of all is from DESCO !!! Their cheapest per area suitable material is this = Desco 12150 - 24" x 36" x 1/8" high density at $US7.14. That's a magical ~$1.20/ft^2 and you can use 2 layers to get 1/4" etc. Multilayers is never quite the same but is good enough. Shipping cost unknown. May make or break order. The pink foam material is usually used for shipping as a wrapper or outer layer . It may not be measurably surcace conductive. It may well do the job "well enough" but you can probably do better. Idea is high density conductive foam that is thick enough that IC pins do not push right through. Thinner works as well but the IC's stand off the surface and you don't get the same seating feel when pressing them in. RS are not known for their low prices. Heree they have 305 mm x 305mm x 6mm (1 square foot x 1/4 inch) of conductive foam for $NZ2.78 RS550-066. Lower in $US hopefully. NB: This is low desnisty foam. Others below probably hi density. Low density works OK, dies sooner, need to be sure it always contacts all pins as it gets older but should be a good starting material. Many related products. Good site. Dearer than RS but high density. eg $22.32/6 square feet x 1/4 " or 3.72 / ft^2. here Texas HQ. Hmmm. RS USA may not have the NZ foam. RS India does. RS US have this DESCO 12250 24" x 36" x 1/4" $US23.66. Thy also have 3/8" thick version for $41.46 here. 8 sellers here with RS being cheapest :-(. Digikey list it and other versions but no stock and dearer here Desco sell it theselves for around $25 here BUT they do a range of closely related products here DESCO !!! And probably best of all for you is this Desco 12150 - 24" x 36" x 1/8" high density at $US7.14. The 1/8" is annoying, but at ~ $1.20/ft^2 it's excellent. You can use 2 layers to get 1/4" for $2.40/ft^2 and 3 layers to ... :-). Multilayers is never quite the same but is good enough. Shipping cost unknown. May make or break order. Dow on conductive foams. Reference only but very ionteresting here Foam. Jameco. Too dear. Reference only at $US8/ft^2 here Some excellent idea starters for conductive materials here
H: How to shield microcontroller from electromagnetic interference I'm working with high voltage circuit (2.1 kV for defibrillator capacitor testing) and I'm controlling power supply with arduino, reading required information from laptop using serial interface. Most of the time circuit works fine, but once in a while during capacitor discharge after the test, circuit triggers by itself without operator pressing the button. Also sometimes serial monitor fails. I figured it does so because Linux stops seeing USB port for short period of time USB itself reappears under different name. I assume it happens because, during discharge, electromagnetic field induces voltage in my circuit, so my question is how to shield my circuit against such influence or maybe I'm totally wrong about the reason. Point of this test is to measure charge time of capacitor. Charge time defined as the time from power On to the time when current supplied by power supply approaches 0.Connecting enable1 and enable2 using relay enables power supply, current Read out provides information when power supply outputs approx. zero Amps . During the discharge, discharge resistor is manually connected to DUT. AI: If the bulk of interference is coming from circuit connections (a schematic would help), you can either add inductance to the connections to filter out high-frequency feedback or attempt to isolate the discharge circuit and control & monitoring circuit. Adding inductance can be as simple as wrapping wire around a ferrite bead. Care must be taken to ensure the feedback is sufficiently attenuated while not impeding circuit operation (ie: slower rise times). Optical and physical isolation are common methods of separating high and low voltage circuits. Safely separating grounds may be too much trouble, but you can still keep the return paths of each circuit apart for most of their journey. The spiking voltage return path should be unimpeded (least inductance). If isolation efforts don't do the trick, one can lower the input impedance of the troublesome digital inputs using pull-up or pull-down resistors and capacitors. The resistor value should be high enough such that the line's regular operation is not impeded -- that is, the driver can support this lower resistance; the capacitor shorts high-frequency content to ground -- start with 100nF ceramic and work up to 10uF if needed (try it first with nothing, of course!). If voltage at any point is exceeding a part's maximum, one can clamp it to below a chosen value using something as simple as a zener diode, though other (superior and more expensive) TVS systems/parts are available. This just protects from damage, though. If the bulk of interference is radiating from the capacitor discharge connections, one approach would be to reduce the radiation at the source. I'm guessing that slowing or otherwise modifying the cap discharge rate (TVS) is not an option, as it would affect measurements. The next best thing is to reduce the propagation properties of the wires and traces powering the capacitor(s): minimize all connection lengths including ground, and minimize ground loop areas (keep the return as close as possible to signal/power). Of course, physical distance between the controller and DUT will help. I have no experience with EMI shielding layers (mu-metal, etc.). A strategy to skip all this is to temporarily shut down the controller during the discharge, a few hundred milliseconds, saving state in the meantime.
H: Why is there risk of overvoltage when jump-starting a vehicle? Ford Focus C-Max manual describes jump-starting procedure as follows: shut off everything, connect the jump cables, start the donor vehicle engine and let it run for a while, turn the ignition key on the disabled vehicle, the disabled vehicle engine should start, do not turn on any electrical equipment, headlights included - overvoltage can damage them. Where could the overvoltage arise from? The goal of the procedure is to connect the batteries in parallel, so that the donor battery temporarily serves instead of the depleted one. Connecting a 12V battery in parallel to a depleted (less than 12V) battery should not yield more than 12 volts. How could the overvoltage happen in this scenario? AI: Summarised_solution: Interuption of load to an alternator can result in a voltage spike of 100 - 200 volts for typically up to about 0.5 seconds. More on a bad day downhill with the wind behind you. If you are small and electronic or an LED or a light-bulb you want to be somewhere else if/when this happens. The unusual connection means when jump starting can persuade an alternator system to "see" load open circuits due to unexpected interactions. Trying to stop these happening is usually felt to be a good idea. Special regulators designed to survive such "events" are available for use in automotive equipment. Some of these are more often used in everyday applications without realisation of their special qualities. (eh LM2940). _____________- People tend to over react to be on the safe side BUT there are real problems to be avoided. When an automotive system is connected as normal, energy flows from alternator via rectifier diodes, via or past any controller that is used and into the 12V "bus" with battery attached. When you start introducing alternator level energy input (10's of amps, possibly 50A) and battery to battery connection which will give about 0 amps if batteries are similar in voltage BUT potentially very large if one battery is well charged and the other flat (which is usually exactly the case) then current flows relative to regulator etc are different. If the sending alternator's regulator gets a wee bit confused and misregulates and all that is on the receiving end is an additional car battery and perhaps a starter motor then little harm is likely to occur. A brief transient 20 or 30 or 40 volts will be transient indeed if a car battery is on the receiving end. If a light bulb, radio, MP3 player, cell phone, coputer or other fragile electronic citizen happens to be present when the big boys are partying then they may get hurt. As a demonstration of what can happen, several decades ago people here sold a device that allowed you to use ag a 230 VAC skilsaw powered by a car alternator still in the vehicle. This may have required a "universal motor" type motor to work - maybe not. The "black box" connected to the alternator connections inside the normal regulator etc and could be switched in when required and output taken from the alterneotr. To use this the engine was set to a very fast idle and the device switched on. Something around 200 Volts AC was provided by th alternator at whatever the rated current was. So eg a 50A alternator was good for about 50 x 200 = 10 kW. !!!. In fact !!!!!!!!!!!! . 10 kW may have been a tad high for what could be achieved in reality but people were running skilsaws from them. That usually needs several KW- depending on the saw. This works because the alternator is essentially a constant current device with saturation of the "iron" acting as the output limiter. For an eg 30A alterantor, if you clamp it at 12 V you get about 12 x 30 = 360 W. Clamp it at 24 V and you get 720 W. Clamp it at high and you get - WoW!. Don't clamp it at all and !!!. As long as the regulator is happy and stable you never see this. Play with its brain, whether with a magic box or strange connections and it may occasionally impress you. Note that the above super high voltage is not potentially unlimited (unlike eg inductive ringing) and is not the same in waveform as voltage increases. If you rev the engine so the open circuit voltage peaksat 100 V peak half wave peak to ground then you will get approx a half sinusoid. As you star to clamp this at successively lower voltages uou get a swuarer waveform as you cut the tops off the sine wave. When you get down to 12v you have a near square wave AC output that rises nearly vertically after the zero crossing and then flat-tops at the clamp voltage. This means that the RMS value of the waveform is much higher than a sine wave. Sine wave Vrms = 0.771 Vpeak.This trapezoid is close to Vpeak RMS. As you use higher voltages as for eg the skilsaw example the waveform will be more sinusoidal. Load dump: Load dump is what happens when the alternator is running at high output and the load is suddenly reduced or removed OR when something such as a regulator gets confused and makes it appear that this is what has happened (load removed by switching or perhaps short then open or ...). Wikipedia says re load dump In automotive electronics, it refers to the disconnection of the vehicle battery from the alternator while the battery is being charged. Due to such a disconnection of the battery, other loads connected to the alternator see a surge in power line. The peak voltage of this surge may be as high as 120 V and the surge may take up to 400 ms to decay. Which sounds like fun. And ... The windings of an alternator have a large inductance. When the vehicle battery is being charged, the alternator supplies it with a large current. If the battery gets disconnected while it is being charged, the alternator current drops sharply and suddenly. This causes a high voltage across the alternator due to the inductance of the field winding. The field current cannot drop quickly, so the magnetic field remains large, so the rotation of the alternator continues to generate a large voltage. All the loads connected to the alternator see this high voltage spike. The strength of the spike depends on many factors including the speed at which the alternator is rotating and the current which was being supplied to the battery before it was disconnected. These spike may peak at as high as 120 V and may take up to 400 ms to decay. This kind of a spike would damage any semiconductor device, e.g. ECUs, that may be connected to the alternator. Special protection devices, such as TVS diodes, varistors which can withstand and ground these spikes may be added to protect such semiconductor devices. Different automotive standards such as ISO 7637-2 and SAE J1113-11 specify the standard shape of the load dump pulse against which automotive electronic components may be designed. There can also be an inductive spike due to the inductance of the field winding. That may have a larger voltage, but it will be for a much shorter duration, as little energy can be stored in the inductance of a field winding. Load dump can be more damaging because the alternator continues to generate power from the rotation of the engine, so much more energy can be released. The inductance of the current-carrying windings has no direct effect on the load dump, but it has a large indirect effect. In normal running, current flowing in the inductance of the windings causes a large voltage drop. To keep the correct terminal voltage, the magnetic field from the field winding has to increase a lot at large loads. When the load is disconnected, there is no current, so there is no voltage drop in the inductance of the windings. The full voltage appears on the alternator terminal until the field current falls. . __________- Note that electronics regulators for electronic devices made to operate in an automotive environent have a very rugged and specialsesd front end. Wprst case they are designed to turn off on high peaks rather than try to ride the wave. You may drop-out your output but your circuit survives. Hopefully. The NatSemi LM294x series is a classic example of this approach. LM2940 data sheet here They say: Designed also for vehicular applications, the LM2940/LM2940C and all regulated circuitry are protected from reverse battery installations or 2-battery jumps. During line transients, such as load dump when the input voltage can momentarily exceed the specified maximum operating voltage, the regulator will automatically shut down to protect both the internal circuits and the load. The LM2940/LM2940C cannot be harmed by temporary mirror-image insertion. Familiar regulator features such as short circuit and thermal overload protection are also provided Also the standard but good stuff The LM2940/LM2940C positive voltage regulator features the ability to source 1A of output current with a dropout voltage of typically 0.5V and a maximum of 1V over the entire temperature range. Furthermore, a quiescent current reduction circuit has been included which reduces the ground current when the differential between the input voltage and the output voltage exceeds approximately 3V. The quiescent current with 1A of output current and an input-output differential of 5V is therefore only 30 mA. Higher quiescent currents only exist when the regulator is in the dropout mode (VIN − VOUT ≤ 3V).
H: MOSI and MISO at 89S52 How can I use MOSI and MISO at 89S52 ? can I use serial port from computer, directly connected to these pins ? Any example codes for this function ? Thanks a bunch Anyone has a code example, from the pictures above ? AI: No, you can't connect these pins to the PC serial port. The main reason is they are SPI pins, and you need to use the UART pins for this. The UART pins will be usually named RX and TX (though the datasheet will tell you) Secondly, the voltages from the PC serial port are incompatible with your chip, so you you need something like the MAX232 suggested by AndrejaKo to translate the levels. I suggest doing the following: Read the Wiki page on UART (linked to above) Read the datasheet - at the very least the UART section. Google for examples of using UART for your chip. For the last point I did a quick google for "89S52 UART example" and got quite a few relevant pages back. Here is some basic example code for the UART from one of them: #include <REGX52.h> #include "delay.h" #include <stdio.h> unsigned char temperature; unsigned char humidity; void uartInit(void) { SCON = 0x52; TMOD = TMOD|0x20; TH1 = 0xfd; TR1 = 1; } void main(void) { uartInit(); for(;;) { printf("Temperature : %bu Humidity : %bu \n", temperature++, humidity++); DelayMs(1000); } } EDIT - to use the SPI pins to connect to a PC, you need the PC to have an SPI capable interface (which don't come as standard on most machines) To add one you will need an SPI host adapter like this which can be plugged into the PCs USB port.
H: Simulation of parallel port but without a parallel port I've been working on a project in my faculty that requires me to use a parallel port, but as I see my laptop doesn't have one! I've been searching for a way to simulate the parallel port on my laptop, like when I send some data to the address 378H, the program that's like the simulator will give me an indication that he has received them and so on... I found this website but it wasn't useful. Also have been googling all the night , but didn't find any .... If you needed any more information I will be more than happy to provide them I'm using Windows 7 AI: You can try to make this USB2LPT adapter. Added by RMc: @xsari3x - This is capable of being a purely software solution if desired. His english page here notes "Contrary to all other USB→Parallel adapters which can connect to printers only, this makes connection to most hardware - without adapting the software! A parallel port will be virtualized by the accompanying driver. " As he provides the driver source code via this page you will be able to bypass the hardware by modifying the source code.
H: Multiple Ultrasonic Rangefinder Question I've been doing some research on ultrasonic range finders as sensors for robotics. I've seen them being attached to servos and pivoted to effectively "look" in front of the robot and make sure the path is clear. While this approach is very effective for the most part, I am hoping it can be improved. What I need to know is if it is possible to use several ultrasonic transducers (lets say 4) at the same time by having each one emit and listen for a different frequency? Here's a picture of what I mean: In this picture, the green box represents my robot. The tiny blue box represents a panel with 4 separately angled ultrasonic transducers. The rays emitting from the blue box represent the angle at which each transducer is aimed. The different colors of the rays represent different frequencies. Say, for example: 34KHz, 36KHz, 38KHz, and 40KHz. If this is possible, how would I go about getting ultrasonic transducers that produce different frequencies, most of them seem to come with 40KHz. Can I just regulate the frequency of them through my Arduino board somehow? edit Furthermore, is it possible to use one ultrasonic transducer to produce the full range of frequencies? IE: I rotate the servo 4 times as fast, ping 4 times as fest, but step up a frequency interval after each ping? Can a single transducer listen for variable frequencies? AI: A typical piezoelectric ultrasonic transducer won't be as efficient when driven at frequencies other than it's rated one. They act a bit like a resonant LC tank, so sensitivity drops off quite sharply. A typical figure seems to be ~2kHz -6dB bandwidth (e.g. with 40kHz transducer if will be half as sensitive or give half the output at 39kHz and 41kHz) 40kHz seems to be the most common (and cheap) but you can get different frequencies like 25kHz, 60kHz, 180Khz, etc. Rather than doing this though, why not just use 4 of the same and pulse each one separately, or use one and rotate through desired angle with servo. Unless your robot is travelling very quickly it shouldn't matter if you stagger the pulses slightly. You can even make a basic SONAR this way, here's an interesting PIC based example.
H: What's the correct form of this CRC algorithm We are working on communication between AVR and a Crous PTZ. We found its protocol and now we can turn it on and so. We have problem with its CRC. This is Crous protocol doc (Got it here), at end of it, CRC algorithm is described (see image below), but seems it's wrong because the counter parameter will never be 8 but it is checked to see if it is 8 or not. Our coder has wrote the following code for that algorithm , but returned CRC is not the same as the CRC returned by Crous device. #include <stdint.h> unsigned int crc_chk(unsigned char dta, unsigned char length) { int16_t j; uint16_t a,b,c; uint16_t reg_crc=0x0000; for( c = 0; c < length; c++ ) { a = reg_crc / 256; a ^= test_crc[dta]; dta++; a *= 256; b = reg_crc&0xff; reg_crc = a | b; for( j = 0; j < 8; j++ ) { if ( reg_crc & 0x8000 ) reg_crc = ( reg_crc * 2 ) ^ 0X8005; /* LSB(b0)=1 */ else reg_crc = reg_crc * 2; } } return reg_crc; // the value that sent back to the CRC register finally } He found true CRC in device respond, for example , In this device respond 01 BF 15 0F 94 95 96 97 9F 9E A2 A0 98 99 72 6B 6A 88 89 64 62 63 65 66 03 2D AC and according to page 45 of The protocol Doc, CRC of 0F 94 95 96 97 9F 9E A2 A0 98 99 72 6B 6A 88 89 64 62 63 65 66 it should be 2DAC, 03 shows end of data, and 15 is size of data that when we calculate it in decimal, will be 21 that you see we have 21 bytes too. What is the correct form of this algorithm? AI: At a glance, it looks like the "counter = 8?" decision block should probably have a "NO" path that feeds back to, probably, "the bit 15 CRC = 1?" decision block input. And the existing output of the "counter = 8?" decision block should be labelled "YES"... As for the implementation, I'm having some trouble making sense of it. What is test_crc and where is it defined? Shouldn't dta be a pointer in the function signature? I made some updates to the code in your post to improve readability. I faithfully implemented a function based on the block diagram and my assumption and ran it in IDEOne and get the result I think you expected... here's my code. #include <stdio.h> #include <stdint.h> unsigned int crc16(uint8_t * data, uint8_t length) { uint16_t CRC = 0; uint16_t A = 0, B = 0; uint8_t index = 0, Counter = 0; for( index = 0; index < length; index++ ) { uint8_t byte = data[index]; A = CRC / 256; A = A ^ byte; A = A * 256; B = CRC & 0xFF; CRC = A | B; for( Counter = 0; Counter < 8; Counter++ ){ if( CRC & 0x8000 ) { CRC = CRC * 2; CRC = CRC ^ 0x8005; } else { CRC = CRC * 2; } } } return CRC; } int main(int argc, char *argv[]){ uint8_t data[] = { 0x01, 0xBF, 0x15, 0x0F, 0x94, 0x95, 0x96, 0x97, 0x9F, 0x9E, 0xA2, 0xA0, 0x98, 0x99, 0x72, 0x6B, 0x6A, 0x88, 0x89, 0x64, 0x62, 0x63, 0x65, 0x66, 0x03 }; uint8_t length = sizeof(data); uint16_t crc = 0; printf("Length = %d\n", length); crc = crc16(data, length); printf("CRC = %04x", crc); return 0; } It outputs: Length = 25 CRC = ac2d
H: Most small / cost effective way to detect changes in altitude? I want to make a device, which when placed on someone skiing or snowboarding, will be able to tell whether that person is sliding down the slope. The problem is two-fold. I must first detect whether the device is moving. Then, I must know whether the device is gaining or losing altitude, because I want to do something different depending on if someone is sliding down the slopes or going up the chairlift. As such, there would be 3 total states: Not moving (the skier is stopped anywhere) Skiing (the skier is moving towards the center of the earth) In a chairlift (the skier is moving away from the center of the earth) It's not required accuracy about the altitude but just understand the variations. A few options have been mentioned: A GPS, which is expensive and unrelaible for the altitude metrics An accelerometer A barometer Ideally, the materials required for this detection would cost under 20$. I would also ideally need to arrange them in something smaller than a car remote like this one. AI: (1.) GPS is getting very small and would do a superb job, but the next solution is more liable to appeal. (2.) A small rigid almost sealed container will lag the outside pressure by an amount determined by the leakage rate and container volume. Pressure sensors come in absolute and differential versions. Absolute measure pressure relative to some internal reference. Differential sensors have two "ports" and measure difference between them, A pressure sensor with one port inside the container and one port outside will reliably indicate whether you are rising or falling. If internal pressure is above external pressure the object is rising. If internal pressure is below external pressure the object is falling. The indication will be a weighted average of the period for a few time constants leading up to the present moment. eg if a rising object dips briefly and for less than a time constant of the container then rises again the pressure inside would increase briefly due to the dip but not enough to flip over into falling mode. Atmospheric pressure halves about every 4500 metres in a logarithmic manner Some quick figuring which may be woefully wrong suggests that nearish sea-level a 1 metre vertical separation gives about 14 Pa difference in pressure. 1 atmosphere = 100,000 Pa = 100 kPa so 14 Pa ~= 0.014% of an atmosphere. Despite being small the difference should be able to be reliably detected. A look at Digikey prices suggests that a minimum price of around $25 is required. Maybe more for what you need.(But see Sparkfun offering below for about $9). SO Here is an "off the cuff" possible solution. Use a small rigid container with a controlled leak. Size tbd. Make a hold in one wall perhaps 20mm across. Size tbd. Place a very light diaphragm across hole in wall with "enough " slack in it so that it domes in or out under pressure difference. It should be possible to get an extremely low pressure indication of direction of pressure difference. P inside greater = rising - dome out. Pinside smaller = falling, dome in. Detect dome position optically. TEST: I tried the diaphragm method with no visible results - I think. I used a reasonably rigid 500 ml pill bottle and used a sheet of "glad wrap" as the diaphragm. Gladwrap was pulled over opening with some slack in it and fastened with several rubber bands around neck. Container was carried up street a height of about 10 metres (top of road from my house). Photos were taken by street lamp and flash at top and bottom. Visual examination in-camera showed no obvious change. Subsequent examination on PC screen may show otherwise. So ... Method "needs work" :-). I'm sure it can be made to work BUT a commercial sensor is a lot easier. The TI Chronos watches are specialed at half price by TI occasionally Re Bosch BMP085 sensor as suggested by Caleb - data sheet here This is "just" suitable for the job. Variation in pressure is around 12 Pa/m- varies with altitude. Bosch datasheet use hPa = HectoPascal - very naughty non SI unit !!!. 1 hPa = 100 Pa = 100 N/m^2. Bosch unit has noise level - which sets usable sensitivity, of 6 Pa = 0.5m and in low power mode and 3 pa = 0.25m in low noise mode. So assessment to about 1 m should be viable [tm] in this application. $US9 from Sparkfun here and $20 on PCB with 2Rs and cap here
H: What is the best website to place orders for electronics components online in the USA? I need to start ordering electronics components and I am trying to figure out who to use. I want to pick one website to use for all my needs, so they need to have a diverse selection of components, competitive pricing, and relatively quick shipping. I don't want to shop around to find the lowest cost parts, I just want a reliable company that I can rely on so I don't have to shop around each time I want to go online to order components. AI: There are many good companies and you will grow a favorites list with time, but I (in New Zealand) find Digikey very good www.digikey.com. They have a vast catalog range, much is in stock, prices are usually in the very good to acceptable range. Delivery is rapid and they tend to pick and dispatch same day in almost all cases. Do not be put off by where their HQ is :-). BUT look at Findchips which will give you some good ideas. RS are the masters of a vast stock and usually premium prices, Farnell are a successful RS wannabee. Look also at Mouser, JameCo, Amazon, ebay !!!, ... Findchips supplies information for these suppliers:
H: Transformer Design: How do I set an N1/N2 ratio by means of selecting winding inductances? I'm trying to simulate a transformer by using a circuit simulation software. In my requirements sheet, three specifications are given for the transformer: Maximum power (\$P_m\$) of the transformer will be 4VA. Magnetizing inductance (\$L_?\$) will be 30\$\mu\$H. \$\frac{N_1}{N_2}\$ ratio will be 4. (I don't know what "magnetizing inductance" is. Is there a term like that? Can it be mutual inductance (\$L_m\$)? Are \$L_m\$ and \$L_?\$ the same parameters?) The turns ration must be a function of these parameters, isn't it? Like: \$\frac{N_1}{N_2}=f(P_m, L_1, L_2, L_m)\$ Where; \$L_1\$: Inductance of the primary winding. \$L_2\$: Inductance of the secondary winding. My simulation software does not allow me to directly set \$\frac{N_1}{N_2}\$ ratio. Instead, it allows me to set the \$L_1\$, \$L_2\$, \$L_m\$ parameters. So, my question is, how do I indirectly set the turns ration (\$\frac{N_1}{N_2}\$) by choosing \$L_1\$, \$L_2\$ and \$L_m\$ parameters? AI: It sounds like you're dealing with a SPICE simulator. In SPICE, you define a transformer as a coupled inductor, with the following ratio: \$\dfrac{N_1}{N_2} = \sqrt{\dfrac{L_1}{L_2}}\$ There's also a coupling factor K that comes into play. The magnetizing inductance of a transformer is the inductance you measure across the primary winding with the secondaries open-circuit (floating). It's a function of the core material and geometry, air gap and number of turns. Your \$L_1\$ and \$L_m\$ should be one and the same.
H: Connect(solder) a Arduino to some buttons I don't have much experience with electrical engineering and teachers have given us(mostly me, I'm the Software Engineer the rest are Media Designers) a pretty challenging task. We have been given a coffee machine and we need to connect that to an Arduino. They gave the tip to solder wires to connector to the buttons on the front panel. Now we spend a day dissembling the thing and have the buttons exposed. At this point we're clueless how to proceed. The button itself is simple... ...but where do we need to solder the wires to? All four pins or just two of them? I have no documentation about what it's using(voltage wise ect.) and measuring them would be difficult since the thing is apart and we cannot power it. Could someone point me to the right direction and/or give me some on-topic reading? AI: This is going to take a lot of speculation on my part. There are a couple of ways of wiring up a push button (e.g. passively pulled-up, passively pulled-down) and how you "bypass" it depends a lot on the specific wiring and push button type (e.g. normally-open, normally closed). The switch looks pretty common though - like this one. That is to say it probably operates like this (schematically): Start by getting a multimeter and doing a continuity check among the pins of the push button. I would venture to guess that the four pins of the push button are actually two electrical pairs (i.e. {T1,T2} and {T3,T4} in the schematic above). Without pushing the button you will probably get the two ringing pairs, and with the button pressed you will probably get all four to ring out to one another. Lets go with that. You want to use the Arduino to "push" the buttons. You might be able to get away with connecting the Arduino GND to one side of the push button and a DIG pin to the other side, then setting the pin to LOW to "push" the button, and HIGH to "release" the button. It's hard to say without measuring how the push button is wired in circuit. The most generic way to bypass a push-button and put it under electronic control by a microcontroller (like an Arduino), knowing nothing else about it, is (once you figure out which pins get shorted by the button press) to put a "pass gate" (aka transmission gate") in parallel with it and control it with two pins of the Arduino. A pass gate is a PMOS transistor and an NMOS transistor with their drain and source pins (respectively) wired together. You turn "on" the pass gate by supplying the PMOS gate with a LOW and the NMOS gate with a HIGH. You turn "off the pass gate (surprise) by supplying the PMOS gate with a HIGH and the NMOS gate with a LOW. The more sophisticated device to use would be an Analog Switch IC that fits your specific needs for number of switches, poles, and throws. A pretty neat little through-hole one that will handle up to four independent switches would be TI's CD4016BE.
H: How to find out whether I have a unipolar or a bipolar stepper motor? I have one stepper motor. There are six wires coming out of that. How can I find out weather I have a bipolar or a unipolar stepper motor? Note: Related, but not a duplicate: Unipolar and Bipolar Stepper motors AI: You have a third type of motor: A "Universal" motor. This is a motor can can be configured as either a unipolar or a bipolar motor. General rules: 4 Wires: Bipolar only 5 Wires: Unipolar only 6 Wires: Universal 8 Wires: Universal A unipolar only motor has the center of both windings connected together internally. This precludes the use of the motor in a bipolar system. With a motor with six leads, if you connect the leads from the center of each winding together, you get a unipolar motor. If you leave the center connections unconnected, and drive each winding using only the connections to the winding ends, you are using it in bipolar mode.
H: 1.8V to 5V, still not comfortable with transistors I have a H-bridge IC L293DNE that needs 5V input signals to operate, however my available outputs are only 1.8V from a Gumstix Overo GPIO pin. I have a power supply that supplies me with +5V 1A. I've searched around for information about "Level Shifters" and "Logic Level Translation", but have been unable to find any good basic information. I have a few 2N2222 transistors laying around, and I need to convert four 1.8V outputs to 5V, but I have no idea how the circuit should work. Will the 2N2222 do? Do I need resistors, and if so, where do I put them and how do I calculate the resistance needed? AI: (1) Try this (magic :-) Use 2N2222 + 2 x 10k resistor. When input is low transistor is on and output is pulled low. When input is high transistor is off and output is pulled high by collector resistor. This is a less usual arrangement but allows non-inverted switching - in highh = out high etc. Gumstix output has to provide LC293 input current and Vdd/10k input current as well. Should be no problem. Collector resistor MAY not be needed depending on LC293 behaviour. Added: MOSFETS: If you use low Vgsth MOSFETS instead of transistors you can remove the input resistors. As above, the LC293 inputs MAY float high when open circuit - alowing the collector resistor to be eliminated - but even if they do it may not be something you should depend on. (2) This uses no transistor but may need component cvalue adjustment to work acceptably. 2k7 LC293 input to 5V 2k2 LC293 input to ground LC293 input is now at 2.25V. This is a valid high input. Connect a silicon diode from LC293 input to Gumstix output (arrow points to Gumstix, or Anode to LC293 cathode to Gumstix) Connect a 100k from Gumstix output to ground (more conceptual than actual) Set Gumstix output to 1.8V. Diode Cathode and Gumstix output now "want to be" at 1 diode drop ~= 0.6V below 293 input = 2.25 - 0.6 = 1.65V. ie the diode means the 293 input is hardly if at all affected when Gumstix output ii 1.8V. Now drive Gimstix out to 0V. LC293 input is now at about 0.6V. The data sheet does not make it certain but this will probably turn the LC293 input off. Check voltages in above to ensure no voltages exceed IC ratings.
H: Implementing guard trace/ring in PCB design I have read here and there some articles about pcb guard trace/ring. But none of them discussed how to correctly implent it. What I could find were some pictures and comparison that cant help me at the moment! What I would like to know is how can I make the following circuit more current-leakage proof (In design case - I know that PCB material and SIR plays a big rule). The circuit will supply up to 30V through resistors and each resistor is connected to capacitor. Each Capacitor is then connected to a switch matrix and finally single output from switch matrix is connected to a picoammeter to measure the leakage current of the capacitors. I am wondering if I should care about leakage current in the circuit or not! If so, how can I improve it? This is my test circuit: I am thinking of connecting the capacitors just by wire into the circuit, that is one pin of capacitor soldered to by a wire in the little circuit I designed, and the other pin also with a wire soldered to BNC shield that goes to picoammeter and is in common with voltage source (SMU) AI: A guard ring is traditionally used to protect high impedance nodes in a circuit from surface leakage currents. The guard ring is a ring of copper driven by a low-impedance source to the same voltage as the high impedance node. This would typically be the input pin of an op-amp. Here's an example of a classic guard ring layout for a metal can op-amp from National Semi's AN-241: And here's an example of how it would be connected, from Analog's Analog Dialogue magazine: The key feature is that the guard ring is connected to a node that will be driven to the same voltage as the high impedance node being protected, but with a much lower source impedance. Note that not all vendor websites are created equal. Microchip's AN1258 recommends using the high-impedance net to create a guard ring around the low impedance nets --- don't do this. Now to your specific case. While the undriven side of your capacitor is not strictly a low-impedance node, since the ammeter itself should provide a fairly low impedance path to ground when you're measuring, it's still going to cause measurement errors if any current should try to reach ground through that node instead of by another path. It wouldn't hurt to add a ring around the node like this: Unlike in another answer, I wouldn't include the driven side of the capacitor within the ring, since that's a low impedance node, being driven to a fairly high voltage. However, you've indicated the net in question isn't even physically located on the PCB, so this advice is largely moot. Being as the high impedance net is basically floating in air, it should be well-protected from leakages in any case.
H: Timing and clock skew problems in digital designs I am reading "Rapid Prototyping of Digital Systems: SOPC Edition", and on p.113 it contains the following statement: In VHDL, as in any digital logic designs, it is not good design practice to AND or gate other signals with the clock. Use a flip-flop with a clock enable instead to avoid timing and clock skew problems. Could you explain what exactly are those "timing and clock skew problems", and give some contrasting examples of good and bad designs? AI: Consider the case where you have some data that you want to latch into a register under some particular conditions: Here you would assert the gate signal whenever you want to save the data from flip-flop D1 into flip-flop D2 (maybe the D2 is a read buffer or part of a shift register, and a read transaction was just detected). However, meanwhile the input data to D1 may be changing. The clock signal to the D1 happens pretty much as soon as the clock generator produces a rising edge. D2, however, doesn't see the clock edge until sometime later, due to the propagation delay through the AND gate. If D1's state has changed, then D2 might latch in the new data, rather than old data you expected from your RTL simulation. Worse, depending on the clock-to-Q delay of D1 , the AND gate delay, and the flip-flop hold time, D2's input may be in the middle of changing when it detects the clock signal rising edge, causing its output to go metastable. If, instead, you use a flip-flop with a clock-enable input, you won't have this problem. Assuming the flip-flops have zero hold time (typical within FPGA's), there's no extra delay for the clock reaching D2, and the two flip-flops will sense the clock edge at (darn near) the same time. Then D2 will always see the "old" data from D1 as your RTL simulation led you to expect, and won't have a problem with metastability.
H: Resistor Noise - What it will have effect on, in a circuit? Reading the article resistor noise and knowing that resistor noise is in the form of Voltage (is that thr right expression?!) leaves me wondering that this generated voltage will have only eefect through the circuit tracks and enters the components in its way, or if it is in form of EMI and can have effect on nearby sensitive components even if they are not connected to the noisy resistor? If the second one is correct, would remedy be capping the resistors with a metal shield (like the cpa in the analog section of old PC video cards or TV cards?) AI: The linked article discusses three types of noise: Thermal noise: Thermal noise is the noise that we most often refer to when we talk about resistor noise. Another name is Johnson noise. Thermal noise results from the random motion of electrons through the resistor, and is given by sqrt(4kBTR), as stated in the article. Most critically, the rms thermal noise is proportional to the square root of the temperature (Kelvin scale) and to the square root of the bandwidth of whatever is measuring the noise. Contact noise: It's not exactly clear what the article is discussing here, but he distinguishes this noise by its 1/f characteristic. Noise with 1/f dependence could arise from the current passing through the barriers between the carbon grains in a carbon resistor (which would be why the article recommends other types) or by current passing through the boundary between the metal leads of the resistor and the carbon resistive material. This is the only type of noise that the original article claims will be reduced by using a higher-wattage resistor. This could be explained by the higher-wattage resistor having more parallel paths through different grain or interface boundaries, resulting in noise contributions averaging out. Shot noise: I wouldn't normally characterize this noise source as being generated by a resistor. Shot noise is fundamental in any circuit, resistive or not, when current is detected. It results from the fact that current doesn't arrive in an absolutely continuous stream, but one electron at a time. Shot noise is likely to be a problem only in extremely sensitive circuits where other noise sources have been very carefully eliminated, or when high current gains are used. Either thermal noise or shot noise can be characterized as either a voltage noise or a current noise, based on the Thevenin and Norton equivalent circuits: In any case the resistor noise is injected into the circuit nodes connected to the resistor. Because it is generally a very low level signal, it's unlikely to be emitted as EMI and cause problems in unconnected parts of your circuit, unless, of course, your circuit is amplifying it. To answer a question from the comments, "white" noise is noise that has constant power density over frequency. For example, if a white noise source produces 2 nV/sqrt(Hz), and we measure it with 1 Hz bandwidth around 100 kHz or with 1 Hz bandwidth around 100 GHz, we'll measure 2 nV rms noise in either case. Thermal noise is a white noise source, while "contact noise", as mentioned above, is not white because it has has 1/f frequency dependence.
H: Overflow interrupt firing only once I've run into an issue where, it appears, my interrupt only fires once, then simply refuses to fire again on my ATMega32U2. I have the following (stripped down) code: void init(void) { DDRB = 0xff; PORTB = 0x00; TCCR0A = (1 << WGM01); // 1024 prescaler TCCR0B = ((1 << CS02) | (1 << CS00)); // Interrupt every 4096 clocks OCR0A = 3; // Enable timer compare match interrupt TIMSK0 != (1 << OCIE0A); } ISR(TIMER0_COMPA_vect) { PORTB++; } int main(void) { init(); sei(); while(1); return 0; } When I plug an LED into each pin of PORTB, the first pin is high, while the rest are low. The most I can deduce from this is PORTB is incremented to 0x01 by the interrupt firing once, then left alone as the interrupt never fires again using the TIMER0_COMPA_vect vector. However, if I replace the compare interrupt with an overflow interrupt (TIMER0_OVF_vect) and configure the registers differently, it works fine; PORTB cycles through 0 - 255 very quickly as I'd expect. This is my working code with the type of interrupt I don't want: // Different timer config void init(void) { DDRB = 0xff; PORTB = 0x00; TCCR0B |= (1 << CS01); // Enable timer 0 interrupt TIMSK0 |= (1 << TOIE0); } // This time, it's an OVERFLOW vector, not a compare vector ISR(TIMER0_OVF_vect) { PORTB++; } int main(void) { init(); sei(); while(1); return 0; } I've read what there is to read on Google, however the only fixes posted are logical errors that I don't think I have. I've read this forum post and had a look at the timer configuration registers, and they're exactly the same as my first example. I've also read this question, but that didn't help. I've been following the tutorial on this page (PDF) for the TLC5940 LED driver chip and am on Chapter 4 (refactoring code to use interrupts). Please note that I don't want to use the ready built library; I'm using this as a learning experience. AI: This may just be a typo in your post, but the line where you enable the Timer Compare interrupt says: TIMSK0 != (1 << OCIE0A); ... when it should say ... TIMSK0 |= (1 << OCIE0A); It's subtle, but if that's what your code actually was, then you were comparing TIMSK0 to a constant rather than assigning to it (and therefore never actually enabling the interrupt). On a sidenote, you can more concisely write: TIMSK0 |= _BV(OCIE0A); ... instead of .. TIMSK0 |= (1 << OCIE0A); in avr-libc, if you're into that sort of thing :-).
H: Is this part (given picture) an EM relay, relay-controller, snubber? Here is a rather bad (low resolution, grainy) picture of a circuit board that claims to be a 2-channel 315MHz ASK/OOK type remote controlled relay set. I can identify the relays, but not the big blue boxy thing behind them (see picture, with red-arrow). Can someone help identify what it is ? Also, is that white thingy labelled "Carli" part of this blue part, or separate ? AI: The blue part is a transformer (should be reasonably heavy). The "Carli" labeled part is probably a capacitor. http://uk.farnell.com/block/vb1-5-2-9/transformer-1-5va-2-x-9v/dp/1131629
H: Hand-routing PCBs for SMD I've routed plenty of through-hole boards, but I have no experience with SMD routing techniques, and even the look of the board feels a bit ‘alien’ to me. Any tips for placing/routing prototype PCBs with SMD components, for someone who can already route with through-hole components? I'll be hand-soldering as well, so I'm sticking to SOIC, 1206, and the like. Ideally, I'd like tips on how to place for reasonable density, whether to use one or both sides of the board for components, etc. AI: Let me start with your last question, I would highly recommend NOT soldering components on both sides unless you have a really good reason to. I have made a few boards with double sided soldering and it became more of a pain then anything. As for the routing itself, my answer here might help you out some, but I will elaborate some for your specific circumstances. Part density can become an issue when you are hand soldering, but it is difficult to give exact numbers as everyone will be different with how comfortable they will be soldering and what parts it is. As a minimum you will probably need 2 soldering iron tips width apart. This will give you the room to get the iron in to work on one part while not hitting the other. You might also want to take into account the angle that you like holding your soldering iron at as you won't want to be resting your iron on another IC. If you have a shakier hand then you might want to see how much your hand shakes and space your parts at least as far as the tip of the iron moves as you are shaking. I would also avoid running traces between legs of SMD components. A lot of people will do it just because it passes DRC, but if you are hand soldering with no soldermask, it becomes very easy to accidentally bridge to the trace. It is also helpful, but not required, to bring your traces out straight from any ICs and then after a little room branch them to the direction they need to go. This will help you line up your IC properly as well as to be able to get the solder in place easily. And finally, going from through hole to SMD, you will find that many of the tricks that you can use with through hole just wont work with SMD. Things like having no vias because you are using a through whole component to jump to the back side, instead you might have to go back to your schematic and change things around to limit the number of vias used. Also you can usually run traces under through hole items, but this may complicate things more with surface mount. Overall, just practice and you will pick up tricks just like I am sure you have picked up tricks with through hole.
H: USB B, mini B, or micro B for product design I'm trying to decide which connector I should use for a USB peripheral I'm designing. Is there a guide for choosing one? The device is a portable electronic scoreboard that's 16"x10"x1". It will be outside, possibly in wet conditions. It will not draw power from the USB. The only thing the USB will be used for is slow terminal serial data back and forth. AI: Mini-USB is a disaster waiting to happen (in my opinion and experience). Insertion-removal lifetime is low - one of the major factors addressed with micro-USB was an increase in cycle life. If I was doing what you describe I would choose USB-B (ie full size) as the working choice for development and only change it if there were major reasons to. I had just this choice a few years ago and went with USB-B. The product didn't eventuate but I anticipate using it in a similar role in future. Micro-USB is superior to Mini in many aspects. Current capacity is down in most cases but some manufacturers make (or claim) higher current versions. Micro-USB is THE new international cellphone charging standard connector. Doesn't affect you application directly but does mean that NOT being Micro-USB compatible will prevent a few random plugins. Regardless of what you choose, if it can get wet it should be capped in a manner that effectively gives it a formal IPxx rating that suits your need. Mechanically, USB-B is very robust and resistant to everyday use. I have not yet seen a damaged Micro-USB connector, but they fail the-soldier proof test and probably also the hurried person in the dark test. Even USB-B would benefit from a connection guide that increases the do-it-in-the-dark connection success rate.
H: tiny RC receiver for bristlebot? I made a small bristlebot. my version can turn left and right using two vibrators and is controlled by an ATTiny uC. I would like to add remote control functionality so i'm asking what's the simplest and smallest component(s) I can add to my bristlebot to make it remote controllable? (the size of the actual remote control device doesn't matter, just the components on the bristlebot). i want to use radio control, not IR. I have to say, comming from the digital side, I have no experience with analog circuits and RC sender/receivers so far. thanks for the hints AI: Something along the lines of a couple of Alpha-TRX433S would probably do. They are simple transceivers with an SPI interface. If you want cheaper eBay is your friend - this RF-2400P looks to do the same thing as the above, but won't come with a nicely written datasheet. EDIT - It turns out this one does have one - User834 has kindly provided a link to the R4-2400P Datasheet. Anyway, the reason for the initial assumption was that often the minor electronic products sold on eBay don't come with anything much in the way of documentation, which is something to weigh up when choosing where to buy from (plus waiting times, customer support, etc) EDIT 2 - Along with the datasheet, on their site they have some other RF-2400P documents/code examples (see pages 2 and 3) which may be of interest. You haven't mentioned exactly how the bot is controlled at the moment though. I am assumimg you can interface with the ATtiny's SPI. If not let us know what you have available on the bot to interface with.
H: Why does short distance wireless energy transfer have such low efficiency? Wikipedia and numerous other sources cite the following statement about Magne Charge high-power inductive charging system: For example, the Magne Charge system employed high-frequency induction to deliver high power at an efficiency of 86% (6.6 kW power delivery from a 7.68 kW power draw). The Wikipedia article on inductive charging has a citation near that statement, but it leads to a Magne Charge user manual that doesn't back the "power draw" part of the statement and doesn't give any details on where energy is lost. Now a system like Magne Charge features two coils that are both rather large - the off-vehicle "coupler" used with Magne Charge is something like 100 millimeters in diameter and they are placed very close to each other and aligned in parallel during charging. There's no long-distance energy transfer. This looks almost like a plain old transformer (yet with an air core) and I've never heard of a 7 kilowatt transformer wasting as much as 14 percent energy in conversion - dissipating about one kilowatt of power would just melt the transformer. How realistic is the "86% efficiency" claim? What would account for such huge losses? AI: Some of the losses will be associated with processing the power to step it up to a higher frequency. Other losses will occur from inductive heating of the surrounds and energy being lost as RF
H: Car subwoofer powered by mains voltage I have a car active subwoofer, 550w RMS, 1600w peak, which I would like to use in my home, and power it from 220v mains. ~133A is a fairly large ask from a transformer, I think, and even 46A seems quite high. I have a couple of computer PSUs knocking about, and I was wondering would it be possible to use a pair of these to supply the power required? Would it be as simple as connecting the transformers in parallel, to supply the subwoofer, or do I require something more complex? Edit: Ok, when I say power, I'm talking about the feed used to operate the sub/amp. The +12v terminal on the unit. I'm not talking about the signal input. The two wattage values, are whats printed on the underside of the sub. (as well as 4Ω impedance & 12v DC input) The figures I was pulling out, in regards to current draw, were 1600w/12v = 133A and 550w/12v = 45A, perhaps I'm well wrong with these though? Added: As people seem to be having trouble understanding this material. and as it's not clear why they are, here is a summary. A piece of equipment is usually operated in a car and powered from the car's 12V battery supply. The equipments purpose is to deliver audio energy into a load - usually the very low frequency end of 'music'. (It's a powered amplifier and is usually called a "subwoofer" but that tends to confuse people - think of it as equipment that needs 12V power. The equipment's rating plate says that it's maximum power output level is 550 Watt RMS and that peak power output is 1600 Watt. The Watts is expressed in RMS power as it's an amplifier but we can think of this as DC load with fair chance of approximate correctness. Music ratings being what they are the true power MAY be lower or far lower, but start at the stated levels initially. As M. Ohm says that I = Power/Volts, this suggests that at 550 W the current is P/V = 550/12 = 45.8A = 46A and at 1600 W the current is P/V = 1600/12 = 133A The questioner wants to know how to power this equipment directly from an AC mains powered supply. AI: There is only one good reason to power a 500+ Watt car amp from AC mains: to save money by using what you have. From an electrical and practical point of view, it's silly. Assuming you want to save money then the best way would be to use a car battery plus battery charger. The battery provides energy storage for the peaks but the charger keeps it going. There are lots of things wrong with this approach. The most important one is dealing with the potential for the battery to vent corrosive gases. But it will provide 1600 Watts for short times. Another issue is the cost of a battery and charger could cost as much as the correct solution-- unless you have it already. The correct solution is to buy a real amp that runs off of the AC mains. It will be plenty powerful, have better audio quality, and be more reliable. Something like the QSC G5 or G7 amp. (Disclaimer : I work for QSC, so I'm biased!)
H: Multiplexed Thermocouple Considerations I have a side-project to read temperatures from 4 thermocouples (K type, around 500F for coffee roaster data logger), and no previous analog experience at these levels. I've identified two possible solutions, but I'd like to hear feedback / suggestions / alternatives. The first method would be to feed the four thermocouples through an analog mux (say HEF4052, though haven't done as much research on this- is finding a mux for low-freq uV signals), and then to a typical thermocouple IC (MAX6675). The second method would be to feed the thermocouples into a 4 channel differential ADC, probably with an integrated PGA (AD7708). Then have an on-PCB temp sensor to handle cold junction compensation. Another option'd be analog mux to a single channel ADC, etc. Are there advantages to one approach over the other? It seems like the first would be fewer components, and a bit more reliable, though a bit more expensive then the second option. I've also seen circuits using an RC filter on both thermocouple lines- is that worthwhile? What kind of TC would be worthwhile on these kind of signals? Something for blocking 50/60Hz? Just installation specific? My primary concern is that this is the first time working with signals measured in uV, so I'm not sure what is and isn't important (beyond basics like keeping digital and analog seperated). EDIT: One more question for the ADC approach: is it important to measure the signals differentially, or could the low end of all 4 thermo couples be tied to ground, then be measured in a single ended fashion? ADS1118 seems like it has alot of what's wanted, but is only two-differential channel (and the datasheet shows differential measurements at that). More plainly: what's the advantage of doing differential measurement vs. single ended with one end tied to ground? Just isolation from the rest of the system? AI: If it were my design, I would use AD7708 and a separate temperature sensor on the PCB for ice point compensation. Since 50/60Hz is a common mode signal on both TC lines, it's canceled by a differential amplifier (in the front end or in the integrated A/D). RC filters reduce higher frequency noise, which can be rectified by the amplifier, which would cause an offset in TC reading. Depending on the amount of noise in your environment, this may or may not be a problem. The approach with an external mux is viable to. Check that the mux doesn't inject too much noise. A mechanical relay would be a really low noise mux. edit: On floating thermocouples vs. common leads. The topology with a common TC lead could work. But there are caveats. Different TCs can be a slightly different potential (common mode). If there is a shared lead, a current may be flowing through it, which can skew reading. If thermocouples are spread around spatially, they may see different noise. The noises will be added on the common lead, but will appear separately on the separate leads. 50/60Hz noise cancellation would not be as good. update: Related post on floating vs. grounded thermocouples.
H: LM317 voltage regulator circuit drops Vout on load I'm attempting to build a voltage regulator circuit for a DIY stir plate using a CPU fan supplied to an LM317 voltage regulator circuit. I have everything wired up on a board just like the diagram, but using 1k&ohm; and 10k&ohm; resistors (which according to this calculator should give the same voltage out). I'm feeding it 12V of DC power from a DC power supplying up to .3A. Measuring the Vout of the circuit without a load attached gives the expected ~12V and drops to ~0V when I dial the potentiometer down. However, once I add the fan, it won't move and the Vout measures a max of 2.1V. The fan claims it needs 12V and .1A - I'm assuming this means it's ~120&ohm;. I've also tried swapping it for resistors that I had laying around. Measured Vout under various loads: Fan: 2.2V 220&ohm;: 3.6V 1k&ohm;: 7.3V 100k&ohm;: 8.6V 1m&ohm;: 11.3V no load: 11.3V For diagnosis, I've tried swapping my R1/R2 resistors from 1k/10k to also try 10k/100k, 100k/1m, and 220/1k (no 100 laying around). It's pretty common to see these as different combinations on other stir plate instructions I've read, and the LM317 calculator says they should give the same voltage. All of these combinations gave nearly identical Vout for the variety of loads. The voltages also stay the same with or without the capacitors, which I read were optional. Can anyone point me towards what's probably wrong, or how to further diagnose it? EDIT: Solved! I had the LM317 flipped around backwards due to some bad labeling on the bag the component came in. I checked another company's data sheet and flipping it around fixed it. AI: Solved! I had the LM317 flipped around backwards due to some bad labeling on the bag the component came in. I checked another company's data sheet and flipping it around fixed it.
H: How can I tell if a chip has ESD damage? I have a several chips (microcontroller, PIC16F1939) some of which have weird behavior (random resets, some pins pulled high some of the time). All of them are running the same software. I suspect that those chips have ESD damage (or some other internal damage). How can I be sure? X-ray? Any other method available? AI: I don't know of an "easy" way to confirm ESD damage - there appear to be quite a few methods used to detect failure in ICs, all of them pretty expensive. They include X-ray, Microscopy, IR Thermal Analysis, Curve tracer, TDR, etc. This sample report of failure analysis is quite informative, detailing several different methods used to (eventually) find a fault. However, I would check the code carefully to make sure there isn't an intermittent bug responsible for what you are seeing, or a problem with your circuit (e.g. EMI, power supply problems, etc) Maybe try a few simple test programs which replicates various parts of the full firmware and see if the problem is specific to one part (or is present all the time) Also check on Microchips site for any known silicon issues, I have been caught by this a couple of times in the past.
H: Isolating BNC connector from test shield For my project, I need to have BNC connectors on the test metal shield. So what I did so far is drilling holes, and mounting BNC connectors on it: I used some hot shring on the part which passes through the hole. Those washers are normal fibre ones. I don't have something better at my arsenal now. This will not be a good insulator, because I measured the resistance from outer bnc connection to the metal shield and it happend to be around 1.4 GOhm: The problem is, the signal LO (the outer connector of coax cables) should be totally isolated from the metal shield. The best thing I can think of is some sort of teflon washer (shoulder washer) that can pass through the hole of the metal shield and then I can insert the BNC connector through it. Unfortunately I was unlucky to find what I need. What I have found is made from nylon and I think it can not provide a resistance as good as teflon, also it has the problem of absorbing water (humidity) : Please let me know what you think, and would be nice if you know a place that I can order the required stuff! AI: How about using insulated BNC sockets? (This one available here in the UK) Then you shouldn't have to worry about insulating them yourself.
H: Relay destroyed I am using a DYAD CP Clare DSS4 1A05, normally open, relay. The datasheet can be downloaded I am new to using relays. These seem to be the important specifications: Coil Voltage: 5V Typical -- 10V Maximum Operate Voltage & Release voltage: 0.8V Minimum -- 3.75V Maximum Here is my circuit: Where - R0, R1, R2, and R3 are relays of concern - I0, I1, I2, and I4 are inputs which can be 5V to close the switch or 0V to open the switch. - The left and right motors are 12 volts dc motors. The problem is, the relays got destroyed too often, usually after a day of use. That is, the two armature terminals of 1 or 2 relays get normally open (and cannot be closed anymore), and some get normally closed (and cannot be opened anymore). I don't know what I lack here. I tried reducing the +12 and -12 volts to +- 6V, and the dc motors replaced with 3 volts, but still the same problem. What do you know about this matter? AI: There are two obvious possibilities: You aren't doing break before make properly. You need a delay between turning off one relay and turning on the next. It's quite possible that one relay can turn on faster than the other turns off, leaving a dead short thru both relays for a little while. You are switching a inductive load but not giving any place for the inductor current to go when switching off. Relays are intended to handle this to some extent, but at the least this will cause arcing when the contacts open. Two reverse Schottky diodes to the two supply rails for each motor will fix this problem. Added: Here is a schematic showing how the reverse diodes should be connected:
H: What is the physical meaning of resistance and power ratings of a loudspeaker? What exactly does it mean when it is specified that internal impedance (or resistance?) of a loudspeaker is 16 \$\Omega\$? Is that ohmic resistance of the copper of its internal winding? Or is it absolute value of its impedance value? If it is an impedance value; a loudspeaker can play sounds with a wide variety of frequencies, how can they specify a general impedance for a loudspeaker? And also for power rating, what is the physical meaning of it? Is it the maximum power of sound (the energy transferred to the molecules in the air as vibration in one second) that a loudspeaker can give out? AI: The specified impedance is the sort-of average over the relevant frequency range for the speaker. Googling for "speaker impedance" shows a few graphs. The impedance consists of an ohmic part and a much more complicated part. The ohmic part is (hence) much lower than the rated impedance. The power rating is the total amount of electrical power you are allowed to feed the speaker without destroying it (but there might be other limits, like the amount of power in certain frequency bands). It is certainly not the energy in the sound waves produced: a speaker has a very low efficiency, Wikipedia cites 0.5 .. 20%.
H: Changing a Signal's DC Offset I have a square wave being generated from a waveform generator oscillating between 0 V and 5 V. The generator does not support negative DC offsets. I need to shift this signal down to be centered about the 0 V value, i.e. oscillating between -2.5 V and 2.5 V (AC Coupled?). What are ways of doing this? (Forgive me if I mess up any terminology I'm a software engineer by trade.) AI: What you need to do is simply remove the DC offset all together, not supply a negative one. This is known as AC coupling. If you run the output of your square wave generator through series capacitor, it should do what you need. This will however be at the expense of making the square wave less square. An example circuit is shown below for you: And the output would look like this (Green Trace = Generator Output, Blue Trace = Voltage Across Resistor): You will probably get a little voltage loss (meaning your peaks will be a little less that +/- 2.5V) since no capacitor is ideal, but you can get a pretty good square wave output if you get the right value capacitor. You'll have to experiment and see. Usually, the larger capacitor value you choose, the closer your output waveform will be to the original for any frequency a benchtop square wave generator is outputting.
H: Differences between thermistors and thermocouples As I understand it, both thermistors and thermocouples are temperature sensors. So what are the advantages/disadvantages of using one over the other to measure the temperature? What are the specific applications for either of the sensors? AI: Thermocouples: wide range of temperature sensing (Type T = -200-350°C; Type J = 95-760°C; Type K = 95-1260°C; other types go to even higher temperatures) can be very accurate sensing parameter = voltage generated by junctions at different temperatures thermocouple voltage is relatively low (4.3mV for Type T thermocouple with one end at 0 C, other at 100 C, so that's 43uV/C tempco) mostly linear Thermistors: more narrow range of sensing (Quality Z thermistors spec'd at -55 to +150 C) sensing parameter = resistance usually very nonlinear NTC thermistors have a roughly exponential decrease in resistance with increasing temperature good for sensing small changes in temperature (unless you are careful in your signal conditioning, it's hard to use a thermistor accurately and with high resolution over more than a 50 C range). sensing circuit doesn't need amplification & is very simple (voltage divider with reference resistor tied to reference voltage usually is sufficient) – see my blog for more information about signal conditioning. accuracy is usually hard to get better than 1°C without calibration
H: How do you dim a streetlight bulb? I'm getting a streetlight, most likely with a HPS bulb (high-pressure sodium). I'll probably hook up some sort of sensor to turn it on only when someone is actually parking lot. Why do some streetlights seem to take a long time to turn on? Is there anything that can be done to get parking lot lights to turn on quicker? Why do some companies say you must let the bulb cool down for a minute or so after you turn it off, before you can turn it back on? Is that a limitation of the bulb itself, or the control ballast, or what? Can "dimmable HPS" systems reach full brightness from a nearly-off dim state quicker than traditional on/off HPS systems? The only dimmable HPS systems I've seen so far can dim down to a minimum of 1/2, which visually seems only slightly less bright than full on. Is there some reason HPS can't dim down to 1/10 or 1/100 like other lighting technologies? (Am I just not looking in the right place for dimmable HPS systems?) How do you dim a streetlight bulb -- how is the voltage/waveform applied to the bulb different at dim than at full power? Are there any reasonable alternatives to HPS bulbs? If Haitz's law continues, then someday LEDs will cost less -- but the current LED lamps that last 10 times as long, but cost 100 times as much to get the same brightness, don't seem reasonable in 2011. (Edit: dropped protocol question as suggested by Jay Kominek - it's at motion detected protocol ) AI: Questions indented like this. Answers on margin. I'm getting a streetlight, most likely with a HPS bulb (high-pressure sodium). I'll probably hook up some sort of sensor to turn it on only when someone is actually parking lot. HPS is not a good choice for rapid turn on use. You'd probably be better served by a more standard bulb such as a Halogen, or something exotic like HID, or 'solid state' like LED. Why do some streetlights seem to take a long time to turn on? Is there anything that can be done to get parking lot lights to turn on quicker? Long turn on is caused by the technology used. Usually this involves the vaporisation of a metal and building up temperature and pressure. There is nothing sensible that you can do except change technologies. If you have a military-type budget you may find a faster way but for mere mortals, buying what is provided is typically the only choice. Why do some companies say you must let the bulb cool down for a minute or so after you turn it off, before you can turn it back on? Is that a limitation of the bulb itself, or the control ballast, or what? Most bulbs that use a gas arc or ionisation of a gas require a starting voltage which is significantly higher than the running voltage. When the tube is hot the starting voltage can be higher again - perhaps by a factor of 10 in some cases. While starters can usually be made to "strike" the tubes in such cases. Since this adds extra cost it is usually not justified in applications where only a few people occasionally need to restart lights. In specialist cases where failure to restart is unnacceptable, the effort and expense is taken to provide the extra voltage. An excellent example is HID lighting for cars. An HID light has a very small sized arc and white light. The small arc size allows excellent optical handling for beam forming (as in cars or projectors). The white light is attractive for various reasons. When cold an HID tube requires many hundreds of Volts to strike and when hot it requires many kV - perhaps 5-10 kV. HID controller makers for lamps used for fixed lighting may decide to not provide the HV restrike capability - it adds cost and dealing with HV is a reliability issue. But in a car you must be able to turn the headlights back on instantly at any time. So all automotive HID controllers have hot strike capability. Can "dimmable HPS" systems reach full brightness from a nearly-off dim state quicker than traditional on/off HPS systems? I don't know, but, almost certainly yes. Once an ionised start is obtained, if it can be stably maintained at low power, you'd expect increasing the temperature and pressure to higher levels to be much quicker than bringing them up from cold. Manufacturers' data sheets should comment on this. The only dimmable HPS systems I've seen so far can dim down to a minimum of 1/2, which visually seems only slightly less bright than full on. Is there some reason HPS can't dim down to 1/10 or 1/100 like other lighting technologies? (Am I just not looking in the right place for dimmable HPS systems?) Again, an informed guess: The minimum energy required for stable ionisation is still fairly high and if you try to reduce the brightness below that, the light simply turns off. Hence my caveat above, "if [stable ionisation] can be stably maintained at lower power". I'd expect better than 2:1 to be possible but probably not vastly better. How do you dim a streetlight bulb -- how is the voltage/waveform applied to the bulb different at dim than at full power? That very much depends on technology and on regulatory requirements. Where a bulb uses advanced technology and is sold as "dimmable" the manufacturer will provide very specific instructions. Technologies that accept linear current drive variation (e.g. incandescent, halogen and some LED systems) will allow very simple waveform control - either TRIAC leading edge waveform shaping or leading and falling edge or a power factor corrected reduced envelope. Other technolies may get a special waveform and conditions from a special controller and may be considered a "black box" from the entrance to the controller onwards. For example, some LED systems use 2 or 3 stage hill and valley circuits to fill the "valley space" around mains zero crossing points with energy taken from the cycle peaks. and they THEN apply a buck converter. The input to the dimmer is the start of the special magic and you then do not lightly separate the LED 'bulb' and controller. An HID controller will almost invariably be very close to its bulb. (People don't like reticulating 10 kV). Is there a standard protocol for sensors to tell parking lot lights that motion has been detected, so the lights need to turn on? I dont know. But no. This is a simple task and there are liable to be various ways of implementing a fairly straight forward choice. In most cases a simple timeout will do. Complexities such as usage patterns, time of night, etc. can easily be added if a microcontroller is used in the system. Are there any reasonable alternatives to HPS bulbs? If Haitz's law continues, then someday LEDs will cost less -- but the current LED lamps that last 10 times as long, but cost 100 times as much to get the same brightness, don't seem reasonable in 2011. Yes. How much light do you want?. There are many issues other than life and cost alone. LEDs offer almost the best to the best energy use when running, instant turn on, instant restart, wide range dimming, low temperatures (low stress on other components), low maintenance and replacement costs, etc. HID bulbs in the 30-200 Watt range are available for automotive use and would be trivially adaptable for street lights. No doubt they are also available for streetlights formally. Halogen bulbs have lower efficiency but offer instant on, dimmability, instant restart and excellent CRI (colour rendition).
H: Soldering an AC power cable Not sure if this should go here or in Super User, but I'm primarily concerned with how safely I can solder an AC power connection with little/no experience. So what exactly am I doing and why? I am looking to make some minor modifications to a home-theatre PC, one of which is relocating the power supply to inside the chassis. In doing so I would like to create a false PSU "plate" that I can screw into the back of the chassis to make it look as stock as possible and maintain an external AC power connection. I've already cut out the back of a cheap power supply and all I need to do now is cut an AC power cable and solder it to the female plug so I can connect that to the power supply inside my chassis. But are there wattage/safety limitations with different types of solder? Are their certain types of solder that are better than others for handling AC current or just power in general? I have not purchased a soldering iron/gun or solder or anything yet, so if one thing works better than something else I'd rather know before I spend my money. I'm not worried about how good/bad the actual soldering work looks once I'm done since it will be inside the case, but should I "finish" it in some way to make it safer/insulated? Like wrap it in electrical tape? Or if that's a stupid idea, heat-shrink tubing or glue or something else? Any insight/suggestions would be appreciated! EDIT: One of my concerns is that I would like to be able to draw a few hundred watts over this connection in case a turn this into a little living-room gaming rig in the near future. Not sure if/how that would affect anything. AI: Are you going to have the AC jack (power entry module) on your new back plate? If so, what kind of terminals does it have on the inner side? A photo or a pencil sketch of your new back plate could help us visualize the problem. Without knowing anything else, I would recommend splicing the wires with a crimped butt terminal (like this one or this one). It's a thin-wall metal tube inside of an insulating plastic tube. Each end of the tube can be crimped onto a wire. Here in the US, you can get them in any hardware store. Crimped connections are less brittle, compared to soldering. Splicing plus soldering works too. Heat shrink is a more reliable insulation than tape.
H: Where can I find a Bluetooth chip capable of shipping in bulk? Why is it that places like Newegg can sell consumer Bluetooth products for less than $10, but the only Bluetooth modules I can find on Mouser or Digikey cost close to $20? I am looking for the cheapest way to support bidirectional communication via Bluetooth SPP. Does anyone know why these chips are so expensive? AI: In mass production a BT chip costs less than 75 cents. The problem is none of the vendors will work with you, you need to find a module maker who can support you. In MP (Mass Production) you can reach to 5$ level with module including antenna etc. good luck. The key vendors to look at are CSR and BRCM (Broadcom). We use a Taiwanese module maker with one of their solutions. APMComm is the vendor, there are tons of others just look around.
H: Init code for reading and writing SD card with MCS51? Do you know how to interface SD card with MCS51, AT89S52 with SD card and code example in Keil if there's any... Thanks for the info... AI: SD cards can be accessed either using the full 4 bit wide data bus, or via SPI (serial peripheral interface) The latter one (SPI) has lower throughput but it is a very simple interface commonly used between micro controller and periherals ICs. The simplified version of the physical layer of the SD card spec gives you more detailed info: see download area of https://www.sdcard.org/ There is also an aplication note by TI that explains how to access SD cards via SPI using their MSP430 µC and might be very helpful even though you are using a different µC.
H: Component alignment, best practice? I am going to put a part on a board and the position of this component needs to be perfect. I am talking about 1/10th of a mm accuracy. What is the best practice for this type of alignment issues, what precautions I can take to ensure this accuracy during manufacturing. UPDATE Ok. I get it, I will loose the tolerance, let me ask, what type of alignment can be achieved with ease? This is for a complex lens system focusing on a Photodiode, the size of the active area is 2x2mm, so more error placing = less signal hence the concern. AI: First you need to pop up two levels in the overall design and ask why you really need 4 mil position accuracy. Even if you do achieve that most of the time, it will complicate inspection and lead to reliability problems. This smells like a a bad higher level design choice was made. Find out what the real problem is and then address it in a more reasonable way. To get the best placement accuracy, you need fiducials as others have noted. Even when you don't put explicit fiducials on a board, someone at the board house will find two pads near the corners and set their system to work with that, right after grumbling something about "rookie" and "moron". Sometimes they will tell you they want fiducials, but usually they'll just cover up your mistake with maybe a little more position error and the aforementioned grumbling. The best answer however is to talk to your assembly house. At that level of accuracy, you can't just slap a couple of fiducials on the board and figure everything will be fine. You need to have a dialog with them because different machines and processes have different capabilities. However, even if the assembly house says they can do 4 mil accuracy and you do what they tell you to, how are you going to test this board? A manufacturing requirement is no requirement at all if it isn't tested to. Again, this gets back to my first point. The only right answer is to not be here in the first place. Not everything is possible or reasonable just because you can write a spec for it. Added: I meant to say this before, but got distracted and forgot before hitting send. Even if the assembly house can guarantee original placement to 4 mils, that does not mean the part will end up there. Molten solder has a pretty strong surface tension, especially with respect to small parts (look up "tombstoning" for a extreme but real example). Once the solder melts, the original placement is largely irrelevant. The surface tension of the solder pulling on each of the pins will pull the part into the sortof "center" alignment. Usually this is a good thing since it allows for some initial placement error and still have the part end up in the right place. In your case, this means the real placement is not so much a function of where the machine plunked down the part (this is the part of the process that fiducials help with), but where the pull of the solder surface tension on all the pads averaged out to. With a symmetrical chip and the pads only a little larger than the pin footprints, this is going to be pretty predictable. With a assymetric part, like a SOT23 transistor for example, this is not so obvious. The surface tension pull is also in part a function of how much solder got placed on each pad. So now the eveness of the solder paste thickness matters. Again, what you are asking will be difficult at best, possibly unreasonable.
H: Arduino and LEDs Power Supply Question First, thank you to anyone taking time out of their day to read this and answer. Resources like this are incredible for amateurs like myself. My question is based around power supplies, Arduinos (clone board), and LEDS. My device will use an Arduino to interface with a strip of 160 5VDC RGB LED's. Each color for each LED pulls 20 mA for a total of 60 mA at full bright, full white based on the datasheets that I can find. Total power consumption 9.6 A (this seems very high). The datasheet also makes reference to 3 to 9 W per 32 LED's so 45 W max. I'm going to consider the power consumption relatively negligible for the Arduino (20mA at most I believe, very small sketch running it). I would like to power all of this from one supply so my question is: What do I need? The one supplier has an accompanying 5v/6A supply they say can power 200 LED's which is feasible if they are not all on simultaneous (which they rarely will, but I'd rather be safe). The next question is what isolation do I need between the Arduino and the LED strips. I obviously won't hook the strip to the Arduino 5V pin, but could I share with one line directly to the Arduino, one line to the LED strip from the supply and a shared ground? Finally, based on the previous two questions, could this be powered with a rechargeable battery? And no, not a car battery. Something like a NiCad or Li-Ion battery pack. Thank you in advance for any insight you can provide. Thank you again. AI: Power seems to be an important aspect in your design, so you might consider using different LEDs. Low-current LEDs for instance take 2mA instead of 20mA. Or maybe 5mA through your existing LEDs will produce enough light for your taste. Another angle would be to design your LED drive circuit for as low a voltage as you can. If you can design it for 3V and you use a switched power supply to create this 3V from 5V (or maybe 12V), you have saved 40% energy. This is especially effective when you use a battry, which produces a lower voltage over time. I guess that when you want to iluminate (nearly) all LEDs you can get by with illuminating them each a bit less. This logic could be incorporated in your software, so the worst case current would be reduced. You must design your circuitry for the worst case, but for battery life it might be more realistic to calculate with averaged cases. So get some more info on what you want to show when you need to know how a given battery will last. As often, your one good question results in an avelange of questions, and some questioning of your basic assumptions. That's system design :)
H: Do I need to worry about Min/Max footprint length values in datasheets I'm currently generating a set of pads for a footprint found in a datasheet. All of the length values in the footprint have min/max values e.g. 1.8 +- 0.1 Should I be using the 'middle' value, and if so, why do manufacturers bother with the min/max values? AI: Of course you have to pay attention to min and max values! This should be self-evident. Every manufacturing process has variations. There is no such thing as a fixed exact dimension. With the min/max values, the manufacturer is telling you what range the parts you will receive will fall within. You could get a whole batch right at one end or the other of that range. If you want your board to be reliably produced, it has to work properly with parts anywhere within that range. This should be obvious. For example, if some surface mount chip is specified with a nominal .3" distance between the ends of the pins with a 10 mil tolerance, what exactly does the .3" spec mean? Nothing. It's only there to give you a quick conceptual idea of the size, but otherwise they are saying the size falls from .290 to .310 inch. Let's say you center the chip at the origin when defining the package in your CAD system. That means the absolute coordinate of the ends of the pins will be half the width. The ends could extend as far as .310"/2 = .155" from center. Of course there will always be some placement error and you want the pad to extend a little past the end of the pin for a good solder miniscus and possibly to ease manual soldering in case you ever need to. My general rule of thumb is to add 20 mils for all the above. That's a general rule. There are reasons you might want a bit more or less depending on how the chip will be placed and soldered and some details of the process. In this example, we'll go with the general 20 mil rule. That means the ends of the SMD pads need to be at the absolute coordinate .175". The same logic applies to the inner edge of the pad. Again you look in the datasheet and find the minimum distance from the center of the chip where the pin can come down and touch the board. On the inside, you don't need 20 mil of additional length. I usually add about 10 mil, although particular processes may dictate something different. Using this logic, you end up with a footprint that will nicely accept any chip the manufacturer sends you. If it's a standard footprint you may only want to enter it into your CAD system once (at least for the general case). There may be slight spec differences between manufacturers. It is a good idea to check datasheets from a few different manufacturers for the same supposedly standard footprint. This gives you a better idea of the true variation out there. Usually they are close, but there can be small differences.
H: how to find out wether the stepper motor is working or not? I have unipolar stepper motor with 6 wires and i have made controller circuit but when connect controller to stepper motor it is not working.. So i want to know weather stepper motor is working or not. Is there any simple method to test steeper motor? Thank you! ADDED: olin lathrop i have added digram. The other comination such as AB,AC, AD,BC,BD etc gives 50 ohms in multimeter. AI: Compleat Solution: Identify two coils. (1) If coils have no connection between them do "Main Test": below. (2) If there is resistance measurable between windings provide a resistance map. as follos. 6 connections A B C D E F Measure and report resistances AB AC AD AE AF BC BD BE BF CD CE CF DE DF Main Test: Coil 1 will have 3 wires A B C Measure resistances AB BC CA Two combinations should measure R ohms. (R an arbitrary value) One combination should measure 2 x R ohms. For combination that measures 2 x R ohms, name wire that is NOT connected = B So now AB = R ohms BC = R ohms CA = 2 x R ohms. Provide voltage V+ which is voltage that stepper is rated at AND which can provide rated currrent. Power supplu has outputs V+ and ground. Connect B to +V Brush A against ground briefly. Then brush C against ground briefly. Repeat A C A C. Motor should jump backwards and forwards a smal amount on each touch of A or C to ground with Coil 2 will have 3 wires DEF. repeat as above for coil 1. E = centre tap as above. Motor should jump backwards and forwards a small amount at each touch. If no jumping then something is wrong. If motor jumps do "Run Test" below . Run Test: Remove controller and put safely away for now. Do following. "Connect to" = electrically connect and leave connected. Disconnect = disconnect previous connection. Windings are ABC DEF B = centre tap E = centre tap Connect B to V+ Connect E t V+ These will remain connected. Then Initialise: Connect C to ground, Connect F to ground. Run: Disconnect C, Connect A to ground. Disconnect F, Connect D to ground Disconnect A, Connect C to ground Disconnect D, connect F to ground Repeat from Run: above Motor should go through one step cycle for the 4 steps above. Report. Fix controller.
H: Simple voltage divider question So two resistors in series can be a voltage divider. So say I have the following circuit - From what I have read the voltage gets split across the resistors based on their resistance. So there will be 2V across R1 and 8V across R2. Now I have also read that Vout takes the value of the voltage across R1, in this case, 2V. What I am not sure of is why it takes the value of the voltage across R1 and not R2? AI: It does not "take" a value. It IS the value at the point you connect to. \$V\$out, and the bottom of R2, and the top of R1 are all connected. They are therefore necessarily all at the same voltage. But R1 & R2 are "comfortable with this" - the point of the calculations that have been done was to find the voltage at which this condition was true. With 8 V across R2 if you start at 10 V and come "down" R2 to the bottom you get 10 - 8 = 2 V. With 2 V across R1, if you start at ground and travel "up" R1 you get 0 + 2 V = 2 V at the top. i.e., starting at top or bottom you conclude that the voltage where R1 and R2 join is 2 V. You would be concerned if you did not get the same answer whatever you did as the whole point in working out the voltage across each is to work out what is needed for them to be "in equilibrium" when connected. Advice: So far you are missing the intuitive feel for what Ohms law is about. What seems very hard will one day suddenly become blindingly obvious (really) and will make sense from then on. So - play with resistors on paper. Redraw Ohms law 3 ways* and make sense of each. Understand what it means. Then one day ... . :-) $$R = \frac{V}{I}$$ $$I = \frac{V}{R}$$ $$V = IR$$ What seems puzzling and hard and a=obscure MUST become obvious and simple and trivial. Strange as it may seem, this can and will happen if you continue t play with the subject. All these forms must and in time will make COMPLETE sense to you. They must seem so trivially obvious that there can be no doubt that this is how it should be (even though in the real world there are small variations due to the special magics that indwells the stuff the world is made of). Once you have grasped Ohm's law you can try Resistive power dissipation. For P = power. $$P = \frac{V^2}{R}$$ $$P = I^2 . R$$ $$P = V . I$$ All these are exactly equivalent. Clue - plug in the value for one of the variables from Ohm's law, cancel out what can be cancelled and you will arrive at another form of the statement. For Example: $$P = \frac{V^2}{R} = V . \frac{V}{R}$$ BUT Ohm's law say V = IR so P becomes $$P = \frac{I. R . I . R}{R}$$ $$P = \frac{I^2R^2}{R} = I^2 R$$ Same as above.
H: Bass booster with op-amps I've found this schematics: (link) On the page they say "It can boost by 14dB" (they mean that amplifier can boost bass by 14dB). But now I'm little confused - is the circuit configured to boost bass by 14dB or must I change something to boost it by 14dB ? How can I calculate that? Thanks :) AI: Basically there is a potentiometer, a variable resistor that can be regulated to give a gain on the lower frequencies that can go up to 14 dB, depending on the position of the cursor in the 50K resistor. Since the 47n capacitance bypasses the higher frequencies, you should have the least bass amplification with the cursor in the rightmost position: (22+47)/(50+22) ~= 1 and the maximum amplification for the leftmost position: (50+47+22)/22 ~= 5 And this is for the lowest signals; since any signal is cut due to the lower gain given by the 47n bypass capacitor, you can (depending on the frequencies that you consider) have that gain, but basically it gives you a 5-factor regulation.
H: How do I decide which method to use in circuit analysis? I'm an Electrical Engineering student, and circuit analysis can be really confusing to me. I sort of understand the concepts of solving circuits, but I don't really know when to use which method. Are there any simple rules on choosing which method I should use for solving circuits? Node-voltage analysis? Superposition? Mesh analysis? Just use reduced linear equation system (or whatever it's called in English)? Should I just calculate how many equations each method will take and pick the one with least equations? Also, how do I know if I should use Thevenin's / Norton's generator to substitute a network? Please note that this is not really for practical purposes - I'm studying for an exam, but all the assignments in my textbook are categorized by methods, so I know which one to use. However, in the exam that info is not given to students. Thanks. AI: Basically there are few different things here that appear lumped together in your mind and which may be better seen separately. First you have the classical methods for solving circuits, such as the mesh analyses, node-voltage analyses, full equation system, reduced equation system and maybe some more I forgot. First, the full equation system has no excuse to be used, so don't use it. The reduced equation system should only be used for very simple circuits where the preparation to use one of the two other systems would take more work than solving the circuit using reduced system. After some practice, you should be able to determine how much work you'll need to solve the circuit using each system (so try using all 3 systems on some problems, just so you can compare how much work each requires). Next, you should have good theoretical knowledge of how each system works. The circuit may be such that some system cannot be easily used with it. You should also note the special cases where the mesh analyses and nodal analyses are especially useful. For example, in mesh analyses, if you have lots of constant current sources, you get lots of trivial equations for mesh currents. Same thing with nodal analyses and voltage sources. So basically, you should calculate how many equations you'll get with each and pick one with least equations, but do take into account special cases of current source and voltage sources when calculating the number of equations! After that, you have the theorems which you use. I'd say that you should first see if any theorems can be applied to a circuit and only after applying them try to solve it using the systems. For example, you should use Norton/Thevenin when you have a big circuit where one for few elements change. For example, you have a circuit with a rheostat and you need to calculate say current through it on various settings. In this case, just replace the rest of the circuit with Thevenin's generator, since it doesn't change. In case of superposition theorem, it's useful in cases where you have sources that turn on and off and you should calculate their effects on some part of the circuit. Same thing goes for other theorems, like bisection (where you have symmetrical circuit, so you only need to solve one half of it) or compensation (which is useful when you have sources whose values change). So for theorems, the general idea is to find use cases where each of them will actually allow the circuit to be simplified. So when you have a problem, ask yourself not "How am I going to solve this using method X?" but "Why am I going to solve this using method X?". This should work even on problems in textbooks where they are divided by areas. So as I said before, try solving one problem using several different methods. See which ones can be applied to the problem, which ones can't be applied to the problem, ask yourself why for each and then take a look and see which method is the most optimal (in sense that the least number of equations needs to be solved or that you get a significant number of simple equations) and try to understand why the most optimal method is the most optimal method. This way, you'll see when it's counterproductive to apply some theorem, when you gain nothing by applying some theorem and when applying a theorem actually helps. Same story goes for reduced system, nodal and mesh analyses too.
H: Transformers connected series at secondary side For some reasons, I want to connect secondary sides of two transformers in series as you see in the schematics. Computer simulation is as you see in the graph. (Notice that the corresponding signal values \$V_{out1}\$ and \$V_{out2}\$ are printed at the right side for the graph.) The two transformers are identical. Their electrical parameters are shown in the image above. Their dot-conventions are shown in the schematics. The load will not always be resistive; it can be a more complex circuit with an arbitrary impedance value, or it can be a diode rectifier. And, of course, it is assumed that all of the circuit elements will stay in their rated working range. My question is, would this circuit work in practice? Could there be any instability or any other unpredictable problem? Is there any reason that you wouldn't advice me to use this configuration? AI: As long as both secondaries are rated for the same current, that should work fine. If they have different current ratings, you will want to take no more current than the lower of the two. The main thing is to keep track of the polarities, i.e., the placement of the dots. With series secondaries, if you get one winding flipped, the secondaries will be out-of-phase and you won't get any current, assuming the secondary voltages are the same. If they aren't, the higher voltage secondary would drive current against the lower voltage one, but just keep the dots straight and this is not a concern. The real hazard is when you try to put secondaries in parallel. Get the dots wrong on this setup, and the two secondaries become a short circuit. Much smoke will follow.
H: RS485 Communication I need resourceful information's on how to implement the serial protocol via an RS485 interface. As regards to my area of application, I simple want to communicate with my micro-controller via an RS485 port. How do I go about this? Any useful links with useful steps will be appreciated. EDIT: I am designing an energy meter with interfaces in-other for it to communicate with the outside world, to READ and WRITE informations. I intend to add to it the RS485 interface just like the Optical communication interface which I have already implemented. I want to know if there is anyway I can combine the serial protocol communicating via the RS485 interface. I hope this is more clearer. Thanks AI: I want to know if there is anyway I can combine the serial protocol communicating via the RS485 interface RS485 doesn't have any defined serial protocol -- it's just the physical layer for specifying a multidrop differential signaling network, + a UART data link layer for encoding bytes via start/stop bits like RS232.
H: Help in understanding a circuit (Piezoelectric sensor) This circuit is meant to produce logic level outputs to HIT1 and TRIG1 when an input in detected at X1. I need to explain the operation of the circuit, calculate the unknown resistor values, explain their roles and determine if there are some components missing, however I'm struggling. Any help/hints would be appreciated in understanding how it works. I know that OA1 is the Op-amp and CP1/2 are comparators, where the output of the comparator goes into a digital scoring meter, why are two outputs required however? Just any help understanding would be appreciated, thanks in advance. AI: We are not here to do your homework for you. However, we can help with specific questions. What have you done to try to undestand the circuit yourself? What part specifically are you stuck on? It would help to have a clear spec for what the circuit is supposed to do. This includes the voltage expected to be produced by X1 in response to the stimulus you are trying to detect and some idea of the frequency. Without that it's impossible to say what some of the values are supposed to be. Do you undesstand the purpose of each of the components? For example, what does the first amp do and how do R1 and R2 effect that process? What is the purpose of D2, C1, and R3 put together? Why are there two comparators and what is the chain of resistors R4, R5, and R6 there for? Added: It looks like you have now given at least some thought to the circuit on your own, so I think it's OK to go into more detail about how it works. Look at just OA1, R1, and R2 for now. You should be able to recognize those form a classic non-inverting amplifier. R1 and R2 form a voltage divider that attenuates the output signal to make the feedback signal. The gain of this stage will be the attenuation ratio. For example, if R1 is 20 kΩ and R2 10 kΩ, then the divider will attenuate by 3 (have a gain of 1/3), which means this opamp stage will have a gain of 3. X1 is a piezo sensor, which puts out a voltage when subjected to strain. It is unclear what the designer intended for D1. It will clamp the voltage from X1 to one silicon junction drop below ground. That is a good thing to do since piezo transducers can produce quite high voltages when subjected to high strain, like when being hit with a hard object or dropped onto the floor. This effect is exploited in some barbecue ignitors to create a spark. While normal operational voltages may be quite small (sound waves in air aren't going to strain the piezo crystal much), the voltages from unintended shocks can easily damage OA1. I have no idea why the designer thought of this for negative voltages but not for positive. As is too often the case, just because someone draws up a circuit and posts it on the web doesn't make it a good design. I would put a second diode just like D1 in parallel with it but with reverse polarity. That will keep the piezo voltage to within one junction drop either side of ground, which should not damage the amp even when it is not powered. Normal piezo voltages from sounds waves will be much less than that, so this shouldn't interfere with normal operation. So in normal operation the output of OA1 is the piezo signal after some voltage gain and buffered to a low impedance. Now consider D2, C1, and R3. Note that the output of that section only drives two comparator inputs, which we can consider inifinite impedance for our purpose at this point. Think of just D2 and C1 first. When the opamp output goes high, it will charge up C1 thru D2. When the opamp goes low, D2 will be reverse biased and whatever voltage is on C1 will remain. Basically this is a maximum value circuit. It will capture the peak voltage (minus the D2 forward junction drop) and hold it on C1. A high enough captured peak level will ultimately trigger the outputs. However, you don't want a single event to trigger the outputs forever. That's where R3 comes in. It causes the voltage on C1 to exponentially decay back to 0 over time. When C1 is in Farads and R3 in Ohms, then C1*R3 will be the time constant in seconds. So the negative input to the two comparators is the recent peak input level, with how recent adjusted by the C1*R3 time constant. Such a circuit is called a detector because of its early use in AM radios to detect the carrier amplitude. It captures (or "detects") the low frequency amplitude of a high frequency AC signal. Now look at the resistor chain R4, R5, and R6. This is just a two-tap voltage divider. The top voltage and the resistances are given, so you should be able to figure out the two tap voltages. These become the threshold voltages at which the two comparators will trigger. When the detected piezo signal amplitude exceeds the low threshold, HIT1 will go low. When it exceeds the higher threshold, TRIG1 will go low. The two outputs do the same thing except that HIT1 is more sensitive than TRIG1. It takes a louder signal or stronger whack to assert TRIG1 than to assert HIT1. In this case, we're assuming negative logic for these, so "assert" means to go low in this case. We don't know how these signals are used, but consider what you get if they drive the inputs of a XOR gate. The XOR output will be true only when the detected voltage is between the two thresholds. Such a circuit is called a window comparator because it only asserts when the input signal is within a certain range (within a voltage "window"). The above analysis is assuming that the opamp and the two comparators are properly powered. Unfortunately this is not shown, so we can't tell. The TL074 needs a few Volts headroom on each end, so will need a negative supply since it is expected to operate on signals around 0V. The TL07x also need some minimum supply voltage. I don't remember off the top of my head how much, but I'm pretty sure just 5V isn't enough. Running them from +9V and -5V is probably sufficient, although they can go rather higher too. As always, you need to check the datasheets for the parts you are using to see what special requirements or restrictions they have and to make sure they are run within specs.
H: Noise when powering headphones amplifier through USB port This question is actually connected with this one: Getting 1.2V from USB I've successfully connected my FIIO E3 headphones amplifier to USB (so that I don't have to use batteries). But I've notices few things: 1) I connect it to computer USB port. I get some strange noise - like humming and crackling. Actually, when I do something on my computer (e.g. I copy something to HDD), that noise gets louder. 2) If I connect it to the computer USB port with USB extension cord, I don't hear noise from 1), but I hear very loud white noise 3) Then I've tried to connect it to my iPhone charger (it gives 5V from 220V). It works perfectly (no humming or other noise). So anyone got a clue what's happening ? Thanks :) AI: I don't know what you mean by "connected" your headphone amplifier to USB. I'll assume you mean that you are powering it from the USB. In that case, the noise on the USB power is getting into the headphone signal. Since the amp apparently isn't designed to filter the power input, you'll have to add that. Put a small inductor in series with the USB power line, then add a capacitor to ground on the amp side of the inductor. You probably don't need much of a inductor. Even a ferrite "chip inductor" would probably help. The most important point is to put a few 10s of µF of ceramic capacitance immediately accross the power input to the amp. A few 100 µF electrolytic in addition couldn't hurt.
H: Norator in series with inductor/capacitor I know that if I have a norator in series with a resistor, I can replace the resistor with a short circuit. My question is, if I can do the same with a linear inductor/capacitor? AI: The norator is an imaginary component, albeit you see if often used when you have a current source. You can only build one if it is functionally possible. Let see, A current source driven into an inductor will start will a near infinite voltage as everything is turned on(not possible, but real inductors have a light capacitance or the real norator would not be able to drive infinite voltage) and over time would only have to output 0V to drive the current as an inductor goes to a short. A voltage norator would have to start driving zero current and slowly build up to need infinite voltage as the inductor becomes a short circuit. A real inductor has some resistance, a real voltage source cannot be perfectly ideal. If you use a capacitor a current norator would have to constantly pump charge into the capacitor until it went to infinite voltage. This would either over-voltage the cap or fail the norator circuit, which as an ideal circuit really can only be treated as an ideal source as long as you stay within some specs. If used a voltage norator you would find it needed infinite current at first and would quickly decay to no current. If you do not pay attention to the first moment(which is limited by both your source resistance and capacitor resistance), just like the current norator with the inductor, you will find this is reasonable, capacitors are used on the output of voltage sources all the time.
H: Would this circuit work? I've been a software dev for a while, but never really did a lot with hardware so please forgive me if this question is really basic. I have an Arduino project I am trying to set up that involves a photocell. Most of my Arduino knowledge so far is from the book Getting Started with Arduino. They have a section that actually talks about photocells. Below is the diagram they give for building a circuit. I have two questions about it. First, what is the point of the resistor (seeing how the photocell is basically a light sensitive resistor)? Why couldn't the circuit just be "5V to photocell, photocell to A0"? Second, if my project has already used the 5V pin (its for an LCD display) could I rig the circuit up to start at a digital pin (which would be set to output 5V) to photocell back to A0? If not, how would I power the photocell? Normally I'd just try this (without the resistor) and see what would happen, however I don't have a spare Arduino and don't feel like frying this one quite yet. AI: First, what is the point of the resister (seeing how the photocell is basically a light sensitive resister)? Why couldn't the circuit just be 5v to photocell, photocell to A0? I don't know anything about Arduino's but from looking at the circuit, I surmise that A0 connects to an input pin of the microcontroller. What's happening is that when light hits the photocell, its resistance decreases, so the A0 pin is pulled high, and the Arduino reads a "high" input. When there's no light input, then, you want to read a "low" input. What happens is, with no light, the photocell resitance increases, and the extra resistor pulls down the A0 pin to ground, so the Arduino can read a 0 input. If there was no extra resistor, no matter how high the resistance of the photocell, it would still always pull up, and A0 would always be "high". Second, if my project has already used the 5v pin (its for an lcd display) could I rig the circuit up to start at a digital pin (which would be set to output 5v) to photocell back to A0? If not, how would I power the photocell? Again, I only know from the way the board is labeled in your diagram, but I expect that "5V" is a power supply pin. If it is, then you should be able to connect it to multiple loads, as long as the total current needed by those loads is not more than the board can supply (check the data sheet or manual for your board). But the photocell circuit shouldn't draw more than a few mA, so it should be safe to add this load to the load from the LCD you already have. You just need to find some physical way to connect both the LCD and the photocell to the same pin. One easy way would be to just solder three wires together to form a "Y"; connect one leg of the Y to the Arduino, one to the photocell, and one to the LCD circuit. Edit You explained that the A0 is an analog input pin for the Arduino. In that case, what you're doing is using the photocell as one part of a resistor divider: In your case Vin is 5 V, and R1 is the photocell, and R2 is the "extra resistor". The voltage at Vout is connected to A0 of the Arduino so you can measure it. The formula for the output voltage of the resistor divider is $$ V_{out} = V_{in}\times \frac{R2}{R1+R2} $$ If you remove the extra resistor, that's like taking R2 to infinity. You can see from the formula that in the limit as R2 goes to infinity, you get $$ V_{out}=V_{in}\times R2 / R2 $$ or $$ V_{out} = V_{in}, $$ meaning you'll always read 5 V at Vout if the extra resistor isn't there. Resistor divider image from Wikimedia, Creative Commons Attribution Share Alike
H: Safe resistance for speaker jack What would you consider to be a safe resistance for a speaker jack on a computer? I want to make a speaker unit for my laptop (which has awful built in speakers), but I'm afraid I'll end up drawing too much current. So I just need a safe estimate for how much resistance I should build into my system. On a side note, I just want to be safe with my wiring. Audio jacks have two channel pins (L and R) and a common... "ground" I guess you would call it, right? So if I wired like this... Left---Speaker---Ground---Speaker---Right would that work? AI: If you are talking of a typical line out or headphone jack from a laptop/PC soundcard, then this is not suitable for driving speakers without some amplification. So assuming you are talking of an active speaker setup (i.e. it has some built in amplification) using a line out signal from the PC, you will want an input impedance of around 10k\$\Omega\$ or higher. The idea is not to load the output impedance, which is typically around 100\$\Omega\$ according to the Wiki page on line level. This maximises voltage signal transfer. For the wiring, it is L, R and common as you say, so connect the common to the ground of your circuit and L and R to the 2 inputs. EDIT The impedance is low on your headphones as they are not an input to an amplifier stage, rather they should be driven from the output of one. The >10k impedance I am referring to is a typical input to an amplifier stage. Since it's just signal, not power transfer that is the intention here you want to have a high input impedance so as not to load the signal and cause the voltage to sag. The line out (say 100 ohms) will also be suitable for driving small headphones, since they require very little power. Since it's power you want to transfer to the headphones, the low impedance is better. For speakers though it's nowhere near enough without an amplifier. Read the Wiki line level page linked to above, it explains this all pretty clearly. For a complete understanding you might want to grab a book on basic electronics and study ohms law - this will also come in handy for the next part. Building an amp: There are a million and one amplifier circuits out there, ranging from a couple of components to huge complex power hungry monsters. Since you are new to this, I recommend starting with something that does as much as possible for you. Luckily there are cheap ICs that do just this, just needing a few simple connections to make a reasonable quality amplifier. There are many to choose from (just go on any large component vendor and type "amplifier ic" and you will get loads of options) so it could be a bit confusing - here's one option: The TDA1517 This is a 2 x 6W (dual output) class B integrated amplifier. I only picked this one as I have used it before and know it to be a "solid", no fuss amp. If you need more power or lower THD+n then have a look around on Digikey, Mouser, Farnell, etc. The connections are pretty simple: So you would connect your L (probably tip) and R (probably ring) to "input 1" (pin 1) and "input 2" (pin 9) then your common (shield) to pins 2 and 5 (there are two pins for signal/power ground so you can separate larger power currents from small signal currents and keep things quieter - put your power on the other side from your input so the power current doesn't share any of the signal return. If this seems confusing, don't worry, just connect pins 2 and 5 to ground and it will probably work okay even if you don't lay it out perfect)
H: If I'm going to use a potentiometer as an adjustable voltage divider, does the tolerance or resistance matter? Here's what I working with. I'm researching some three terminal potentiometers for use as adjustable voltage dividers. The outer terminals are connected to 0V and 5V respectably, so as I turn the knob, the wiper voltage sweeps from 0 to 5V. My question: Does the tolerance of the potentiometer (5%, 10%, etc.), or the resistance matter for this application. I'm not sure about the tolerance, but I'm pretty certain that the resistance will only affect the size of the load that the wiper can drive (impedance and what-not). AI: If you are just taking the voltage into a high-impedance load, then the value of the pot doesn't matter at all. 1k and 10k pots will both give 2.5V at 50% rotation. It is a common pattern in electronics to make things ratiometric so exact values don't matter. In this case, the tolerance and temperature coefficient of the pot is completely canceled.
H: Driving 3-4v laser from 5v arduino I want to control the following laser module from an arduino digital output: Specification V2 – Aug 2010 Wavelength : 650nm +/-5nm Output Power : 4-5mW Operating Voltage: V2 = 3.0-4.0V Operating Current: 15-20mA Operating Temperature: 10 – 40°C What's the best approach - I've looked at diodes for voltage drops, resistors and regulators but I really don't know which to use. The variability of the voltage and current in the specs is rather confusing. TIA AI: The best way is to use a dedicated laser driver IC such as the iC-WKL from Global Laser. This will take care of the careful regulation needed. It expects a laser diode with an inbuilt monitor diode for optical regulation. Other less ideal ways to drive them are: A series resistor to limit current as you would with a normal LED - some more robust modern diodes can apparently be used like this quite successfully. A constant current setup. Laser diodes are usually very sensitive to variations in current/voltage (the lasing threshold is quite close to the maximum threshold so not a lot of room for error) so check your datasheet to see how much "play" you have. This page has some good info on laser diodes.
H: How does this OP-AMP offset voltage measuring circuit work? In the Operational Amplifiers part of Analog University from National Semiconductor, I saw an offset voltage measuring circuit for an OP-AMP. Here is the page. I've included some details and the schematic below: It says that this is a very accurate way of measuring Vos. In LTspice, I've built this circuit with two LT1001 s and the output of the OP-AMP saturates to +5V. I used +5V and GND for the supplies. In the page, it says that if +1V is applied to the "Servo Input", the output of the DUT will be +1V. I can understand that since the Servo OP-AMP will try to make its both inputs the same by changing its output voltage accordingly. Since there is almost no voltage drop across 10k in the non-inverting input of the Servo OP-AMP, output of the DUT will be +1V. For example, say the DUT has an offset voltage of +500 μV and NO gain errors and the Servo Input is set to +2.5V. The DUT's output will now be set to 2.5V and VOS will be at +500 mV regardless of the Servo Input setting. Any gain error would be summed in along with the offset voltage, and the result is multiplied by the loop gain (1000). With the Servo Input grounded the circuit basically functions as a "gain of 1000" test circuit. The Servo amp contributes very little in the way of offset errors (the servo amp's offset is divided 'down' by the loop gain). I couldn't understand why Vos (output of the Servo OP-AMP?) will be at +500mV (that is the gain multiplied by the offset voltage of the DUT)? Both OP-AMPs are in each others feedback loop, however, DUT is in the positive feedback loop of the Servo. Why is that? It would be great that you include Vos as a voltage source when you are explaining. (I am so puzzled and thus maybe I was not clear. Please notify me and I will edit accordingly.) AI: First, the DUT is in the positive feedback because this way you have an inverting and a non-inverting gain in the loop, so that multiplying them you obtain an overall negative loop gain. Second, the gain is 1000 because Vin of DUT is Vos*50/(50K+50), so if you consider that V+ of the DUT should be 0, there is only the offset applied, so the feedback forces the output to be 1k times the offset voltage. I think that you can look at the output this way: suppose that the situation is the one described, and you have a 500uV DUT offset and so 500mV output voltage. Now, if you try to perturb the Servo Input, the feedback forces the output of the DUT to be almost the same of Servo Input, restoring the same Output voltage. Note: Voff is the conventional name for input offset voltage, while Vos is the output voltage with Voff applied at the input pins.
H: Using a 48V Charger for a 12V load My friend and I are trying to make sense of this. We have 4 12V batteries, a 48V solar panel charger/controller, but our load needs 12V. The system must be able to support a maximum load of 3000W, peaks of 3500W, but the standard load of less than 200W. The charger will be operational a typical 8-10 hours a day, but always connected. The 200W load will be steady 24/7. This is what we were thinking: Connecting the 4 batteries in series. Plugging the charger on the first and the last. This should get the charger operational. Connect the positive of each battery to a single point (Parrallele connection), but add a 12V 5000W diode on the wire to prevent the current from short circuiting the charger circuit. Same principal with the negative pole, but with the diode connected in reverse. This should give us two seperate circuit one in 48V, the other one in 12V. Here are my questions: 1) Is this circuit operational? Will it work? 2) What is the average energy needed by the diode? On the diodes tech sheet I'm getting for digikey. There is no internal resistance value. I'm wondering if the system itself will require too much power. AI: No! Your diode scheme won't work. It's not clear how exactly you propose to connect the diodes, but either you will short one or more batteries or you will end up with the full 48V minus two diode drops on the output. As Leon said, what you need is a 48V to 12V converter. The most likely form of this is a switching power supply called a "buck converter". You can look up that term for details on how exactly they work. At your current (almost 300A at 12V out), this will not be a trivial design and it will dissipate significant heat no matter what you do. Unless you're skilled in switching power supply design (and if you were, you wouldn't be here asking), you're better off buying something off the shelf if you can find it. This is not a beginner project. Do something else first if you want to learn. At this power level and current, you'll need every possible trick including multiple phases and synchronous rectification. Consider the cooling requirements. Even if you can make the converter 95% efficient (that would be impressive), it will still dissipate 150 W of heat when operating at 3 kW. That is not a trivial amount of heat to get rid of, and will require careful attention to cooling. In other words, this isn't just a expert level electronic design problem, but will also require more than casual mechanical engineering for the thermal management.
H: Question about the output voltage of an op-amp. (ua741) When i hook up my opamp to a 9 volt battery (like in the image below), i get 8 volts from the output pin. It gives the same reading when i attach both the inverting and non-inverting pins to the 9 volt rail. Shouldn't it be closer to 0 volts or few milli volts? Why is the opamp behaving like this? Is it broken? Thanks in Advance. AI: As Oli said, in the first case you are operating it out of spec since the input common mode range does not extend to the positive supply. In the second case the inputs are just floating so you don't know what voltage they end up at. However, even if you were to short the two inputs together and hold them somewhere within the valid range, like 4.5V, you would still likely not get 0V out. This is because the opamp is not perfect and has some input offset voltage. This is essentially a small error voltage added to one of the inputs. Let's say for example this opamp this day at this temperature at this input voltage has 2 mV input offset. When you tie the two inputs together, the opamp will see this 2 mV input instead of the real 0V input. That apparent input will be multiplied by the opamp's open loop gain, which is probably at least 100k or so. 2mV * 100k = 200V. Obviously this amp can't produce 200V, so it will drive it's output as far as it can towards the positive supply rail. Note that the input offset could just as well have been -2mV, in which case the output would drive as far as it can towards the negative supply rail. Input offset voltage is a reality of opamps, and is one of the issues that need to be considered in designing a circuit with them.
H: Arduino - Controlling multiple 12v motors I have seen this thread but it wasn't helpful. Is it possible to connect four 12v/4a motors to one Arduino and control them independently? I'm a beginner to circuits and such - that's the part that's worrying me, not the Arduino code. The Arduino has only one 12v output. How should I go about this? Edit: Whoops sorry. It has only one 5v output, noob error :/ Also, what if I need to control three of these instead? 12v 500ma Solenoid valves.... should I still be using relays? http://www.ebay.in/itm/1-4-Electric-Solenoid-Valve-12-volt-Air-Water-BBTF-/290578532901 AI: Your real question is how to control a 12V 4A motor from a 0-5V logic output such as from a arduino. Probably the simplest way is to use a relay. Use a relay with a 5V coil and a low side NPN to drive it: This can support relays that take up to 100mA or so to drive, which should be more than enough for relay run from 5V that can switch what you want. The other side of the relay is just like a ordinary switch. You put it in series with the 12V supply and the motor. There are fancier ways to drive the motor, but this is simple, robust, and meets all the specs you provided. Added: You now say you want to control a 12V 500mA solenoid in stead of a 12V 4A motor. That is just like driving a relay, except in this case the current is higher and it will be powered from the 12V supply instead of the 5V supply. For the different supply the only change is to connect the high side of the coil and diode to the new supply. The higher current procludes the relay drive circuit shown above. If bipolar transistors are used, more current gain is required than you can reasonably expect from a single part. This can be dealt with by using two transistors. I would just use a single logic level FET: However, there are lots of ways to implement a low side switch for 12V and 500mA that is driven from a logic output.
H: What's the need for higher frequency in inductive charging systems? Consider an inductive charging system like Magne Charge - it has a rather huge "coupler" coil off the vehicle and a corresponding slot on the vehicle and the coils in the "coupler" and in the slot are aligned perfectly parallel and brought close to each other. So it looks like a good old transformer. Yet there's a huge box in each Magne Charge system (a wall-mounted unit) that most likely generates higher frequency current. Btw this box seems to be accountable for huge energy losses. What's the need for that frequency increase? A good old transformer will run at the same frequency as mains - 50 or 60 Hz depending on the region - and have pretty good efficiency. Why would this slightly altered transformer setup need higher frequency? AI: It all boils down to efficency. As the frequency a transformer runs at increases, the transformer can be physically smaller. To Plagiarize Quote Wikipedia: The EMF of a transformer at a given flux density increases with frequency. By operating at higher frequencies, transformers can be physically more compact because a given core is able to transfer more power without reaching saturation and fewer turns are needed to achieve the same impedance. Consider the size required for a 50/60 Hz transformer capable of 6.6 - 50 KW (the power rating range of the Magne-Charge systems).
H: Effect of Battery charging with un equal batteries in parallel I have 24 VDC to 220 VAC Inverter and two 90 Ampere Batteries now I feel that backup is not what I need now I intend to connect these two existing batteries in parallel to give total of 12 volts and 180 or 170 amp and add a new single 150 Ampere battery. Now Question is that what effect would be there on charging? ups cuts of charging on 28vdc. What I feel that if we have unbalanced battery ampere rating in parallel then first smaller one gets full and the overflow current helps the bigger battery to fill then .Am I wrong? AI: Even parallel charging expensive batteries of the same type is unwise. If you are using deep-cycle batteries then they almost certainly justify using a charger that can manage each independently or separate chargers. During UPS operation you want the combined energy of all batteries (of course). If these have all been floated and are fully charged then you can "with reasonable safety" combine them at this stage. Best/nicest would be to have the ability to stagger discharge and apply each new battery as desired. Either of the above schemes ideally requires the ability to zero or close to zero voltage drop connect the batteries to load. Traditionally this would be done with contactors but can be done with modern MOSFETS at low loss and quite reasonable price. For example, this utter gem of modern technology Infineon N-Channel MOSFET IPB009N03L at $3.44 /1 in stock at digikey is rated at 30V, 180A, Rdson < 0.001 ohm [!!!!] 0.6k/W Tjc. At 30A with a wisp of copper it would be warm. At 100A it would need sensible heatsinking. I do not know the sensible design current or the package (as opposed to the device ratings) but the package seems to be trying harder than some to deal with the current. A few of these or something similar could well allow you ease of charge-separately, "connect as required" operation.
H: Oscilloscope trace not quite square I just obtained a Rigol DS1052E oscilloscope and so far I'm very pleased with it indeed. For an early test I used my papilo fpga board to generate a signal using the following verilog - module Demo(input clock, output led); reg [0:8] counter = 0; always @(posedge clock) begin counter <= counter + 1; end assign led = counter[0]; endmodule I connected the oscilloscope probe up to the output pin. I called it LED because it had an LED on in a previous test but it's just a diconnected pin right now, and I got this trace - The frequency etc is all as expected, however I see spikes at each positive and negative transition. My question is, are these real? And if so are they something I would need to worry about in a real circuit if that pin was connected somewhere, or are they an artifact of the way I'm measuring the signal? Basically am I using the 'scope correctly? As a software guy doing this for a hobby I tend to think of digital signals as purely on or off, but I know its more complicated that that so wanted to ask am I seeing something real here, and is it something I'd ever have to worry about AI: Two issues come to mind: Is the ground clip of your probe connected such that you get the shortest possible connection to the return of your signal source? (If the logic IC or FPGA has supply pins buffered with capacitors, connect your probe's ground clip directly to the ground node at these capacitors.) Is your probe compensated? It's not enough to use a 1:10 probe for good signal quality, you also need to match the probe's capacitance to the scope input's capacitance. Related: This online tutorial, this answer and this answer.
H: Question about soldering/desoldering I've just bought new 30W soldering iron and now that I'm home, I've tried to desolder few capacitors from my MBO. Anyway, I've turned the soldering iron on, waited few minutes for it to heat up and then put the tip to the part I wanted to desolder. I was amazed - nothing happened !! Well, after let's say 30 seconds (I know, that's too long but I didn't get anything e.g. smoke or something and the capacitor didn't heat up because I was holding it on the other side) I've managed to somehow desolder it ... But now I have solder in holes, and I thought well, that's no problem. I've used this technique: but unfortunately, this doesn't work. I can't melt remaining solder (in the holes) by applying tip of soldering iron to the one leg of capacitor. Actually, I don't think that I can do anything with this soldering iron ... Is there something wrong with it or with how I am using it ? Thanks ! AI: First of all: modern PCBs use lead-free solder. It has a higher melting point and a different "look" when solid. Sometimes it helps to apply a little bit of lead solder to get a better heat transfer between the soldering iron and the solder joint. After the whole soldering joint is molten, I use a vacuum plunger ("solder sucker") to remove bigger amounts of solder. Remove the soldering iron to avoid overheating the component. Then (the component wire is still in the hole) I use some quality brand desoldering wick: I place the desoldering wick in such a way that it has a good contact to the solder joint, and then press on top of the wick. This way the wick has a good contact to the solder joint. About heating up the capacitor: It may well be that you overheated the cap, I'm not sure if the metal case is has a good thermal coupling to the contacts.
H: Capacitor in parallel with resistor on xoscope amplifier schematic Short version: Why is C3 necessary in this circuit? Explanation: The schematic for the input buffer/amplifier circuit for xoscope is made up of subsections that are mostly broken down in the descriptions on the site: C1: AC coupling, to remove DC component from signals In notes, the author suggests moving this to after the impedance stage R1, C2: Impedance, to avoid impacting the operation of the circuit under test R2, D1, D2: Clamp to +12.7V, -12V, to keep input within spec limits of amp R3, D3: -11.3V reference for clamp to avoid dropping below common mode limit of amp R5, R4, S1: Switchable 1x/10x feedback divider R6: Output amplitude trim I haven't found an explanation, however, for C3, the 100pF across R2. The circuit this derives from (The Art of Electronics, figure 4.74) does exactly the same thing, once again with no explanation. Apparently the utility ought to be obvious, but I'm new to earnest analog electronics. I can only assume that it's stabilizing something, but I don't know how the operation would suffer without it. AI: My guess is that the designer is bypassing the series resistor in an attempt to mitigate the frequency roll-off caused by the diode capacitances of D1, D2 and D3. D1 and D2 are reversed biased, so there's the drift capacitance, and D8 is forward biased, so there's diffusion capacitance. Added together in parallel they might combine to give (just a guess) 20 pF of capacitance. That forms a low-pass filter in combination with R2, and without C3 would limit the bandwidth to about 170kHz. The TL084 has a gain-bandwidth product of 4 MHz, and with a gain of ten would have a bandwidth of about 400 kHz, so in this configuration it can do better. I guess the designer is assuming(?) that at high frequency the source will be current limited and that the op amps own internal ESD protection will handle things; this circuit seems mainly designed to protect the input if, say, it's connected to an audio amp putting out 40 volts p2p. C1 should definitely be moved; R1 and C2 are there because they are to be matched to the source impedance of the probe, and C1 will mess up the response!
H: LC filter for Vref and Vadc I'm reading an Atmel Data-sheet and it mentions using an LC filter for the Vref and Vadc pins, when simulating a simple small AC voltage with a 5V offset and using an LC filter with 10uH and 10uF the attenuation stays at 0dB until the SRF is hit at about 15.8kHz. The signal only starts to drop after that point, am I right assuming these types of filters are only meant for really high frequencies? (In power supply terms at least) Also, if you get noise at the SRF of your filter won't that create other problems? AI: The rolloff frequency of a LC filter is \$ f = \dfrac{1}{2 \pi \sqrt{LC}}\$. When L is in Henries, C in Farads, then f is in Hz. This comes out to 15.9 kHz for 10 µH and 10 µF, so your simulation is apparently correct. Just like RC filters, LC filters can be arranged for frequencies over a wide range since inductors and capacitors come in a wide range of values. They are not inherently "high" or "low". Often the DC level of a power supply is pretty good but has high frequency noise on it, like from a switching power supply and high frequency components of switching transients. Sometimes these are filtered with a small chip inductor in series followed by a ceramic cap to ground. The rolloff frequency may be a few 10s of kHz, but the noise is much higher than that. Lots of analog chips have pretty good power supply rejection capability, but since this is done with active electronics it fails at high frequencies. As long as the power supply filter removes the high frequencies the electronics can't handle, things will work well enough.
H: Is full wave rectifier better than half wave one? I am curious if there are practical differences between a DC power supply based on a half wave rectifier or a full wave rectifier. I mean I have a few small DC power supply units which should give 12V 0.1A each. They all have a transformer 240V->18V, then 1 diode or 4 diodes, then 78L12 (0.1A regulator) and one or two capacitors (typically 220uF or 470uF). My question is if the power supply can give a good quality DC voltage with just a half wave rectifier (a single diode) when a 470uF capacitor and 78L12 is added, or if bridge rectifier (4 diodes) is better. I also have one old 12V 0.2A power supply based on a Zener diode instead of 7812 regulator. It also has 18V going to just a single diode, then 33R resistor which limits current to 0.2 Amp, then Zener diode parallel with a 1000uF capacitor. Again: Would it be better to have 4 diodes there, or is the half wave rectification good enough here thanks to the 1000uF capacitor? (All my power supplies work well, I am just curious "why" and "how" these things work.) Update: I found two more interesting information: Capacitor should be approximately 500 uF for each .1 Amper of output (or more). This applies to full wave rectifier. Since I saw the same values in half wave rectifiers, it isn't enough and they are bad design. 4-diode rectification cannot be used when we want to have a combined 5V/12V output (or any other two voltages) with a simple transformer, because it can't provide a common ground for two different circuits. (A more complicated real example: I have got a power supply with four output wires from transformer -7/0/+7/+18 Volt. Then it uses 2-diode rectification to get full wave 7V output, and 1-diode rectification to get half wave 18V output. The 18V line can't be "upgraded" to 4-diode rectification here.) AI: Either can work correctly if designed properly. If you have a dumb rectifier supply feeding a 7805, then all the rectifier part needs to do is guarantee the minimum input voltage to the 7805 is met. The problem is that such a power supply only charges up the input cap at the line cycle peaks, then the 7805 will drain it between the peaks. This means the cap needs to be big enough to still supply the minimum 7805 input voltage at the worst case current drain for the maximum time between the peaks. The advantage of a full wave rectifier is that both the positive and negative peaks are used. This means the cap is charged up twice as often. Since the maximum time since the last peak is less, the cap can be less to support the same maximum current draw. The downside of a full wave rectifier is that it takes 4 diodes instead of 1, and one more diode drop of voltage is lost. Diodes are cheap and small, so most of the time a full wave rectifier makes more sense. Another way to make a full wave rectifier is with a center tapped transformer secondary. The center is connected to ground and there is one diode from each end to the raw positive supply. This full wave rectifies with only one diode drop in the path, but requires a heavier and more expensive transformer. A advantage of a half wave rectifier is that one side of the AC input can be directly connected to the same ground as the DC output. That doesn't matter when the AC input is a transformer secondary, but it can be a issue if the AC is already ground-referenced.
H: How to measure the capacity of the battery Instantly? How to measure the capacity of various types of batteries instantly? What kind of measuring device should I use to do so? AI: It is not possible to measure or guess the capacity of a battery with a single set of instantaneous measurements, like voltage, current, and temperature. At best you can tell how much current is going into or out of the battery a what voltage. However, there is no way to infer capacity from that. If you can control the load, you can get some idea of the internal resistance, but even that would take at least two measurements separated in time and therefore can not be done instantly. And, battery voltage and internal resistance does not tell you capacity.
H: wifi module with MCU on one board I would like a microcontroller already interfaced to a WiFi module, with the WiFi interface taken care of. Also, I want to be able to program the MCU to interface sensors or whatever...possibly with the outputs broken out for ease of connecting. Almost like a development board, but small and cheap enough to interface a few sensors or such and send over wifi. These guys are close Roving Networks, but the interface to the MCU is very limited. I know wifi is overkill for sensor data, but it is also ubiquitous. I guess what I am saying is that I hate laying out boards. I have done some serious google searching and haven't found anything. Anybody using anything like this? Update: The ESP8266 is probably the answer to this question AI: It could be cheaper to sacrifice the ubiquity of the WLAN protocol (that maybe it's not so necessary) and switch to other 2.4 GHz protocol, such as 802.15.4 (Physical and MAC protocol, low level) or things such as Bluetooth or (better) ZigBee. You could still easily interface the network with your computer using a USB dongle, and you gain in range, power consumed and you find also readymade modules, such as Jennic, that has also a built-in PCB antenna.
H: what does byte 2 and byte 3 mean? An instruction from the instruction set of intel 8085 that is SBI data (Subtract immediate with borrow) . This instruction says "The contents of the second byte of the instruction and the contents of the CY flag are both subtracted from the accumulator. The result is placed in the accumulator." Or (A) <-- (A) -(byte 2) - (CY) In this what does second byte or byte mean ? Also in the instruction STA addr (Store immediate address) which says "The content of the accumulator is moved to the memory location whose address is specified in byte 2 and byte 3 of the instruction." What does byte 2 and byte 3 mean ? AI: Instructions are made up of a variable number of "words" and those words are made up of bits. In the case of the 8085 architecture, you can have instructions that are one, two, or three words long, and each word is 8-bits. Those bits are divided up into fields based on your instruction set. What fields there are and what those fields mean is usually contextually sensitive based on the value of one field that always has the same meaning. Typically this field is referred to as the "op code." You should read in detail at least chapter 8 of the linked pdf to get a thorough understanding. In the case of instructions that operate on registers and store their results in a register, the source and target registers need to be identified in some fields in the instruction. In the case of an instruction that adds a constant to a register and stores the result in a register, the registers still need to be identified, but the constant also needs to be encoded in the instruction in its own field. In instruction set architectures, the term "immediate" is often used to mean a "constant value." In case of instructions that read from or write to memory, the location in memory may have to be encoded within the instruction. That's the basic idea, hope this helps. For future reference, a good search term for questions like this is "Instruction Set Architecture" for your processor. Edit Re: STA 4200 The STA instruction is described on page 3-61 (pg 117) of this Assembly Language Programming guide for 8080/8085 processors.The three bytes are: Byte 1 = OpCode (00110010) Byte 2 = Low Address Byte Byte 3 = High Address Byte STA is the "Store Accumulator Direct" instruction, and what it does is copies the value of the Accumulator into memory at the 16-bit address composed from Bytes 2 and 3.
H: Why do batteries recover after a load is removed? I carry a small 2-AA flashlight, and a few times, I have accidentally left it on in my holder. Each time it dies completely, so that no light is emitted, but if I turn it back off and wait for a few minutes, the light works weakly again. The longer I leave it off, the longer the dead battery lasts. I've noticed similar patterns in my mobile phone battery. Why does this happen? AI: The actual process is dependent on the type of battery we are talking about. In a lead acid battery, The cell voltage will rise somewhat every time the discharge is stopped. This is due to the diffusion of the acid from the main body of electrolyte into the plates, resulting in an increased concentration in the plates. If the discharge has been continuous, especially if at a high rate, this rise in voltage will bring the cell up to its normal voltage very quickly on account of the more rapid diffusion of acid which will then take place. from here. In general, you can think of it as a normalizing of the chemicals involved. There isn't any more "life" in the battery, the life remaining is just in the correct place to give you a little use. Also, read this answer for basic battery info
H: Noise reduction strategies in electrophysiology When recording electrical signals from cells (in a dish or inside a living human or animal body), one major problem is to increase the signal to noise ratio. These signals are usually in the 10uV to 100mV range and are generated by very low power sources that can yield currents in the order of nanoAmps. Often signals of interest fall within 1Hz-10KHz range (most often 10Hz-10KHz). To make the matters worse usually there are lots of noise generating tools that are necessary to be around (in the clinic these are other monitoring, diagnostic and therapeutic devices in the lab these are other monitoring, scientific devices). To reduce the impact of noise and increase the signal to noise ratio, there are a few generally applied rules like: If possible use a current amplifier (often called head-stage), an amplifier with very high input impedance and rather low voltage amplification or even no voltage amplification. very near to the signal source (body). To connect the source (recording electrodes) to the first stage amplifier (head-stage) use wires that don't have shields (to avoid capacitative distortions of the signal). Avoid ground loops When possible use differential amplifiers (to cancel the induction noise from the electromagnetic sources around). Always use Faraday cages and grounded shields (usually Aluminium foils) to cover the signal source and anything connected to it (body, equipment ...). You can't do this without proper filters (usually a 10KHz high cut and a low cut that depending on the signal may be anywhere from 1Hz to 300Hz ) If you can't get ride of the mains noise (50Hz or 60Hz in different countries) and only if your signal covers that range you can use active filters like Humbug http://www.autom8.com/hum_bug.html My question is: Are there any other suggestions that I missed? Is any of these suggestions flowed or wrong? Usually people in this fields (like me) do not have formal education in electrical engineering and sometimes there are myths passing from a teacher to student generation after generation without proper evidence. This is an attempt to correct this. EDIT: if possible use batteries or very well regulated power supplies in all your devices, including any pumps, microdrives, monitoring devices, even you can put filters on the mains of your computers (although this usually is not a serious issue). AI: Driven shield It is possible to use shielded wires between the electrodes and the pre-amp without a lot of influence from the shield's added parasitic capacitance (your 2nd dot). The signal itself won't be hurt much because it is very small compared to the common-mode component. To understand this, imagine a tiny differential signal on top of a much, much larger common-mode signal (mostly caused by 50 Hz or 60 Hz mains voltage) and a DC-to-low-frequency component caused by the interaction of the tissue with the electrodes and the body itself. As far as I understand the issue, the interference coupled onto the signal via the cable's capacitance is much worse than having the signal itself fed through the cable capacity. The trick is to actively drive the cable's shield with the common-mode part of the signal instead of connecting the shield to the pre-amp's ground. Some years ago, I've built such pre-amp with an active guard and was able to use shielded wires as long as 2 m between the electrodes and the first stage of the amp. The schematics can be found in this thesis (not mine, but conveniently includes the most interesting schematics of my EMG amp). Please see fig. 8.7, 8.8 and 8.9 and all the stuff around them in chapter 8. Fig. 8.12 discusses how interference is capacitively coupled onto the signal of interest. Sorry, the thesis is in German, but I hope the images and schematics are international. A good place to pick up the common mode signal is the "middle" of the gain setting resistor of the initial InAmp (again, see the thesis linked above). Driven right leg The right leg is used as a reference to measure signal on left leg, left arm and right arm. The concept of a driven shield can be extended to actively drive the patient, and the connection is made at the location used as a reference for the signals to be measunred, which is the right leg. This is known as a driven right leg (DRL); there's a good discussion about DRL amps in this article by EDN. If your measurements are not taken from a human body but from some cells in a dish, you can probably put the DRL electrode onto the bottom or into the jelly / growth medium, close to where your reference electrode sits. This way, you use the same strategy as you would in the sense of a DRL setup. Notch filter Also, If the hum is really bad, you can put a notch filter at 50 Hz or 60 Hz into the signal path, but this will also hurt the signal of interest. Very important safety note: The electrodes must not have any direct galvanic connection to protective earth (PE). This is necessary because once the patient gets connected to a potentially lethal voltage by a fault in another device around the lab, the fault current will have a very good path through the patient and via the electrodes to ground. When talking about a ground reference around the electrodes or the pre-amp, be sure to make this a ground referenced to the pre-amp only and not to the real ground usually known as PE! This usually requires an isolation amp somewhere around or just past the pre-amp, or a digital isolator if you wish to have the ADC close to the pre-amp. More about this in DIN EN 60601-1 and other relevant standards.
H: Multiple devices on a CAN bus via the OBDII diagnostic connector in car We have an aftermarket cruise control installed (in Suzuki Swift), which is connected to the OBD-II connector to access the CAN bus (according to the installation manual, it uses just CAN-L and CAN-H pins from the connector). Now I have bought an OBD-II Bluetooth module. Could it be used at the same time as the cruise control? If I understand the Wikipedia page on CAN bus properly, devices are connected to the bus parallel and terminator resistors are only at the two ends of the bus line. So it should be possible to have both devices connected to the OBDII connector... About using the devices at the same time, I think that would depend on which ID the cruise control is assigned to (so that it would always get priority above the Bluetooth module). To summarize the questions: 1) Is it possible (and safe) to have both these devices connected to the OBD-II connector at the same time? 2) Is it possible to use them at the same time? Is it common for the diagnostic devices (like the ELM327) to have the lowest ID on the CAN bus to not interfere with other devices on the bus? AI: I think this will be safe. My reasoning is this: - the vendor of the cruise control hopefully made sure not to interfere with the OBD-IDs (AFAIK 0x7DF and 0x7E8, both fairly high ids for an 11-bit identifier). - the bluetooth module will (hopefully) only use OBD-ids. If you don't trust the vendors of both devices, you should not connect them to your vehicle even only one at a time. CAN is a very robust protocol, the worst case scenario would be for the bus flooded with collisions for a short period of time until one of the devices involved would stop sending messages. I'm not sure what exactly would happen in this case, but I'm positive that uncontrollable acceleration will not happen: Manufacturers are aware that a failure of the CAN bus can happen any time (just think of a short between both lines).
H: Can I use Arduino Software and IDE for development on Freeduino Atmega 328 Can I use Arduino Software and IDE for development on Freeduino Atmega 328? AI: If the "Freeduino" (no idea what that is) uses the Arduino bootloader and is connected via some form of UART interface to the same UART pins as the Arduino, then yes, you can. The Arduino UNO uses the Atmel 328P chip as well, so you could use that. The only possible issue might be with the oscillator configuration - if this Freeduino thing uses the same oscillator arrangement as the UNO then you will have no problems.
H: How do network devices detect whether an ethernet cable is connected? I have a bit of kit with an FPGA on it which includes an ethernet adapter. I'm trying to diagnose why it's not working and while I do that I've noticed that with an ethernet cable connected to my laptop, I see the network coming up and then dropping out again. How does the hardware detect that the cable is plugged in? Is it watching for a clock sig AI: Point to point ethernet (not the old bus types) send link pulses to let the other end know something is connected. These are generated and detected in the phy layer. Ethernet interfaces often have a "link" LED near the connector. These are driven by the phy hardware when it detects link pulses from the other end.
H: Want my PCB design to work right the first time! Just finished a design of a 8-Layer PCB, the highest frequency is 125MHz. I want this design to work right the first time, how should I revise the design and what should I take care of? Something like a checklist will be much appreciated :) Edit #1 : 6 Mar 2012 : Board Received & Tested I Received the PCB and finished testing it. It's working very good, yes it "Electrically"worked right the first time :D .. But, found 2 Mechanical problems that will be solved in Rev 2.0. Thanks all :) AI: No, your proposed ground setup is not a good idea. The analog and digital grounds should be connected solidly, but in exactly one place. Splitting the supply with a small chip inductor can be a good idea, with of course solid decoupling and bypassing to the local ground on each side. As for a board design checklist, there is no such thing except for the purely procedural matters that anyone can follow. There is not checklist for a good design. This is where the skill, knowledge, and experience of the engineer makes the difference. I definitely agree with Photon and others in that you should get a design review. We do that routinely here. Anyone can miss something. Circuit design is in large part about thinking of all the contingencies and all the little things that will happen that the circuit has to be able to handle. For example, I recently did a small 2 layer 3x3 inch test board for a customer I have worked for on other projects. Before sending the board out, I gave the schematic to the customer (who is a scientist but knows a good deal about electronics) for review. He remarked how I had "thought of everything" and pointed out a few things he hadn't considered. But then he also noticed one place I should have included a diode, and he was right. Even on a small board it's possible to overlook something. You really need a second pair of eyes looking it over. By the way, this board is now working fine. So far one issue has been found due to the thing this board connects to not doing quite what we all expected it to do. Fortunately a firmware update and a simple bit of rework deals with the issue well enough. This is a 10-off test unit, so we're just going to manually rework the existing boards. If more are ever made, I'll make a new version of the board with a few minor things changed. The point of all this is that you need to plan on the first version of the board not being perfect. Sometimes it's not a design oversight but a misunderstanding of the requirements. This stuff happens, so expect it. Something will be wrong with the first version. If the engineer did a good job, then it will be relatively painless to manually fix on the prototypes and the fix can be incorporated the right way in the next version. A circuit complex enough to require a 8 layer board isn't going to be perfect the second time either. Something will need to change from the second version. More often than not this is not a issue with the circuit design but a change in external requirements. Marketing will insist on one more feature. The mechanical guys finally got some prototypes and realized a mounting hole needs to be moved and that there is no place for the cable coming off the connector without a expensive change to a mold, so you have to change the board and move the connector. Stuff happens, even with competent design all around. You can't change that. Just like there is good and bad engineering, there is also good and bad project management. Good project management recognizes the above and plans and budgets accordingly. Bad project management thinks it will be perfect the first or second spin, then gets blindsided and goes into a panic when the inevitable happens. The budget gets blown, upper management gets upset because things are behind (the unrealistic) schedule, and people look for short term fixes a the expense of long term viability. Sometimes upper management understands what is going on and corrects things, like sidelining or outright replacine the immediate project manager. However, in my experience upper management just gets dissollusioned with the whole project, figures it's a mess and will never work, and cuts their losses by cancelling the whole thing. Sometimes the company really needs this project to succeed, but now upper management keeps it on such a tight leash that everything becomes less efficient and takes longer to do, and the immediately cheaper path is always chosen. Sometimes they get away with that, more often the whole thing fails and the small company goes with it. Yes, I've personally seen all the various scenarios I described above. So the moral of the story is, plan properly from the start. Asking how to make sure the board is right the first time is missing the point and is heading for trouble.
H: Should I use slow fuse or fast fuse? When I design something or going to add a fuse to place where fuse isn't used now, should I prefer slow or fast fuse? I understand that this depends on situation, but I'd like to hear what do you prefer if there are no special circumstances. To be more specific, I am going to use a 20x5mm 250 Volt glass fuse. I know how much current the circuit takes, so it is not problem to choose a fuse with the right current I need. But should I take slow, or fast? If I understand it correctly, the slow fuse is more tolerant to shocks during power-on of the device. For example today I think of a fluorescent lamp ballast in my kitchen which is a weird chinese unfused circuit and fuse addition seems to a be good idea. Since there can be a higher current moment during start of fluorescent lamps, a slow fuse possibly allows me to use a lower Amp one. On the other hand, if I use a fast fuse, I can safely use a higher Amp one and still it will react sooner in the case of short circuit. A higher Amp fuse also has much smaller resistance. So for example I personally would prefer 1 or 2 Amp fast fuse instead of .150 Amp slow fuse for that kitchen lamp. Is this a good idea, do you agree with me? (The kitchen lamp is a real example, but it's just an example. I'd prefer to know if you prefer slow or fast fuses. I mean classic replaceable 20x5mm glass fuses / 250 Volt.) AI: Note the very very (lfe savingly) important aspect of HRC = "High rupture capacity" fuses, discussed at the end. You have done a fairly good job of summarising both the reasons and the dilemmas involved. Fast blow are used where possible, where the fuse can be sized such that typical faults will always cause it to blow but nuisance blowing is rare. Suh situations have little or no startup surges or large occasional current excursions. Slow blow are used where large short term transients are known to occur and if sizing of the fuse to accommodate the transients will result in inadequate protectionm against typical faults. Where neither fast or slow blow fuses offer adequate protection (transients are very high but faults may be relatively low compared to maximum usual) then a cicuit breaker can be used, whose characteristics can be mapped accurately to a desired time/current profile. Fast blow is the "more ideal" where possible. Circuit current is well defined within known limits, Start up transients are not so large compared to typical current that allowing for them is going to cause problems. Fault currents are liable to be much much larger normal operate current and much larger than expected transients. Slow blow is a compromise that allows protection while accommodating expected transient behaviour. Startup or other transients may occur which cause much higher than average currents but for short periods. Sizing a fast-blow fuse to allow the transients would result in a fuse which may not provide protection during some expected fault conditions. The ideal may be both a fast and slow blow fuse in series (very unusual and possibly also illegal for regulatory reasons) or a circuit breaker with a well defined current versus time "envelope". Regulatory requirements often make it clear which sort of fuse must be used. ________________________- HRC / High Rupture capacity. ** The life saver!!!** In some situations fault conditions can develop which can result in fault currents vastly in excess of the normal operating current and so high that massive destruction to property or loss of life may occur. An excellent example is a multimeter intended or measuring AC mains voltages of 230 VAC or higher. A meter measuring nominal 230 VAC mains voltages may easily be exposed to over 330 VDC peak, and transients on the waveform may cause much higher voltages to occur. A domestic range/stove/oven may be supplied with two phases with phase to phase voltages of 400 VAC or approaching 600 VDC peak to peak. In either case above, if these voltages break down circuitry in the meter, an arc may occur followed rapidly by carbonisation of components, PCB, nearby case etc and a relatively low resistance across mains short may occur. The mains may then be supplying a high energy load vastly in excess of what is expected or designed - at least kilowatts with ease and tens of kilowatts in some cases. The onset of arc formation and generation of heat can be so rapid as to cause an explosion of th equipment with debris being ejected violently and with electric shock hazard also increasing. Standing in the gap to this happening is "the fuse". Edit: Actually, the fuses in multimeters are used to protect the current measuring circuitry. The voltage measurement stuff is protected by MOVS and PTCs. If the fuse is able to blow and stay functionally blown when such a fault occurs the meter etc 'just stops working". if the fuse holder arcs and the PCB carbonises or the fuse otherwise fails to interrupt current, then the above scenario can occur. And does. People have died due to this scenario and will die in future An answer is the use of an HRC fuse which is designed to "rupture" in suh a way that a damaging arc does not form and the circuit is cleanly broken. HRC fuses are usually ceramic bodied, usually white. Not all white or ceramic fuses are HRC. Not all HRC fuses are white or ceramic. Image below shows fuses said by makers to be HRC. note that one is glass bodied. ( From here.) Many HRC fuse images and links here. Test equipment intended for AC mains use will usually specify HRC fuses. DO NOT SUBSTITUTE inferior types. I have only ever had one meter fail under high voltage high energy conditions. That was on a 1000 VDC range with a 1200 ior so VDC transmitting power supply being measured. Very impressive. A good lesson. Long long ago. Cheap multimeters often have their high end ACV ranges marked "not for mains use" or similar. That's why. If you use them on mains you usually won't die. But if you do, you won't be able to say that you weren't warned. Remember that before you can't !!!
H: Is Wifi With Arduino Fast Enough to Control a Vehicle? I'm building a simple motorized vehicle that I wish to make autonomous through the use of neural networks. I am using Arduino as I am new to electronics but more experienced in programming. I'm sure there are much more powerful microcontrollers out there, but for my purposes (and funds) an Arduino Mega 2560 is what I would prefer to use (and I already have one). Now I suspect that the Mega, even though it is far more capable than an Uno or similarly small Arduino boards, is not capable of running a neural network that take inputs from a decently numbered array of sensors and generates several outputs (maybe 5?). My idea, then, is to run the neural network on my phone if it is fast enough, or my desktop computer if not. Either way, I figured the best way to transmit the input and output data back and forth between the external processing unit (phone/desktop) and the Arduino will be WiFi. I saw a YouTube video of someone controlling an RC car with an android app they created, transmitting data through WiFi, and while a bit laggy for RC purposes, it seemed to be within 1 second of latency. Does anyone know if WiFi would be fast/reliable enough to control a little autonomous vehicle? Assume that it will be traveling about the pace of an adult human walking, and reacting to its surroundings based on sonar sweeping. (Latency of data transmission will be important because the sonar data will have to be processed by the computer, but ideally the robot will keep moving without slowing down or stopping to wait for the data.) AI: Yes, this IS possible. There are even people who control their Quadrocopters with WiFi, but the latency really is a problem. this thing is a commercial product and they let the user control it with wifi, but they have a huge load on algorithms on board to make it controllable. in your application I would never use WiFi but 433MHz/868MHz you can buy modules for around 5€ - called RFM12 (from hoperf). there is a huge load of librarys for these in the internet. Small tip: don't do all the processing on the one big host, the delay takes longer than the processing on board.
H: Soldering heatsink pad on bottom of IC I am attempting to make a board for the tlc5951 24-channel led driver to drive an 8x8 rgb led array. I have made what I think is a good eagle library for the sop-38 package, but I am not sure what to do about the pad on the underside of the ic. The datasheet has thermal characteristics with and without the pad soldered, but I suspect I will want the heat dissipation provided by the pad. This is my most ambitious soldering project yet, and I have a few questions I would like to straighten out before I have the first round of boards made. Should I hook the heatsink to my ground polygon on the bottom side, or leave it disconnected? I'm not sure if it will cause problems with grounding if it heats up too much. Is my only option to reflow this, or is there a way to do it by hand? I have never done any reflow soldering, and I am much more comfortable hand soldering. I am definitely not comfortable having a stencil made to do this kind of thing. Is there any kind of thermal compound or something that can make a thermal connection comparable to a solder joint, or is solder best? The datasheet has very specific dimensions for pad size, via patterns, and stencil opening. Should my solder mask pretty much follow the stencil opening outline on the datasheet? AI: What I do for prototype boards that I'm soldering by hand is to put a large hole in the pad and feed solder into it with the soldering iron. 2 mm works well. Solder the other pins first, so that the chip is fixed in position. The flux in the solder will be sufficient. Number of holes depends on the size of the pad. One is usually sufficient. You need a good soldering iron with plenty of heat, I use a Metcal.
H: Will a 0402 0.01 µF ceramic capacitor next to a 0402 0.1 µF ceramic capacitor have any power decoupling benefits? I always understood that the point of using smaller capacitors in parallel was to provide low impedance at higher frequencies than the bigger capacitors, because the higher capacitance capacitors 'usually' had larger packages, so the parasitic inductance negated their capacitance from a certain frequency and up. However, if both caps have the same packaging (0402 in this case), is there any benefit at all? AI: This is a bit of a controversial subject. Some people seem to feel that a capacitor beyond resonance has no benefit for bypassing. Others point out that even past resonance the part is basically just a very small inductor short-circuited to ground and it still has fairly low impedance. This plot from Murata shows the (magnitude of the) impedance vs. frequency for three different capacitor values in the same package (0402): This shows that after a high value part (like 0.1 uF) passes resonance, a lower-value part (like 0.01 uF) just barely achieve a lower impedance before it too hits resonance and its behavior becomes dominated by its inductive parasitic, which is basically the same as in the high-value part. That said, as others have pointed out, the more capacitors you can put in parallel, the more you reduce the series resistance and inductance of the ensemble of parts; so adding more parts is going to help at least a little bit. Edit: I should also point out that if you start considering larger values in larger pacakges, say 1 uF in 0805 and 10 uF in an electrolytic A-size package, you can definitely improve the impedance at lower frequencies (below 10 MHz).
H: Is it possible to mod a class 2 bluetooth device to work as a class 1 device? I have two Microcontrollers which communicate over a bluetooth link (serial link, like RN-42). So far so good. Unfortunately the device is listed as a class 2 device and I noticed that the distance is indeed very limited. Acoordingly I was wondering if it is somehow possible to mod the chip to act as a class 1 device. Is it enough to connect the chip to a better antenna? or do I need active amplification. In case I need active amplification I would appreciate if someone could point me to some tutorial, which help me getting started. Many thanks. AI: You need a PA (power Amp) before that Antenna. Not an easy hack but possible, it will be illegal though. (you need to get a new FCC license for it) If you have an SMA connector, you can build a tiny board with a PA and give it a shot. PA2423 is an example of such power amplifier. The best way, replace the whole module with a class 1 module, probably some software work is needed but will be easier, cleaner and potentially faster.
H: What do the PCB markings mean? On a printed circuit board, I see lots of tiny letters and numbers. Is there some kind of standard that dictates what letter indicates what type of component? AI: The technical term for the markings is "reference designators" (aka "refdes") and there are a few standards can define them. Take a look at this wikipedia page for a quick overview. http://en.wikipedia.org/wiki/Electronic_symbol http://blogs.mentor.com/tom-hausherr/blog/tag/reference-designator/ For schematic components, most EDA tools start off with one or few alphabets and then a sequential number. For example, R1 for the first resistor, C1 for the first capacitor, IC1 for the first IC and so on. You can download a free EDA tool such as Eagle to play around. Also, see the wikipedia page for a few more examples. For PCB footprints, different vendors do make naming convention suggestions. See Altium's suggestions here, for example. Edit: I do NOT know anyone personally that refers to this as a strict standard or a standard at all. It's mostly what you are used to and familiar with.
H: Sequence detection in sequencial logic I Have a simple question. I have a circuit that become 1 when it recognize a sequence 1, 2, 3 in a certain register. And it works great. But the second part of the problem asks that the output of the circuit remains to 1 until in the register comes 000 sequence. How can I do this with flip-flops etc.? AI: You have a register. Connect its output to two comparators - one that outputs 1 when your register matches the "target" pattern and one that outputs 1 when your register matches the "all zeroes" pattern (i.e. an OR-tree followed by an inverter, e.g. implemented with alternating NAND and NOR gate planes). Lets set up a truth table based on "previous output" (that is a flopped version of your output), and the output of your two comparators. Previous Output Pattern Compare Zero Compare Next Output 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0 You should be able to synthesize the logic that drives your output flip-flop from that table, but my take is it's a multiplexer selected by the Previous Output. When the previous output is 0, choose the Pattern Compare output. When the previous output is 1, choose the Inverse of the Zero Compare output.
H: Using the audio input port as a voltmeter I'm a physics undergraduate currently studying electromagnetism. I have no experience at all with playing with electronics. I'm trying to see the effect of a changing magnetic field on a closed circuit (the Faraday-Lenz law) Now, I have collected some old wires, a male-male audio cable, and some magnets taken from a toy for children. I am also using my MacBook Pro (mid-2009). What I built a rudimentary coil, connected the two ends to two of the pins of the audio cable, and connected the cable to the computer via the audio input port. I expected to be able to see some audio input when I would pass the magnet through the coil. What really happens, in the best case is just nothing, there is no audio input, even when I make the magnet pass inside the coil. However, when I connect just one side of the coil (which in fact is a long wire) to one of the pins of the audio jack (without connecting the other side), the computer records continuously a fuzz. The first question is why does it happen? I can understand that, given that the two pins are not connected, a potential difference between them is detected, but this happens even the two pins were connected before disconnecting one of them. Why does a potential difference instaurate? Moreover, I suppose that my experiment is a failure because I'm trying to detect potential differences which are orders of magnitude lower that what I can detect. I have really no experience in the field, so I'd like to ask you: what are the voltages of a typical audio input? For my computer Apple says nothing.. and if they are much larger than those produced with my coil, how can a small microphone produce them? How come that even when I use my headphone as a microphone it works, but my system does not what is the typical value (in Teslas) of the magnetic field produced by a simple toy magnet? I'm attaching a picture of the "apparatus", so you can see yourselves what I'm speaking about Thank you very much for any response AI: Audio inputs are normally AC coupled (there is usually a series capacitor to block any DC component in the input). Typically this means you won't see much below about 20 Hz and you certainly won't be able to measure DC or slowly varying signals. As for sensitivity, typical "live level" inputs expect a signal of 775 mV RMS which corresponds to 0 dBV. Microphone inputs are usually more sensitive than this, but there is no "standard" sensitivity and the input hardware often has some kind of controllable gain stage prior to the A-D converter.
H: Will "hot plate" reflow soldering work without a solder resist coating? With a successful through-hole design under my belt I am now ready to try fabricating a board that uses surface-mount components. I have been reading about this, and have gathered that the DIY crowd has gotten reasonable results with "hot plate" reflow soldering. I think I understand the basics of this technique, but one point on which I am still unclear is the necessity of a solder resist coating. Is reflow possible without it? I have seen a kit from LPKF for adding a solder resist coating to a prototype board, but do I really need it? AI: In general, reflow soldering would work w/o solder resist. You might get a higher incidence of solder bridges without solder resist (solder mask) than with it. Among other things, the incidence of solder bridges depends on the pitch (spacing) between the pins of the ICs you’re using. Fine pitch pins are easier to bridge. For example, you’d get more solder bridges on SSOP packages with 0.025” pitch than on SOIC packages with 0.050” spacing. What IC packages do you have on your board?
H: Can a trace connect to a pad on the top layer? I'm making my first two layer PCB and have am unsure of whether it's ok to connect a trace to a pad on the top layer (if the pad is on the bottom layer, that is). Here's a picture to show what I'm talking about: Is the method shown on the right allowed? AI: Yes, that is fine. As long as its a plated through-hole (PTH), copper touches both top and bottom layers. Obviously, if that is a surface mount pad you can only connect it to the same side as the pad itself.
H: Why is 1000Base-T RJ-45 pinout scrambled instead of having each diff. pair in sequence ? I need to make an ethernet connection using a cable about 6 feet long to a small and low power gigE camera. Other signals are required (power to camera and hard trigger) and one cable is better than two for practical reasons, so I'm not going to use an RJ-45, and plan on using a multipin circular Hirose (uncharted territories here). I noticed however that in the RJ45 one of the pairs is 'inside' another pair in the pinout, but I would have imagined that each pair would simply be next to each other. I don't know why this is not the case, and if the reason behind this may help me in choosing the right pinout for the circular Hirose. AI: If you step back to the telephone days where RJ-11 was used, the center pair was used for 1 line, then you would step your way out (one side of the pair on each side of the existing line) for each additional phone line. This made things very nice for compatibility between like a 2 pin cord plugged into a 4 pin socket. RJ-61 is similar to RJ-45 except that the pinout follows the same pattern that was used in RJ-11. The problem with this method is for high speed systems the outer set of pins are too far away from each other for proper noise rejection like you would hope for with twisted pair. Thus, the advent of RJ-45. Keeps some of the standards set in RJ-11, but also allows for higher speed data. For what matters most to you will be the signals you are passing and the compatibility you would like to keep with stock cables. What I mean by this is that you can wire the connector however you want, but if down the road someone will try to use a stock Ethernet cable, or an extender cable, or something like that, the pin orientation might make a different if you are relying on the twisted pairs to reject noise.
H: How do I build a switch to automatically control my shop-vac? I'm starting to get into woodworking and I've run across some high-end dust collectors and shop vacuums that turn on automatically a second after the tool plugged into them (such as a table saw) is turned on. When the tool is turned off, the vacuum stays on for a few seconds longer, then shuts off automatically. There are also aftermarket switches like the iVac that do the same thing. It seems like I would need a normally-open 120V relay to turn on the the shop vac, but how do I delay turning on the vacuum, then make it stay on for a few seconds longer after I turn off the tool? AI: Electrically it's easy. But, doing it for less that the $45 iVac would be hard. Cost your labour at $0.10/hour and no problem. Parts cost of electronics is modest. Here is a word picture of how you might do it. I won't add a circuit diagram as I don't really think this is advisable given what is available. This operates at say about 12 VDC. Whole thing could be done at mains voltage. Usues relays. Could be wholly sold state. Mains to 10 VAC or so transformer. Supplied from saw power feed. Rectify 10 VAC to DC and regulate to say 12V DC. Provide "mains on" signal for one diode connected to 10 VAC upstream of main rectifier. When 12 VAC appears a capacitor is charged via a diode and a resistor R1from "mains-on". Charge time ~~= R1 x C. When "mains-on" disappears the capacitor is discharged via a second diode and a second resistor R2. Charge time ~~= R2 x C. Adjust R1 and R2 to suit desired times. Drive a MOSFET gate from capacitor so it is turned on ~R1C after mains-on and off R2C after mainson disappears. Operate relay for vacuum from MOSFET. relay is 12 VDC and 12 VDC supply must hold up long enough to keep relay held in for vacuum to post operate. There are other ways. QED
H: Are my theoretical power consumptions of this avr correct? After being inspired by a simple ATMEGA 168 based darkness alarm that has a theoretical life span of 3 years on batteries utilising sleep mode, I had decided to make something similar of my own (a wakeup alarm, using the oscillator for roughly okay precision rather than light) My confusion is in the way the battery life is calculated (see the "Battery live time calculation" section) so I had decided to do my own calculating. The AVR apparently at 1.8V in power down mode consumes 0.1µA. In active mode, 250µA assuming a 1MHz external oscillator (datasheet here). Now a few (ideal maybe) AA batteries would have 1200 mAh, so 1200 / 0.001 / 24 / 365 = ~137 years standby life time 1200 / 0.250 / 24 / 365 = ~0.5 years active life time Assuming my piezo buzzer + 10k series resistor for it takes 5 mA total, I could maybe average the current usage by hour 5mA * 10 (second alarm)? / 6 (intervals of 10) / 60 (in to hours) = ~0.138mAh 0.250mA (active current) * 10 / 6 / 60 = ~0.00694 mAh End result being (ignoring that active power draw overlaps powered down status).. 1200 / (0.001 + 0.138 + 0.00694) / 24 / 365 = 0.9 years Can you suggest major flaws in this? What would be a method to calculate all this current draw over time especially when batteries use mAh rather than Wh, and the data sheet only specifies "xx uA @ 1.8v" (and not ~4.5V I am using). Is there a simpler way to calculate power consumption when things only draw energy at certain periods (rather than my "average per hour" calculation) I've done? I seem to have hit a wall at the theory side of the personal project. It just interests me how long it can run if I design it as simple as possible. AI: You are very close. The average power is a very accurate way to do this given that you are not pulling such a high current that the effective capacity of the battery fluctuates. Batteries, Batteries, and More Batteries There is one very important term, and that is the self discharge rate of the battery. This is dependent on chemistry, but lets say you get a nickel-metal hydride. The self discharge rate is "20% or more in first 24 hours, plus 4% per day thereafter" if it is not a low self discharge rate NiMH, which still discharges around 25 or so % a year. Lithium batteries have some of the best characteristics for self discharge rate and my experience supports this fact. I think battery university has a great site to discuss many different battery characteristics and I often point people there to learn about batteries when they are starting to work with them. If you want to compare battery discharge rates they have an entire article discussing the phenomena. This is a bit around the point, but I always try to make this point, when you measure battery voltage you need to have it under load. This varies with chemistry, but it is paramount in lithiums. I had a coworker placing bad coin cells in our devices and using them because the coin cells showed almost full voltage with no load. Under a load of any amount(10kohm aprox .2mA) they were flat dead. Your Microcontroller and You As you are dealing with using the manufacturer sheet on leakage current there are also many different issues you will have to deal with to keep to those specs that are probably also work thinking about. The biggest I have seen is a floating input. Many engineers will leave unused pins as inputs thinking, "Hey, what harm can this do?" Quite a bit if you are talking microamps. A floating input will have its transistors changing state constantly and the fluctuations cause a power draw difference. We once had a reduced lifetime in a product because we had an error that left 2 pins floating causing our standby current to more then double on our MSP430. You need to drive all of your pins to output and let them hold a state. It is easy to miss when doing these calculations things like wakeup time. I seem to remember our MSP430 had a non-negligible wakeup time if you were doing it very often. It also had a larger power pulse for just a moment as it came online. Our little homespun RTOS had to try to take this into account and if the shutdown was less then X milliseconds we skipped it with NOPs and saved some power. If you are looking at a very long life product, you are going to need conformal coating. The oils in your skin are not an issue immediately, but with time they form a lightly conductive material on your board. Conformal coating protects your board from this little current sucking side affect. Read any app notes they have about low power operation, it probably covers issues like the pins need to be held as output and many other important and useful facts. Last but not least, Dont let yourself get relaxed just because you have read the app notes and everything seems okay after a week of running your product, you have to do as clabacchio says, you must measure and make sure. You debug your code normally, this is part of it, you need to find out if you made a mistake that is causing your idle current to be mAs instead of uA or even just if you did what we did and a pin is floating on accident. Make sure you use buffered measurements when you do this, if you have a large leakage on your device taking the data you can make a mountain out of a molehill when testing. Also, never forget about pullups, they are little power hogs if you are not careful.
H: How could I get something to oscillate at 2295 Hz? I am curious on making things oscillate. I would love to do this with one chip, but if there was a chip that oscillated at 2295 Hz, I have no idea where it is. So the question is, how could I use an LC or RLC circuit to oscillate ate 2295 Hz? I have looked at the formulas and looked for calculators and can't see a way to go backwards like I'd like easily. Or is there any other circuit that can be used to oscillate at this frequency? AI: You need to tell us what you are trying to do and why. BIG picture. What you ask for is very easy BUT may not be what you really want. The "best" way may be to use a microcontroller with an inbuilt timer / counter unit (or even one without one). If a square wave is wanted then this allows easy rapid and accurate alteration of frequency once established and a single IC solution. Depending on required accuracy and stabiity this could be controlled by a crystal or a ceramic resonator or use an internal oscillator. A very easy way & low cost way is to use any hex Schmitt inverter, or in fact and inverting Schmitt gate configured as an inverter. The IC can be 74C14, 74HC14, 74...14, CD40106, ... t ~= R x C Fosc ~= 1/(R x C) (From here Following all from here Using an op amp RC Phase Shift: or Wien bridge: or Schmitt: or Using 2 transistors or using 1 MOSFET transistor Usually used at higher frequencies. A zillion leads - each image is live.
H: Atmega8 input impedance What is the Atmega8 input impedance. I want to add a push button to an Atmega8 and my configuration would look something like this: A +5V source, resistor, push button not pressed goes to Atmega8, pushed goes to ground. From my understanding Atmega8 is a CMOS and therefor the input impedance would be very large, most likely in the 100MOhm. For a logical high the Amtega8 need 0.6Vcc, my Vcc is 5V, therefore a high will be considered for anything above 3V. Assuming that my assumption of very high input impedance is right, the resistor can be: 3V = 5*100M/(100M+R) ==>R = (500-300)/3 = 66.66MOhm. Would that be the correct theoretical highest resistor value that I can use? **The actual resistor used will be a 47kOhm but I really want to know how to find the maximum theoretical value. AI: Look in the datasheet and find the pin leakage current. CMOS digital inputs are usually specified as having a maximum leakage current as apposed to a minimum resistance. Now look at the minimum guaranteed logic high input voltage at your operating conditions. The supply voltage minus the minimum high voltage tells you the maximum voltage the pullup can drop and the input to still be interpreted as high. That drop voltage divided by the total leakage current is the maximum theoretical allowed pullup resistor. Note that I said "total" leakage current. This is not only the pin input leakage but leakage from all other sources, like other pins of other devices connected to that node, whatever you think the leakage is accross the PC board at the worst case level of dirt and humidity, etc. In practise you can't know all these things. Do all the calculations you want, but I'd want a pullup at least a order of magnitude lower resistance than the maximum theoretical you calculate. When current consumption matters, I usually figure 100 kΩ is the maximum safe and reliable value. When it doesn't, I'll use 10 kΩ unless there is a good reason not to.
H: Which type of 100nF capacitor is best for 78xx regulator output? I use 78L12 or similar voltage regulators in a few power supplies. I use them in their basic setup, see the picture: This diagram is common for all 78xx and 78Lxx regulators. It says that output capacitor should be 100nF. I am able to obtain these 100nF capacitors either ceramic, or tantalum, or film for almost the same price (near to nothing) so I'd like to know which type of capacitor is the best for this particular case. Note: I know that a tantalum cap is recommended for SMPS output, but 78xx isn't switched-mode. AI: There is little point to ever use a tantalum when a ceramic is available for the same cost. Actually, I'd use a 1µF ceramic on the output and a 10µF ceramic on the input. The 7805 will be plenty stable with those, and that will help with transcient response. The reason you see 100nF (let's not use ".1µF" baby talk) a lot is for historical reasons. Back in neolithic times when a caveman first carved a 7805 from a chunk of silicon, that was about the limit of cheap and available ceramic caps.
H: Building an outdoor WiFi connection In Germany the wifi(5470-5725 MHz-Subband 2) maximum output power is 1000mW. I would like to buy a Airmax5 which has 200mW(23dbm) output power. In the Airmax5 there is 13dbi built in directional antenna according the documentation the maximum distance is 20km.I would like to replace the directional antenna with 12dbi omnidirectional antenna or a 16dbi sector antenna. Also on the coaxial cable there is minimum 2-3db. I would like to establish a connection within 2-3km. The 1000mW is the maximum module output power, or with the antenna? How can I calculate weather do I exceed the maximum output power? Is it possible to estimate the maximum distance between two wifi antenna? AI: Things will be a lot easier to calculate if you convert everything to dBm. The conversion is P(dBm) = 10 · log10( P(mW) ) So take you maximum output power of 1000mW and you will get 30dBm. I am no expert on Germany law, but my instinct tells me that max power is after accounting for the antenna gain. The reason my instincts tell me this is that for one, it is how it is most places. And secondly, it makes logical sense. The reason for having power limits is for both limiting the interference to neighbors trying to use the same open frequency as well as for health concerns (you don't want consumer pumping dangerous amounts of RF power into places they shouldn't be). With those reasons in mind, the antenna gain affects both the interference caused to neighbors as well as the amount of energy being directed from the antenna. The technical termonolgy for this is EIRP or Equivalent isotropically radiated power. Essentially it just means, if you have a perfect omni-directional antenna, what would be effective power it would have to output to be the same as the directional antenna you are using. So now going back to what type of antenna you can have. The access point advertises 23dBm radiated power and a 13 dBi antenna (note, the i on the dB stands for isotropic, it relates back to EIRP). What this really means is that the access point is pumping out 23-13=10dBm of power before it gets to the antenna. This means that you have 30-10=20dB of headroom for antenna gain. It is not recommended to go right up to your power ceiling as there are many things that can cause you to go over. The antenna gains and output power from your access points are just estimates (although usually pretty close), but there is no reason to risk legal issues just to get a bit more power. The maximum distance you can transmit for is a little bit of a difficult thing to estimate and would require a lot of work on my part to explain it. In order to get any estimate at all, we have to make a lot of ideal assumptions, but real world can change things a lot. I would recommend using something like this RF Link Budget Calculator to estimate the distance you can travel. Usually the SNR is a bigger factor then the received power itself. Using a directional antenna can help improve your SNR since you wont be picking up noise from all around, but if you get too directional you may actually hurt your SNR if you don't have it aimed directly at your receiver.
H: Cheap, low-power, point to point radio? Possible Duplicate: What's the cheapest way to link a few microcontrollers wirelessly at low speeds over short distances What's a cheap, low-power radio system for doing some point-to-point radio connections? I'm thinking of something like wireless doorbells or light switches, which can operate for long periods of time on a single battery. Full-duplex operation would be nice, but not required; perhaps these could be two different solutions. AI: [edit] nevermind, there are comprehensive posts on the sort-of-duplicate thread Nordic makes an awesome set of chips that have developed a community following. I like in particular the NRF24L01+ 2.4ghz transceiver chips, available in convenient breakout+antennae form for cheap. (3.20USD off ebay, ~20 off of sparkfun and that plugs right into sparkfun's awesome nordic serial inteface board (which is another $20), ~5 to 7 on non-ebay sites iTead, MDFLY, etc. -- the ebay and non-sparkfun are identical boards being mass-manufactured somewhere in China it seems). There's arduino and maple libraries written for them, in addition to the sparkfun code, and diyembedded has tutorials. We've used both sparkfun and mdfly boards with success. For even more plug n play check out jeenode. Not sure how low-power it is. Bare chips run 1.80 on semiconductorstore or 3.50 on sparkfun from quantities of one (SS has more exp. shipping than SFE though, and not sure speed). Nordic also makes SoC versions with a mcu -- haven't played with those yet. If you want to talk to smartphones, nordic also makes cute ULP bluetooth chips nRF8001, but they are bluetooth 4.0 or something and no one in the maker community seems to have used them yet... comparison of nordic offerings: previouswww.nordicsemi .com/index.cfm?obj=menu&act=displayMenu&men=21 and mouser .com/catalog/catalogUSD/644/2773.pdf I also searched for theses. There is a good paper with cost/power/range comparison, but it's from 2009, "A Comparative Review of Wireless Sensor Network Mote Technologies" and doesn't talk about nordic at all, so it may be a bit out of date see also community here wsn .oversigma.com/wiki/index.php Good luck! This area is new to me and I look forward to other people's answers.
H: Circuit for recharging Li-ion Polymer Battery I have a Li-ion Polymer Battery (Apple 616-0550), 3.7V 3.44Wh (~930mAh) salvaged from an iPod Touch 4th. What do I need to know in order to build a recharging circuit for this type of battery? Preferably, from a 5V or 9V power source. AI: What they said Single chip custom IC based. Various manufacturers make single IC LiIon / Lipo chargers that need no external transistors to function. One sich is Maxim's MAX8=8934A / 8934E. This is not necessarily the best solution available, but is very flexible and very competent. It allows USB or mains (via power pack) input, charge and discharge control, low power inbuilt LDO 3V3 regulator and much more. Cost is about $US5.20 /1 from Digikey in stock. This is about 4 x the complete parts cost of my "simplest possible" solution below - but it is far more capable. It's in a beginner unfriendly 28 pin TQFN package. Datasheet Pricing A typical circuit diagram is provided at the end of this post. Block diagram only: Simplest possible (almost) that will work well enough is a supply that is current limited to 930 mA and voltage limited to 4.0 to 4.1 V. I say 930 mA based on a 1C max charge rate. If you are SURE that the manufacturer says you can charge this at > 1C then consider doing so BUT as a general rule, 1C is a safe max rate for LiIon of various flavours. SOME LiPoly allow you much faster rates, but there is no guarantee without specific data. The constant current supply works when the cell is below 4.0V and the constant voltage take over thereafter. If you are happy to operate it from a 9V supply then 2 x LM317 would do. 2 x LM317 , 3 x resistors, a few caps. See below. LM317 pricing Digikey from $US0.64/1 in stock. LM317 datasheet 1st LM317 = constant current 900 mA. Vin to In Vout from Adj R from Adj to Vout = Vref/Ilim = 1.25/0.9 = 1.4 ohms. You may need to combine some standard R values to get this. 2ns LM317 = constant voltage at say 4.0V. Rlow = say 1k Rhigh = (4.0-1.25)/1.25 x 1k = 2k2. Scale resistors in that ratio as desired to suit data sheet requirements LM317 constant current: LM317 constant voltage (3) My answer here gives some good related background re what capacity you can expect for what end voltage etc. DO NOT use 4.2V. No need. shortens life risks going too far. This shows capacity achieved with Voltage and time Be aware of LM317 dropout voltage = necessary drop across IC to operate it. Shown below. The constant current will drop dropout + Vrsense = say 2.3 + 1.25 = 3.55V. The constant V will drop Vout + dropout = 4.0 + 2.3 = 6.3V. So notionally you will need 3.55 + 6.3 = 9.85V = 10V. In practive you can probably use slightly less, but not much. MAX8934x typical circuit diagram.
H: BNC camera computer interface I have some security cameras who's only interface is a BNC connector and I want to use them to do video processing. I want to find a simple way to interface a BNC camera with my computer so that I can get the data. I figured that the only way is to create a simple circuit that can forward data from the pin through USB, then write drivers for it so that I can register it as a directshow video camera (on windows). Is there a better way to do it? AI: It's not anywhere as simple as you think. It is likely that your "BNC" camera is a standard composite video camera. As such, you need a fast ADC, and a bunch of logic to properly decode the video signal. You cannot in any way just wire it up to usb. Your best bet is probably to buy an inexpensive video-capture card (google "video capture", there's lots of options). They run as low as ~$30. If you really want to do it yourself, there are a few people who have done so out there, and posted projects online. Here is one. It's worth noting that if you want to do this in real-time, you will have to use a FPGA or very fast microcontroller of some sort. The above project is just a frame-grabber (i.e. it can take one frame every few seconds). Commercial products for video-USB generally use an ASIC of some sort.
H: Are thermal fuses polarized? I have a device with a thermal fuse in it. The fuse has failed, and I would like to replace it. Does thermal fuse have a polarity, similar to an electrolytic capacitor, or is it the same with normal fuse? It has a stripe marking on it. Is it sensitive to polarization, or will either way work? AI: Short: No. Thermal fuses are not polarised. Longer :-) : No thermal fuse I have ever seen was polarised (based on decades of experience but ...). I cannot think why a thermal fuse would be polarised. This seems to be extremely unlikely but I mention it for completeness: If a device that was called a thermal fuse WAS polarised then it would be more than a fuse - it would be very special in some unusual manner. If so then it would need to be replaced by an identical unit if it was going to do the same job. A photo would be a good idea. Does it have a part number on it?