source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Comparator - get the difference between inputs? Is there any way to have a comparator (say LM339) output the difference between its +V and -V ??For example, if +V is 6.3 volts and -V is 5 volts, how to get a 1.3 volts signal?Put another way, I guess it could be how to substract the -V from the +V voltage..This is probably simple, any ideas? <Q> A difference amplifier will do what you want, but it has a potentially serious problem. <S> The input impedances are not well defined, or matched. <S> Referencing Jay's circuit, the input impedance of the noninverting side is \$R_1+R_f\$. <S> That is as close to a defined input impedance as we get with this topology. <S> Since there is negative feedback, the inverting pin will track the noninverting pin. <S> What would normally be a virtual ground is now varying based on \$V_+ \$, and with it the input impedance of the inverting side. <S> \$V_{out}=(1+\dfrac{2R_1}{R_{gain}})(\dfrac{R_3}{R_2})(V_2-V_1)\$ <S> The inputs are buffered and have matched input impedances, equal to the op amp input impedance. <S> You can either build one yourself, or buy an IC. <S> An IC solution will ultimately have better performance, especially in common mode rejection. <A> Comparators won't do quite what you want, but take a look at a differential amplifier . <S> It's a circuit that amplifies a difference between two signals. <S> If you just want the raw difference, you can set up for unity gain, which will not "scale" the signals. <S> You'll still have to cleverly pick your resistors for a common-mode gain term that won't greatly impact your overall result, but that's not terribly hard. <S> Take circuit for example; as long as \$ \frac{Rf}{Ri}\$ is close to 1, the raw difference between the two signals will be accurately represented. <A> There also the technique using a switched capacitor: - <S> In this example it's measuring the differential voltage across a strain gauge bridge and making it single ended for the ADC. <S> In principle, if you didn't need fast measurements you could use a relay to apply the cap to the source <S> and you'd get really good isolation AND the ability to measure voltages that are far-removed from earth, limited by the contact voltage rating of the relay.
| If this issue is a problem for your application, a better option would be an instrumentation amplifier.
|
How do I verify if a conductive mat is getting "Earthed" Explaining to me about electricity is like explaining to your Grand-Ma about it. So please be kind and gentle :) I bought an Earthing Mat from " http://www.amazon.com/dp/B003RLOBOK ". It includes a conductive mat to which I connect a white-wire whose other end goes into an earthing point on my wall. As long as a person's body is in contact with the mat, he is getting earthed. But how do I verify/measure if the conductive mat is getting earthed correctly? (in effect I am getting earthed correctly). I called up an electrician over to my house who demonstrated and verified that the white-wire (connected to mat) is getting earthed. After inserting one end of the white wire into the earthed socket, he touched one wire of a bulb (with 2 loose wires) to the other end of white-wire. The bulb lit up and he said that white wire is getting earthed. But he didn't know how to verify the conductive mat. All he said that this looks like rubber and should not work. I come with an almost zero electrical knowledge. So how can a novice like me verify if the conductive mat is working as it should. <Q> Earthing mats do look like silicone rubber, but are made of, or coated with, some flexible conductive material. <S> Therefore appearance alone is insufficient to assume it is not earthed. <S> If the mat is earthed, the tester will light up, as the tester works by earthing itself through the clip, then through the human body or other earthing connection. <S> Of course, also check if the tester lights up at the socket in the first place, by touching the clip with your hand. <A> If you have a multimeter, test the resistance of the mat by touching it with both probes a few centimetres apart. <S> It could be hundreds of thousands of ohms, but not infinite - there should be some large resistance between the mat and earth so that when the static voltage discharges, only a little current flows (IIRC there's no point in having it otherwise - it's the current that actually kills the components, not the charge), and so it doesn't cause other issues accidentally earthing equipment or circuits. <S> You could also measure resistance between the surface of the mat and an earth point; this will include another several mega-ohms for the resistor which should be in the earthing block you attach it to (again to reduce current when discharging). <A> If your electrician was able to light an incandescent bulb, (not a neon), even a small one, between any accessible part of that pad and the live terminal on the wall, as shown, you have a relatively dangerous product. <S> There should be a current-limiting resistor (the fraudsters say 100,000 ohms on the product sites), but this should be located at the wall plug, not somewhere in the pad. <S> If the product relies simply on the supposedly low conductivity of the pad surface, which is bound to be variable and susceptible to aging or wetting, and you touched some other device that had an electrical fault, like a lamp, you'd be asking for a bad jolt or much worse. <S> One of my friends just fell for this snake oil, and I'm going to check out the device soon. <S> Almost any garden-variety multimeter will tell the tale. <S> While you're at it, do what most of do very casually: measure your skin resistance with the meter, by, say, holding one probe in each hand, and you will get an idea of what that's like. <S> Also, you may wish to read about the entire concept on many debunking websites.
| If you have one of the screwdriver type mains testers, it is easy to verify earthing: ( source ) Grab the metal clip at the back of the tester firmly using the mat as a glove - without directly touching the clip with any part of the body - and insert the screwdriver head into the live point of any mains socket that is switched on.
|
Use of zero ohm resistor in pcb design In many PCB board, I have seen zero ohm resistor in between the signal lines. What is the reason behind it? Can't we simply connect it through copper trace? <Q> Sometimes the board is too tight to route without crossing sides a zillion times, and a simple jumper can really make the routing much nicer. <S> A jumper can make this simple and apparent. <S> The resistor is simply a jumper that can be machine handled. <A> Several possible reasons: <S> In 1 or 2 layer PCB designs, sometimes 0 ohm resistors are used to jump a signal across trace routing bottlenecks. <S> 0 ohm resistors are used "just in case". <S> Just in case the designer needs to do something with the design later. <S> As in, "I probably don't need this but if something doesn't go as expected I might need to change this to a 1K ohm resistor". <S> 0 ohm resistors are often used as "soldered in jumpers". <S> Board configuration options that are set when the PCB is manufactured, not by the end user. <S> Sometimes, one board will be used for several slightly different products. <S> 0 ohm resistors can configure the board. <A> We add zero-ohm resistors to all of our supply rails. <S> Recently we had a board with TEN different voltage rails on it: <S> -6v, 1.8v, 2.5v, 3.3v, 3.6v, 4.1v, 5.0V, 9.6v, 12v and 18v. <S> Some are bias voltages, and only require a few hundred microamperes. <S> When the first article comes back from the manufacturer, we remove all of the zero-ohm resistors and bring up each rail, one at a time. <S> When we are satisfied all the voltages are correct, we then power the circuits up, wiring the pads of the zero-ohm resistor through a milliammeter, and verify nothing is shorted. <S> (Unfortunately some times you have to add in several rails at the same time, e.g. a TFT LCD which takes six different voltages) <A> Zero ohm resistors are used where the designer my want to modify the circuit after it is built. <S> It is easier to desolder a component than it is to cut traces. <S> They may also be used inplace of vias and double sided PC boards. <S> A zero ohm resistor can jump over a number of other traces where a trace on the board would have to route around. <A> Sometimes, a circuit isn't possible on a one-layer PCB, so to reduce costs, they insert a wire bridge. <S> Most of the time, they don't use wires but zero ohm resistors because then the insert-resistor machine can place them on the PCB. <S> It might also be that the designer wants to leave the opportunity open to use a resistor of a significant value later on.
| The zero ohm resistor is simply a jumper that can be conveniently populated with pick and place machinery. It could also be that the PCB design is otherwise so complex that they would have to use thinner traces, which they don't want. Other times, you might want very tight control, making sure that two ground planes, for example, touch at only one point.
|
Are there strong but insulative screws? Common through-hole power semiconductor devices, like TO-220 and TO-247, can be mounted to a heatsink by running a screw through the hole in the device. However, on TO-220 the hole is often electrically connected to one pins of the device. TO-247 often isolates the hole from the device backplate, but this isolation is not guaranteed, and often fails below 1500VDC. I frequently need 3kV withstands. We often use clips to hold the device to the sink, which can help the problem, but makes construction more problematic, and may still have insulation problems. Shoulder washers are also used occasionally, but again, that makes construction more complex. Life would be simpler if we could use insulated screws. The only ones I'm aware of are nylon, and good luck getting any torque out of those! Are there any screws (M3, M4, #6, #8, or similar) which are made of an insulating material, but which still have sufficient mechanical strength to hold a device to a heatsink? Especially in high-vibration environments? <Q> But if you really want to use non-conductive screws, have a look at fiberglass reinforced plastic ones such as Isoplast . <S> I haven't used them personally and they don't make any specific claims as to shear strength, but they look a lot stronger than nylon. <A> You can get isolating bushes in mounting kits: Infineon <S> app note <S> So you use a metal screw, but a plastic collar goes around it, isolating the screw from the device. <A> There appear to be a few materials on the market for threaded fasteners that could indeed have advantageous properties over nylon in some applications: FR4 (the stuff tough circuit boards are made of). <S> Polyetherimide (ULTEM) <S> Polyetheretherketone (PEEK) Various fibre-reinforced composite materials, based on various plastics (eg Polyarylamide, Polyurethane)
| To insulate transistors from a mounting plate, I typically use metal screws with an insulating pad as I describe in my answer here: how to electrically isolate a PCB from a heat sink .
|
Can a speaker be damaged but not blown? If one plays too loud of a sound through a speaker, it can blow - i.e. become visibly torn or stop working entirely. However is it possible that the loud sound will damage it partly and result in the speaker operating at a less loud level; can a speaker blow just a bit ? <Q> Sure. <S> If the speaker is completely destroyed, this may be that the wire in the coil is broken or shorted, so that it doesn't operate. <S> However, one can imagine a scenario where something else in the speaker is damaged, such as the surround (the rubber coil that allows the cone to vibrate freely) or the spider (cloth "guide" inside the speaker, behind the cone) or leads leading into the cone are damaged, but the coil still operates. <S> Any of these issues have the ability to reduce the volume level of the speaker. <S> It's worth noting that it's usually not the "loud sound" that damages the speaker <S> , it's the large inrush of current that the voice coil cannot handle, the excursion of the cone (moving farther than designed for), or natural wear and tear on components. <A> It is possible to damage a loudspeaker by driving it too hard. <S> However, the symptoms are more likely to be no output at all, or excessive distortion (scratchy sound or rattling noises) rather than reduced output. <S> But let's understand exactly what you have damaged first. <S> If your "loudspeaker" is something like a Hi-fi speaker, with separate drive units for low and high frequencies (woofer and tweeter) <S> then it normally also has a circuit between them - a crossover - to split the signal into high and low frequencies. <S> In this case you might have destroyed just one of the drive units : an ear close to each will tell you which; or one of the components in the crossover, so that less power (or none) is fed to one of the drive units ("speakers") <S> If the crossover is at fault, that is a much simpler and cheaper repair than replacing a drive unit. <S> In some speakers, each drive unit has its own amplifier (aka "active" speaker system) with the necessary crossover filter built in : they can be complex to repair. <A> You can damage the suspension of a speaker so that the voice-coil part of the cone will rub. <S> Generally this makes a bad scratching sound, but it's possible it wouldn't be that obvious. <A> A speaker contains a number of components which are able to tolerate different levels of abuse. <S> If a speaker is abused, the exact construction and nature of the abuse may affect which components fail first. <S> A single speaker element typically has a cone of some sort of material to which a coil of wire is affixed. <S> Current in the wire will cause the coil to generate a force parallel to the axis of the cone; this should in turn cause the surface cone to move, thus displacing air. <S> For a speaker to produce good quality sound, it is important that the parts of the cone which are supposed to move, move smoothly as designed, without unwanted mechanical interference. <S> This will generally require that parts of the cone be stretched, compressed, and/or flexed. <S> Such stretching, compression, and flexing can cause concentrated stresses, which can easily cause tearing or mechanical failure of part of the cone. <S> A speaker with a torn cone may behave electrically much as it should, but will no longer move smoothly and will generally give lousy sound. <S> Another part of the speaker that can fail is the joint between the coil and the cone. <S> If the force on the coil exceeds the strength of that joint, it's possible that it may fail partially or completely. <S> If this happens, motion of the coil will not be properly conveyed to the cone, causing the speaker to sound rather weakly. <S> Additionally, the speaker will likely be more effective at producing sound when driven in the direction that would pull the coil against the one, than when driven in the opposite direction. <S> Thus, the sound will not only be quieter than it should, but distorted as well. <S> Finally, it's possible for the coil to fail electrically if it is overheated sufficiently to melt the wire and/or insulation. <S> While such a failure could occur without stressing the cone or joints sufficiently to cause mechanical failure, most speakers that are said to be "blown" have actually suffered mechanical failure rather than electrical failure. <S> It's possible than a mechanical failure would cause a consequent electrical failure (among other things, speakers convert electrical energy into sound and heat; a mechanical failure which reduces the amount of power converted to sound may increase the amount converted to heat) but in many cases, speakers are more likely to fail for mechanical reasons than electrical ones.
| Speakers are essentially large coils of wire, and when they "blow", it's generally that the coil is taking too much current and isn't being cooled enough, and is damaged.
|
How does current divide in parallel inductors? How does current divide over parallel inductors?Take a setup like this, how would I solve for i1, i2 in terms of i? simulate this circuit – Schematic created using CircuitLab <Q> Lets start by putting down what we know <S> The voltage across each inductor must be the same (just like the current must be the same to series capacitors).Now <S> the voltage induced in an inductor is $$V = <S> L \frac{\mathrm{d}i}{\mathrm{d}t}$$ <S> These voltages must be equal <S> so that $$ V_{AB}= L_1 \frac{\mathrm{d}(i_1)}{\mathrm{d}t}= L_2 \frac{\mathrm{d}(i_2)}{\mathrm{d}t} <S> $$ <S> If we integrate with respect to t (\$L_1\$ and \$L_2\$ are constants) we get <S> $$ L_1 i_1 = <S> L_2 i_2 $$ <S> so the ratio of currents is $$ \frac{i_1}{i_2} = <S> \frac{L_2}{L_1} = \frac{2}{1} <S> $$ <S> In other word the biggest current will flow in the smallest inductor ( just like the biggest voltage drop will be across the smallest capacitor in a series circuit ). <S> If you were to treat the inductance values as if they were "resistance values" (which they are not) you would see immediately that "the bigger resistance" would take less current and it would be in the ratio of the "resistances" To obtain the current \$i\$ combine the inductance values $$ \frac{1}{L} = <S> \frac{1}{L_1 <S> } + \frac{1}{L_2} <S> $$ so that the circuit is reduced to a single inductor \$L = \frac{2}{3} <S> H\$ <S> then use kirchoff's law \$ <S> i = <S> i_1 <S> + i_2\$ <S> and as you already know \$ i1 = 2 <S> \cdot <S> i_2 \$ <S> you have everything you need to work it out. <A> There is no need to make this complicated. <S> inversely proportional to its inductance relative to the other inductors. <S> This is just like parallel resistors have relative current thru them <S> inversely proportional to their resistance. <S> The same formula as for parallel resistance can be used to determine inductor current sharing. <S> For example, consider two ideal inductors in parallel, a 10 µH and a 30 µH, both starting with 0 current. <S> The current thru the 10 µH inductor will always be 3x the current thru the 30 µH inductor. <S> You don't need to know anything about the magnitude or waveshape of the voltage to make this statement. <A> Transform the inductance values to impedance values - there are well known equations for this. <S> Once you have the impedance values it should be easier to see where the current flows : since this is a parallel circuit, more current flows through the lower impedance. <A> You would find the currents of the inductors by simply using current division. <S> I had a similar problem where I had a current source of 25mA and two parallel inductors the first of 60mA and the second of 40mA. the answers using current division were the same as in the back of my book which lead me to believe that you can. <S> I am not entirely sure though, just thought this may help since it worked for me in a previous problem.
| Each inductor with the same voltage applied to it, whether AC or a complicated waveform or not, will have current thru it
|
Methods for electronic flatulence detection I would like to build a electronic flatulence (fart) detector. I was thinking of methane because detectors are readily available, but I read http://en.wikipedia.org/wiki/Flatulence and it says: However, not all humans produce flatus that contains methane. For example, in one study of the feces of nine adults, only five of the samples contained archaea capable of producing methane. Oxygen, nitrogen, carbon dioxide are listed but I think they would be too common in normal air. That seems to leave: Hydrogen Hydrogen sulfide Methyl mercaptan Dimethyl sulfide Dimethyl trisulfide Does anyone know if practical sensors are available that detect those gases or have other ideas? I think somewhere around the $20 or less mark would be good, so I wasn't really seeking a full professional solution like gas chromatography that may normally be used. The application is for under office type chairs, so maybe heat detection could be used although I'm not sure it would be posible to tell the difference between the desired event and someone just sitting down on a cold chair, although maybe a pressure sensor could be used along with some filtering to not trigger until the temperature had stabilized a bit. <Q> It looks like Hydrogen is the major component: Normal Flatus . <S> 360mL perday. <S> How much per fart will take some closer reading. <S> Here is an Arduino flamable gas detector, it probably can sense Hydrogen: LM393 MQ-9 , say, at 10ppm. <S> (Some shopping legwork for a Hydrogen leak detector or flammable gas sensor is in order.) <S> So a 36mL bolus of Hydrogen (I just guessed what volumes are emitted throughout the day to make up that 360ml, and guessed 1/10 of the total) must diffuse into a volume of 3600 Liters before it is below detection level of 10ppm. <S> Your 10ppm sensor must be within about 100 centimeters. <S> Looks like the under-the-seat location is the right spot. <A> As an example: The Twittering Office Chair and <S> it's Twitter account <S> (apparently died of asphyxiation back in '09). <A> Weird project. <S> Chairs that detect farts? <S> No thanks. <S> Anyway I would suggest you look at an off-the-shelf propane sensor. <S> Propane (C3H8) and methane (CH4) are very similar. <S> In fact many of them are described as Propane Methane sensors. <S> They are cheap and made in the thousands for RV's and Boats. <S> A friend of mine always said if he was too close the the sensor the alarm would go off.
| Methane was used by another guy used in his office chair to detect his own flatus, but if that source is real, Futurlec seems to offer dozens of gas sensors for whatever gas you like.
|
How are electronic musical greeting cards made? I remember that long time ago, when I was a kid (in the 80s) there was some electronic greeting cards that when open up, start playing simple tunes through a small piezo-electric speaker. A quick look at the board reveal a small black chip and some circuits under: I'd like to know how is the small black chip implemented? (There is never any information or label written on it.) Is the chip made using same technology as modern microprocessors (CMOS technology, but with a very large nm process since size here is not an issue?) I'm also puzzled by the fact there is no crystal oscillator or capacitor on the board, which might have been useful for generating the square waves for the speaker. <Q> These sound chips were and still are a creation of Seiko/Epson corporation or one of its subsidiaries. <S> It was a spin off product from the extremely low power CMOS processes that they developed for the watch business. <S> The design of the IC itself is actually a 4bit uProcessor with mask ROM for the different "tunes". <S> They also provided more expensive OTP (EEPRom) based units for experimentation before changing the mask. <S> I'm sure that there are a number of companies that could make these and searches on "greeting card music chip" show lots of Shenzhen references. <S> They are purchased as KGD (Known Good Die) in waffle packs and then glued to the PWB (PCB), wired bonded to the pads and covered with epoxy. <S> I'm sure now a days you could get them with bump bonds. <A> The volume of these cards was high enough that it probably justified a custom chip. <S> The manufacturing process is called "chip on board", or often just COB. <S> The bare silicon chip is mounted diretly to the circuit board, then a blob of epoxy put over it to protect it. <S> In high volume this is cheaper than using a packaged chip. <S> If this was a custom chip, it probably contains a ROM and a little sequencer to read the sound samples, then probably a PWM generator to make class D audio open loop. <S> Those are just guesses on my part, but would be the first approach I'd investigate if tasked to come up with something like this. <S> Above all, it has to be cheap. <S> Sound quality isn't much of a issue. <S> The speaker has to be so small and cheap that it will be the limiting factor of quality. <S> You want the sample rate just high enough to not add too much quantization noise. <S> It only has to work for a few minutes, then it will get tossed anyway. <A> You will notice the card has four things. <S> 1 small batteries 2 <S> the black blob (the electronics) <S> 3 a crude switch that slides between contacts <S> 4 a cheap and nasty loudspeaker <S> The chip is switched on when power from the batteries is connected to it through the switch contacts. <S> This is exactly the same type of thing you would normally expect in a 'normal' IC chip with legs. <S> By just using the chip bonded to the board it is cheaper and smaller. <S> The chip doesn't require capacitors or xtals because it has an internal oscillator (just like many of its bigger brothers.) <S> It essentially divides this frequency and follows a simple program to output sound. <S> By using PWM (pulse width modulation) it can create speech and other 'sounds'.
| The black blob is an epoxy resin covering a small integrated circuit chip connected to the PCB with wires.
|
how should i design variable current source of 4-20mA with 24Vdc input? I am trying to design current source of 4-20mA variable with 24vdc input. The circuit can read one output at a time and variable from 4 to 20mA. When input varies between 0 Volts and 24 Volts, the current source should vary from 4 mA to 20 mA correspondingly. The input voltage will be constant somewhere between 0 and 24 Volts, at any given point of time, and the corresponding sourced current should be constant at that time. <Q> What you're describing is a 4-20 mA Current Loop . <S> The implementation of current loops is very vast, however, I would go with an approach similar to this one . <S> The input range is 0-5v for the example I gave, but you could quite easily scale your input down to 5v max by using a voltage divider. <S> The circuit is rather robust and relatively easy to implement and looks something like this: <A> It is trivial to implement, and is specified for precisely the 24 Volt input range in the question. <S> It operates from 7.5 Volts to 40 Volts, and the input signal full-scale is equal to the Vcc used. <S> One input resistor, one transistor, and that's it: Just 2 external components . <S> The supply voltage source can be at the receiving end, so the remote device does not even need a local power supply. <S> The signal bandwidth, at 380 KHz, is more than ample for the slowly changing input implied in the question. <S> An added bonus for remote devices is the integrated 5 Volt 12 mA regulator output, often sufficient for some basic logic circuitry or an indicator LED, saving on part count on the remote board. <S> IIRC this part, or some drop-in replacement, <S> used to be available as a DIP package as well, and that version was much better at dumping heat than the MSOP version, hence much better in a harsh industrial environment. <S> Sadly the DIP doesn't seem to be available any more. <A> I'd consider doing it this way. <S> This circuit (below) takes an input voltage Vin and with the values shown produces a high-compliance current source of Vin/100. <S> For 20mA to the load, Vin should be 2V. For 4mA to the load, Vin should be 0.4V. <S> Next is mapping the 0 to 24V input to 0.4V to 2V. <S> I'd do this by reducing the 0->24V input to 0->5V and adding 1.25V (in series with the reduced signal) via a series shunt regulator like the <S> REF1112 <S> : - Stages: - 0 to 24V input becomes 0 to 5v becoming 1.25V to 6.25V becoming 0.4V to 2V <S> This feeds the top circuit. <S> Alternative ways You could add 6V to the 0-24v input producing 6V-30V <S> then voltage divide this by 15 to get 0.4V to 2V. Use a TL431 to make a 6V shunt voltage and apply it in series with the input voltage. <S> However this does require an input voltage that is sourced from a low impedance. <S> If current sinking should be required, with reference to the top diagram only the first stage is required - it is a current sink and its emitter resistor can be made to be 100 ohms. <S> Heat dissipation A 20mA output current can warm things up and if the positive supply rail for the current source/sink is high (say 15V) the power disippation in the output FET could be 250mW into a low impedance load - <S> this requires design attention and possibly heatsinking in the copper of a PCB. <A> Marrying space-age and stone age technologies:1) <S> ATtiny852) <S> SPI digital potentiometer3) <S> Adjustable linear regulator with potentiometer between output and ADJ, like a LM3504) <S> A few adjusting resistors and decoupling capacitors5) <S> Your current source is at the ADJ terminal, and will be at a voltage at most (Vdrop + Vadj) below the input voltage. <S> Make the ATtiny sample the input voltage through a resistive divider. <S> This can be done at 10 kHz speed or higher. <S> Make the Attiny output control data to the digital potentiometer to control the feedback resistance. <S> If you use a regulator with 1.25V reference, the resistance at 4 mA would be (1.25 / 0.004) == 312.5 Ohms. <S> At 20 mA, you have (1.25 / 0.020) = <S> = <S> 62.5 <S> Ohms.
| My preferred go-to solution for voltage inputs driving 4-20mA current loops is the 8-pin XTR117 . AD5254 or AD8403 would work; it's a 1kOhm part that you can gang up 4-way to get 250 Ohm range; add a 62.5 Ohm resistor and you cover the whole range perfectly.
|
Widely available IC for encording and Decoding DTMF data I am planning to do some research in data transmission over the air. For this I am interested in DTMF encoding and decoding. Is there a widely available IC to achieve this? A circuit diagram using the same ic would be a better answer. An arduino solution would be even better. <Q> The datasheets contain examples of connecting to a microcontroller and they are quite easy to use. <S> Holtek products often don't seem to be carried by a lot of larger suppliers <S> but I just checked and they still seem to be commonly available from smaller suppliers so you shouldn't have much trouble tracking them down. <A> The dsPIC line of microcontrollers from Microchip can generate and detect DTMF signals in firmware, using the DSP features of the microcontroller. <S> The downloads for the libraries and user guides are available here for download . <S> I have used these in a project and they work quite well. <S> dsPIC33F microntrollers are available for under $3 in a DIP package. <A> An Arduino could decode DTMF by putting an interrupt on zero crossings and counting the interval. <S> Use an opamp to go from signal to rising/falling detect pulse, and use a pin change interrupt to record the time of the changes. <S> The timing between successive samples can be inverted to give you frequency/ies. <S> The interrupt latency of the AVR chip is < 3 us, although the Arduino library adds some significant latencies on top of that to drive the timers/counters; still, it will be precise enough to > 20 kHz input signals. <A> Generating DTMF with Arduino (purely in software) is relatively simple. <S> One example can be found here . <S> Decoding DTMF is more challenging, and I wouldn't try to achieve it purely in software on a 16MHz 8-bit CPU. <S> I had success with such a project using the M8870 chip which is readily available. <S> My project is documented here , and the schematic (which includes the M8870, the Arduino, and some unrelated stuff) is here .
| Holtek Semiconductor have traditionally had a wide range of DTMF encoders and the Holtek HT9170 may be a good option for a decoder while the Holtek HT9200 is an option for the encoder.
|
Component with an impedance that has a negative real part Is there an electrical component such that its impedance has a negative real part ? Fact: Any electrical component made from resistors, inductances, capacitors (connected in possibly complex ways using series or parallel connections recursively) must have an impedance of a non-negative real part. Proof: Suppose that there exists a way to connect the components (R,L,C) in a possibly complex ways using series or parallel connections recursively to get an impedance with a negative real part. Choose the connection of R,L,C that uses the least number of connecting wires. Let's call this component COM . <Q> Not with passives, so far as I know, but there are amplifiers you can build that have effectively negative input impedance, and they generally use positive feedback to achieve this. <S> For example, see http://en.wikipedia.org/wiki/Negative_impedance_converter <S> From the pointed-to wikipedia entry: <S> This example shows resistances, but R3, for example, can certainly be a capacitor. <S> The situation I've generally seen these used in are to cancel out the large impedances of glass microelectrodes that are pulled from pipettes, used to record neural signals <A> Using simple devices <S> L's, C's, and R's by themselves, you cannot get a negative resistance. <S> It takes either an active device (see Scott's answer) or some physics happening in an individual device. <S> There are at least three primary devices that hold historical significance that have this characteristic which are the Back diode, the Gunn diode and some tunnel diodes. <S> All of these devices have regions of their I-V curves that exhibit negative resistance. <S> You must bias the signal to span these regions of interest and not go beyond. <S> Here is a snip from "American Micro Semiconductor <S> The back diode was used for envelope detection in early radar speed guns. <S> The Gunn diode operates on a different principale and is called a Transferred Electron Device (TED). <S> These are typically used in oscillators, when paralleled with a device of opposite characteristics the combination oscillates at millimeter wavelength frequencies. <S> Here is a semi-complete list of types of devices that all have negative resistance; <S> (Source: - Complete guide to semiconductor devices by Kwok K. Ng); Tunnel type: <S> Esaki Diode, Backward Diode, Back Diode. <S> TED Type: <S> Gunn Diode, Transferred electron Oscillator (TEO), TEA A=Amplifier. <S> Resonant-Tunnelling type: <S> Double barrier diode, RTFET. <S> Resonant-interband tunnelling type. <S> Single barrier tunnel diode. <S> Metal insulator semiconductor switch type: MISS, MIS Thyristor (MIST) <S> MEtal-Insulator-semiconductor-Metal (MISM) switch, <S> Metal Insulator Semiconductor-Insulator Metal <S> MISIM switch. <S> Planar doped barrier switch (PDB), Double heterojunction optoelectronic switch (DOES)ledistor, Lasistor. <S> Ammorphous Threshold Switch type: <S> Ovonic threshold switch. <S> Heterostructure Hot-electron diode (HHED) <A> Note that this is a necessity due to conservation of energy. <S> For operating points in the first and third quadrants, the device is dissipating power. <S> In the second and fourth quadrants, it is sourcing power. <S> A passive device, which implies no internal energy source, is therefore limited to operating in the first and third quadrants in steady state. <S> Some devices exhibit negative resistance over a part of their operating range. <S> It used to be popular to exploit this effect in unijunction transistors to make a single-transistor oscillator. <S> There are also devices that exhibit hysteresis, which you could consider negative resistance depending on how exactly you define that. <S> A neon bulb is a good example of a passive device with hysteresis that can be cycled many times. <S> To get sustained negative resistance over a wider operating range that might include the second and fourth quadrants requires a power source and therefore some active circuit. <S> You can make a point appear to have negative resistance to ground by using a opamp, for example. <S> As another example, the input to a ideal power supply exhibits negative resistance. <S> Since the power supply draws a fixed amount of power, the current it draws decreases with increasing voltage. <S> That is all limited to the first quadrant, but with our current technology requires a active circuit to realize. <A> Negative real part of an impedance means that if you apply some voltage on the component, current flows in opposite direction. <S> To specify, imagine some component with 2 pins A and B. <S> When you connect B to GND and A to some positive voltage, if the DC current flows from B to A instead of A to B, that means that the real part of impedance has a negative value. <S> Unfortunately this isn't possible. <S> Here is the explanation: <S> Current flow is the average electron flow on the line in basic level. <S> Applying voltage means giving energy to system which makes electron move in one direction. <S> If you observe that most of electrons flows in negative direction, it means that there is another independent power source inside the system which suppresses your outer power source. <S> Basically, if you don't have another power source in the system and calculate impedance value with negative real part, it conflicts with laws of thermodynamics.
| Yes, as long as the negative slope of the current as a function of voltage curve is limited to the first and third quadrants. Real-space transfer diode (RST).
|
Sleep on Arm Cortex I'm trying to put a cortex m4 processor (m3 with dsp extensions) to sleep for a little less than a second. I want to be able to tell it to sleep, then a second later, or when a button is pressed, pick up right where I left off. I've looked in the reference manual and VLPS or LLS modes look like it would fit my needs. Ideally I'd like a glorified delay function, for it to sleep for a second. I don't know how to begin to enter that mode or how to program the NVIC. I'm using C on bare metal. Any help would be greatly appreciated. Here's the code: #include "IntervalTimer.h"//The following is where the SLEEPDEEP flag is at#define SCR (*((volatile unsigned long *) 0xE000ED10))volatile uint32_t timerCounter0;boolean printNow = false;void timerCallback0() { timerCounter0++; printNow = true;}void setup() { SCR = SCR | 0x04; //Set SLEEPDEEP Serial.begin(true); IntervalTimer timer0; timer0.begin(timerCallback0, 1000000);}void loop() { if (printNow) { Serial.println(timerCounter0); printNow = false; asm("wfi\n"); }} <Q> I'm not sure which MCU you are using exactly, so I checked in the STM32F4 reference manual , which I'm most familiar with. <S> Since sleep modes are implemented by the ARM core, it should be similar to any other Cortex M4 MCU. <S> Section 5.3.3 discuss entering/exiting sleep mode (checking it out for details). <S> To enter sleep mode: <S> The Sleep mode is entered by executing the WFI (Wait For Interrupt) or WFE (Wait for Event) instructions. <S> Depending on some register's value, the sleep mode is entered immediately or only after it exit the lowest priority ISR. <S> To exit after 1 second, you will need to setup a timer that will trigger an ISR after 1 second. <S> (Since this is MCU implementation dependant, I'll skip the details for the STM32F4.) <S> If sleep mode was entered with WFI, this interrupt (as well as any other interrupt) will wake the MCU. <S> If you need more detailed control on what should wake the MCU, you should sleep with WFE and setup the wake event (section 10.2.3 of the manual). <A> You are counting many periods of a fairly short timer, each expiration of which requires you to wake up. <S> You should probably look at using a larger value in the timer register, and possibly using a prescalar divisor. <S> (Even if you are waking up only a few times a second and so not wasting much power, this will make it a pain to measure power consumption unless you use a scope to measure across a series resistor) <S> However, even then you would likely still be running on a fast PLL clock, which consumes a lot of power. <S> So for more power savings you will want to switch to a low power clock source such as an internal or external KHz-range backup clock, or at least disable the PLL and possibly crank up any system-wide clock prescale divider. <S> And you also likely have many parts of the chip powered up and clocked which are not needed in sleep mode - likely you want to power down and de-clock everything except the GPIO, interrupt controller, counter module and RAM. <S> Additionally, you need to audit your circuit design for any cases where you are driving a signal against a pullup or pulldown resistor, or even letting a digital input float in the vicinity of a logic transition. <S> Getting a system down to microamp standby modes can be an involved project, as you eliminate one power leach after another. <S> Also watch out for debugger, serial, USB, etc connections - not only as potential loads, but also potential stealth power sources for the system to get power while bypassing whatever you are measuring with (yes, you can get energy from data pins). <A> Not sure if this is what you were looking for, but I'll have a go anyways. <S> Using C, you should be able to have the processor do nothing (ie: sleep) using the sleep() <S> function from <time.h <S> > . <S> Refresher: <S> #include <time.h <S> > <S> int main() { int sleepms; sleep(sleepms); //Sleep for "sleepms" milliseconds }
| To get maximum power savings, you need to put the timing entirely in hardware, so that you only generate an interrupt at the end of the desired period, or at least fairly infrequently.
|
MOSFET is not turning off when the gate terminal is grounded This figure shows a small portion of my circuit: The maximum Vgs of the MOSFET is 20V. The MOSFET is initially turned on and now I want to turn it off. For that I am grounding the terminal A to ground through a resistor of 1k. But it is not turning off. If I do this without the 1k resistor it is turning off. What could be the possible reason? <Q> If you attach A to ground, you have, in effect, this: simulate this circuit – <S> Schematic created using CircuitLab <S> Since the gate current of a MOSFET can be assumed to be zero, we can think of this as a voltage divider , and see that the voltage at the gate of M1 is 2.7V. <S> This isn't low enough to turn the transistor off. <S> Probably, you want to remove R6, or make its value very much less. <S> A MOSFET, unlike a BJT, has a very high gate impedance, and so does not require a resistor to limit the current. <A> The resistors attached to the gate form a voltage divider. <S> If the 1k is floating, you have 10/25 of 48V on the gate, or 19.2V. <S> If the 1k is pulled to common, you have .9/15.9 of 48V on the gate, or 2.7V. <S> Depending on the FET, that 2.7V may be enough to keep it on. <S> Basically, your 1k resistor is too big. <A> The answer should really be obvious. <S> Just look at what the voltage is on the gate when A is held at ground. <S> You have a resistor divider with (7.5 kΩ + 7.5 kΩ) <S> = <S> 15 kΩ in the top leg and (1 <S> kΩ // <S> 10 kΩ) <S> = 909 Ω in the bottom leg. <S> That will produce 5.7% of the input voltage, which is 2.74 V with 48 V applied. <S> Apparently your mosfet is partially on with 2.74 V on its gate. <S> One possible option is to replace R6 with a diode so that when A is brought to ground the gate will only be at 700 mV or so. <S> However, a meaningful recommendation is hard to make without knowing the rest of the circuit. <S> There are lots of possibilities. <A> If you ground A terminal R6 and R3 are in parallel. <S> Your voltage on gate of NMOS is: Ug=48*(R6||R3)/(R1 + R2 + R6||R3) <S> If you remove R6 you will bypass R3 and gate will be on gnd potential. <A> If you ground point A with an 1kOhm resistor you get 2k in parallel with 10k, which gives 5/3k=1.66k. <S> So the voltage divider gives 1/10 of 48V or 4.8V at the gate, which is enough to switch on the FET. <S> If you ground A directly you get 1k in parallel with 10k, which gives 10/11k = 909 Ohm and 2.74V at the gate (as the others have written), which is not enough to turn the FET on.
| Another option might be to clamp the gate to ground with a NPN transistor when you want the FET off. If the 1k resistor is absent, you're pulling the gate directly to common, which will certainly turn it off (barring noise and the like).
|
What would a "Perfect" inductor be like I sometimes see that "A perfect inductor would be with superconductors" and so on. What properties of "Perfect inductors" makes them different from regular and what advantage would they create towards electronic circuits? <Q> The perfect inductor has reactance without any resistance. <S> In other words, the real component of its impedance would be zero. <S> Loss of power as heat within the inductor is thus also zero. <S> The perfect inductor presents no impedance to a constant current (i.e. DC), yet opposes any slightest change of current. <S> Any non-superconducting material can not meet this condition, as it is bound to have some resistance. <S> Hence, a perfect inductor would need to be made of superconducting material. <S> Advantages at the trivial level would be elimination of any wasted power through resistive heating in an inductor, of course. <S> Beyond that, one enters the realm of speculation: There may be many advantages, but also design challenges. <A> Ideal or perfect inductor would be/have, in my book: - Zero DC resistance (unless requiring inductor with defined-peaking characteristics in a tuned circuit or winding a solenoid that naturally suits having a DC resistance) Zero core loss (eddy current loss) unless requiring an EMI suppressor Zero hysteresis loss Linear i.e. has no saturation (unless you are requiring a saturable reactor or desiring to create 3rd harmonic distortion) Zero capacitance and hence no self resonant frequency <S> No change in L as temperature changes <S> No curie point (applies to non-air-cores I believe) <S> unless by design you need one. <S> Zero disaccomodation factor (no change in permeability with mechanical shock) No flux leakage unless building a transformer. <S> Hopefully you can see that some "ideal" or perfect requirements do not suit other applications. <A> infinite saturation flux density <S> zero core loss infinitessimal volume <S> I wouldn't want to try switching one in a regulator, though. <S> The voltage induced when the magnetic field collapses would be a sight to see :) <A> A "perfect inductor" (or "ideal inductor") would be a two-terminal device with the following voltage - current relationship: \$v_L = <S> L <S> \dfrac{di_L}{dt} \$ <S> Note that this implies that the voltage across the device is zero <S> when there is a steady (constant) current thus, it would necessarily be the case that such a device would have zero resistance, i.e., it would not dissipate energy but only store or deliver it. <S> It's really the lack of properties like, for example, resistance, capacitance and the associated self-resonance frequency, etc. <S> that distinguishes a perfect inductor from an "ordinary" inductor. <S> A perfect inductor would be simple in that it would possess the property of inductance period . <S> This would certainly be an advantage in a circuit in that you wouldn't need to take into account the non-ideal properties of a real, non-perfect inductor. <S> In other words, a "perfect" inductor is a fantasy. <S> It doesn't exist except in the abstract world of ideal circuit theory. <A> A perfect inductor that had it's 2 leads connected by zero ohms would maintain a current flow through itself forever, would it not? <S> Assuming we could get current started. <S> Regardless of the value of inductance. <S> However any form of measurement would rob energy and cause the current to be reduced. <S> It would act as a flywheel spinning in free space. <S> Interesting, unobtainable, stuff.
| A perfect inductor, at first glance, would have the following: zero series resistance infinite permeability
|
Using an Opto-Isolator to detect 120VAC on a Microcontroller I am designing a system where I need to know whether or not 120VAC is present on a specific wire. The system is in line with a fuel pump system, and I need to check to see whether or not the pump is getting power, if not, make an alert that the Emergency Shutoff Switch has been pushed. The line could be either 0v (Open), 0A @ 120VAC current (Pump powered but not running), 8A @ 120VAC (Pump powered and running). I really only need to detect whether or not there is 120VAC present. I have found multiple sources saying that I could use an OptoIsolator , would this suffice? And how would one wire it? Is it as simple as 120VAC in, 5v out? Or is there additional circuitry that I require? <Q> A opto-isolator is appropriate, but no, you don't just wire 120 V into one. <S> The input of a opto-isolator is just a LED, or sometimes two LEDs in parallel with opposite polarity. <S> The LED usually emits IR, so drops around 1.2 V and can handle maybe up to a few 10s of mA. <S> The output is usually just a phototransistor that allows current to flow thru it when it receives light from the LED. <S> Since this power is low frequency, you don't need fast operation and can use relatively little forward current. <S> Let's say 2 mA peak thru the LED is enough. <S> You can easily find optos that have a current transfer ratio (how much current the output transistor can pass divided by how much current you run thru the LED) of 1 or more. <S> That means the output transistor tied between ground and a 10 kΩ pullup will produce a good enough digital signal. <S> The peak voltage of a 120 V RMS sine wave is <S> 170 V. A 82 kΩ resistor in series with the LED will light it well enough in that case. <S> It should also be rated for at least 200 V. <S> The LED can't handle 170 V in reverse, so you can put a ordinary diode rated for the voltage in series with it, like a 1N4004. <S> That also cuts down on the power dissipation in the resistor since it is only conducting half the time. <S> In this example the resistor only dissipates 90 mW with the diode in series. <S> The limiting factor for the resistor will be its voltage standoff capability. <S> There are various tricks to reduce power consumption, like using a capacitive voltage divider before the resistor. <S> If 90 mW is OK, then I'd just use the resistor and diode. <A> Optoisolators have varying safety ratings in terms of isolation voltage. <S> If the monitoring circuit could be touched by a person, you would need an optoisolator that provides at least 3750V isolation (preferably 5000V) to safely isolate the mains from the user. <S> As far as detecting the AC goes, the input of an optoisolator is generally a unipolar photodiode. <S> (10mA is generally 'safe' for most optos.) <S> You cannot 'just connect it' to the AC. <S> You could rectify the AC coming past the cutoff switch, scale it with resistors to a safe current, feed it to the photodiode and monitor the pulse train generated by the isolated phototransistor, or you could add some capacitors and make it into a DC level, feed that to the opto and monitor the phototransistor for on/off. <A> You could use an optoisolator across the power line and end up with a very cheap < $1 solution. <S> However, a very simple way to do this without getting involved in the details of optos, appropriate resistors, possibly rectification and filtering is to buy an off the shelf wall wart that will take in 120VAC and output 5VDC. <S> Should cost about $5 and it will immediately (+/- <S> a second or so for its internal capacitors to discharge) indicate whether or not you have power on the line. <S> A 120VAC relay can also be used instead. <S> Either of these is likely simpler than building an optoisolator circuit. <S> Now, you don't say how you plan to detect this signal. <S> Is it an input to a microcontroller, an Arduino (or the like), or just light up an LED? <A> Just use a 120VAC Relay and monitor the N/O or N/C pins on the relay. <A> The transistor side of the optocoupler connect to lower power supply on which your board is running and monitor it. <S> You get a high when 120VAC is present and a low when 120VAC is not present.
| Opto Isolator is the correct solution for your purpose, as I can see a it is a AC supply of 120V, I suggest to use a bridge rectifier which gives you some sort of pulsating DC, the just use resistor for voltage drop, and connect it to cheap optocoupler form Vishay or Farichild. You need to ensure that whatever waveform you're monitoring doesn't exceed the rated voltage and current of the diode.
|
Generating a 10 volt rail from a High Voltage Supply with unknown Ground Potential I have a sticky situation where my power supply is coming from a charged capacitor with 200 volts across it. Because of the way it was charged, I can't guarantee that the negative side of the cap is at "ground" potential. All I can depend on is that there is a 200 volt difference. It could be that one side of the cap is 10 volts and the other side is -190volts. As a result of this, I'm nervous about trying to mix other control circuitry that uses a different ground potential, so what I want to do is simply use the 200 volt circuit to run the control circuitry. From what I know all I have to do is use a voltage divider to generate a third voltage leg that has the 10 volt difference I want for my control circuitry. Then I should be able to run IC chips (like NE555) and mosfet gates off the 10 volt difference without any problems. It also shouldn't matter whether I make the 10 volt difference relative to the low side or the high side. Is all my understanding correct? Are there any problem areas I could run into when trying to divide high voltages to much lower voltages? What if I had an even higher voltage supply such as 1000 volt? Can I still divide it like this to run ICs and mosfets? Here's a pic to help illustrate: <Q> To supply \$200mA\$ at \$10V\$ from \$200V\$, there must necessarily be \$200mA\$ at \$190V\$ somewhere else, if you are converting the voltage by any linear method (like a voltage divider). <S> $$ 200mA <S> \cdot 190V = <S> 38W <S> $$ <S> That's a big resistor, transistor, or something, with a big heatsink. <S> Not at all hard, but quite big, and warm. <S> Probably, you will want a non-linear voltage converter, like a buck converter . <S> This will be much more efficient, and won't need to be big with a large heatsink. <S> If your control circuitry, and everything connected to it, is connected to only your \$10V\$ output, then it doesn't matter if that \$10V\$ is \$200V - 190V\$ relative to ground, or \$5V - -5V \$ relative to ground. <S> After all, "ground" is just where you stick the "ground" symbol in the schematic, and the electrons can't see that. <S> But, if you are already using a buck converter, you could get one with an isolated output. <S> Typically, these will use a transformer to couple the power from the input to the output, and the feedback will be done through an optoisolator. <S> Thus, the output of the buck converter is floating , meaning, it has no reference to anything on the input side. <S> You could then, if you wanted, connect your control circuit's ground to some other ground, and not be worried in a voltage difference between these grounds making some large current flow and making smoke. <S> Even if you don't connect it to something else, that floating output has the nice feature that when someone touches it, maybe accidentally, and that someone also happens to be touching some other potential (say, the Earth, which is connected to a lot of stuff), the output voltage will "float" to their potential, <S> and then there won't be any difference, and they won't be shocked. <S> It's quite likely that any 200V to 10V buck converter you find will be isolated, for safety. <S> So, perhaps by happy accident, you don't have to do anything special to solve both your problems. <A> 200 V/1050 ohm = 0.19 <S> A 190 V x 0.19 <S> A = 36 W. <S> That's a pretty big resistor. <S> Yes, you can use either the high or the low side. <S> TI has a power selector that gives various possibilities. <S> With your parameters the choices are from the UCC28701-03 parts as shown here . <A> A bog-standard wall-wart will convert 90V-260V ac to (say) <S> 12V. <S> The output will be isolated and therefore you can ground it locally or leave it floating. <S> I would choose one that says it can handle DC inputs (as far as I'm aware most of them do) and I would choose one which is a two pin device i.e. doesn't rely on an earth pin for safety. <S> How does this help? <S> Most wall-warts initially convert the ac to dc then do the switching via a small transformer down to 12V. <S> The initial dc they convert to is in the range 120V to 370V <S> so 200Vdc input is ideal. <S> You need 10V and this is rarer than 12V <S> so you have the options of: - Finding one Using two wall-warts with 5v outputs wired in series Using a linear regulator like a 7810 after the 12V output. <S> Option 1 - can you find one? <S> Option 2 is my favourite because 5V devices are plenty and having two with outs in series gives you a +5V, 0V and -5V supply. <S> Option 3 - nice clean output but <S> "like a 7810" realistically means a LDO regulator but if you are into doing circuits this should be no-problem.
| A switching power supply is what I would use and luckily there are off-the-shelf solutions that are relatively cheap.
|
Completing a circuit, how is the necessary voltage determined? When you have some device, like a TV, why is there a necessary Voltage-or current for that matter. Whenever I see circuits, it always says to find the current from the voltage and resistance given, so presumably with any battery there should be a current. Why do some things require bigger current and bigger voltages? And how would one calculate the voltage required? Furthermore, even with some deemed insufficient Voltage, there would always be a current, so I don't know why a device wouldn't work. <Q> The reasons vary greatly, but I think a good way to summarize them is this: a device does more than simply passively draw current. <S> For example, the CRT of a television: the deflection plates use an electric field to deflect the electron beam to a given pixel: <S> The voltage applied to the vertical and horizontal plates determines the angle of deflection--the greater the voltage, the greater the deflection. <S> So a larger screen would require a higher voltage in order for all the pixels to be reached. <S> This is just one example, but you get the gist: in most electronic devices the actuators are driven by voltage. <S> Even when they're driven by current, such as with speakers, the signal is usually transmitted throughout the circuit as a voltage. <S> Another thing to consider is the behavior of transistors. <S> Transistors, which drives all the switches, amplifiers, active filters, and logical elements of a circuit, have a threshold voltage. <S> This is usually fairly small, around 0.7 volts or lower, but if a transistor does not receive at least this voltage on either of its channel terminals, the transistor will essentially be in an "off" state, functionally indistinguishable from a transistor with no voltage applied at all. <A> Mostly you need a certain amount of current to make it physically work. <S> For example, if you need an electric motor to have a certain torque, you have to make a magnetic field of a certain strength, which requires a specific amount of electric current. <S> For logic gates on computer chips, a 1 is created by charging a capacitor up to a certain voltage. <S> The more current you have, the faster that charging happens, and the faster your computer computes. <S> A light bulb needs a certain amount of current in order to create a certain amount of light. <S> All these things have an intrinsic resistance. <S> That means if you want to induce a certain minimum current, you require a certain minimum voltage, by Ohm's law. <S> In practice, designing circuits is often done kind of in reverse. <S> A lot of household devices require 120 or 240 volts, because that happens to be the amount that comes out of the sockets in your wall. <S> Portable electronics get designed for the voltages of batteries that happen to be readily available at the store. <S> But they often will convert internally to a voltage that better matches their actual needs. <A> I read your question as something like this: "why does a circuit that is designed to operate on 12VDC need 12VDC to operate?" <S> Circuits are designed to work with a particular power supply voltage. <S> For example, older logic ICs were designed to work with 5V power supplies. <S> Later, more efficient ICs were designed to work with 3.3V power supplies. <S> Older vacuum tube circuits sometimes required power supply of <S> hundreds of volts because, well, that's how much plate voltage is required to operate a vacuum tube. <S> Any reasonable answer to the question of why these devices require these power supply voltages will assume a certain level of knowledge of circuit theory and device theory. <S> The fact is, active devices aren't resistors and, in general, are quite non-linear. <S> There may be essentially zero current for any voltage up to some operating threshold. <S> If you exceed the maximum voltage, there may be lots of current and probably smoke too. <S> Why do some things require bigger current and bigger voltages? <S> While not the most comprehensive answer, a reasonable start to one is to consider that, depending on the purpose, electrical power is converted to some other type. <S> For example, an amplifier and loudspeaker convert electrical power into acoustic power Since the product of voltage and current is power, the more power that is converted, the larger the product of voltage and current required of the power supply . <S> In many cases, the electrical power is converted to heat due to losses. <S> For example, digital circuits that switch at very high frequencies convert considerable electrical power to heat (think of the large CPU coolers required for high end gaming computers). <S> A Class A audio power amplifier may convert hundreds of watts of electrical power into heat just while it is idling , i.e., not producing any electrical output to the speaker. <S> And so on...
| Often times the actuators and transformers in a device rely on electrostatic phenomena, so in order for it to accomplish a task, a varying range of voltages is required for various devices.
|
What does hot and cold mean on an AC outlet? So I sometimes hear that the outlet has a smaller hole for hot and larger for cold so its harder to stick your finger in hot. But if it is an AC wave, shouldn't they both be the same, because they get 50% of pos. and neg? What exactly does Hot and Cold mean on an AC outlet and does it have something to do with ground? (ex: you touch hot and it goes through your body to ground and gives you a shock) <Q> In the USA One thing that the other answers did not cover, the line coming in to your house is actually 3 lines from a transformer with a center tap. <S> That center tap is the "cold" and the two ends are both "hot", to get 120 you go from the center to one of the ends and to get 240 you go from end to end <S> In your breaker box it alternates which end is available each line, that is why 240 breakers are two wide, it is connecting the two ends together instead of the middle and the end. <S> In Europe Similar principles apply with the following major differences Most households are supplied with a single phase of 230 V AC A three phase, four wire (+ protective ground), star topology network is commonly used. <S> The wiring colours are different (below for Netherlands, probably other countries too). <S> green/yellow striped is protective earth. <S> brown is live supply black is switched live blue is neutral return. <A> Short Answer: <S> "Hot" is the side connected (ultimately) to the power plant. <S> The power plant drives the "hot" line above (and below) "ground" potential. <S> Deeper Answer: <S> Here is the equivalent DC schematic: <S> simulate this circuit – <S> Schematic created using CircuitLab Notice how it doesn't matter what you connect to the cold side if the switch is open. <S> In your example, the switch is actually the open outlet and the DC source is replaced with an AC one... <S> Why "Cold" is Cold: <S> It's perhaps more illustrative to think of the "hot" wire as the one which deviates from neutral (ground). <S> In an open circuit, no current flows normally through the circuit. <S> The risk is that you, by touching one of the wires, could complete the circuit by providing a pathway through your body. <S> Since you will be near ground potential, contact with a wire at ground potential is substantially safer than contact with a wire far away from ground potential. <S> That's why we call the neutral "cold". <S> Your intuition is correct about polarity. <S> The current would flow through you in different directions during the different halves of the AC cycle (if you touch hot and provide a pathway). <A> More appropriate terms would be "live" and "neutral". <S> The live is actually excited with a signal waveform from the power company, so if you say plug a multimeter into the ground (literally the ground) and the live hole you'll voltage difference. <S> Because there's a voltage between the live and ground, current can flow through you if you stick your finger in (assuming you're electrically connected to the ground). <S> If you're not electrically connected to ground, or more specifically you're only connected to the potential of the live wire <S> you're perfectly safe* because electricity needs a potential difference to flow. <S> This is why birds can land on powerlines and be just fine. <S> This does not happen with the neutral, so there should be no significant electric potential between the neutral and literal ground. <S> Because there's no significant voltage, touching the neutral is safe <S> * because no current flows. <S> *note: For safety reasons though, I would not recommend sticking your finger or a screwdriver into the supposed neutral hole, or hanging off of powerlines. <S> You never know if if you might accidentally touch the live wire (say from a poorly wired up outlet) or complete the circuit by brushing your leg against a tree branch, among many different things which can go wrong. <S> It's better to not take the chance. <S> Turn off power to circuit breakers before mucking around with outlets, and unplug appliances before trying to service them (or better yet, get a trained professional to do it for you). <A> As others have noted, in the USA it is common to have two anti-phase power supply wires, both of which are called "hot" but must remain electrically disconnected from each other. <S> The "neutral" wire should always be halfway between them, and will typically not deviate much from ground voltage. <S> Accidental contact with the neutral wire is less likely to be harmful than accidental contact with a hot wire, but should not be considered "safe". <S> Although the neutral wire is generally at about the same potential as the safety-ground wire, it serves a very different purpose. <S> The current flowing through the neutral wire of a cable should be equal and opposite to the current flowing through the hot wire (or, if both anti-phase hot wires are present in a cable with a shared neutral, the sum of the hot currents should be equal and opposite to the current in the neutral wire). <S> If 14.371 amps are flowing out through the hot wire, 14.371 amps should be flowing back in through the neutral wire. <S> The safety-ground wire should be capable of sourcing or sinking considerable current, but outside of fault conditions the actual current in it should be essentially zero. <S> One useful safety invention of the last century is the ground fault circuit interrupter (so-called in the USA; I think other countries use the term "residual current detector"). <S> It continuously monitors the current in a hot-neutral pair and ensures that the current in each wire is equal and opposite that of the other. <S> If the two currents differ by much, the device will assume that current is flowing into or out of the circuit through some other path (possibly going through a person) and will disconnect power. <A> Neutral is bonded (connected) to ground (called "earth" in some countries), usually at the breaker box, and therefore has minimal to no potential compared to ground at the outlet. <S> A test lamp connected from hot to ground will light the same as if it were connected hot to neutral (on a ground fault circuit, however, it will trip the breaker if connected to ground). <S> A test lamp connected from neutral to ground will not light.
| In the US, the terms are usually "Hot" and "Neutral".
|
Preference of NAND & NOR gates What's so special about NAND & NOR(apart from being universal gates) that most books on digital design try to emphasize design using these gates? Is it easy to manufacture or something? <Q> NAND and NOR are preferred because they are smaller and use less power in a CMOS process than equivalent AND or OR gates. <S> NAND and NOR gates can be created with 4 transistors, while AND/OR require 6. <S> An AND/OR gate is laid out in a cell library generally as a NAND/ <S> NOR followed by an inverter. <S> AND Gate (OR is similar) <A> Once you have inverters, you can basically create any gate you want. <S> Below is a cool chart that shows how to turn a NAND gate into the other kinds of gates. <S> What @Tim said about the physical size of NAND and NOR gates is absolutely true, but I'd also like to point out that this doesn't matter when talking about Quad-Gate chips like the more modern versions of the 74xxx type chips. <S> The reason why that is is that the I/O Buffers and pads on the chip itself are much larger than the actual gate, so the difference between 4 transistors and 6 doesn't really change the price much (if at all). <S> It does matter for larger chips where you have millions of gates and the size of the logic <S> is much larger than the size of the I/O. <A> An historical perspective. <S> In the early days of logic circuits the easiest gates to build <S> were NOR gates <S> (you could even build them with thermionic valves/tubes). <S> Much of the inital work (and maths) was done in NOR gate building blocks. <S> With the advent of integrated circuits and especially the 7400 logic series came the multiple emitter transistor and so the focus changed to NAND gates as the basic building block. <S> Then came CMOS (4000 series gates) that could create both types of gate without the penalty of extra devices. <S> (It also decreased power consumption, size of chip, increased voltage supply range etc. <S> etc.) <S> The rest, they say, is history.
| NAND and NOR gates are arguably more flexible than AND and OR gates because you can also turn them into inverters.
|
Does a ground fault compromise the whole circuit? (this image taken from http://www.allaboutcircuits.com/vol_1/chpt_3/3.html ) Based on this picture, would a tree across the bottom wire of the circuit (the solid wire, not the dashed wire representing earth) cause the person to be electrocuted? Am I correct in thinking the tree would cause a voltage drop? EDIT: To clarify, what would happen if a resistor was added to the bottom, solid wire? <Q> I assume the neutral wire is still unbroken after the tree is across it, in this case nothing would happen. <S> The tree is already at ground potential, as is the neutral wire, as is the person. <S> If the neutral conductor is broken then there will likely be an introduced earth fault impedance (either tree or person) and the load would see a voltage drop. <S> If the person becomes the lowest impedance to earth then he will likely be zapped. <A> It appears the person in the diagram is touching the bottom wire, which is connected to ground. <S> I assume you mean if a tree (as in the plant) connected both the top and bottom wires, would the person be shocked then? <S> The answer is no, the potential difference would be across the portion of the tree that is making the connection. <S> Here's a video showing a tree branch shorting out high voltage distribution lines: http://www.youtube.com/watch?v=-6Alur-65_w <S> If the person continues to make contact with the ground wire during such an event, there would be no noticeable effect. <A> The situation you illustrate is one of the major reasons why it is important that safety ground connections be kept isolated from neutral connections. <S> If there were two wires connected to grounds at the left of your picture, one of which was carrying current for the load, and one of which was being touched by the person, then for a harmful condition to occur it would be necessary both that one or more connections failed, and also that one or more erroneous connections was present. <S> Neither any combination of failed connections alone, nor any combination of erroneously-present connections alone, would suffice. <S> One of the limitations of normal safety ground protocols is that while multiple faults are required to create harmful conditions, it's possible that enough faults may develop that the system is one fault away from electrocuting someone without those faults causing any symptoms. <S> For example, it's important that the safety ground and neutral wire have no connection to each other, except via separate paths to earth, but there's no way short of disconnecting the neutral to ensure that's the case.
| The person is not shocked because there is no potential from the wire being touched to earth ground underfoot.
|
USB Solarpanel read current with python? I'd like to connect a small solar panel (2v 50ma) to a USB cable and measure the output on python. Now I was wondering if this would work and how to make it work. How many volts can I send into my pc? And would pyUSB work for reading this? <Q> You cannot connect a voltage source directly to the USB data lines - USB is a complex digital communications system. <A> Looks like the simplest way would be this which means one of <S> these with a shunt resistor to convert the current to a voltage drop. <S> The bad news is that it isn't the smallest possible package for the job; the good news is that it's a single package (since the PIC does all the USB) with supporting hardware, and there's more than enough room to expand if you want to get fancy (e.g. parallel LCD output, keypad input, multiple panels, etc.). <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You can then use PySerial to talk with the PIC since it will show up as a serial port on the computer. <A> You can't do this directly. <S> Get a microcontroller with an ADC and an USB interface, then use the ADC to read from the solar panel and transmit this over USB (or other communication method) to the computer where Python is running.
| You would require an Analog to Digital converter (ADC) that could interface to USB, and connect your solar panel to the ADC analog input.
|
Getting started with electronics with minimal space? I've wanted to get started working with breadboards and basic circuits, but I have very little space with which to work or to store any tools. The largest contiguous surface I have is a weak 2ft by 2ft pull-out wooden keyboard drawer on my desk. I might be able to manage something with that, but I don't know how I'd be able to safely store anything I work on or any of the equipment (wires, soldering iron, electronic parts, etc.). Given a shortage of space, is there any way to still work with electronics? <Q> Use your computer! <S> It used to be that to "get started" in electronics <S> you had to have materials. <S> Now you can do some pretty high quality experimentation and learning in online simulators, tutorials, and videos. <S> It is definitely, much less than ideal, but with zero space and zero hazardous materials, you can gain a remarkable amount of basic skill. <S> Some resources for free tools and data <S> CircuitLab -- online circuit simulation <S> CircuitHub -- online parts library for CAD/EDA tools <S> Kicad -- free design software <S> Upverter <S> -- online design software <S> Octopart -- online part search <A> Since you have so little space and seem unable/unwilling to fight for more, one possibility is the Electronics Learning Lab from Radio Shack. <S> You can hook up wires by pushing the springs over and slipping them in, and it's sturdy enough to use on your lap so that you can wire it up anywhere you can sit. <A> But if you have limited space that is fine too as long as you do not have materials like solder or aluminium scattered across the table which could lead to damaging components. <S> As far as breadboarding is concerned, prototyping itself can be very messy. <S> Things to take into consideration are: Not to lose small components like resistors Safety precaution with the soldering iron as the temperature goes upto 400 Deg C <S> Make sure you have enough space to keep your power supply, hot iron, solder, breadboard and components <S> you are working with <S> so you do not have to keep moving around.
| To work with electronics it is recommended to have clear space as electronic components are fragile and can be easily damaged especially parts like micro-controllers, integrated circuits (IC), etc.
|
Resistor selection for LED This isn't asking the equation to determine the necessary resistor for LEDs, but more asking the general practice for selecting them. I've seen multiple circuits that have used much higher resistor values than what I would deem to be necessary. For example, I have seen a design that has used a \$330\Omega\$ resistor for a red LED with a forward voltage of \$2V\$, and forward current of \$20mA\$ on a circuit with \$5V\$ supply. By my calculations that's twice as high as it needs to be (\$150\Omega\$). I've read else where that this resistor is the 'playing it safe' choice, in that they use that wherever and can be confident they wont blow the LED. But is there any other reason behind it? Other than purposely halving the LED brightness. Perhaps this prolongs the life of the LED? In my circuit I've selected the theoretical correct resistor value for each LED, but want to know if there's a practical rule I'm missing as the resistor values are quite small at times. <Q> While the answers by @Passerby and @MichaelKaras pretty much cover it, there's one more thing to add: <S> Humans perceive light intensity non-linearly: At very low intensities, we are very sensitive to a even slight variation in brightness. <S> On the other hand, at higher intensity, the unassisted human eye is pretty much incapable of discerning differences in intensity. <S> This really interesting graph demonstrates this excellently: <S> ( source ) <S> Essentially the ability to perceive change in intensity is very high when most of the vision is attributable to the rods of the eye ( scotopic vision ), and drops very low when the cones are doing the sensing ( photopic vision ), i.e. at slightly higher luminance. <S> Less critical but good to know <S> : LEDs illuminate somewhat non-linearly versus current, with the graph dropping off the linear as current increases. <S> This is most noticeable with red. <S> ( source ) <S> So, long story short: <S> The human eye cannot notice even large intensity changes at the higher levels of light that an LED generates at higher currents. <S> Using half or even less than half of nominal rated current (20 mA typical for indicator LEDs, 50mA or more in high power LEDs) will thus work perfectly fine for most indication purposes. <S> In my designs, 5 mA is my preferred current for all indicator LEDs: <S> Try it, it works great! <A> LED Datasheets, like most datasheets, are based on averages and target goals. <S> Mainly, the listed led life is hours on at x current, y voltage, z temperature. <S> For most "regular" leds, that's 20mA forward current. <S> Drive it harder <S> , it's brighter, but life is shortened. <S> Drive it softer, it's dimmer, and life should be longer. <S> Aside from allowing the LED to live longer, there are 2 other reasons you might want to drive it with a lower current. <S> First, because you are saving energy. <S> If you are on battery power, every mA counts. <S> Drive the led at a lower current, save energy, you can drive it longer. <S> The second reason is that you don't need them at full brightness. <S> Sometimes the difference between 18mA and 20mA can't even be seen unless you put two side by side to compare. <S> Sometimes, depending on ambient light, distance, led type, and purpose, you could have the led running at 4mA and that's good enough. <S> I can't tell you how many things I have with overly bright leds that I have needed to put tape over, or modded to lower the brightness (the original gameboys for one. <S> Blinding!) <S> There is one other concern for choosing resistors. <S> And that is standard values. <S> You might not have a resistor with the same exact value that (V - VF) / <S> I would suggest. <S> So you choose the next bigger one. <A> Running an LED at rated maximum current is OK if you make sure that the applied supply voltage is well regulated. <S> But please consider that many times the rated current through an LED may cause it to emit way more light than would be necessary for some applications. <S> Designers will also limit the current through LEDs for some other reasons as well including: 1) <S> Lower current operation can extend battery life for battery operated products. <S> 2) <S> Some LEDs will have variation of the emitted wavelength based on amount of current flowing through it. <S> Current limiting may be used in these cases to adjust color purity. <S> 3) <S> When using an array of LEDs on a panel there can be variation of apparent brightness between various LEDs of different sizes, colors and part numbers.
| Reducing the current in the various LEDs on the panel is a common scheme used to make them all look uniform at similar brightness. Reducing the current in the LED will lower the stress on the diode and will lengthen its life.
|
difference between single double and three phase If single phase is 230 V and 3 phase is 440 v then what about for 2 phase?And why is it so? <Q> Here is what wikipedia says about two-phase power. <S> Two-phase electrical power was an early 20th century polyphase alternating current electric power distribution system. <S> Two circuits were used, with voltage phases differing by 90 degrees. <S> Usually circuits used four wires, two for each phase. <S> Less frequently, three wires were used, with a common wire with a larger-diameter conductor. <S> Some early two-phase generators had two complete rotor and field assemblies, with windings physically offset by 90 electrical degrees to provide two-phase power. <S> The generators at Niagara Falls installed in 1895 were the largest generators in the world at the time and were two-phase machines. <S> The advantage of two-phase electrical power was that it allowed for simple, self-starting electric motors. <S> In the early days of electrical engineering, it was easier to analyze and design two-phase systems where the phases were completely separated. <S> It was not until the invention of the method of symmetrical components in 1918 that polyphase power systems had a convenient mathematical tool for describing unbalanced load cases. <S> Induction motors designed for two-phase operation use the same winding configuration as capacitor start single-phase motors. <S> Single phase and 3 phase are unrelated to 2 phase described above. <S> Basically, 3 phase is what the power stations produce now and ultimately this gets distributed as 3 single phases to our homes: <S> - There are three line voltages shown in red that are 120º apart in phase orientation. <S> This can be seen as three single phase voltages (blue) and if you did the trigonometry you'd see that the length of red is sqrt(3) times bigger than the length of blue hence, <S> if you have 230V phase voltage, the line voltage would be 398V. <S> Here's how the voltages look in time: <S> - Going back a few years when the UK had 240V, the line voltage was 415V and sometimes 440V line voltages were referred to ans <S> they yielded a phase voltage of 250V. <A> The 230 V is phase-to-ground voltage. <S> 400 V (not 440) is phase-to-phase voltage, because 230 * sqrt(3) = 400. <S> For two-phase system eg. <S> 100 V the phase-to-phase would be sqrt(2) <S> * 100 V, because phases differ in angle of 90 degrees and you can calculate this from Pythagorean theorem . <A> Voltage is measured relatively from a point. <S> You cannot say how much voltage is passing through a point, instead you may say how much more voltage a point has than any other point. <S> Here in single phase, where you are supplied with a neutral wire and a phase wire, if you measure the voltage between the phase and the neutral, it would be 230 V. <S> But in the case of three phases, where you are supplied with three phase wires and a single neutral wire, if you measure the voltage between phase to neutral it would still be 230 V. <S> And if you measure the voltage between any two of the phase wires you would get 440 398 V. Thanks @Transistor for the correction.
| The revolving magnetic field produced with a two-phase system allowed electric motors to provide torque from zero motor speed, which was not possible with a single-phase induction motor (without extra starting means).
|
How can I determine the voltage insulation rating of magnet wire? As an extension of my previous inquiry into air-core chokes, I'm trying to determine the voltage insulation rating of magnet wire, without much luck. Few of the audio air-core choke manufacturers list that data, and none of the magnet wire manufacturers I've checked give it either. For example, this company lists the type of insulation used, and its thermal properties, but nothing about its voltage withstand ratings. This appears to be common practice. I see references to insulation grades (1, 2, or 3), which seem to be how many insulation layers are present on the wire, but I still haven't found any voltage rating for those grades. How can I be sure that the insulation on magnet wire will not break down under a given voltage? Am I not looking in the right place for this rating? Am I looking at the wrong kind of magnet wire for high-voltage applications? Are we required to build chokes such that consecutive windings of magnet wire are close enough in voltage that the insulation rating of the wire doesn't matter? <Q> The primary purpose of magnet wire insulation is to provide turn-to-turn or layer-to-layer isolation; as such, the voltages involved are relatively low, regardless of the overall component rating. <S> Therefore the actual voltage rating is usually of little interest. <S> For higher withstand voltages - between the winding and the core or other components - other forms of barrier are normally employed. <S> This must be the normal case : <S> if the wire coating had to withstand high voltages, its thickness would increase; then there would be less copper in a given winding space, compromising the efficiency of transformers and motors, or wasting materials by requiring larger bobbins and cores to maintain the same performance. <S> Thus, high voltage copper wire would have a vanishingly small market if it were available. <S> If you require an air cored inductor with high withstand voltage ratings, I suggest you plan on means other than the varnish coating to achieve those ratings. <S> For example, multi-section bobbins, silicone potting, heatshrink sleeving, nylon mounting bolts and standoffs, or whatever is appropriate to the mechanical situation. <A> Quoting from the great Wiki "Like other wire, magnet wire is classified by diameter (AWG number or SWG) or area (square millimetres), temperature class, and insulation class. <S> Breakdown voltage depends on the thickness of the covering, which can be of 3 types: Grade 1, Grade 2 and Grade 3. <S> Higher grades have thicker insulation and thus higher breakdown voltages. <S> The temperature class indicates the temperature of the wire where it has a 20,000 hour service life. <S> At lower temperatures the service life of the wire is longer (about a factor 2 for every 10 °C lower temperature). <S> Common temperature classes are 105° C, 130° C, 155° C, <S> 180° C and 220° C." Calculation of breakdown voltage ( Test acc. <S> To IEC 60851.5.4.2, cylinder ) <S> Calculation of average values <S> Ds: Ds = t <S> x <S> Vμ [Volt], with Ds : breakdown voltage T : increase due to insulation, <S> t = da – dnom, : <S> wire diameters with and without insulation <S> Vμm = volts per micron insulation (dependent on type of insulation) <S> Example: Test with cylindrical electrode (round wire) <S> dnom 0.071mm (bare wire nominal diameter) <S> da = 0.083 <S> mm (wire with coating) <S> t = da <S> – dnom <S> = 0.083 – 0.071 = 0.012 <S> mm = <S> 12μm (thickness of insulation between wires) <S> Vμ = 205 V/μm, therefore Ds = 12μ <S> x 205 V/μ = 2,460 V <A> Most of the commonly available stuff is 500 or 600 volts. <S> Here is an example. <S> To go a little deeper, there are a number of different coating used for depending on temp environment for example. <S> Here is some info about some of the different materials. <S> Many of the materials will have high dielectric withstand ratings, but there are pin holes that effectively lower the in use rating. <S> There are also corona ratings which are often close to 600V, like here .
| The breakdown voltage depends mainly on the thickness of the insulation (see formula below), but also on the bare wire diameter, the application temperature of the coil and the type of enamel.
|
How can I electronically measure tilt/compression of a pliers or alligator-clip? I would like to electronically measure the width (really the compression/extension) to which an object's constituent blades have been stretched. Or alternatively, I could measure some other parameter which I can then map to the displacement by data calibration. In particular, I am dealing with a miniature tool (a few cm long) whose outline resembles an alligator-clip (or pliers). So consider something like either of the objects in the below image. How can I electronically track/measure the below spacing to a resolution of about 0.1 mm over a full-scale extent of ~10 mm? I cannot think of any transducer or phenomenon that I could map to this movement and get such fine resolution. For example: Perhaps I can measure parallel-plate capacitance -- would that be accurate enough in this scenario? Or maybe I could place a spring between the two jaws and measure the compression -- but how would I measure the compression of the spring? CV isn't a viable option because I wish to make the sensor compact enough that that I can log the data wherever I wish. EDIT: Updated with illustration added based on @Michael Karas's Answer and @Matt Young's suggestion. <Q> I think you want to look into small strain guages. <S> Strain guages are a resistive element that changes resistance in relation to very small changes in the longitudinal stress introduced into the senesor element. <S> These are generally made of a thing plastic type carrier material with loops of resistive material printed upon it. <S> Generally a sensor is comprised of two resistive elements in series like a voltage divider. <S> These are then wired into a bridge circuit that is monitored via an instrumentation amplifier. <S> The sensors often are made up with a stick on glue to attach them to substrate. <S> In the case of something like your allegator clip you could use two sensors just attached along the outside length of the allegator clip assembly. <A> I'd look at a flex sensor such as this one from Sparkfun. <S> Resistance varies depending on the amount of flex. <S> You might mount it as a 'U' loop inside of your scissors so that as the scissors open or close the sensor flexes into a tighter or looser 'U'. <A> ... <S> I'm terribly new at this
| A micro potentiometer might work depending on your tool configuration.
|
Why are smartphones and tablets ARM based? Why don't these devices use Intel processors like laptops do? Why are they restricted to ARM? Also for Windows 8, do they want ARM just for tablets and smartphones or is it also for laptops/desktops (is that even possible)? <Q> The main advantage to ARM is the power consumption. <S> ARM is very efficient compared to other architectures. <S> At the most basic level, the lower power consumption comes from the processor's instruction set: ARM devices use a RISC instruction set, which is a small but optimized set of instructions. <S> This allows for fewer transistors and instructions, thus saving both power and space. <S> As you can imagine, mobile phone manufacturers want to get the most bang for their buck when it comes to battery life. <S> It's been widely rumored that Microsoft is going to move their laptop focus to ARM, but the trend has yet to take off in my opinion. <S> As of right now, Intel processors pack a lot more performance punch at the cost of higher power consumption. <S> This is a tradeoff manufacturers are willing to make with desktops and laptops, as it's usually relatively easy to supply more power to these devices (versus, say, a smartphone). <A> Today ARM processors have a big advantage in mobile devices: they need less energy in order to work. <S> This is very important in smartphones and tablets because the technology of the batteries is always the same and so if you want to increase the autonomy of these devices you need components that use less power. <S> For now, Intel is some steps behind in power usage, so manufacturers prefer to use ARM CPUs in mobile devices. <S> This is mainly due to the retrocompatibility of the x86 architecture that Intel is forced to maintain. <S> This involves a higher number of transistors and the more transistors, the more power needed. <S> Intel is investing a lot in this sector and today some devices are starting to use its processor (Motorola RAZR i, Samsung Galaxy Tab 3 10.1). <S> For now Intel processors have better performance and so are preferred in laptops and desktops to ARM. <S> ARM is growing fast and I think that in the future its processors will also be used in laptops (that have more benefits than desktops in reduced power consumption) and finally in desktops. <S> For now Intel wins in performance and ARM wins in consumption <S> but they are working hard to reduce their gaps. <S> Intel also has the best manufacturing process in the world and this is a great advantage that allows to them to reduce the gap from ARM in power consumption. <A> Intel chips were originally designed for running on desktops, where power usage isn't as big of an issue. <S> The line in the sand has been slowly blurring as both companies try to capture wider markets. <S> See this article for a good comparison. <A> Price. <S> I'm surprised that no one has mentioned this yet - along with low power consumption, you can get great cost savings using ARM CPUs instead of <S> Intel x86s. <S> You can get $159-$199 tablets today with full touchscreen interfaces - an equivalent laptop (with a x86 processor) will likely cost at least $300-$400. <S> Granted, there's a downside to that low cost (and power consumption), and that is that processing power is limited compared to Intel x86 CPUs. <S> But for smartphones and tablets, you're likely not opening up 10-20 browser tabs, so it should be fine. <S> You may ask whether gaming and video viewing is on par with desktops/laptops though, and the answer is mostly <S> yes - smartphones and tablets have some powerful (less-expensive) GPUs that should give you at least 720p video, with some giving you 1080p video. <A> ARM for desktops and laptops is possible and actually has happened, some laptops have used an arm running linux to keep the system ready in hibernation (to save power by turning off/down the intel processor and using the lower power arm to keep memory fresh, etc). <S> ARM architecture can most definitely compete with intel, same as on a smartphone as in the server room you an get more processing power for less watts, your server farm could do the same at less overall power. <S> There are a number of reasons why arm cannot penetrate that market <S> likewise there are a number of reasons that intel is not able to penetrate arm's markets. <S> The netbooks started as arm based running linux and had an attractive number of hours/days per charge, but folks wanted windows so that meant power consumption, so they got windows in a little larger form factor with significantly less number of hours per charge. <S> I wouldnt be surprised if Apple makes the first successful/major jump to ARM for laptops, will see.
| The biggest reason you find ARM chipsets in the smaller devices is because ARM chips are designed for low power applications.
|
How do you "shrink" electronic components, such as transistors, resistors and diodes? I realize that these components have been shrinking in size. How is this process done? Should all electrical engineers know this? <Q> Semiconductors are fabricated using process technologies. <S> The invention of these technologies has led the shrinking transistor sizes that have so greatly benefited the electronics industry. <S> They have been shrinking so fast that the rate has actually been exponential, following Moore's law since their invention. <S> In 1970, manufacturing processes reached the 10 µm node. <S> In 2013, we are moving below 22 nm. <S> At over 450 times smaller, you can see that you can do so much more with a chip than you could in 1970 with the same size. <S> But what is process technology? <S> Put <S> simply, a process is a lot like a recipe. <S> Many steps are performed to process a silicon wafer until individual packaged circuits are the result. <S> Many mature processes are more than 100 steps. <S> The silicon process has been an enormously valuable research topic and there are many resources to start learning. <S> When a process technology is advanced, allowing smaller feature sizes, we say that process is shrunk. <S> That is the actual word that process scientists and engineers use. <S> When a process is shrunk there is usually at least some advancement in the photolithography stage, allowing smaller details to be patterned. <S> But many steps may be affected by a process shrink since it is such a complicated process. <S> Who needs to know? <S> Surprisingly, few people need to understand process technology, and most electrical engineers can remain largely uninformed about it without it affecting their careers. <S> ASIC developers and researchers who design devices to be fabricated must understand the design rules imposed by the process, but don't necessarily need to know the details of manufacturing, although this knowledge certainly gives them an edge. <S> Of course, the process engineers must have detailed understanding, and the process researchers must have more detailed understanding still. <S> Whats next? <S> Moore's law is unsustainable for silicon processes. <S> We are already approaching the limits of silicon because of physical limitations. <S> Its possible that quantum computing will allow us to continue making computing smaller and more efficient. <S> In the other direction, researchers are finding new uses for silicon: micro- and nano- electromechanical systems <S> MEMS/NEMS . <S> These devices open up applications that are impossible with electronics alone, and give credence to predictions of fantastic scifi-like ideas such as nanobots. <A> Electronic components aren't shrunken. <S> You don't start with a large transistor, mutter some magic incantation, then end up with a small transistor. <S> To end up with a small transistor you make a small transistor in the first place. <S> No, all engineers do not need to how electronic parts are shrunken since they aren't, and many types of engineering disciplines have little to do with electronics parts anyway. <S> If you design chips, then a bit more familiarity with the processes is a good idea. <A> Transistors and diodes are already pretty tiny. <S> The ones you see are in (relatively) huge packages so they can be easily handled. <S> Integrated circuits consist of many (sometimes a great many) transistors and diodes made on a single piece of silicon, complete with all necessary interconnections, again placed in relatively large packages, with connection points spaced around the edges so that the package can be soldered to a PC board. <S> Unless you are designing or manufacturing integrated circuits, I don't think detailed knowledge of the process is of importance to the average engineer or technician. <A> If you question is related on historical progress of semiconductors - Many scientist and engineers was involved in development of modern semiconductors and that is very long and complicate story. <S> For today electrical engineer is not essential to know whole history. <S> There are specific fields where engineers are directly involved in low level technological process.. <S> for example designing and making integrated circuits. <S> If you think on designing process - in development engineers use prototypes which are often looking very differently from end product. <S> Sometimes they using bigger packages (if available) , debugging tools and circuits.. <S> In final product all that unnecessary parts of circuit are removed, bigger packages are substituted by smaller(witch <S> are usually more suitable for pick and place assembly) <S> http://www.youtube.com/watch?v=nyh9u-t7yvQ
| For electrical engineers it is useful to have some idea about the semiconductor fabrication process, but there is no particular reason to know the details, unless of course you deal with semiconductor fab processes directly.
|
For the CAN bus, is it OK to swap CANH and CANL lines? Similar to question In a USB cable, is it OK to swap the D+ and D- wires? , is it okay if we interconnect CAN-H and CAN-L lines? CAN is a differential protocol. Is it that dominant and recessive bits are nothing but voltage differences on these lines? Information about other differential protocols would also be useful. <Q> I couldn't find any reference that gave a definitive answer. <S> But looking at a few datasheets, I don't think so. <S> USB is looking at the presence or absence of a change in voltage. <S> Whereas CANBus is looking at the voltage itself. <S> Here is an example of a USB transmission: <S> The ones and zeros are coded depending on whether or not there is a transition. <S> As opposed to CANBus which takes the difference in the voltage levels as seen in this app note : If we look at a datasheet for a CANBus transceiver, for example the MCP2551 , we see something along the lines of: Sym Characteristic Min Max UnitsVDIFF(r)(i) <S> Recessive differential input voltage -1.0 <S> +0.5 VVDIFF(d)(i) <S> Dominant differential input voltage <S> 0.9 <S> 5.0 V <S> Since a negative voltage is mentioned, this leads me to believe that polarity is important and they are not taking the absolute value of the differential voltage. <S> So if we have: $$CANH = <S> 2.5V$$$$CANL = <S> 2.5V$$ <S> Normally the transceiver would do: $$CANH - CANL = <S> 2.5V - 2.5V = 0.0V = Recessive$$ <S> If you swapped the lines it would do: $$CANL - CANH = <S> 2.5V - 2.5V = 0.0V = Recessive$$ <S> So far so good. <S> The problem comes when we have: $$CANH = <S> 3.5V$$$$CANL = <S> 1.5V$$ <S> Here, the transceiver would normally do: $$CANH - CANL = <S> 3.5V - 1.5V <S> = 2.0V = Dominant$$ <S> If you swapped the lines it would do: $$CANL - CANH = 1.5V - 3.5V = <S> -2.0V = <S> Recessive (out\ of\ spec)$$ <S> So you the receiving end would see nothing but recessive bits. <A> Swapping CAN-High and CAN-Low lines does not work. <S> This is easy enough to establish empirically. <S> I and my coworkers sometimes swap the lines by accident, and it is immediately apparent that it does not work. <A> Everything depends on the transciver model. <S> They is a certain flexibility on the value of CAN_H and CAN_L <S> but I DO think that the value of CAN_H has to be higher in any case (at least for all the model that I have seen).
| If you just change the cable pin, as soon as all the CAN_L are connected to each other and the CAN_H as well, it should work.
|
Intentionally mis-use the USB port on an Arduino? I want to take an Arduino and after programming it on the PC like normal via USB, push a button or something and change its mode so that the behaves differently. Is this possible? I'd like to interface with this: Pins are +1.5V, clock, data, ground. Blue box on top is what I'd like to replace with the arduino. They're using a mini USB connector for the serial connection. Looks like a mutant form of SPI as the clock is from the box (with readout) to the slide and the MISO data comes in reply with clock pulses from the slide. (update: it uses a 21 bit protocol with 9kHz clock and the code from Yuriystoys is almost plug and play) I'm working on reading the info while in parallel to the connection via wires I soldered to the board's pads. Update: I ended up soldering a through-hole USB A socket onto a Prototyping board and using that. I routed +3.3V to pin 1, set up a voltage divider for the clock (D6) 330/470Ω on pin 2, routed pin 3 to MISO (D7), and connected ground to pin 4. I'm sure this is physically/electrically impossible to implement using the existing USB port on the board. While I did get the results I was looking for, the capacitance based scale's reading technology would slowly drift, rendering results inaccurate over time. I need repeatability and drifting .002" in 10 minutes won't cut it. I am reworking this using a 1 micron glass slider scale from DroPros.com and will maintain fixed position in EEPROM between calibrations. TFT display is Adafruit 1.8" TFT with SD card and 5-way joystick input. An indispensable i/o shield in my opinion; easy to program, easy for user input, and quite versatile. <Q> So the usb port is being as a general connector, not as a USB standard device? <S> If so, just get a usb port or cable and wire it to the Arduino outputs. <S> If it's being used as an actual usb slave device, then that's alot more complicated. <S> Either way, if you want to use the existing usb port, you would need an arduino that uses a AVR ic as the usb port, and reprogram it so that it can do two functions (not simple). <S> The older arduinos use a FTDI FT232R, a dedicated usb to serial IC that would not work well with what you want to do. <A> There are different kinds of Arduino: <S> The Arduino Uno uses a separate microcontroller (ATmega16u2) for USB communication. <S> Reprogramming it is possible if you know what you’re doing, but unless you have an external programmer, this is very risky. <S> The Arduino Leonardo and Micro use an USB capable ATmega32u4 as their main microcontroller, so those are most amenable to hackery like this. <S> On the USB capable AVRs used for Arduinos, the USB pins are not mapped to a regular data port. <S> However, according to the data sheet, they can be controlled through the UPOE register, so theoretically what you ask for is possible. <S> It seems much easier to use other pins for this, though. <A> This will not be possible without circuit changes because of the fixed power connections to the USB connector, which appears incompatible with the power connection you mention. <S> If not for the power issue, with an UNO or similar, you could probably reprogram the USB interface Atemga to use the usb lines instead as GPIOs, but the voltage levels might not be safe for this device. <S> But really getting an wiring it into GPIO pins of the main Atmega328p, perhaps after level translation circuitry, will be the most sensible.
| Older Arduinos use an FTDI chip for USB communication, and while the serial side can be reprogrammed, I don’t think the USB side can.
|
Leading Power Factor effects on electrical System If power factor comes in leading & showing -0.95, is there any effect on electrical system? If yes, then please tell me what would be the effects and how long we keep power factor in leading?? Keeping power factor in leading shows more KW & less KVA? Is it correct or not. <Q> Keeping power factor in leading shows more KW & less KVA? <S> Is it correct or not. <S> This is incorrect. <S> If the real power load is 10kW, at unity power factor the kVA is 10kVA. <S> If PF = +/-0.95, on a real load power of 10kW, kVA is 10.52kVA. <S> Leading PF is caused by a net capacitive load and the effect of it is the same as a lagging PF (inductive load); the supply current is higher than for a truly resistive load. <S> You can keep PF leading (or lagging) as long as you want but it isn't an ideal situation because some electricity companies have a policy to charge you for use of reactive power in order to supplement the cost of putting bigger cables into their feeders to factories - higher current means bigger cables. <A> If by inadvertent mistake too many capacitors are placed in service on the distribution system during heavy load periods, not only will the distribution voltage rise to an intolerable level, but the total apparent power flow through the transformer[s] <S> could exceed its [their] rating[s], as the excess reactive power supplied by the capacitors but not drawn by the load will flow out of the transformer to the supply side. <S> If by mistake the load is shed but the capacitors remain in service, the main problem to deal with will be high distribution system voltage, which can indeed rise to dangerous levels depending on the circumstances. <S> Transformers with on load tapchangers and automatic ditribution voltage regulating schemes may well go to bottom tap in an attempt to buck the voltage down into the normal range , and if while at bottom tap load is lost the voltage may rise unacceptably. <S> Provided the facilities to do so exist, operators will routinely and pre-emptively remove capacitors from service in this situation. <S> Too much capacitance will raise the voltage. <S> Back in the day when bulk correction was common, The voltage could be driven high enough to cause very early failure of the lighting in a plant on the weekends when the lighting was almost the only load. <S> Depending how the network operator charges for reactive power, the plant might be subject to unexpected power factor charges. <S> Highly capacitive loads are harder to interrupt than resistive loads. <S> It might be possible switching device <S> may not operate as expected. <S> For example, a lineman might take a current reading at a 15 kV fused cutout before deciding whether to it is safe to use a loadbuster tool. <S> Since the ammeter does not indicate power factor, he might not realize that the plant load was highly capacitive. <S> One particular model of loadbuster can interrupt 900A of normal load, but only 120 amps to a capacitor bank. <A> Leading power factor means that the current leads the voltage, that is, the load is capacitive. <S> If the load is inductive then the power factor is lagging and its sign is positive. <S> When calculating kW from kVA use absolute value of the power factor because it will be the same whether the PF is leading or lagging. <A> It depends whether you analyse a source (a generator) or a load. <S> If the load has capacitive properties, it can be used to compensate inductive reactive power, however not with such big PF. <S> Usually it is done by inserting capacitors (in parallel or series), and they have very low resistance relatively to their reactance and it is very close to 0. <S> Considering the generator, by changing its excitation current, it is also possible to make it work as a compensator. <S> There are even special machines designed for compensation work. <S> Compensating (both by capacitors or compensators) allows to feed inductive loads (like motors) without transmission losses. <S> We don't need to send inductive power to loads. <S> Answering the question how long: this is a steady state so it does not matter how long PF can be with such value. <S> If load changes or topology of the network will be modified, this PF can change too. <S> While calculating active power you don't need to know what type of reactive power you take/get. <S> The equation for active power is $$P <S> = Re(S) = |S| \cos \phi <S> $$ <S> where $$\cos \phi = -0.95$$ is your power factor. <S> In this case, however, the fact that PF is negative means that active power is negative too. <S> When you are considering a load, this means that the load outputs energy to the system, so it works as a generator. <S> If you would consider a generator, the negative active power means it works as a load, so it takes energy from the system. <S> This can happen in fact in one and only state, when the generator's turbine failed and rotation of the rotor is created by rotating magnetic field of the system (the generator works as a motor <S> and it is rotating the turbine). <S> The apparent power will never be smaller than active neither reactive powers. <S> Because these are complex numbers we can't say which one is larger. <S> The minus sign on your meter means that the power factor, which is calculated as cosine of angle of current phasor related to voltage phasor is in some kind of opposition (so it flows in opposite direction), so the power is.
| The effect on power system of "leading" power factor is that there is more capacitive power.
|
Vacuum tubes heaters supply, AC or DC? Which way is better to feed the heaters of a vacuum tube on a guitar amp, AC or DC? With the same transformer, is it possible to change between AC and DC supply for the heaters? <Q> There are two types of heaters. <S> In one, the cathode is a hollow cylinder and the heater is inside the cathode but electrically isolated from it and everything else. <S> In the other type, the cathode is a wire with at least two connections. <S> Current is passed thru this wire to heat it while its common mode voltage is driven with whatever signal is supposed to be on the cathode. <S> In the first type, the heater can be driven by AC or DC. <S> It doesn't matter as long as the RMS voltage is right. <S> Common voltages were 6.3 V and 12.6 V. <S> This type has the advantage that since the heater is completely isolated from everything else, it can be driven directly be a separate secondary of the power transformer just for that purpose. <S> The downside is that it takes more power to keep the cathode at the proper temperature. <S> The second type must be run from well-filtered DC. <S> Since the cathode has some resistance end to end (it must to dissipate power), there will be a voltage difference end to end proportional to the heater current. <S> This will show up in the output signal if it varies. <S> This type of tube was usually used where power usage mattered, like in battery operated equipment. <S> Usually there would be a separate battery for heating the cathodes. <S> The heater voltage was often 3 VDC in these tubes, since that was two ordinary cells in series. <A> The normal rating for vacuum tube heaters is 6.3 volts and 12.6 volts. <S> The 12.6 heaters normally give an option for a centre tap so they can be connected as two 6.3V. <S> There was always a debate about which was best A.C or D.C. <S> but the original amplifiers were wired as A.C. <S> The perceived benefit of rectifying was to reduce hum but the rectified power still contained a large AC component at 100/120 Hz. <A> The other answers are correct; tubes can be heated with either AC or DC. <S> Traditionally AC was used for economic reasons - it saved the expense of a rectifier - except in low power (battery) equipment - which wouldn't apply to a guitar amp. <S> Now with AC heating, there will be some small variation in cathode temperature across the AC cycle, and this modifies the emission characteristics. <S> In a push-pull amplifier, everything cancels out under small signal conditions and the amp sounds quiet and clean, but under heavy load (where one valve is conducting hard and the other is off) <S> this contributes some intermodulation products. <S> Hi-fi amplifiers minimise the audible effect using negative feedback, and modern ones can afford (especially at those prices!) <S> to use regulated DC heater supplies; but that's not what you are designing : these imperfections are partly responsible for the grungy guitar amp sound. <S> So I would use an AC heater supply as a deliberate part of the design, especially if you are trying to achieve something like the original guitar amp sound. <A> In most amps, valves can be heated with AC or DC. <S> Tapping the heaters may be important since the heater filaments can act like a diode if the cathod is some volts above heater potential (which is the case most of the time with auto bias) and induce AC hum in you beloved signal. <S> Make the heaters center tapped +15V above low signal tubes' cathode can prevent this problem to appear. <S> Be sure to respect maximum cathod to heater voltage given by the data sheet for all your valves when you design the heater circuit. <A> The voltage to be supplied would also be the same, i.e. if a tube is rated for 12 Volts, then one uses 12 Volts DC or 12 Volts AC. <S> On the second part of the question: To take the AC output of a transformer and convert to DC, an additional bit of circuitry is required: A rectifier (either a bridge rectifier or a half-wave diode) followed optionally by a capacitive (or sometimes an LC) filter, then perhaps a voltage regulator, depending on what purpose the rectified power is to be used for. <S> For heating coils in vacuum tubes, there is no benefit to rectifying the AC supply, just use the AC.
| A vacuum tube device's heater filament can be supplied with either DC or AC, the tubes work the exact same way with either type of supply: The heater is simply using the power for resistive heating.
|
Is there an instrument that can measure the capacity of lead acid batteries Background I have an electrical scooter with 6 x 12Volt lead acid batteries (72 Volts total), which are now in such a condition that they can barely get me to my work and back. I got a bunch of used UPS batteries from a friend, and want to check their capacity and compare them with the batteries that are currently in my scooter. I roughly think I know how to measure their capacity, after loading them I should discharge them at a certain rate and see how long it takes before the voltage drops below a certain threshold. I'm not sure about the exact numbers though, and I'm also not quite sure how I should discharge them at the same rate as my scooter would typically do (power a heater or something like that?). Question Is there a device/machine/instrument that can do all of that for me? Load the battery, discharge it at a constant rate and log the results. If not, I guess a UPS hooked up to a computer could be programmed to do the job? Any ideas? <Q> They are often used by UPS service technicians during preventative maintenance checks to check on the health of each battery in a large series string. <S> Here are a couple examples: http://www.cadex.com/technology/our-technologies/spectro <S> http://www.bkprecision.com/products/electrical-battery-testers/battery-capacity-analyzers/600-12v-sla-battery-capacity-analyzer.html <S> The good ones probably cost more than a set of replacement batteries for your device, but if you can find a UPS dealer or service tech, they may be able to test your batteries for a small fee. <A> Take them to your local NAPA/O'Reilly auto parts store. <S> They offer free battery testing on their machines for lead-acid wet cells. <S> Other auto parts stores usually offer this service for free too just call around and make sure they can test your type of battery (6V vs 12V etc). <S> They punch in the battery parameters (capacity, cca, etc.) <S> from the manufacturer and the machine will run it through its paces in about 5 minutes or less. <S> But for UPS batteries these UPS and other telecom type stationary batteries are designed for standby emergency service and not daily deep discharges. <S> They basically only have 150 to 300 cycle life or 5 to 10 years whichever comes first. <S> I doubt you'll be happy with their performance in your scooter. <A> A garage should have a battery tester, I've only seen one hooked up once a long time ago. <S> I beleive all it did <S> was measure the voltage then discharge through a fixed load for a minute? <S> and then gave a go / bad indication. <S> I'm guessing that you can do the same from fully charged and then see which is the worst and dispose of it.
| Yes, there are lead acid battery testers that will tell you the condition of each battery.
|
the . hex file we burn goes to flash memory or RAM or EEPROM of Atmega8? The flash memory of atmega8 is 8Kb. Is this the maximum size for the .hex file, or it the max memory which i can allocate to variables in my code? If none of the above is true, than what is memory allocation structure of Atmega8? To which memory does .hex file goes to? <Q> In standard use your code goes into the 8 Kbytes of Flash memory and variables go into the 1 Kbyte of SRAM. <S> Note that because a hex file represents a single byte as a pair of hexadecimal characters and contains some other information it will be over twice the size of the actual code that will be loaded, so a hex file a bit over 16K should load. <S> If you're using Atmel Studio 6 in the build output area if you scroll up you should see something like: Program Memory Usage : 540 bytes 0.8 % <S> Full Data Memory Usage : 0 bytes 0.0 % <S> Full <S> So the program memory use shows how much of the Flash will be used and data memory usage shows how much of the SRAM will be used. <A> The flash memory is your program memory. <S> That would be where your hex file is stored. <S> You can force data into flash if you're tight on RAM, but it isn't as fast of a read/write as RAM. <S> RAM is the memory used at run time, for variables and whatever other else needs to be accessed on the fly. <S> EEPROM is nonvolatile memory for storing things such as calibration data, serial numbers, etc. <S> It is rarely used for anything that needs to be written regularly. <A> For actual memory usage see map file. <S> In case of GCC tool-chain that do by linker as: avr-ld -Map=app.map or through gcc <S> driver: avr-gcc -Wl,-Map,app.map
| The most reliable place to find out of much Flash and SRAM your code uses is from the compiler.
|
Is there any method to communicate with a car ECU? I want to build a device with AVR to read the car RPM from its ECU. I don't know how to receive data from ECU at all. The thing is important for me is Reading car RPM. any suggestion? EDIT: The car is Peugeot 405 <Q> Elm Electronics makes a series of chips for interfacing a micro to the obdII port. <S> Doing this yourself or figuring out the protocol is a large project. <S> Alternately, you might consider tying into the crankcase sensor, or other sensor available on that particular car. <S> I assume this is diesel, so you can't tie into the fuel injection or ignition system? <A> This uses the ELM327 mentioned by others; it is ready-to-go and includes the ODB2 cable. <S> SparkFun OBD-II UART <A> Stopped no pulses with increased speed the pulses increase. <S> Then all you need is a circuit to transfer pulse frequency to a DC output Voltage that you manipulate to control your device.
| After looking up how an electronic speedometer works your best bet is to go to the wheel sensor that sends pulses to the ECU in proportion to the speed you are going.
|
LM358 Datasheet and configuration I have a few questions about the LM358. The first is regard to the schematic below. I'd like to know why RB is there? (What purpose does it serve and how do you know?) The second is with regard to the figure below showing open-loop response. I don't quite understand why there is feedback (the cap and the 10M resistor). Could someone please explain why? My last is, how does one know what the maximum frequency that one can put into an op-amp is? For example, I think I read somewhere that tying a terminal to a square pulse generator is bad because the square pulse has an infinite bandwidth and putting something with infinite bandwidth into an op-amp is not good. How does one know how high a frequency an op-amp is rated for (without breaking it)? <Q> I'm only going to answer one of your questions. <S> It would be better if you asked your questions separately. <S> My last is, how does one know what the maximum frequency that one can put into an op-amp is? <S> This is specified in the datasheet. <S> Applying a frequency beyond the op-amp's specifications won't harm it. <S> Essentially, it is a low-pass filter. <S> The image from your question illustrates this: If your input square wave is very much below the op-amp's cutoff frequency, then it will pass through unchanged. <S> As the cutoff frequency gets closer to the square wave frequency, it begins attenuating the higher harmonics, which has the effect of increasing the rise and fall times. <S> Eventually, all the harmonics will be attenuated, and the square wave will start looking more like a sine wave. <S> As the square wave frequency increases beyond the op-amp's cutoff frequency, the entire signal is attenuated, until you are left with nothing at all. <S> Here's an animation from Wikipedia showing the shape of the square wave as higher harmonics are added. <S> The process I described is the same thing, but in reverse: the higher harmonics are attenuated. <A> Here's what the application hints say about Rload <S> I don't quite understand why there is feedback (the cap and the 10M resistor). <S> Could someone please explain why? <S> Because the input offset voltage can be a few millivolt <S> it's easy to apply a 10M feedback resistor to perfectly bias the op-amp DC wise so that ac measurements can be made. <S> Becuase the input cap is 0.1uF and the feedback resistor is 10Mohm the circuit acts like a high pass filter at 0.159Hz <S> so this is of no consequence when measuring ac gain. <S> The real gain of the opamp can be inferred from the gain when using C and R. <S> how does one know what the maximum frequency that one can put into an op-amp is? <S> Here is an open loop gain (red) from an op-amp not disimilar to the LM358. <S> Notice the blue line - this is the frequency response when negative feedback is applied. <S> There is a constant 20 dB gain from DC to 1MHz (3dB down) <S> and this would be the actual response with feedback. <S> So if your square wave were 1kHz the square would be failry pure up to nearly the 1000th harmonic. <S> You can't break an op-amp with frequency - you can only break it with too much current or voltage. <A> The resistor is also at the output to act as a pull-down. <S> The LM358 is not a rail to rail op-amp, so without that resistor you will not be able to have your output signal hit ground.
| You could alternatively place that resistor as a pull-up from output to V+ if you needed your signal to reach closer to V+ without clipping. The limitation is simply that as frequency increases, the op-amp's gain decreases.
|
Detection of simultaneous edges of two asynchronous clocks This question was initially asked at StackOverflow as a Verilog question, but, eventually, it became more hardware than software discussion. The question: how simultaneous (positive) edges of two asynchronous clocks might be detected in digital circuit. The original question did not contain any information about how much time "simultaneous" is, therefore your suggestions and thoughts on this are also welcome. For clarity, let's define "simultaneous" as 0.5 or 0.25 times the period of the slower clock. One of the proposed solution uses non-standard flip-flop configurations described in the following patents: US6320442 B1 , US5793236 A , US5327019 A . Is this approach 100% safe, or there is still chance of overlooking the event in question (due to internal metastability, or any other reason)? Is there a standard approach in dealing with this kind of tasks? EDIT: There were few solutions suggested, but none showed explicitly how exactly the information about the occurrence of simultaneous edges may be (reliably) fed into digital logic. Please note that (essentially) this is the question, and any solution which do not address this subject is incomplete. <Q> The simplest pure-hardware way would be the circuit below. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This works because there's a propagation delay through the inverters. <S> During that propagation delay, the bottom two inputs will still be high, pulsing the output of the NAND gate. <S> You just have to make the propagation delay long enough to satisfy the setup and hold times of the NAND, but short enough that it will completely discharge between clock cycles. <S> It's timing sensitive but definitely doable. <S> People do it by accident all the time. <A> I've edited my answer to show the circuit diagram with more detail and also cover the questions in the comments from David Kessner and Vasiliy Zukanov: <S> - Two gates are used; the OR gate has to be zero before a timer clocked with what I've called "super-clock" is primed. <S> Once it is primed it then starts counting as soon as either CLK1, CLK2 or both go high. <S> It finishes timing as soon as a zero is detected on the output of the EXOR gate. <S> 2nd EDIT to provide information that is a little clearer. <S> Super-clock is a clock running significantly higher than CLK1 or CLK2. <S> The period of super-clock is many times smaller than the period of either CLK1 or CLK2. <S> If the timer doesn't count to anything after being primed and triggered it is because the positive edge time difference between CLK1 and CLK2 is insignificant. <S> If it counts to 1 and no more then it can be assumed that the time delay between CLK1 and CLK2 is between zero and one-super-clock period i.e. it is still insignificant. <S> If it counts to two or higher than this can be arbitrarily taken as the two clocks not rising synchronously. <A> I don't think this should be difficult. <S> This setup will give resolution of 2 cycles in master clock domain for definition of "simultaneous". <S> So that will dictate what minimum frequency master clock should be. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> It is absolutely important that ClkA and Clkb are true clock signals without transients. <S> If these were termed as simple signals, I would add a flip flop in front of synchronizer in that clock domain as such. <S> simulate this circuit <S> State machine should be straight forward where any transitions from 00 to 11 or 00->01/10->11 happening in 1 or 2 cycles.
| Assuming you have master clock that is faster than either of Async clocks, all you need is 2 sets of double synchronizers and a state machine running in master clock domain to "detect" events.
|
What is the purpose of the thin wire at the top of power transmission lines? I know a power transmission line carries usually two sets of 3 phase conductors. But I have noticed a relatively thin wire at the center-top of the power transmission line. What is the purpose of this thin wire? <Q> Wikipedia says they are ground wires to protect the live wires from lightning . <A> Top of the cable is ground wire rest and other (1 or 3 lines) are phase cables. <S> It is just for the protection from lighting strikes. <S> That's why they are often made of steel. <A> As stated when they use the ground wire for communication it have the signal inside its. <S> And yes, the ground wire is grounded on each tower (one of the best transmission type for protection of electric systems is the fiber optical inside a grounded wire). <S> In some arrangements, there are more than one guard cable. <S> It can be up to 3, depending mostly of the size of tower and placement of the phase cables. <S> The worst case I've ever seen is below
| They serve to shield the line and intercept lighting stroke before it hits the current carrying conductors below.
|
Can I determine the original resistance of a burnt/failed resistor? How to find the (original) value of a burnt resistor? Let's suppose a condition in which initially I don't know the value of its resistance. Now because of its low watt, it burnt. So is there any method to find out the resistance? <Q> Three things you can try: <S> See <S> if you can read the colour code (probably not) Try a multimeter, but this won't work if the resistor is broken See if you can get the (sub)circuit of the device / some chip around the resistor and find the resistor there <S> Otherwise, I don't think you can find it out. <S> Note that you shouldn't use a damaged resistor (or any damaged device or component): it might give unexpected results and the properties may change over time. <S> You should only use these methods to find a good replacement for the damaged transistor. <A> Once a resistor has been abused, you don't know what its value might be without explicitly measuring it. <S> Disconnect one end of the resistor and measure the resistance with a ohmmeter. <S> That's the only way to know. <S> However, you can't really trust a abused resistor, even if you know its value under one set of conditions at one point in time. <S> It could be much noisier than normal. <S> It's value could change unpredictably with temperature and small mechanical stresses, phase of the moon, or what you had for dinner last night. <S> A burnt resistor is trash. <A> A burnt out resistor can only be read one of two ways. <S> The first is the color code on the resistor, if it is through hole, or the number code if it is a smd resistor with a a number code. <S> If that is not available, the only other way is a circuit diagram, or a reference design around the IC it is supporting. <S> Most manufacturers tend to stick with the manufacturer's reference design, rarely deviating unless they have a specific reason to, so if the reference design specifies a specific resistor, you have a very good chance that is it. <S> Aside from that, no, if the resistor code is unreadable, and the reference design is not applicable <S> , you cannot know the original resistor value once the resistor goes bad. <S> There is no point in measuring a burnt out resistor, as if it actually measured the right ohm-age, it wouldn't be ""burnt out"". <S> The other option is context . <S> Sometimes, based on the circuit, you can simply assume what the resistor is. <S> If it is a transistor base resistor, it might simple be a saturation value resistor. <S> If it is a led resistor, it's value might allow for 20mA through the led. <S> This is very contextual, and it depends on the IC, so it pretty much falls under the "manufacturer reference circuit" standard. <S> Engr Kahn's answer below also seems to have a reasonable chance of working. <S> As resistance in series is cumulative, if you can measure half the resistor (like you would the wiper of a pot) and then the other half, aside from the burnt section, you can get an approximate value then adjust upwards to standard values. <S> And depending on the circuit, the exact value is not always necessary. <S> A 1.2k resistor might work well enough in place of a 1k resistor. <A> You can find the Values of burnt resistors by these three handy methods. <S> How to find The value of Burnt Resistor ( <S> By three handy Methods ) <S> Method 1 1. <S> Scarp the outer coating. <S> 2. <S> Clean the Burnt Section of the resistor 3. <S> 4. <S> Add these two value f resistances <S> 5. <S> This is the approximate value of Burn resistor 6. <S> Just add a small value of resistance for damaged section .i.e., suppose the value of burnt resistor was 1k Ω, but you got 970 Ω. <S> So just add 30 Ω, and you will have 1k Ω. <A> If you scrape off the coating, you'll find divots that go around the resistor. <S> l strip or divot is equal to 1 ohm, 2 is 10 ohms, 3 is 100 ohms, 4 is 1000 ohms <S> and so on... it will get you in the right ball park, the rest is up to you.
| Measure resistance from one end of the resistor to the damaged section Again measure the resistance from damaged section to the other end of the resistor.
|
How should I power these components at different voltages? I'll be using a 12V power source, as this is an automotive application. I have the following components: ATmega2560, 1.8V-5.5V, 200mA (actually an Arduino Mega 2560, as I couldn't find a through-hole AVR with four UARTs) GPS module , 3.3V-5V with 5V-safe inputs, 20mA GSM module , 3.4V-4.5V (4.0V is recommended), 3.3V logic, 2A peak MCP2515 CAN controller, 2.7V-5.5V, 5mA MCP2551 CAN tranceiver, 4.5V-5.5V, 75mA Everything would be a nice, easy 5V if it weren't for the GSM module, which wants around 4V. So should I use two regulators (a 5V one and an adjustable one set to 4V)? Or if I already have a 5V regulator, is it possible to just use a voltage divider after that for the 4V? I plan to use a 4050 for level conversion from the MCU to the GSM module (the MCU at 5V reads 3.3V as high). Would I also require a heatsink? The Arduino's regulator doesn't have one, but it gets hot given a 12V supply. <Q> I have similar project. <S> I did it with two voltages. <S> First I put the switching regulator to drop to 3.9V for GSM. <S> Then LDO to drop from 3.9V to 3.3V for MCU, GPS, CAN. <S> I see the GPS module you pointed out possibly has <S> it's own LDO on board <S> and that's why its voltage ranges from 3.3V. <S> Take a look on those modules alone <S> http://www.gtop-tech.com/en/category/GPS-Antenna-Module/A01_MT3339.html <S> they all go from 3.0V so both voltages could be used (3.9V or 3.3V). <S> For CAN tranceiver I used SN65HVD230D from Texas Instruments, which is a little more expensive but works with 3.3V (that eliminated necessity of third 5V supply). <S> Don't use voltage dividers for supplying power. <S> The load connected to this divider acts like another resistor in parallel with one from divider. <S> If the load you connect is mcu or some module, the impedance is unknown and variable in time - you wont be able to achieve desired voltage. <S> Voltage dividers are good if you connect some high impedance line to it. <S> Then almost no current flow through that line and the voltage at the divider stays at the level it was set. <S> This should be fine in case you need to lower some logic levels (you mentioned 4050 which is a good solution). <S> You might also need some protection circuit at the power input, before the voltage regulator. <S> Automotive power can have load dumps (100V on power line for about 400ms), positive and negative voltage transients. <S> Cold crank condition can lower the voltage to 3V for 15ms. <S> Jump start can raise it to 24V. <A> You then have the option of an adjustable LDO (with > 2A capacity!) <S> from the 5V rail (which would put more load on the 5V DC/DC converter, too) or a separate 4V switching DC/DC converter with similar TVS and capacitor protection. <S> All the 5V things can easily be driven by a single Murata OKI-78SR, which is a TO-220 form factor switching DC DC converter that generates 5V/1.5A out, and costs < $5 in quantity 1. <S> (Sweet!) <S> The 4V is harder. <S> 2A is a fair bit of current. <S> You can burn it all off from 12V with a LM350 adjustable regulator (3A rated) with a heat sink. <S> Or you can design a switching regulator on your own that targets 4V out. <S> Or, if this is a large-quantity design, talk to suppliers like GE or Murata or Recom to see if they can make a custom part for you, so you don't have to. <S> Another option is to get a 3A+ converter to get 5V out (they range about $40 up from DigiKey in quantity 1) and linear regulator down to 4V. Check out <S> the CUI VYB10W-Q24-S5-T. Note that you'd need a LDO regulator with drop-out at 1.2V or lower to get to 3.8V. <S> Finding one of those that can do 2A is a little harder. <S> Try something like a MIC29302AWU perhaps, realizing that it only goes up to 16V for input, which a car 12V rail can temporarily go way above (see above about load dumps.) <A> All the ASIC's <S> whether it be Atmega, GSM Module, GPS Module, CAN Transceiver and Controller will come with the ratings of MIN, MAX and TYPICAL supply. <S> But, for the proper and best functioning of any of the modules or ASIC always feed the TYPICAL supply input mentioned in the datasheet. <S> If its some industrial design, don't use dividers to feed power supply to ASIC's or modules, as it may not deliver the expected power. <S> Go with the power consumption analysis of the system and design your power supply using LDO or DC-DC Converters.
| I would use a 5V switching DC/DC converter with a TVS diode and a capacitor in front of it to guard against load dumps on the 12V rail.
|
How to track motion of a moving ovendoor At work, we are measuring various parameters to test out a newly designed oven prototype. To make things more efficient, I am trying to create an electronic setup to automate the measurement, in particular of the door's motion (from fully open to fully shut). The goal is in measuring the instantaneous velocity of the door at the various points of its motion, which is a fixed radial path. Note the emphasis on instantaneous velocity logging, as opposed to an average velocity as determined by timing alone. What is a way I can measure the ovendoor's velocity / track its motion with reasonable accuracy? (Reasonable implying error < 1-2 cm/s) Since it is only fixed radial motion (and no component along any other axis), and since there is a moving component and a stationary component, I presume this should be an easier problem than, say, measuring the velocity of an independent body like a person or hand. My first thought was an accelerometer-gyroscope-IMU-based method, i.e. integrating the acceleration over time to get the velocity, but reading up on this subject suggests that this will lead to sizeable errors. <Q> I am not fully aware of the context of this oven door; but I would like to contribute a suggestion. <S> How about a quality potentiometer at the hinge of the door? <S> Consider this, you get both the position and the velocity of the door this way; this method is simple and robust. <S> Obtaining the position of the door is trivial, through some testing and measuring, you could find what values the pot outputs at given inputs, or door positions. <S> Also, if you differentiate the position with respect the time (in practice, you can simply divide the rate of change in position you obtain over the rate of change in time), you would get the angular velocity. <S> Then from there you can calculate the velocity the door is traveling at. <S> From the picture above, the angular velocity would be little omega. <S> V is the velocity the end of the door travels. <S> V, obviously obtained with angular velocity multiplied by radius. <A> One suggestion is to have a set of inexpensive low power lasers arranged in an arc above the upper plane of the door's rotation, pointing directly downwards. <S> A corresponding arc of PIN photodiodes or phototransistors just below the lower plane of the door's rotation can be hooked up to GPIO pins of a microcontroller, to detect the light interruption of each beam in sequence. <S> I've made a rough illustration of the arrangement, using 5 degree sensing angles. <S> This precision could well be brought down to 1 degree per sensor, if needed. <S> This 5 Volt 5 mW dot-type red laser would suffice ( around $1 on eBay including international shipping ): <S> For the sensor, a PIN photodiode such as the OP906 ( $0.59 in single units from Digikey ) can be used: <S> In your microcontroller code, the timings for the successive laser beam interruptions will provide a precise instantaneous rotation speed between any two points separated by 5 degrees, as the door is opened or closed. <S> The ADC sample rate, timer precision and processing speed of the microcontroller will determine the data precision achievable. <S> One useful simplification of this design ( thanks, @ <S> jippie , for getting me thinking in this direction ), if precision is not super-critical, is to use a single narrow tube light , such as a 8 watt fluorescent or CFL tube, above the door, to replace the lasers. <S> The light detectors would remain as they are, light to them would be interrupted in sequence as the door closes. <A> I'm surprised that no one has mentioned using a string encoder or a string potentiometer <S> It's a fairly simple and accurate solution. <S> Basically a string is connected to a spring-loaded encoder and the encoder measures the string movement. <S> There is very little moving mass and it doesn't require that the encoder shaft be colinear with the hinge or require any modification to the hinge such as gearing or belts. <A> If the primary movement is along a circular path, a single gyroscope should give sufficient accuracy. <S> Would require some math to go from angular velocity to velocity of center of mass, but that's a one time calculation. <S> The issue with IMU's and dead wreckoning type approaches is that over a long time you get compounding velocity error from integration of linear acceleration. <S> This happens because there's generally no good way of generically determining linear velocity. <S> This gets much worse when trying to determine position, accounting for rotational offsets of linear velocity, etc. <S> etc. <S> Depending on the kind of testing you are doing, you can augment the IMU with a sensor for determining when the door is closed/at a stop position, then use that to re-zero the IMU. <S> With that approach the IMU only needs to be reasonably accurate over the time it takes to open/close the door (presumably only a few seconds), which I believe is reasonable.
| Basically, if the velocity is limited to angular velocity, a gyroscope+math can generally give you the instantaneous velocity.
|
Program to draw pinouts (and easily visualize pin's multiplexed functions) Documenting an electronics project is also an important task if it will be used by someone else other than the hardware designer(s). Right now I need to draw a diagram for a breakout board in order to show what functions are available on each pin. Something like the following diagram (of mbed): Can someone recommends me a program that allows me to easily draw such diagrams? <Q> Latex + TikZ is popular in academia and you can use it to programmatically create very clean diagrams. <S> Inkscape is open source software similar to Illustrator. <S> Visio is a diagram tool produced by Microsoft. <S> Widely used in engineering departments. <A> Fritzing is pretty nice for this, there are a bunch of libraries built in and available for download that have a lot of the more popular platforms made, and you can define your own parts using an svg editor like Inkscape . <S> It's particularly nice for having defined pin areas for your lines to connect to <S> so things don't break if you drag it around. <S> But I haven't tried to use images of PCBs for pinouts with it <S> so it might not be the right thing for that. <S> edit 2/22/2020 : here is a good video showing how the Adafruit feather diagrams are made: https://youtu.be/ndVs1UvK6AE Sparkfun also has a repo on github for generating SVG elements that they use for their "graphical datasheet" pinouts. <S> I have not tried it but Sparkfun does a lot of these types of pinouts: https://github.com/sparkfun/Graphical_Datasheets <S> Someone has taken this further with a python script, which may be a good option for advanced users if you don't mind learning how to use the format: https://github.com/stevenj/GenPinoutSVG Also adding this link to another GitHub repo to generate nice looking SVG representations of PCB designs from a KiCad board file. <S> I have not used this myself either, but it looks like it would pair really well with the way Fritzing defines parts: https://github.com/yaqwsx/PcbDraw <A> It's probably not the "right" app, but I use Powerpoint for stuff like this. <S> I also sometimes use the online diagrammer at https://www.lucidchart.com/
| draw.io is good for doing quick block diagrams and simplified wiring and is browser based with nice cloud integration. Illustrator is more user friendly, mass-marketed and has a more shallow learning curves.
|
Why do I suck at electronics so much? I have always been interested in electronic circuits since 3rdgrade when we lit a bulb up. I then always wanted to learn more and more. I'm a soft-more in high-school and it seems like i've it a dead end now. Every thing I build seems to break right after I get it to work and nothing seems to work right. I spendso much time tweaking one littlething just for failure over and overagain. My whole room is just a pileof broken stuff that broke/could never get to work. I just seemed to reach a peak. I see a small, fairly simple electrical circuit and trust them that it works, but I don't get what's going on. I get a transistor amplifies but when I see a bunch together to make a circuit, I don't get it and my mind blanks out. I would hope to design my own circuits from ideas, but that I'm even farther. I do have a bunch of books, but those don't even seem to help. I really am passionate about electronic circuits and understanding how everything works but it just seems like my brain has reached a limit and I all of the sudden got stupid and unable to get any more information in there.I spend day after day working on my circuits but It just seems like I am digging on granite with a spoon. What should I do next electronics wise to go up and increase my knowledge of electrical design? How can I keep my inspiration up and not give up ( it's really getting annoying having a 99% failure rate). Thanks for any advice and I know this question will get closed, but I am really desperate for help. <Q> If your profile age is correct, then don't worry. <S> You probably already have an advantage over the rest of the people your age who like this kind of stuff. <S> To understand electronics well, it takes theory and also, experience. <S> Both of which you lack. <S> That's not your fault and and there probably isn't much you can do about that yet. <S> But give it time, and go to university so that you can begin to learn the theory. <S> You can't really knoe all the theory now because the math is above your level. <S> As much as you want to say that you can understand the math, you won't. <S> For what you can do now, stick to what you are doing. <S> Small circuits here and there, and 'tweak' them as you feel fit. <S> Try and understand why the 'tweak' worked and maybe this site can help you for somethings. <S> But when you start going into amplifiers (small signal stuff), it can be confusing and <S> the math behind it is really just algebra(not hard but can be confusing) and that's where a good sense of intuition would come in to help leviate some of the confusing math and the different modelling methods to figure out input and output impedance etc. <S> You are still young and have much to learn and time <S> is the only thing that can help you understand. <S> Keep tinkerin, keep failing, and keep trying <A> I think everyone, in every field, must have moments that feel like what you are going through. <S> The answer is "learn from your failures. <S> " <S> If you build something that later fails, determine why. <S> Did you pick a component value that was wrong? <S> Did you use a component that was of poor quality? <S> Was there a cold solder joint? <S> If you cannot identify what went wrong, you cannot hope to learn how to improve. <S> The one-word version of all this? <S> Experience. <A> I am starting my first job as an Electrical Engineer, and let me tell you. <S> When I was younger, (your age, and even older), NOTHING I built worked. <S> I'd get stoked about an idea, throw something together, and it wouldn't work. <S> As you get older, you'll have access to more (and better!) <S> equipment, knowledgeable people around you, and tons of resources. <S> I'd be proud of how passionate you are, and trust me, It'll pay off. <S> Keep plugging, keep building, and keep thinking big! <A> Don't be discouraged! <S> But understand there is a big difference between building stuff and designing stuff. <S> The learning curve for building is a lot shorter than for designing it. <S> It's not uncommon to be frustrated. <S> You are at a natural point in the learning cycle where building small things that work for a while <S> is no longer fun. <S> You're ready for the next level. <S> Building something that is rugged and solid takes another skill set. <S> Getting to the point of designing and building complex and reliable electronics is an even longer term process. <S> Don't worry if you feel like your brain is full. <S> It isn't <S> but you might be a bit burnt out and need help or a break before getting to the "next level". <S> When we are working long hours in the lab we have a saying that quitting time is when things are breaking faster than we can fix them. <S> And as you move along in your skills you'll find things tend to work better and better the first time you turn them on and lab hours shrink. <S> Give yourself a break. <S> I'm sure you probably have 10x better skills than peers your own age. <S> Just keep at it and don't let it get too you -- <S> if it wasn't hard everyone would be doing it.
| There are a lot of subtle aspects to electronics that takes years to understand and then usually years more to master. You have to be able to look at your past work and learn something from it. You can't expect to completely understand a complex circuit just because you've built and played with a smaller version.
|
How to automatically position designators in Altium? Is there any way to automatically place component designators in Altium such they are all visible and doesn't overlap other components? A clear example is described here but it seems it is a separate piece of software you have to buy. Is there any built-in feature to achieve this? What I want to achieve is this: <Q> There's no way of doing this in Altium without writing a custom script. <S> We've run into the same problem with placing designators on the Assembly layer so that they are all properly oriented. <S> The problem with your "After" photo is that it is not immediately clear which label corresponds to which component. <S> It is far, far better to have the designators maintain the same spacing as the components. <S> So if your components are placed 0.100" on center between each other, then your designators are also 0.100" on center. <S> Your CM will thank you when they need to troubleshoot boards. <S> I also recommend that you tent your vias, and use SMT test points on the critical nets to enable testing. <A> Just select all designators that should be to the right of a component and choose Autoposition - "Right center" in PCB Inspector. <S> Also you can move designators above or below from component. <A> Select your components and go to edit → align → position component text.
| You can get similar result with Autoposition function.
|
Why ceramic IC packaging? As someone with no background in electronics whatsoever, I wonder:why are ICs packed inside ceramic or plastic? I thought we wanted the heat to go out as fast as possible, and ceramic is a good thermal insulator. <Q> In IC packages it certainly is desirable to dissipate heat with the lowest possible thermal resistance. <S> However, at the same time, electrical insulation and protection from oxidation / corrosion are also desirable, at least for discrete components that are likely to be handled or exposed to the environment. <S> An insulating packaging such as ceramic or plastic allows this insulation and protection, while permitting heat dissipation through controlled paths, such as integrated heat sinks or heat sink tabs in some packages, or just through the pins in others. <S> Many IC packages are also sold as bare die, or wafer level chip scale (WLCSP) packages, for the circuit assembly process to directly connect to the PCB. <S> The bare chip is then environmentally protected using epoxy potting or similar protection coatings, after soldering or bonding of the lead bumps to the circuit board. <S> Such bare packaging of course requires more sophisticated assembly equipment than the much larger IC (and larger contact pitch) <S> packages do, so they aren't for everyone. <A> The type of chips most commonly seen in ceramic packages are those with UV-erasable memory. <S> In order to allow such memory to be reused after it is programmed, it must be possible to expose the die to a considerable quantity of UV light. <S> This requires that the chip have a quartz window, and installing a quartz window on a chip in turn requires that the chip's package be made of something whose thermal expansion characteristics reasonably match those of quartz. <S> If a quartz window were installed in an epoxy package, thermal expansion and contraction of the package would likely cause the seals to fail, allowing atmospheric air (including water vapor) to reach the part and destroy it. <S> I saw one chip once which looked like it was made from epoxy with a plastic window which looked a bit "milky"; I didn't examine it closely enough to confirm that, though. <S> If it was a plastic window, it would probably have been usable for a few UV-erase cycles, but many plastics degrade relatively quickly UV exposure. <S> Perhaps someone figured that making EPROM chips with plastic cases would save enough cost that even if they would fail after a few uses, they'd be reusable enough to justify using them instead of non-windowed parts, and cheap enough to justify using them instead of ceramic parts. <S> I don't think they ever caught on, though. <S> The main other place I've seen ceramic parts was in places where they had a metal top which would be heat-sinked. <S> There again, the dimensional stability of the ceramic was necessary to prevent the seal from failing under changing temperature conditions. <A> Many plastics and epoxies absorb moisture from air. <S> Changing characteristics with humidity change. <S> This affects frequency tuning. <S> They can be sealed well enough to slow infiltration and damage by hydrogen and oxygen in orbiting satellites. <S> For thermal conductivity actually BeO is extremely good but the manufacturing process presents hazards. <S> Aluminum nitride is fairly good thermally and can be used song as the design fits. <S> Lastly another trouble with plastics is that some chips will run hot enough to melt it or break it down. <S> There are applications using ceramic coated metals where it doesn't affect RF frequencies. <A> Oldschool parts came in the less popular metal can. <S> Cans aren't common for mass produced parts. <S> Ceramic and plastic packages are engineered to have fairly high thermal conductivies (~20W/m∙K), and they come at a fraction of the cost of a metal package. <S> Ceramic packages are usually white because they are a high alumina material. <S> Plastic packages are black because they contain carbon black and/or graphite to dissipate both heat and static charge.
| Ceramic is used in RF and microwave applications because they have insulating and impedance properties crucial to radar, and cell phone base stations towers.
|
Timer on PIC18 not getting close to desired interrupt period time I tried to setup Timer0 on a Microchip PIC18F46K22 so that it will trigger an interrupt and toggle an LED. However, it takes at least 42 µs for the LED to toggle. At an increment rate of Fosc/4 (= 8 MHz/4 = 2 MHz), a TMR0 preload of 0xFF and a two cycle loss when writing to TMR0 I expect to get an interrupt every 1.5 µs, at least on paper. Even if I factor into some instruction cycles for my LED operations, I can't figure out why it takes 42 µs. What's wrong here? Here's my code: volatile unsigned char ledStatus;void greenLEDon(void){ LATCbits.LATC5 = 0;}void greenLEDoff(void){ LATCbits.LATC5 = 1;}void interrupt isr(void){ if(TMR0IE && TMR0IF) { if(ledStatus == 0) { ledStatus = 1; greenLEDon(); } else { ledStatus = 0; greenLEDoff(); } TMR0IF = 0; // Clear interrupt flag TMR0 = 0xFF; // preset for timer register }}void setup(void){ OSCCON = 0b01100010; // 8 MHz, internal // General outputs TRISCbits.TRISC5 = 0; // RC5 (green LED) INTCON = 0b01000000; // PEIE on (Peripheral Interrupt Enable) INTCONbits.GIE = 1; // General Interrupt Enable // Timer0 Registers T0CONbits.T0CS = 0; // TMR0 Clock Source Select bit: 0 = Internal Clock (CLKO) T0CONbits.T0SE = 0; // TMR0 Source Edge Select bit: 0 = low/high T0CONbits.PSA = 1; // Prescaler Assignment bit: 0 = No Prescaler is assigned to the Timer0 TMR0 = 0xFF; // preset for timer register T0CONbits.TMR0ON = 1; T0CONbits.T08BIT = 1; INTCONbits.TMR0IE = 1;}void main(void){ setup(); while (1) { }} <Q> Stop and think about what it means to set timer 0 to FFh. <S> That means it will overflow and set the interrupt condition on the very next clock. <S> The clock is stopped for a couple of cycles when TMR0 is written, so this will occur 3 cycles (if I remember right) after the write. <S> How can you possibly expect the interrupt mechanism to repond that fast. <S> The return from interrupt (RETFIE) takes 2 cycles alone, and the entry into the interrupt routine at least another 2 cycles (it's essentially a call), then there is the code to save and restore context. <S> This is all overhead even if your application code does nothing. <S> Expecting a PIC 18 to interrupt every 3 cycles is rediculous , as even a cursory look at the datasheet should have made obvious. <S> Using a compiler on top of that only makes the minimum interrupt frequency that can actually be handled worse. <S> If you want to set up a periodic interrupt, start with timer 2, not timer 0. <S> That timer has a period register for exactly this purpose. <S> Even if you are stuck with timer 0 to create a periodic interrupt, you should be adding a value into TMR0, not setting it to a fixed value. <S> That way there is no accumulating error and the number of cycles from the timer <S> 0 overflow to the instruction that writes it to a new value doesn't matter. <A> You should try to take a look at the equivalent assembly language code produced by your C code upon compilation. <S> The actual code produced will give you a better picture of why certain things take a given number of cycles. <S> With the fast interrupt rate you are attempting the actual processing rate that you achieve is the sum of: Duration to timer overflow if time of exit of ISR back to main() is shorter than timer programmed duration. <S> This is probably close to zero cycles in your example. <S> The time of interrupting at least one instruction fetch in main(). <S> The time of the MCU responding to the interrupt and fetching the interrupt vector. <S> The total execution time of the ISR itself as next interrupt cannot happen till current one is finished. <S> Look into trying to just XOR the port bit itself in the ISR instead of using the copy variable and the extra subroutines. <S> Code such as: LATCbits. <S> LATC5 ^= 1; Or possibly even faster: <S> LATC ^= 0x20; <S> Welcome to the world of programming in the embedded realm on low performance hardware where your CPU does not run at 3.27GHz. <A> I see one thing that might cause unexpected results here: you set TMR0 to 0xff in the ISR. <S> I don't understand why you do that. <S> You want the timer to increment on itself, you don't need to write it yourself. <S> In fact, it isn't even needed to set the TMR0 to <S> 0xff <S> in the setup() - it doesn't really matter what the value on startup is. <S> Now, let's calculate this again. <S> You're using an 8MHz clock <S> , that's 2MIPS. <S> The prescaler is set to 1:2, so that means your TMR0 increments 1M times per second. <S> This means your ISR will be called 1M/256 times per second, if you remove the TMR0 = <S> 0xff from the ISR. <S> This is 256us or 3906 times per second. <S> You should not take in calculations for calling the ISR or the LED. <S> This is because while you do this, the timer is still running. <S> When you exit the ISR, the timer isn't 0 anymore. <S> Therefore, the ISR is called exactly at the rate we just calculated. <A> In addition to the above, copies are made of a variety of registers by the interrupt handler so that they can be restored on return. <S> Minimally, the return address needs to be saved to the stack, even if you're willing to throw away the value of every register. <S> See section 9.12 in the datasheet for better description. <S> To cut down on errors of this sort, clock faster. <S> With your 8Mhz crystal, you can use the 4x PLL to clock at 32MHz. <S> With a faster crystal, the PLL lets the uC go at 64MHz. <S> Your error wont go away but it will go down by a factor of 8. <S> Another approach would be to move to the dsPIC33 line, which seems really optimized for low latency interrupts, and can clock at 80MHz for a 40MIPS rate ( <S> the instruction cycle on those uC's is 2 clock ticks!). <S> Of course, this might have implications for your tool chain. <S> Lastly, if its really critical, you might consider actually using logic chips to accomplish your task, which doesn't seem all that complex. <S> You can maintain the uC, but just use hardware logic external to the uC to do the real speedy stuff. <S> FPGA would be yet another really fast possibility, but with definite tool chain issues.
| You could get it faster by simplifying the code in the interrupt routine.
|
Why do we need an isolation transformer to connect an oscilloscope? My professor always insists that I provide power to an oscilloscope thorough an isolation transformer. What is the necessity of this? What is the risk if I don't connect it? <Q> You should never float a scope with an isolation transformer! <S> This is reckless and dangerous advice from your professor, and he/she needs a reality check. <S> The accepted procedure for doing work that requires isolation is to ISOLATE THE UNIT UNDER TEST, NOT THE TEST EQUIPMENT. <S> Why? <S> It's much easier to remember that the unit under test is what's unsafe and needs cautious handling, not your oscilloscope <S> If you hook a communication cable up to your floating scope (USB, GPIB, RS232), guess what - it's NO LONGER FLOATING. <S> (All of these cables have earth-referenced returns) <S> As soon as you connect that floating scope return to a potential, all of the exposed metal on the scope is now at that potential. <S> Major shock hazard. <S> If you cannot float the unit under test, use an isolated differential probe to do your measurements, and keep both the UUT and scope earthed. <S> No measurement is worth the safety risk. <S> A battery-operated scope may seem like a good idea in this circumstance, but only if it has dedicated isolated inputs. <S> A battery-operated ordinary scope with non-isolated inputs will still suffer the problem of the exposed metal floating up to whatever potential you connect the ground to. <S> That's <S> why all of the manuals for the battery operated scopes clearly say "This scope must always be earthed, even if you're running off the battery" - if you choose to ignore this, it's at your own risk. <S> A scope with dedicated isolated inputs should still be earthed as a good practice. <S> It's essentially the equivalent of using external isolated differential probes with an ordinary scope. <S> I work full-time in power electronics and have tens of thousands of dollars of lab equipment at my bench. <S> If anyone is caught floating their scope, the float is immediately corrected by the test engineering team, the means of float is seized (most often this is a line cord with the ground prong removed) - disciplinary action is a possibility. <S> Numerous senior/principal engineers have fried their PCs and their entire set of GPIB-connected bench instruments by trying to float the test equipment and forgetting about the GPIB interface. <S> (No one has died yet - thankfully) <A> The alligator clip on the scope probe: <S> ( image source ) is connected, through the power cord, to Earth. <S> If you clip it to something that isn't at Earth potential, you get a large current, and things go boom. <S> That said, an isolation transformer on the scope isn't the way to go. <S> There's a reason the engineers built the scope like this, and it has to do with safety and noise performance. <S> It's better to isolate the device under test, and let the scope work as designed. <S> Remember, that ground clip is also connected to the metal chassis of the scope. <S> It's likely you will touch it. <S> It's also likely you are touching Earth. <S> So consider these circuits: simulate this circuit – <S> Schematic created using CircuitLab scope1 allows dangerous current from the unit under test (UUT) to flow through you to ground. <S> You die. <S> scope2 may be damaged, or may just blow a fuse, since the UUT has been accidentally shorted to ground. <S> But, you will live, because you are a much higher impedance to ground than the ground pin on the cord. <S> This is why it's called a safety ground . <S> If you just avoid clipping the ground lead to anything that's not at Earth potential (scope3), then nothing goes boom. <S> Just be sure to not make any mistakes! <S> If you want to protect you, the UUT, and the scope against mistakes, then the right thing to use is an isolated, current-limited supply (scope4). <S> If you do mistakenly short something out, the current limiting kicks in and probably avoids permanent damage to anything. <A> Both approaches are possible to apply (with different pro and contra). <S> It is sometimes difficult to arrange an isolation transformer for a device under test, when the device consumes lots of power (power electronics driving a big motor XY kW). <S> In such cases it might make sense to isolate the oscilloscope, since the isolation transformer can be very small and cheap. <S> LMA
| Between the isolation and the safety ground, it will be harder (but not impossible) to kill yourself.
|
Bulk programming with unique id When programming hundreds of thousands (or more) MCUs or EEPROMs, it seems that companies need to add unique serial numbers to each programmed unit -- don't want two units with the same serial number. How is this done in practice, especially for MCUs with internal FLASH? <Q> You can buy devices that have unique serial numbers in them and connect your MCU to them. <S> Serial EEPROMs that have this feature are available from Microchip and Amtel . <S> For pure MCU solutions you would likely have programming software that programs the base image, then a station or step that programs the serial number as provided by an external PC, for example. <S> The PC has software to make sure it increments each time. <A> For example, STM32 family MCUs have a 96-bit Unique Device ID register. <S> You'll need to use a simple hashing function to derive a shorter ID because serial numbers for ICs from the same batch only tend to differ in one or two bytes. <S> See e.g. here for more information. <A> Since your main question is "How is this done in practice, especially for MCUs with internal FLASH? <S> " i will summarize some possible solutions (depending on the device) <S> the MCU already provides a factory side <S> UID <S> writing the UID to the internal EEPROM as part of production/calibration writing the UID to some kind of dedicated user signature section during production/calibration hard code <S> the UID using an auto generated header file and recompile the source before flashing use an external device that provides a UID and access it during runtime <A> The internal flash of the AVR MCUs is programmable, just like the program memory area. <S> A typical chip programming appliance or set-up will have a feature that increments a serial number to be programmed once per programmed device. <S> You can do it with the avrdude program for programming AVR chips, for example.
| Modern microcontrollers tend to provide unique serial numbers "out of the box".
|
Does an RF receiver constantly consume power? I'm building a battery operated robotic arm and would like to use a cheap, short distance RF transmitter/receiver kit to trigger it. However I would like to know whether the receiver will constantly be consuming power as it listens for the signal. I would prefer to not have to change the batteries more than once or twice a year considering the motor will only be running for a couple seconds per day. <Q> (The only exception that I know of are RFID-type receivers.) <S> At the moment of writing, the specific receiver is not mentioned in the O.P. <S> Here are numbers for a Bluetooth Low Energy module ( BLE113 ). <S> Transmit: 14.3 mA or 18.2 mA <S> Receive: <S> 14.3 mA Sleep mode: 0.4 uA (micro-Amps) <S> Cyclic sleep with wake-on-radio (WoR) is a common way of reducing the average power consumption and increasing the battery life. <S> This, however introduces latency. <S> If the radio is receiving for 0.1 sec every minute and not receiving for 59.9 sec, then the worst case latency will be ≈ 1 min. <S> As receive duty cycle decreases, the ampere-hours consumed in sleep mode will outweigh that during the active mode. <S> P.S. <S> The type and size of the battery is another major factor. <S> Achieving a 6 months battery life with a 10 mm coin cell would be harder than with a pack of alkaline AA cells. <S> Internal leakage in the battery itself (self-discharge) will also influence battery life. <A> I've done a system where the radio woke up once per second and listened for 25msec and shut down if there was nothing sensible to detect. <S> This means the duty cycle of the receiver was on for one-fortieth of the time thus current consumption went down (on average) from about 15mA to about 400uA. <S> This could be made much leaner of course and the receiver could be shut down for (say) 10 seconds reducing the current consumed to below 50uA. <S> However, if you don't want the hassle of synchronizing transmitter and receiver, your transmitter has to repeatedly send the same message out for up to 10 seconds continuously so that it catches at least one 25msec time-slot when the receiver is powered and listening. <S> I guess it all boils down to finding a receiver that can be up and running and listening in the smallest time period possible. <S> The downside is that the shorter the time period it is listening for the less able it is to detect a bona fide transmission from the intended transmitter. <S> I don't think these are big problems unless you need "instant" response times from the motor. <A> As long as the receiver is turned on, it will consume power. <S> There are methods to reduce the amount of time it is turned on, however. <S> For example, you can turn it on for 5 seconds every minute. <S> On for 5 seconds, off for 55 seconds. <S> Then the transmitter and receiver need to have synchronized clocks so the transmitter knows when to transmit. <S> The exact timing of this depends greatly on your radio. <S> You might have it on for 50 mS, and off for 950 mS. <S> You didn't say anything about what your system is, so I cannot say what your battery life will be or if 6-12 months is reasonable. <S> My gut instinct is that you won't come anywhere close to that. <S> I would recommend using an alternative source of power. <S> Maybe solar or some form of energy harvesting. <S> If your device is normally very low power then something like that can power the radio and MCU, saving the battery for when the motor is on.
| Most receivers will consume power, when listening.
|
Why would I use a transformer instead of one inductor in a crystal set? I'm reading up on A Simple Radio Receiver . I have a question about this image: The signal from the antenna (perhaps a few tens of microvolts, or hundreds for a nearby transmitting station) is introduced to the LC circuit either through a small capacitance, or, as in this case, by means of a second coil L2 wound on top of L1, with its other end connected to earth. This behaves like a transformer - currents flowing in L2 generate a changing magnetic flux which cuts L1 and induces an emf in it. I don't understand why L2 is needed. It forms a transformer with L1, to "cut L1 and induce an EMF in it". What is meant by 'cutting' in this case? And, when they need EMF in L1, why not just connect it to the antenna input directly? Like this: simulate this circuit – Schematic created using CircuitLab Sorry for the ugly schematic, it would've be too large otherwise. Anyway, why is a transformer needed in this crystal radio set? I actually built a crystal set without a transformer, with this circuit: I also added a 100n capacitor parallel to the crystal earphone. Why would or should I use a transformer instead of going into the LC circuit immediately? <Q> Do or Don't - Using a transformer or leaking antenna signal to the tuned circuit via a small cap really does work. <S> By work I mean it makes the tuned circuit formed by L1 and C1 very much more resonant and this means channel selectivity and higher signals. <S> What about the antenna? <S> The antenna impedance will be quite low and "resistive" and this is not ideal for connecting directly across the tuned circuit formed by L1 and C1 - it will dampen down the resonance and make selectivity poor and signal amplitude smaller. <S> Here is what I mean: <S> - I have selected L1 to be 100uH and C1 to be 220pF - <S> this forms the basic tuned circuit. <S> I have leaked onto the tuned circuit via a 33pF capacitor an input signal from a 50ohm source. <S> In the middle top of the picture there is a yellow label. <S> This says 1.001MHz and 32.93 - the 32.93 is actually dB of gain from output to input. <S> Here is the simple circuit if you want to recreate it: - 32.93dB of gain is a slight exaggeration - 6dB will be lost in the 50ohm of the antenna so gain is actually 27dB and in real terms <S> this is a voltage magnification of 22. <S> I've used 50ohms to represent the antenna resistance which is a compromise value between 37ohm for a quarter wave dipole and the 73ohm for half wave dipole. <S> I haven't bothered to introduce the reactive elements of either antenna for simplicity. <S> They won't affect the general idea. <S> Take a look at how selective the response is: - <S> At 1.001MHz the peak is 32.93dB. <S> At 1.011MHz the amplitude has fallen by 16dB and this is a decent selectivity for an AM receiver based on one tuned circuit. <S> In practice there will be more losses that need to be taken into account, namely earphones, diode etc. <S> but if you start off with the right focus on getting decent selectivity and gain you might get a decent working xtal set. <S> Without the coupling coil or leakage cap you'll get at best 0dB gain and poor selectivity not 27dB gain and good selectivity. <A> There are three advantages to driving the resonant L-C tank via tranformer coupling than directly from the antenna: <S> It changes the impedance. <S> The impedance of the signal coming from the antenna is probably in the 50-300 Ω range. <S> Crystal radios are usually listened to with high impedance headphones, <S> usually around 2 kΩ. <S> Having a 100 Ω source driving a 2 kΩ load is inefficient, which ultimately means lower volume. <S> The detector diode drop is a smaller fraction of the output voltage. <S> The transformer steps up the voltage, making it higher than what comes out of the antenna directly. <S> The forward drop of the dector diode is fixed, so it is less relative to the signal after that signal has been increased in voltage by the transformer. <S> This means lower strength radio stations will still produce some output, and the output you get will have less distortion. <S> Better selectivity. <S> The relatively low impedance of the antenna dampens the resonance of the L-C tank circuit. <S> Another way to say this is that it lowers the Q of the resonant circuit. <S> This means its resonant peak is more spread out, which means that the radio can't be tuned as well to a single station. <S> The effect is that strong stations will appear to spill over into nearby frequencies. <A> L1 is the primary coil of an RF transformer. <S> This is magnetically linked to the coil L2 and steps up the voltage received by L1 (and aerial) by the turns ratio of the coils giving a larger voltage signal. <S> It also helps with impedance matching between the aerial and the resonant circuit (L1 VC1). <S> What is being 'cut' by the conductors (wires) of L1 is the high frequency magnetic field produced by L2. <S> A conductor in a changing magnetic field will have a voltage induced in it (see Faradays laws). <S> Yes you can build a crystal set by directly connecting the aerial to the LC tank circuit but you will find it is not as sensitive or as 'sharply tuned' <S> as this version.
| The larger voltage signal helps to overcome the turn on voltage of the detector diode making the set more sensitive.
|
relationship between frequency and signal strength I know that [the commercial broadcast] radio spectrum is divided into several chunks and each chunk is assigned to be used by different radio stations. Suppose that radio station S1 is using 93MHz and radio station S2 is using 94MHz. My question is, which radio station's signal strength is higher? As far I know: signal strength is high if wavelength is high wavelength is low if frequency is high So signal strength is low if frequency is high Is my understanding correct? If so, why would some radio stations pick a higher frequency? Is there a competition among companies to acquire lower frequencies? I am a computer science student and only have a bit of knowledge in signals. <Q> First, just "signal strength" by itself is meaningless. <S> Signal strength <S> where ? <S> However, there are many such factors and the relationship with frequency is not monotonic. <S> The difference between 93 MHz and 94 MHz will be irrelevant in a practical sense. <S> Long wavelengths, like are used by commerical AM (around 1 MHz) <S> are long enough that they refract around the earth to some extent. <S> This doesn't really happen at commercial FM frequencies (around 100 MHz). <S> Different wavelengths also get absorbed, passed, or bounce off of layers in the atmosphere. <S> There is much more to this than lower frequencies magically have more "signal strength", whatever that actually means. <A> Quantized energy of a photon can be described by E=hv, where h is Planck's constant, and v is the frequency of the wave. <S> I believe this is what you are thinking of: If a wave has a higher frequency , it also has higher energy per photon (as The Photon clarified) , but not the way you were thinking. <S> When it comes to radio, which is an electromagnetic (EM) wave, the energy of the carrier wave, such as radio, is a function of how much energy is put into it. <S> The average radio station pumps quite a bit of power into their radio signal, anywhere from a few kW to more than 100kW. <S> Thus, the different frequencies all have whatever power they want, even though in theory the higher frequencies carry more energy. <S> This idea of "signal strength" depends on a whole suite of factors, and you really need more info to determine what exactly your signal strength is defined as. <S> How far away from the transmitter? <S> What sort of geographical location? <S> Is strength defined as raw power returned, or is the integrity of the data being transmitted also being taken into account? <A> As far I know: <S> signal strength is high if wavelength is high <S> Nope, unrelated. <S> wavelength is low if frequency is high <S> Nope, they are inversely proportional. <S> Wavelength is short if frequency is high. <S> (EDIT, if by low you mean 10 cm is lower than 20 cm, then you're correct. <S> Saying it's a low wave length is confusing because you don't usually use low or high for distance but short and long. <S> Low and high is usually reserved for describing time or height not length.) <S> So signal strength is low if frequency is high <S> Nope, see first nope. <S> Signal strength and frequency (or wavelength--they are the same thing really) have nothing to do with each other. <S> Signal strength is due to the transmission effective radiated power, the pass loss to the receiver, then the receiver's antenna+system gain. <S> Factoring into this is the bandwidth used, the modulation type and the channels noise floor (the commercial FM broadcast band has a higher noise floor than just the thermal noise floor due to the extreme power used in that band). <S> However for the geeks out there: the receiver signal strength is usually a measure of the IF amplifier’s amount of saturation through multi-stage amplifiers and is envelop based. <S> This is actually a relative amount and is meaningless by itself until it is calibrated against a known input power level, then the amount of saturation can be compared to a calibrated input power level and thus a "signal strength" in dB can be estimated. <S> Anyway, among other things path loss can vary over frequency, but the FM broadcast band does not experience path loss differences from the low end to the high end because the band is too small to experience propagation differences. <S> The FCC tends to try to separate high power signals (commercial) from low power public broadcast signals (College radio, etc.) by putting them away from each other in frequency. <S> That is why you often see the college/public stations in the 89-91 <S> Mhz range and the big nationally syndicated stations at higher frequencies.
| No, your understanding is not correct. If you mean at some distant receiver, then yes, frequency is one factor in how strongly a station is received at the same distance and transmitter power.
|
What is the meaning of a battery's "cycle life?" I started to read about batteries, I am interested in lithium batteries, I found a description regarding the stability and capacity/weight, but I read some unclear descriptions like "cycle." What does "cycle life" mean?What are the charge/discharge numbers?What if the battery is discharged to 60% and then charged to 80%, Does this count as a cycle? <Q> So if the battery is discharged to 60 % and then charged to 80% it isn't a complete cycle. <S> You could find more information in this site. <S> Your link says that cycle life is the number of charge/recharge cycles that the battery can support before that it's capacity falls under 85%, my link says 80%. <S> These datas are indicative and I think that can vary a little bit. <S> Generally cycle life means <S> the number of charge/recharge cycles before a battery starts to reduce visibly its performance . <S> According to your link <S> the Li Po batteries generally can support 600 full charge/recharge cycles before its capacity falls under 85-80%. <S> Remember that this value is only indicative and this number can vary a lot depending the manufacturer and the product quality. <A> It is simply the number of times the discharge / charging cycles can take place until the maximum charge capacity of the battery is reduced to 85 % of its charge capacity it had when it was made <A> The cycle life will also vary based on the conditions the battery is in. <S> Factors such as temperature, movement, how frequently it is used, etc. <S> For example, lithium polymer batteries function best in moderate temperatures because that is when the gel is at the optimum density to be fluid and still retain its conductivity. <S> But heat it up too much, it becomes less dense, swelling up and reducing how conductive the it is, and how long it retains a charge. <S> The advertised cycle life is how the battery perform under ideal conditions only, which any kind of battery rarely sees.
| The cycle life is the number of complete charge/discharge cycles that the battery is able to support before that its capacity falls under 80% of it's original capacity .
|
How are "jumpers" used? Two settings on a system I've got can be changed using jumpers. This is the connector and the pin description: There seems to be three pins needed to choose between ON and OFF, but how? Do I set them to high/low in some pattern? The documentation is very sparse so I assume this is some standard interface, but I couldn't google it. 5.3 Jumpers description Please note that the two jumpers on the board are PTH (plated-through hole) type and should be easy to mount/dismount. 5.3.1 TARGET jumper TARGET jumper controls the powering of the target board. If it is in position ON (check the diagram on the back of the plastic cover) it will provide either 3.3V or 5V to the target board (depending on the position of the POWER jumper) The default position is OFF. <Q> (That looks like an AVR programmer) <S> The jumper is a tiny plug that connects two pins. <S> You put the jumper either on the left two pins or on the right two pins. <S> The middle pin is a common pin. <S> In your case the jumpers are being used as a SPDT switch that can't be accidentally moved. <S> To change the selection, pull off the jumper and push it into the alternate position. <S> This applies to each group of three pins <A> Jumpers are metal clips that short circuit two pins. <S> The pins select which parts of the circuit are connected. <A> Jumpers are used in order to enable the user to change setting simply moving it. <S> The same is true for the power supply (5V left, 3.3V right). <S> In every case you must connect the jumper, otherwise the selection input is floating and it can't work correctly.
| The central pin is common, so if you want to set the device ON the jumper must stay in the first two pins, if you want to set the device OFF the jumper must stay in the last two pins.
|
How should power be supplied for in-system programming? I'm trying to program an ATmega328 with an AVR-ISP-MK2 from Olimex . The programmer has a setting for whether to supply power to the target board or not. The connector has +5V and GND pins. I wanted to make sure that I've understood this correctly before breaking anything: If the programmer does not supply power (OFF): should I connect the +5V and GND pins from the programmer to the same +5V and GND as the target board, which is powered by another source? If the programmer does supply power (ON): should I power the target board completely from the programmer, so that I pull the +5V and GND on the connector to VCC and GND on the target board? If so, the programmer would be the only power supply. That is: in both cases, +5V and VCC would be connected, and programmer-pin-GND and target-board-GND would be connected. The only difference would be whether an external power supply is connected. TARGET jumper controls the powering of the target board. If it is in position ON (check the diagram on the back of the plastic cover) it will provide either 3.3V or 5V to the target board (depending on the position of the POWER jumper) The default position is OFF. <Q> If the programmer does not supply power (OFF): should I connect the +5V and GND pins from the programmer to the same +5V and GND as the target board, which is powered by another source? <S> The jumper most likely physically disconnects the +5V pin, so it doesn't matter. <S> Keep GND connected in any case, because the devices require a common reference level to guarantee a reliable communication. <S> If the programmer does supply power (ON): should I power the target board completely from the programmer, so that I pull the +5V and GND on the connector to VCC and GND on the target board? <S> If so, the programmer would be the only power supply. <S> Yes, its probably best to completely disconnect the external power supply in that case. <S> Connecting two different DC voltage sources in parallel is almost always a bad idea. <S> Keep in mind, that USB (2.0) can only supply 500mA@5V max, while the programmer will also consume a few mA itself. <A> As shipped, the AVR ISP Mk2 DOES NOT supply target power, it only senses it. <S> It must see voltage on both the Vcc Pin as well as the Reset pin supplied by an external source. <S> Additionally, it must be able to pull down the reset pin to ground. <S> Normally this is accomplished by tying the Vcc pin to supply voltage through a 10K resistor and also a 0.1uF cap to ground. <S> See http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=81120&start=0 <A> If TARGET is set to ON, you should not supply power to your circuit in some other way. <S> That is to say, don't connect your programmer with TARGET = <S> ON if the board is otherwise powered. <S> If TARGET is set to OFF, you must supply power to your circuit in some other way in order for your target device to be programmed.
| You should in general set POWER to the appropriate setting for your circuit to be on the safe side, though it may not matter if TARGET is set to OFF.
|
How to connect 20 wireless sensors in one receiver with arduino? I live in a house with many doors and windows and I plan - as an easy project - to be able to detect and see which door/window is open using simple leds. What I do not want to do is to have 2 or 3 wires for each sensor hanging on the wall or be on the floor... so I am searching for a way to connect simple wireless window/door contacts (rf 433mhz usually) sold very cheap on ebay. Also I do not want to have 1 receiver for each transmitter because it seems foolish, power & space consuming.. XBee is a very expensive way to do this. Bluetooth could be another option. What's your opinion ? <Q> The sensors are battery powered and so to preserve power the sensor circuit must remain "off" most of the time. <S> This means that the sensor only transmits when needing to transmit i.e. when the door or window opens or closes. <S> This can be achieved with a low power 433MHz transmitter and a low power micro like a PIC. <S> The PIC wakes up when the door or window switch changes state OR just wakes up every 5 minutes or so based on a low power timer oscillator. <S> All the windows and doors use the same methodology and transmission frequency. <S> One receiver picks up the transmission and because sensors only transmit infrequently, collisions are few. <S> However if collisions do happen this is unknown to the transmitter <S> so, each transmitter should wake up on a slightly different timebase to avoid continual collisions and give the system a decent chance of working. <S> Each transmitter/sensor needs to encode it's own address in the data being transmitted <S> so the receiver knows which device is sending data. <S> It can even transmit a bit that communicates the battery status or using a lower power ADC the battery voltage can be transmitted. <S> The receiving radio stays on all the time and presents a micro with serial information that is decoded to light the various LEDs. <S> Not a trivial project but a good one to do. <S> I did a freezer alarm system for a shop based on this very system. <S> each freezer used a 433MHz transmitter and PIC and each transmitted based on a 20 minute period. <S> Should one freezer start to defrost, a central control activated an alarm. <A> You have several options, and two of them are :: <S> use a simple TX-RX modules on the frequency you want, but you have to do the modulation/demodulation and packet codec <S> use a TX-RX chip modems where everything is taken care for you, you just have to setup the internal registers and send fill the transmission buffer to TX or read the reception buffer to RX. <S> It has handshaking, auto ACK and retransmission... <S> eg: <S> Nordic nRF24L01+ or HopeRF <A> I did a similar project last year, in which i used an arduino BT board. <S> Though, my sensor were not wireless, i found that i would be able to connect 9 sensors (simultaneously) to a single arduino board, using all available pins (digital as well as analog). <S> Then i controlled all those sensor using mobile application. <S> Okay <S> so that was mine project <S> Here is the link for Arduino Bt board <S> I think using arduino <S> Bt would be simpler and cost effective solution. <S> Also later, you can have sensor data on your mobile application from BT board, and you will not need led's anymore.
| , now lets talk about yours, you want to use around 20 sensors, so you can go for pin multiplexing, like you can assign a single pin for 3/4 sensors, in this way, you will be able to control all of them using single arduino board.
|
Measuring RF power of a communication signal I am running a software radio application. I need to measure the power of transmitted ofdm signal. The issue is that FCC has regulations of -50dBm/Hz. So I understand that if i need to send a signal at a bandwidth of 1Mhz, the the maximum allowed power -50dBm*10^6 which is 0.01W or 1mw.So i am trying to measure the power at output of my USRP transmitter. I just brought an oscilloscope and measured the sinusoidal signal peak to peak voltage in the oscilloscope. It was 7.2 v peak to peak. I was unsure how to use v^2/R because i don't know the resistance. when i assumed resistance to be 1, I got the power output to be 39dBm. I then checked online and found that you need to measure power spectrum. So that means I need to know power at frequency of transmission. I need a RF power analyser for the same. How is the power at frequency spectrum related to analog power measured by oscilloscope at the output of antenna? What should i measure and reduce if i need to keep it within desired FCC regulations? Is the power of the frequency spectrum constant? <Q> The easy solution is to get an RF wattmeter. <S> Those will measure transmit power directly. <S> Alternately, you can transmit into a \$50\Omega\$ dummy load, measure the RMS voltage, and calculate power as <S> \$P = <S> V^2/50\Omega\$. <S> This will give you total power. <S> To calculate the spectral density , divide this by the bandwidth of your signal, which you should know since you are making it. <S> The power in this spectrum isn't flat: some smaller areas will have greater spectral density, some will have less. <S> I'm no expert on FCC regulations <S> so I can't say precisely what their rules are. <S> I also can't say precisely how they define "bandwidth". <S> To get an idea of the spectral density of smaller slices of spectrum within your signal, take the FFT of your transmitted signal, and each bin will give you a relative measure of power in the frequency range covered by that bin. <S> Divide your measured total power by the sum of these bin powers, and you have a scaling factor that relates the unitless power given to the FFT to power in watts. <S> If the USRP and your software has fixed gain, then this scaling factor will be the same for any transmitted signal. <S> It might be easiest to transmit a simple carrier and calculate the scaling factor that way, then apply it to more complex signals. <S> Note that your software probably displays the FFT in decibel units <S> ; you will want to convert these to linear units to do the math as described. <S> Your choice of windowing function will affect how the power spreads out between bins. <S> See How does the energy of non-resolved spectral lines get distributed in an FFT? <A> Making power measurements on an ODFM signal is difficult do to with the time varying power envelope. <S> The two previous answers with a power meter and thermal diode are suggesting a method similar to that as described in EN 300 328 and EN 301 893. <S> However you'll need to also consider how you are going to make sure the product is compliant when building them in production. <S> Without knowing which FCC spec you're testing to, I can only suggest you take a look at <S> this article on OFDM power measurement for a comparison of techniques. <S> I'm partial to the digital spectrum analyzer that you can use to integrate over different bandwidths. <S> Don't freak out at the cost as you can always just rent one then return it. <S> If you update your question with the FCC reg number/description I'll check back to see if I can help more. <A> A 50 ohm dummy load (non inductive resistance) is the usual way to test the output as Phil says. <S> The peak-to-peak voltage is 2.828 times the root-mean-square (rms) voltage. <S> So taking this as 7.2V (across a 50R load) then \$V_{RMS} = \frac{7.2}{2.828} = <S> 2.546 <S> V\$ $$ \begin{align} \text{Av. power} &= \frac{{V_{RMS}}^2}{R}\\ <S> &= \frac{(2.546V)^2}{50\Omega}\\ &= 0.13W\end{align <S> } $$
| A spectrum analyzer will can also be used to measure ERP of your design against a reference antenna.
|
Sending data using 4 pin 3.5mm jack into smartphone I have been looking around for some time and haven't found helpful information on how this is done. I am working on a project that intends to send data through the headphone jack to be processed by a smartphone. More specifically, I want to measure the temperature of water using an IR sensor. The voltage of the sensor will be sent to a smartphone where it can be analyzed to tell me what the temperature is. Is this a feasible idea? I don't know too much about how 3.5mm connectors work on smartphones so links would be helpful as well. I know this is a vague description of the project and I'm just looking for some sources to steer me in the right direction. The project requires the usage of the headphone jack on smartphones so I can't use USB. Side note: I am a novice undergrad engineer that might be in over his head. <Q> It shouldn't be too hard to solve this problem in a way which is fairly platform-agnostic and flexible across the possible variations of your application need. <S> First, you need to find a circuit for injecting an audio signal into the headset jack; as headsets with wide compatibility (iphone, most android devices, and probably more) are available on the market, this is clearly possible. <S> I believe it has been covered here before. <S> Then you need a means of data transmission which is easy to implement, and which is fairly immune to variations in the phone model, components, temperature, etc. <S> Trying to send an analog voltage level directly would likely not be - the phone (or at least input <S> circuit you use) will likely block DC, and even if it does not you have a hard time knowing the precise gain on the phone's input circuit. <S> So something which encodes information over time is probably going to work better. <S> A simple solution would be a voltage-to-frequency converter, or voltage-controlled audio oscillator. <S> By producing a tone with a frequency proportional to your signal, and then measuring the strongest frequency in software on the phone, you'll have a fairly reliable system. <S> It will be somewhat subject to the accuracy of your modulator though - for example, if you hack something up with a 555 it may depend on non-precision capacitors whose value varies from example to example and over temperature. <S> Another option to look at would be a digital modem - for example frequency shift keying. <S> You could simply pull the specs for a 300 baud telephone modem and approximate such a signal with a square wave output from a little processor such as an ATtiny, PIC, MSP430, etc, using the processor's ADC to read the sensor and come up with a number you want to encode. <S> If you don't need to take measurements very quickly, you could lower the baud rate still further and make the decoder easier to write. <A> Following Chris's answer perhaps something like an LM331 IC would be useful. <S> It performs the task of voltage to frequency AND frequency to voltage conversion depending on how it is wired up. <S> http://www.ti.com/product/lm331 <A> Yup, this is completely feasible idea. <S> This is just analog communication. <S> Recently i have been working on same concept. <S> And i have found about project Hijack. <S> Check this http://web.eecs.umich.edu/~prabal/projects/hijack/ <S> This is 3.5 mm Jack powered device, which makes enable to communicate with the smartphone. <S> As far i know None has tried 2 way communication using 3.5 jack.
| In summary, by modulating some aspect of the signal such as frequency which is less subject to device-to-device variation, you can build a system which will be fairly universal - only requiring that you create a build of your demodulator software which can be linked into the structure of a basic audio record-to-buffer type application in the SDK of each type of phone you want to support. But speed of data transmission will be not as good as the USB. This is just one way communication.
|
connecting ac and dc sources together in series I want a small signal ac voltage riding over a dc voltage, but when I connect my signal generator in series with the DC power source,then the two sources get coupled.I mean if i try to change the ac amplitude the DC amplitude changes too and vice versa.So any solutions for this problem?/ <Q> You should've provided us with more details. <S> For instance, knowing what components you're using for DC and AC sources could lead to a specific answer. <S> In general, his behavior may be caused by either of the following: <S> The current through your circuit exceeding the limit of one of the sources (usually AC), in which case strange behavior can be seen (the exact behavior depends on the components). <S> Your AC source is "grounded" - one of its outputs (usually the "-") must be connected to the ground of the circuit (I'm assuming here that the ground of your circuit is defined by the "-" output of the DC source). <S> Since I believe that your issue is #2 above (and because it is trivial to check for #1), you have few options (the ones I can think of): <S> The answer by @Jim Dearden is the most robust way to proceed with (maybe not the exact configuration, but the employment of op-amp) <S> However, there might be shorter solution: check your DC power supply spec. <S> If its outputs may be floating, then you can switch places between AC and DC supplies in you circuit. <S> This will allow you to satisfy "grounded" constraint of your AC supply, while keeping both supplies in series. <A> Virually any op amp should work (e.g tl071, 741) <S> The op amp is set up with with a gain of 1. <S> The AC signal is fed (through a decoupling capacitor) to the inverting input. <S> The DC signal is fed through a resistor to the non inverting input. <S> The two signals will be added together (AC will suffer a 180 degree phase shift) and appear as a mixed signal at the output. <S> Take care not to set the DC voltage input greater than the supply voltage of the op amp. <S> As you will need to supply the op amp with a dc voltage you could tap into this for your DC value. <A> Your signal generator will likely have two things that make it difficult to directly connect in series with the DC source: <S> - It may not like its 0V (gnd) point raising more than a couple of volts above ground if at all. <S> The output impedance is not going to be zero. <S> A lot of sig gens have a 50 ohm output impedance and the dc current will have to flow through the output of the signal generator and potentially through 50 ohms (or 600 ohms in some cases) - <S> any dc load you place on the pair in series will result in poor dc regulation and reduced dc. <S> The simplest option is to use an output transformer on the signal generator: - If your signal source is audio choose an audio transformer like this: - Notice the red circle <S> - it's telling you that the DC resistance of the secondary is less than 1 ohm and this means the DC capabilites of the pair in series won't be much affected by light to moderate DC loads. <S> Don't try forcing an amp through it though because you'll saturate the core and affect the amplitude of the AC signal and cause distortion and possibly ultimately damage the transformer. <S> There are audio transformers that can be found that are good for 100mA flowing in the output <S> winding <S> - these were used in telephone modems. <S> Note that the audio transformer doesn't need to have windings that are tapped (like the one in the picture). <S> I quickly found this to demonstrate a suitable candidate. <S> 1:1 or 2:1 transformers with single primary and secondary windings are the basic type to use. <S> Split/tapped windings give you more options that you probably don't require but could be useful on other things. <S> If your ac source is in the rf regions you'll need an appropriate transformer suitable for those frequencies.
| Use an op amp to combine the signals.
|
Soldering to and using proto area on XBee sheild This feels like a very stupid question but how am I meant to use this area of protoboard on the Arduino XBee shield - these are straight through vias with no mid layer and so none of the holes are electrically connected. It's too small to sick a piece of breadboard to. I was expecting it to be connected in rows like bread board / vero board but I've tested with a multimeter and nothing is connected - what am I missing? <Q> You're not missing anything in particular, as per other answers you can bend leads and use short lengths of wire to connect components which I often do. <S> While it's lost poularity due to SMT technology another technique I often use is wire wrap . <S> From that Wikipedia article here's an image of a typical connection using a traditional wire wrap post that has a square outline: <S> While the round shape of most through-hole component leads won't secure the wrap <S> well I normally secure the component by soldering to the pad first, trim the lead a little and then wrap followed by a dollop of solder to secure the wire. <S> One nice thing is that the wires are insulated so it's easy to make point-to-point connections without worrying about shorting. <A> These are not as convenient as bussed boards, but you can sure fit alot more on them! <S> I like to mount my components, leave my leads a bit long, tin my jumpers well, and solder on to the long leads. <S> Trim up the leads after everything works. <A> You do get prototype boards like this also, though their use is probably less common. <S> To use them you can just solder wires between the component leads, or solder bare wire (or component leads) to form a "trace" across the pads to connect multiple nodes, and/or use solder blobs to connect pads to form a trace (if possible easily - usually this method is easier with square pads with little gap between, unlike this board)
| While somewhat obsolete having wire wrap wire on hand is always useful even with professional work because with its very small diameter it's an excellent way to connect directly to fine pitch SMT pins to correct routing problems during prototyping.
|
Why is it bad to mix new and old batteries? I've seen warnings that it's bad to mix new and old batteries -- why? Is it a matter of a battery's age or a battery's voltage/current (remaining)? <Q> A simple model of a battery is a chemical reaction which produces a constant voltage. <S> But, this chemical reaction takes time. <S> A simple model of the limited speed of that reaction in electrical terms is a series resistance: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> When the battery is fresh, R1 is small. <S> As the chemical energy is depleted, R1 gets bigger. <S> Why this happens is complicated, and I'm not a chemist, so I can't tell you in detail, but it has to do with the reactants being used up, and the battery plates getting covered in cruft, and so on. <S> This resistance, even though it's a combination of electrical and chemical effects, isn't exempt from the laws of physics. <S> It still experiences a loss according to Joule's law: $$ P = <S> I^2 R $$ <S> This loss of electrical energy must be accompanied by a gain of thermal energy. <S> If you aren't mixing batteries, then as the batteries become dead, all their resistances rise about the same, so while R goes up, the increasing \$R\$ also limits the maximum current \$I\$ that the batteries can supply. <S> Most batteries 1 are designed to be safe under any of these conditions. <S> However, if you mix fresh and dead batteries, then you have the fresh battery which can deliver a large current, into a dead battery which has a high resistance. <S> This results in excessive heat in the dead battery, which may then be damaged or fail, perhaps spectacularly. <S> 1: <S> but certainly not all batteries. <S> Lithium ion batteries, somewhat <S> infamously are not safe when shorted. <A> The worst thing you can do to just about any kind of battery, whether rechargeable or not, is to push an amount of current through it which is large relative to its short-circuit current. <S> As a battery gets depleted, its short-circuit current--and thus the level of current which it can safely handle--will diminish. <S> If all batteries in a stack get depleted at the same time, the amount of current flowing in the system will remain below the amount of current that the weakest battery can safely handle. <S> If, however, one of the batteries in the stack is depleted while other batteries remain strong, the strong batteries may manage to push significant current through the weak one even when its short-circuit current has diminished to basically nothing. <S> Such abuse will severely degrade the useful life of rechargeable batteries, and may cause non-rechargeable batteries (or even rechargeable ones) to release corrosive gunk. <A> Duracell say: - Q. <S> Can I mix old and new batteries? <S> A. <S> Do not mix old and new batteries. <S> We recommend replacing all batteries within a device. <S> Q. <S> Can I mix different battery types? <S> A. <S> No, different batteries are designed for different purposes. <S> Mixing a lithium battery with an alkaline battery will not improve device performance. <S> In fact, it will reduce performance and may even damage your device or cause battery leakage or rupture. <S> As well, do not mix different battery brands within a device. <S> Doing so will reduce overall performance and may also cause battery leakage or rupture. <S> We recommend using the same type of batteries within a device. <S> Q. Do I have to change all the batteries at the same time? <S> A. <S> We do recommend changing all batteries in a unit at the same time. <S> A partially used battery will drain energy from a new one, reducing the total amount of battery power available. <S> These questions and asnwers can be found here <S> The trouble is that Duracell are likely (it's in their interest) to put a less than glossy spin on mixing batteries <S> but it's hard to find a general answer that would contradict. <S> My own experience of battery failure is limited to NiCd batteries where one cell reversed its polarity effectively dropping the stack of cells from 6.0V to 3.6V and this was due to heavy discharge by a faulty circuit not a random selection of new and old batteries but the liklihood of cell reversal <S> (I heard) was more if you did mix old and new.
| Doing so will reduce overall performance and may cause battery leakage or rupture.
|
Do I need filtering caps for a USB power supply? I'm pulling 5V from USB for testing an IC. Should I put a capacitor in there to filter the power supply, or will it already be steady coming from the laptop? I don't have access to an oscilloscope, so I can't check how noisy the USB voltage is. <Q> Yes, put a cap in. <S> , e.g. a 100nF ceramic is a typical value (or 1uF, 2.2uF, etc are cheap/common nowadays) <S> Depending on the IC and if there are other components present, you may need one or more larger electrolytics as well (e.g >10uF, near the entry point for the power rail). <S> Usually the IC should have an example circuit in the datasheet and advice on decoupling/layout. <S> Have a read of any decent electronics book for detailed info on decoupling and why it's needed, or search here <S> (plenty of answers that deal with this) or Google - app notes on board layout/design from places like Xilinx / Atmel / Microchip etc. are worth a read. <A> Putting a capacitor on the 5 Volt line is a good idea even if the source supply is well-filtered. <S> This meets several purposes: Providing a supply reservoir to the device under test: varying current draw at the device will result in supply voltage variation without such a reservoir capacitor. <S> Filtering noise picked up over the length of the cable from the USB source to the device under test Decoupling, ensuring that the device itself does not feed noise back to the USB source <A> Just putting 10uF and 100nF capacitor directly between the VBUS and GND is enough for digital circuits. <S> But be aware that USB 2.0 Specifictiation allows a maximum capacity of 10uF <S> so there is a limit to the inrush current. <S> So do not put larger Caps in to be "on the safe side" <A> The USB spec actually mandates a 1 uF capacitor on the +5V line. <S> The reason is to counteract the inductive kick of hot-plugging and hot-unplugging the cable. <S> More is somewhat better, as long as it's not so big as to cause temporary over-current draw from the host when being plugged in. <A> Depends on the length of the cable (and sometimes the quality), the quality of the laptop's usb circuit, if you are charging the laptop or not, what type of IC you are actually using. <S> Most brand name manufacturers will have a decent enough usb supply where extra filtering is not needed. <S> But most of the time, it doesn't hurt.
| You don't say what the IC is, but you should have at the very least a decoupling cap across the power rail near the power pins of the IC In short, yes, +1 for capacitor(s). The effects of not having at least the smaller cap present may range from working, the odd glitch to not working, so for the cost it's an easy choice.
|
How to stock variables in FLASH memory I am working with a STM32 eval-board from STMicro which includes a ARM Cortex-M4 processor. I need a LUT for cosinus and sinus (read-only variables). I need to manage my RAM memory therefore I want to store these LUT in flash memory. First: is it better to create a interpolate computation of cosinus/sinus or the FLASH reading is fast enough? Secondly, how to put the variables in FLASH memory. ST provides some examples, but maybe, for my problem I just need to declare the LUT variables as static const and it will be like code? <Q> The short answer is to declare your variable with the const keyword. <S> If your MCU actually remembers the value of your const variable (i.e. your sine computation actually works), it pretty much has to be stored in flash memory, otherwise it would be lost at the first reboot after programming. <S> The long answer has to do with linker script. <S> These scripts are MCU-dependant and tell the linker where to put what. <S> Usually, this script is provided by the IDE, but you can write your own. <S> On my STM32F4 setup, my linker script starts with a such a statement: MEMORY{ FLASH (rx) : <S> ORIGIN = 0x08000000 <S> , LENGTH = 1024 <S> K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K MEMORY_B1 (rx) : <S> ORIGIN = 0x60000000, LENGTH = 0 <S> K} <S> It says that the flash starts at address 0x08000000 and the RAM at address 0x20000000 . <S> These addresses can be found in the datasheet where the memory map is described. <S> The rest of the script can get involved, but at some point something along these lines will be present: .text :{ . <S> = <S> ALIGN(4); *(.text) <S> / <S> * .text sections (code) <S> */ <S> *(.rodata) <S> / <S> * .rodata sections (constants, strings, etc.) <S> */ . <S> = <S> ALIGN(4); _etext = .; /* define a global symbols at end of code <S> */} >FLASH <S> This says that all .text sections (that's how the compiler calls code section) and .rodata sections (that's how the compiler calls const variables) are to be put in the flash section. <S> As suggested above, the .map file is the primary way you can check what the linker puts where. <S> You tell the linker to generate it using this option: arm-eabi-gcc -Wl,-Map= <S> my_program.map ... <S> You can search for your symbole inside this map file, see at which address it has been stored and check that against the memory map specified in the MCU datasheet. <A> You can, however, put constants there, which is all you need since you are asking about a sine/cosine lookup table. <S> Those values are fixed by math and don't need to change on the fly. <S> Surely the language documentation describes how to force a array of constants into program memory. <S> This is usually done with some keyword, or by specifying attributes for a linker section, or possibly by extra information passed to the linker separately. <S> As for how to implement a sine and cosine lookup, see these previous answers: https://electronics.stackexchange.com/a/60819/4512 https://electronics.stackexchange.com/a/16516/4512 <A> to have data put in flash declare it as const const unsigned int lut[]={0x1234,0xab,0xcd,0xefa1123,0x1122334, <S> ... your linker script may need to have an entry, depends on the flavor and age of your toolchain, it could go in .text or .rodata or other depending again on your toolchain. <S> and you would then put that section in flash.
| No, you can't put variables in the read-only memory.
|
Connecting devices with different logic levels The following figure is taken from this link, where the author explains how NOT to connect devices having different logic levels He says that: Directly connecting the devices together (see above) will overstress the 3.3V device and eventually lead to device failure. Can somebody explain me why this overstress will happen and what makes the device failure? <Q> Anytime you exceed the limits listed in the datasheet you don't know what the device might do. <S> 5 V is simply out of spec for the 3.3 V device, so it could fail, get <S> hot, not work right, vanish into a greasy cloud of gray smoke, or whatever. <S> What actually happens in many ICs is that there are protection diodes from external pins to the internal power and ground nets. <S> By forcing a pin to a higher voltage than the chip's supply voltage, the diode from the pin to the power net will conduct. <S> This can cause currents in places there aren't intended to be currents during normal operation. <S> That can cause all kinds of off-spec behavior. <S> If this current exists while the power is coming up, it could even make the whole die go into SCR latching mode. <S> Of course the above was only one explanation of what happens in some ICs. <S> When the spec says the maximum pin voltage is 3.3 V, you should not apply more than 3.3 V and not assume you know what might happen if you violate this spec. <S> Some 3.3 V chips have "5 V tolerant" inputs. <S> In that case the chips contains additional circuitry so that 5 V on the pin won't hurt anything and will be interpreted as a normal digital high level. <S> For such inputs, it is fine to drive them directly from the output of 5 V logic. <S> But, this is only valid if the datasheet explicitly says it's OK. <S> Usually the valid voltage levels for digital inputs is well specified in the datasheet. <S> Take a look. <A> When the 5V device drives 5V signals to the 3.3V device, the 3.3V device is receiving potentially higher voltages that what it expects. <S> Parasitic diodes on input lines in the 3.3V device will become forward biased and route the incoming 5V (via a diode drop) onto the local 3.3V rail and the device may become damaged either by supply overstress or by excessive current through the diodes. <S> Not all 3.3V devices are like this. <S> Some are what is known as "5V tolerant". <A> While not a complete answer: <S> These diodes will "step down" over-voltage to a safe value. <S> The problem with this is - the excess voltage is dissipated as heat. <S> Your 3.3v device could burn out eventually (hence, stressed). <S> In the case of devices NOT having an internal clamping diode, shoving 5 Volts into a 3.3v device is virtually guaranteed to blow something. <S> That same linked page shows alternatives for level shifting. <S> The simple diode/pull-up resistor combo is a nifty, cheap, and highly effective solution for many setups.
| Most 3.3v devices (may) have a clamping diode built in on input ports.
|
Sinking and sourcing current I have been reading that NPN transistors are sinking and PNP are sourcing devices. I do not really understand this concept. It says current source device connects load to V cc and current sinking device connects to ground (low voltage). So does connecting a load at emitter of NPN transistor make it sourcing? <Q> In a very simple form, relative to V CC , think of the transistor as either coming before or after the device. <S> If the transistor is connected between V CC and the device, it is sourcing current. <S> If the transistor is connected between the device and ground, it is sinking current. <S> (Image from CircuitsToday.com ) <S> Some articles that describe things in more detail: <S> National Instruments: <S> What Is the Difference Between the Terms Sinking and Sourcing? <S> dataq.com: <S> What's all this Sink and Source Current Stuff? <A> JYelton is right, and probably this is what whoever said "NPN transistors are sinking and PNP are sourcing devices" had in mind. <S> But, that's not the only way to use a transistor. <S> For example: simulate this circuit – Schematic created using CircuitLab <S> This configuration is called common collector or emitter follower . <S> Now the NPN is sourcing, and the PNP is sinking. <S> So, sourcing or sinking doesn't really have much to do with the type of transistor, but rather what it's doing. <S> Is it pushing current from the positive supply rail (sourcing), or is it sucking current from ground (sinking)? <A> Think of it like this. <S> SINKING = provides a path to ground. <S> SOURCING = Provides a path to V+ <S> Be careful because most electrical manuals etc refer to conventional current flow.(+ <S> to -)We <S> (electronics) tend to refer to actual electron flow (- to +) <S> Yes you could configure them the way you described, but its standard in industrial electronics to do NPN = <S> Sinking and PNP = <S> Sourcing.. <A> You often find NPN devices connected emitter to ground, and indeed configured to sink current when producing a logic low. <S> Similarly PNP devices are often found with their emitters to the positive rail, and to source current to produce a logic high. <S> But generally outputs don't have to be BJTs, and even BJTs don't strictly have to be used the way I just described. <S> So, bottom line, I would say yes. <S> If you connect an NPN collector to the positive rail and expect to run your output from your emitter, that transistor will source current. <A> I second the final part of the Phil Frost's answer. <S> "Sourcing/sinking" is a property of an electrical source (power supply) - it <S> sources a current by its positive terminal and, at the same time, sinks a current by its negative terminal... <S> the source is both sourcing and sinking. <S> Thus looking at the source terminals, we see that a current exits its positive terminal and a current enters its negative terminal. <S> When connecting some elements (transistors) to the source terminals, the currents flow through them and we see that a current exits the element connected to (after) the positive terminal and a current enters <S> the element connected to (before) the negative terminal. <S> Then we assign the sourcing/sinking attribute to these elements... and say that the first element sources , and the second - sinks current. <S> Simply speaking, if the current exits a device terminal (output or input), it is sourcing; if it enters the device terminal, it is sinking. <S> It seems strange but some inputs can source current (e.g., TTL inputs). <A> This perspective from a boots on the ground non engineer electrical maintenance man who replaces pnp/ <S> npn proximity sensors a lot, in layman terms; Sourcing switches the positive [high] side. <S> Think of the lights in your house. <S> 120 V goes through switch to energize bulb. <S> Sinking switches the negative [low] side. <S> 120 V goes straight to the bulb <S> and you put the switch on the neutral leg. <A> For an NPN transistor in the active region, its current depends upon the voltage between it's base and emitter terminal. <S> For it to provide constant current, the voltage between its base and emitter should remain constant. <S> Thus, it is used as a sink source where its emitter terminal is grounded and usually, a constant voltage is applied at the base terminal. <S> This ensures that the current through it remains constant irrespective of other changes in the circuit.
| When considering an output from an integrated circuit, source vs sink is very simply a matter of whether the current comes out of the pin (source) or goes into it (sinks).
|
Why is receiver RSSI so much lower than the output power of a transmitter? When we measure the output power of a small transmitter we might see something around 30 dBm ( 1W ) but a receiver/WLAN card/UE right next to the transmitter will report a RSSI in the range of -40dBm , for example. Why is this such a large power loss ( 30dBm - -40dBm = 70 dB ~= output power is 10000000 x greater)? <Q> There is no requirement that it be in \$dBm\$ or anything else; the only requirement is that stronger signals are bigger. <S> But let's just say that your RSSI is indicating received power in \$dBm\$. <S> It will necessarily be much less than the AP's transmitter power for two reasons: <S> An intelligent AP will not transmit at full power unless necessary, to reduce interference with adjacent APs. <S> Most of the electrical energy radiated by the transmitter goes uselessly into space, where the receiver isn't. <S> Point #2 is essentially the inverse square law . <S> If the transmitter emits 1W, than that means for any sphere centered on that antenna, then there is 1J of energy passing through that entire sphere each second. <S> Neglecting things that might absorb or reflect that energy, this is true no matter how big the sphere is. <S> But since the sphere has an increasing area as it gets bigger, the energy available in a given area is smaller. <S> Dividing the transmitter power by the sphere area gives you the power available per unit of area at some distance \$r\$: $$ \frac{P}{4 \pi r^2} <S> $$ <S> So say 1W transmitter, 10m away, the field strength ( <S> assuming an isotropic antenna) would be: $$ <S> \frac{1W}{4 \pi <S> (10m)^2} \approx 796\mu W / m^2 <S> $$ <S> Given that your typical antenna in these systems is <S> a lot smaller 1 than \$1m^2\$ <S> , you'd expect to receive a lot less than even \$796\mu <S> W\$, or \$-1dBm\$, <S> even though \$1W\$, or \$30dBm\$ was transmitted. <S> Of course, this is just an approximation. <S> Earth will reflect some of the power. <S> Walls will absorb some of it. <S> The efficiency of the power coupling between antennas depends on their relative orientation and polarization. <S> No antenna is isotropic. <S> But the basic truth still holds: most of the energy went off uselessly into space, simply because there wasn't an antenna around to receive it. <S> 1: <S> really what we care about here is the antenna aperture , which is related to the physical size of the antenna but is also influenced by other aspects of its design. <S> For an example of an antenna with an aperture much larger than it's physical size, see the loopstick antenna . <S> Still, that's a rather special case, and your typical wi-fi antenna is still going to have an aperture smaller than \$1m^2\$. <A> Power emitted from an antenna, as electromagnetic radiation, follows the inverse square law , which states that: a specified physical quantity or intensity is inversely proportional to the square of the distance from the source of that physical quantity. <S> Most of the transmitted energy is not going directly to the receiver. <S> Even though you might be in close proximity, the receiver will only "see" a small portion of the total output. <S> If you use a coaxial cable and coupled the RF output of the transmitter directly to the receiver input, you would theoretically see a value much closer to the output power. <S> However, I doubt the receiver would be capable of dealing with that much power. <S> That aside, Wikipedia states: <S> There is no standardized relationship of any particular physical parameter to the RSSI reading. <S> The 802.11 standard does not define any relationship between RSSI value and power level in mW or dBm." <S> I therefore wouldn't compare RSSI (Received Signal Strength Indicator) to a measured or known output power from a transmitter; they are not the same thing. <A> The two are so vastly different because most of the transmitted power is not going to be intercepted by the antenna of the receiver, even if it is close. <S> Think of the transmitter like a lightbulb emitting radio waves in lots of directions. <S> Now consider the size of a small antenna on a receiver. <S> Even "right next to" the transmitter, that little antenna will only interept a small fraction of the power radiated by the transmitter.
| It sounds like you are comparing two different things: The power the transmitter is putting out and the power received by one actual receiver. Strictly speaking, the RSSI reported by an 802.11 interface is in arbitrary units.
|
How to connect breakout boards to bread boards? One of my components for a prototype lies on a breakout board. The rest are connected on a breadboard. How can I neatly connect the leads on the breakout board (seven in the picture) to rails/holes on the breadboard? I'd prefer not to solder, since I'd like to reuse the breakout board. Would simply putting the breakout board on a 1x7 header work? <Q> One way that might work is to use clip-on or "grabber" test leads: <S> You can find these inexpensively on eBay or from electronics suppliers. <S> (I found the image at Circuit Specialists .) <S> Edit: <S> In response to your edit, putting the PCB on a 1x7 header would work if <S> You are soldering the pin header to the PCB. <S> If it's loose, you'll be fighting loose connection issues. <S> The holes on the breakout board are spaced at 0.1 inch, matching the pitch of the breadboard and header. <S> (It doesn't look like they are, but I could be wrong.) <A> I would solder the header to the breakout board with the pins pointing down. <S> The luxury version is to use turned pin header , with smaller round pins. <A> <A> Another alternative is first to solder a 0.1" 1x7 header facing up on your breakout board as others have suggested, and then use these female-male cables from SparkFun to connect to the breadboard. <S> The advantage of this method is you don't have to waste 7 rows of holes on the solderless breadboard; you can insert the male ends anywhere as needed by the circuit. <S> The female ends fit perfectly over the pins on the header, and the males end fit into the breadboard just as well. <S> Just go to Sparkfun and search for "jumper wires".
| On the breadboard, insert some pin headers or just use some short jumpers to clip the lead to. Aside from test clips, you could use pogo pins.
|
what happens if I apply a negative voltage across a zener? I have the following circuit (just the input portion of a larger circuit):: The 6V is coming from a walwart or other 6v source. The Schottky diode (UPS120) is there to guard against the input voltage coming in at the wrong polarity. The output is connected to a couple of LDO regulators, and the guaranteed maximum forward voltage (450 mv) of the UPS120 gives me enough headroom for the regulators. However I also need the full 6v for a bias voltage elsewhere in the circuit. Although the walwart I am planning on using is a switcher, my experience is the walwart may go slightly above 6v (e.g. 6.4v) under little load so I added a 6v zener to make sure my bias voltage does not go above 6v. What happens though if the wrong polarity is applied to the input? My regulators are protected because of the Schottky diode. But what will happen to the zener? Will it clamp to ground (ok) or go below ground (not okay)? In the latter case, how can I mitigate this? <Q> It will go below ground one diode drop but the 10k resistor will limit the current into the zener and hence into the circuit that may be damaged so, the only question you have to ask is "how much current can my input take before it is damaged". <S> My gut feeling is that on most devices (MCUs op-amps and the like) 10k from +/- <S> 6V is not going to damage anything but the most exotic of devices <S> so, you are probably going to be OK. <S> Check your data sheet about how much current you can stuff up an input. <A> If the input voltage goes negative, then the zener will be forward-biased, and will behave not unlike an ordinary diode. <S> Your \$10k\Omega\$ resistor will limit the current. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The voltage across D1 will be about 0.6V. <S> The current is given by Ohm's law: $$ \frac{6V-0.6V}{10K\Omega} = 0.54mA <S> $$ <S> That's not much current, so maybe it won't damage anything. <S> You will have to decide, based on what's connected. <S> If that's not acceptable, then you could another diode to prevent all reverse current. <S> But you say that the additional voltage drop would not be acceptable. <S> You can eliminate this voltage drop by using a P-channel MOSFET instead : simulate this circuit <S> When V1 is first applied, the body diode inherent in the MOSFET conducts, but soon this voltage appears at the load, and thus also between the source and gate of M1. <S> This turns M1, shorting out the diode, and the only voltage drop you get here is due to the resistance of \$R_{DS(on)}\$ of the MOSFET, which will be very small. <S> If V1 is reversed, then the body diode will not conduct, and M1 will not be turned on, and there will be no reverse current (except the very small leakage through M1). <S> simulate this circuit <S> You can also do the same thing with an N-channel MOSFET in the ground return, but usually you don't want to disturb the ground reference for the load. <S> If that's not a problem in your application, then go ahead and use an N-channel MOSFET, since they are easier to source. <S> 2N7000 would work fine at the currents you have here. <S> Further reading: <S> Reverse polarity protection <A> A Zener typically needs 5 mA to develop its Zener voltage. <S> With a 10 kOhm resistor, that's unlikely to happen. <S> Similarly, if you connect a reverse voltage across the system, the Zener will conduct like a normal forward diode with some amount of forward drop -- thus the "6V" output will become something like -0.5V. A Schottky diode will typically have a forward drop of betwen 0.3V and 0.6V. <S> Thus, the voltage your regulators see will be more like 5.4V. <S> If they have a drop-out of 2.0V (like the 7805) or 1.2V (like the 1117) <S> then the highest voltage you can generate form them will be 3.4V or 4.2V, respectively. <S> Finally, regarding your schematic, to make it prettier for people to read: <S> Add component designators (D1, D2, R1, etc) to the schematic, and net labels, so <S> it's clear what components are being talked about. <S> Turn off display of "origins" for your components and texts, as the plusses get in the way. <S> In Eagle, there is an "export as bitmap" which makes cleaner images than just doing a screen capture.
| Thus, the Zener can't do much to regulate voltage.
|
Drop USB voltage to 4.5v I have different 4.5v small LED circuits (from 100mA up to 350mA consumption, with some 555 ICs) that I'd like to power using a small regulated USB wall charger (4.95V output, 0.8A). As per my understanding (I'm new to electronics...) I can calculate the proper resistor for each circuit knowing the current. However I'd like a solution that can sustain 4.5V regardless of the current (within the limits above). I've been reading about voltage dividers and zener diodes, however I'm not sure about the best approach for this small drop. What would be the the best way? Update: these are independent small lighting circuits that I've build for small models, powered by 3 1.5v batteries. The problem I'm experiencing now is that the voltage of the batteries drops in time, dependent on the type (rechargeable, etc.) and brand. For example, because 3x1.5v = 4.5v, I've used some LEDs with fV 2.1 in series with a small resistor, to make a more efficient use of the drained current. However in time the batteries V drops to 3.8v, below the minimum level the LEDs need, affecting their brightness (and a new set of batteries is 4.8V!). In hindsight, maybe I should have considered a regulated power supply from the start, instead of trying to compensate for the variable V in the batteries during their lifetime... I might post a new question about this topic, but feel free to comment on this too :) <Q> However I'd like a solution that can sustain 4.5V regardless of the current (within the limits above) <S> If you are happy with a constant voltage of 4.5V <S> then you should consider a low drop out voltage regulator like this: <S> - It can be setup to deliver up to 4.5V and at 1A to the load and will only need 4.645V (typically) on the input to sustain the output voltage. <S> Note that it needs a minimum load for it work correctly (1mA) <S> but this shouldn't be a problem given your requirements. <S> This is typical of a series of many voltage regulators with low drop-out voltage <S> - I'm not saying use this one - I am saying be aware of what TI and other folk may be supplying. <S> It's likely you can find one with current limit circuits built-in. <S> You could also apply a bit of current limiting in this device by having a resistor in series with the voltage feed - this should be chosen to develop just enough voltage across it (at the required load current) to sustain the output. <S> Should load current increase, output voltage will drop. <A> A silicon diode has roughly a 0.65V drop. <S> Putting it in series with the 4.95V from USB will get you close to 4.5V: simulate this circuit – Schematic created using CircuitLab <S> But, there is no real such thing as exactly 4.5V and perfect regulation, only progressively better methods. <S> A good engineer is one that chooses a solution that is good enough, and for powering an LED, this is probably good enough. <S> An LDO will be more expensive than a diode, and you will probably have to order it. <S> A diode is dirt cheap and you probably already have one. <A> Check the forward voltage at the current (Ic) <S> you want for the LED. <S> This value can be found on the datasheet. <S> Let's name it <S> Vf. <S> Then you know that the voltage across your LED is Vf when Ic Amps is flowing through your LED. <S> Your power supply voltage (Vp) is 4.95V.The resistor in series with the LED <S> has a voltage drop. <S> let's name it <S> Vr. <S> Thus Vf + <S> Vr = <S> Vp <S> You Know <S> Vf and Vp. <S> You can then compute Vr. <S> And because you know the value of the voltage across the resistor (Vr) and the current that flow though it (Ic), you can compute the value of the resistor that matches those value together. <S> Resistors follow the Ohm law: <S> U=R*I in our case Vr = <S> R <S> * Ic. <S> You know Vr and Ic, you can compute R. <S> That's it, in an ideal world.... <S> Here the voltage drop across the resistor is very small (~0.5V). <S> And this value is computed from the value of Vf of the LED. <S> But, an LED is a semiconductor with a dependency of the parameters on the temperature as well as tolerances. <S> Now imagine that you design for the worst case. <S> In order to guaranty that the LED is never above its current limit, you will take the minimum value of Vf for the computation according to the tolerances. <S> let's say that this value is just 0.5V lower that the nominal Vf. <S> When it comes to the computation of Vr, the result will be ~1V. <S> Which means twice the Vr for a nominal computation ! <S> This means that the current through your LED and therefore the emitted light power will highly depends on the tolerance on the LED.
| An LDO will also work, and will have better regulation (voltage will vary less with current) and could be closer to 4.5V.
|
Efficient power supply for embedded project I'm working on wireless sensor network project consisting of sensors based on ATmega328 and MRF24J40MA. The sensor is expected to stay asleep most of the time, waking up on regular intervals to collect sensor data and sporadically sending collected data over 802.15.4. I'm not sure on how to power the circuitry for longer life on batteries. I consider two options: Use LVD1117V33 to scale down 4xAA batteries to 3.3V. I guess this means batteries operational voltage range of 6V..3.3V. Use NCP1402 to scale up 2xAA or 1xAA to 3.3V. I expect the battery to be drained nearly to its minimum until the circuity fails. The second option sounds more promising, but don't I overlook something? Are there any options? <Q> The NCP1402 looks a decent choice for one AA battery but with two batteries in series you might find the output voltage (3.3V) rises a bit above 3.3V on light loads. <S> Figure 4 doesn't indicate a voltage higher than 2.5V can be used to generate 3.3V whereas fig 58 implies that for larger load currents you may be ok with an input voltage of 3V. Figure 57 also implies (due to the graph curve) that slightly less than 3V will be OK for 3.3V output on no-load. <A> Your ATmega328 works down to 1.8V, the MRF down to 2.4V. <S> A very simple solution would be to use two alkaline (or one LiSoCl2!) <S> batteries without any conversion. <S> The MRF will work down to 1.2V per battery. <S> I don't know how much juice is left at that level, I could not find a graph in a few minutes googling. <S> If you parallel a few ATmega328 output pins you can probably even feed a 3-leg regulator directly. <S> An MCP1702-2.7 has 0.7V dropout (?) <S> , so the batteries would be useful down to ( 2.7 + 0.7 ) / <S> 3 = 1.13 V. <S> If you want to be really clever: at 1.13V per battery you could let the ATmega328 feed the battery directly to the MRF, bypassing the regulator. <A> The suggestions so far imply you have two options: 1) Use a linear regulator, dissipating Vin-Vout as heat 2) <S> Bypass the regulator by dropping 100% of unregulated Vin through device <S> A third option would be to use a switching regulator. <S> Boost converters produce higher voltage at the output than the input and, therefore, require a higher current at the input than the output which none of the batteries described above should have an issue supplying. <S> I didn't pull the datasheet for your specific component, but there is probably a drop-in (package- and pin-compatible) switch-mode equivalent for it requiring few or no external components. <S> Depending on your sensor refresh rate, a rather tiny solar cell (if sunlight is available to your device) could power the boost converter and run the device for "free" while simultaneously charging a super-capacitor to power the system through the night until morning. <S> Two supercaps in parallel would approximately double your run-time without input power. <S> I suspect that a couple of supercaps could potentially run your setup for many days between power applications, but you could also just substitute an appropriate rechargeable cell if you want to guarantee power for longer periods. <S> The boost converter will (slowly) float the cell back to full all day long as long as there is enough sunlight. <S> These aren't spec'd especially for your application but to give you some ideas: <S> These are extremely tiny: https://www.sparkfun.com/products/9962 <S> Since I didn't sum your power requirements, this is possibly too extremely tiny to even parallel cost-effectively for your purpose; in that case, select one slightly less tiny. :) <S> DIP8 step-up/ <S> down: https://www.sparkfun.com/products/317 1F, <S> 2.5V supercap: <S> https://www.sparkfun.com/products/10068 Two in series would make a 0.5F, 5V backup. <S> 10F, 2.5V supercap: <S> https://www.sparkfun.com/products/746 <S> Linear also makes a thousand different families of power-management chips. <S> Many are SMPS's at heart, but come equipped with a variety of handy features like output-enable, reverse-polarity protection, brown-out/low-power detect, redundant battery fail-over and/or backup power supply, load balancing, balanced battery charge and/or discharge, over-current protection, etc, etc... <S> You should be able to find the perfect chip very quickly using their parametric search.
| Another simple option would be to use 3 alkaline batteries, and feed the MRF via a linear 2.7V regulator that is switched on only when needed (either a P-fet with a 3-leg regulator, or a regulator that has an off pin).
|
Rotating a wireless power mechanism I got this simple wireless power mechanism: http://dx.com/p/diy-wireless-charging-transmitter-receiver-solution-module-green-golden-dc-5-12v-194469 If I'll have the receiver end rotating at about 30 rev/sec, will this have any effect on the power transmission? Will it still work? <Q> Should still work with rotation. <S> Efficiency would depend on where the axis of rotation is relative to the coils. <S> Best efficiency if the coils and rotation axis are coaxial. <S> The transmitting coil can induce eddy current in any metal parts, which will become a loss due to the parts' internal resistance. <S> (This is also called "shorted turn effect". <S> Induction cookers exploit it, by the way.) <A> I use this technique a lot at work and it works fine and we spin stuff up to 20,000 rpm. <S> We also use the same coils for data transmission. <S> The inter-coil gaps can be quite significant too. <S> Power-send and power-receive coils are tuned to be resonant but for your project this is probably less important. <S> Power transfer on gaps of up to 40mm will work with resonant power coils. <S> I don't know what your circuits are like <S> but I'd expect to see 10mm gaps work. <A> Two answers. <S> 1) Probably not. <S> And 2) Since you already have them, why not try it out? <S> As long as you keep them on the same plane/axis, I don't see why it would not work as expected.
| Beware that you will loose efficiency if you have conductive material near the coils.
|
Why do we connect a battery to ground when jumping a car? This may seem like a very simple question, but I've searched all over the place and haven't found an answer. When jumping a car, we connect the + end of the charged battery to the + end of the dead battery, and the - end of the charged battery to the chassis or other metal part of the car. I always thought that you need a closed circuit for current to flow. But this circuit appears to be open: we are connecting the - end of the charged battery to the ground! Thus, how can any circuit connected to ground have a current? I believe another way to ask this question is: will jump starting a car still work if I connect the - end of the charged battery to a third (powered-off) car, instead of to the chassis of the car with the dead battery? If so, why? (I've heard people say that jump starting a car only works because the chassis is connected to the electrical components of the vehicle, thus providing a closed circuit since the battery is also connected to the electrical components of the vehicle). <Q> "Ground" is just a code word which, in this case, refers to the "current return common" circuit node. <S> There is a complete circuit because everything electrical in the car, such as the starter motor, also connects to ground in order to return current to the minus terminal of the battery through the ground. <S> The car's chassis is used for this return network, and so the entire chassis is an extension of the minus terminal of the battery. <S> A more direct return path allows for better current flow and less voltage drop, like plugging a big appliance directly into an outlet, rather than via an extension cord. <S> In case you're also wondering why the plus jumper connections are made first, then the minuses. <S> This is because there is no harm done if you leave the minus jumper dangling in the chassis of the car. <S> Anything it accidentally touches is likely to be ground. <S> If you connect both alligator clips on one end before connecting the other end, the other end is now live and you can accidentally touch the clips together to create a short circuit. <S> If you connect the minuses/grounds first and then go to connect one of the pluses, you can create a short circuit, because the opposite side plus is probably dangling and touching something that is grounded. <A> The - end of the charged battery is already connected to the chassis, the engine, and, particularly, the starter motor. <S> The whole car is designed to work that way. <S> Everything use earth return. <S> All the lights have one wire, and one connection to the chassis. <S> The spark plugs have one wire, and one connection to the engine block. <S> And so on. <S> OK, on a modern car you use a second wire for the starter motor, because it draws a lot of current and you would get <S> a significant voltage drop and power dissipation in the earth return path. <S> And diesel engines don't have spark plugs. <S> And high power driving lights are driven through a relay like the starter motor is. <S> And lights mounted in plastic fittings need 2 wires. <S> Given that the -ve end of the battery is connected to the chassis and the shell and the engine, where is the best place to connect the return wire? <S> Traditionally, you connected it to the chassis or the shell or the engine, so that you didn't have to lean, with a live wire, into the engine compartment, across the engine (hot moving machinery), on to the battery (hydrogen explosion risk, with sulphuric acid as well). <S> But this assumed that the battery was difficult to reach, and that the engine and chassis had a very good connection to the battery (required for the starter motor earth return). <S> Nowadays, some people make the return connection direct to the battery, if they can reach it easily. <S> Even if you connect one end of the return wire to the chassis, you normally connect the first end direct to the first battery. <S> This because until the wire is connected to the first battery, it is not a live wire, will not spark when you touch it to something, is not particularly dangerous. <S> After the return wire is connected to the first battery, it is live, and is dangerous. <S> So you connect it to something safe that is easy to reach. <S> No, you can not connect the return wire to a third car. <S> You need a complete circuit from your battery to the other battery. <A> The main reason for connecting to the positive terminal on the battery first is to do with volatile gases possibly being emitted from the battery. <S> If you connect to both terminals at the battery terminal this will usually cause some kind of spark as you first touch the cable to the terminal, <S> whether you do positive or negative first is irrelevant. <S> Connect the positive at the battery terminal first(no danger of a spark as a complete circuit is not formed), then connect the negative cable to a point on the chassis away from the battery, so the resulting spark is not in the area likely to be affected by any gases. <S> that way you have ruled out the possibility of igniting the gas and have avoided any chance, however small. of an explosion.
| During jump-starting, we connect the boosting battery to ground rather than to the dead battery's - terminal for the simple reason that this provides a more direct return path to the good battery which is powering the dead car: the return current does not have to travel through the dead battery's minus terminal hookup cable and then to the jumper cable, but can go directly from the chassis ground to the jumper cable. Cars sit on rubber tires, and the tires insulate each car from other cars.
|
Is soldering wires directly on a NiMh battery safe? I'd like to know if soldering two wires directly on a NiMh battery is considered as safe or not. My fear is that battery would explode (right in my face) because of excessive heat caused by the soldering iron . Other possibility would be the battery slowly inflating and then spreading toxic fumes (or corrosive materials) trough a hole (like a capacitor under excessive voltage). The battery I want to use is made of 10 units of 1.2V (thus generating 12V ) <Q> It's probably safe enough from your point of view, but not from the battery's. <S> You really shouldn't solder to batteries unless they explicitly have solder tabs for that purpose. <S> Most batteries, and NiMH are no exception, are damaged by soldering temperatures. <S> This presses the battery terminal and the contact together, then zaps them by discharging a capacitor thru this connection. <S> That heats the two parts enough for a little metal to melt and bond. <S> However, the zap is very short and localized, so the total energy is <S> low and high temperatures diffuse <S> well before they get to sensitive parts of the battery. <S> Note that no solder is evident in the picture you show. <S> That is because the tabs were spot welded, not soldered. <A> An important concept, when talking about spot welding batteries, is to realize that the welding electrodes used are arranged close together and applied to the top of the tab. <S> This ensures that the welding current flow is very localized at the "head" or "foot" of the battery, only through the tab and the relevant battery terminal cap <S> The welding current does NOT pass "through" the battery at all, from one battery electrode to the other, but ONLY along the very short, closely-spaced spot-weld/solder tab. <S> The net result on the battery electrodes is no effect, and no electrical current flows through the battery at all during welding, only through the millimetre-or-two separated spot-weld area of the two pieces-to-be-welded. <S> I have terrible nightmares of people reading thread like this for the first time, grabbing using 2 large crocodile clips and passing 300 Amperes though a tiny AAA cell from one end to the other. <S> This would be extremely dangerous, so I think should be mentioned because I've seen it attempted before, with disastrous results. <A> While I'd hesistate to say something was 100% safe <S> The way I'd go about it to minimise the risk with those batteries is: Under the tab <S> you're about to solder place something like a steel ruler or other small piece of metal so that the tab isn't in direct contact with the battery while you solder. <S> I see you've updated the photo with a new configuration that doesn't allow this so you may skip this step. <S> Use a small file to give the tab a good clean and remove any outer protective coating that may have been applied and any oxidation. <S> Using a solder that includes a flux core with your iron set to a slightly higher temperature than you might normally use on a PCB <S> and you should be able to form a good joint within a few seconds. <S> After doing that you should find the body of the battery has only been heated enough to be barely detectable with your fingers if at all. <S> For most NiMH batteries 60C is considered OK during charging (as a maximum) so unless it feels quite warm you'll be well under that limit. <A> Yes, it's safe as long as you don't use excessive heat. <S> NiMh batteries are relatively stable. <S> Practice some with plain wire and make sure your soldering is up to par. <S> To help with the soldering, you can use some flux such as Chip Quik Flux . <S> You should not have to hold the soldering iron for more than a few seconds before the flux activates and the solder melts. <S> Any longer than 10 seconds is likely too long, and you should reconsider how you're soldering. <S> The batteries that are likely to be a danger are Lithium Ion coin cell batteries: <S> These batteries can be soldered to using the same technique, but you should definitely be careful and wear protective eyewear. <S> I've made dozens of blinky LED lights this way without a problem. <S> However, when I allowed people new to soldering to build the batteries they routinely overheated them and let the explode. <S> I don't do that any more (we tape them). <A> If you are agile enough to do it with some few seconds (1-3) of applying the iron, it should be ok. <S> At least, use safety googles, just in case. <S> For something to explode, pressure is needed and this is normally achieved by heating a gas, so think about how hot can the battery become during the process. <S> Small ones will get hotter soon (One button battery exploded to me while playing with it trying to charge it - it was not the rechargeable type - by explosion <S> I mean the lid just popped some 40 cm up). <A> If you can, I highly recommend spot welding.
| I'd consider the risks with such large batteries as minimal to zero if you use a good technique. The way to make a permanent connection to a battery that doesn't have solder tabs is to use spot welding. It should be fine as long as it is done very quickly. If possible try to cool down the battery body while soldering, for example with a metal body or even a wet cloth
|
Why might a multimeter ask for "wrong" fuse sizes? Why might a multimeter ask for the "wrong" sizes of fuses? On the front of my Fluke 87 multimeter, the two probe ports for amperage are labeled as fused at 10A (max) and 400mA (max). When opening the multimeter to check the fuses (both are burned out), however, the fuses are different -- 15A and 1A, respectively. Their places on the PCB are even labeled as 15A and 1A fuses. Wh-wh-what? Further, while looking up replacement fuses on Amazon's site, I see a number of reviews of people with Fluke 87's recommending an 11A fuse. ...? Is there some latitude with fuse selection, where the size of fuse you pick correlates with your favorite number of the day... or something? <Q> Maybe this should be read as "10A max" and "fused" — two different statements, not one sentence. <S> What I am trying to say is that you should not read the two lines on the multimeter as "fused at 10A", but as "rated (=guaranteed) to measure up to 10A" + "fused to prevent brute abuse". <S> Note that even a 10A fuse is not guaranteed to blow at 10A, but on the other hand it might do so. <S> Hence, to be rated to measure 10A, the fuse must be for a higher current. <S> Fuses are very crude things, so a 50% higher value does not seem unreasonable to me. <S> "Hard lines" are very rare in electronics, especially for currents: the common 7805 is over-current-protected and is rated to deliver up to 1A (or 1.5A). <S> But the over-current protection will kick in somewhere above the rated current, but below 2.5A. <A> Something I am missing from the answers here <S> but may still be of help to future readers <S> is that: Fuses are meant to avoid dangerous situations when a circuit fails, not to limit current! <S> It is very well possible that you have an application where typical circuit current never exceeds 10mA, but you fuse it with a 6.3A fuse. <S> Because you will not expect dangerous situations to arise when less than something around 6.3A flows through the circuit. <S> It's an extreme example and usually the fuse ratings are very close to max. <S> circuit ratings, but it is very well possible. <S> You have to assume that when a fuse trips, the circuit is already damaged and all you are doing is avoiding a dangerous situation for the user (fire, explosion). <S> You don't put fuses in the circuit to avoid damage to the electronics. <A> There are a few additional reasons I can think of why a higher current fuse may be specified, these are a direct quote from Fuse Characteristics, Terms and Consideration Factors from Littlefuse which is worth a further read for more background. <S> For 25ºC ambient temperatures, it is recommended that fuses be operated at no more than75% of the nominal current rating established using the controlled test conditions. <S> The fuses under discussion are temperature-sensitive devices whose ratings have been established in a 25ºC ambient. <S> The fuse temperature generated by the current passing through the fuse increases or decreases with ambient temperature change. <S> Most fuses are manufactured from materials which have positive temperature coefficients, and, therefore, it is common to refer to cold resistance and hot resistance(voltage drop at rated current), with actual operation being somewhere in between. <S> With a multimeter it wouldn't be uncommon for it to be operating with an ambient temperature well above 25ºC <S> so some derating of the fuse's room temperature rating will occur. <S> Also when operating at 100% the additional heat will increase the resistance of the fuse. <S> I'm not sure how much of a real-world effect that would have but for measurement purposes of course it's desirable to keep the resistance as low as possible. <S> No doubt some of these recommendations would differ between manufacturers and their particular parts.
| The only thing of interest to the selection of a fuse is whether it does not impact the circuit in a negative way (i.e. in a multimeter: adding too much burden voltage, allowing enough current through under normal operating conditions) and that it interrupts the circuit when a dangerous amount of current flows through the circuit for too long. The actual text is: 10A MAXFUSED
|
To what extent can an FPGA be "configured for desired use"? If the title is off putting, I will elaborate. Some say that if you want a custom CPU you can "customize" it with a field programmable IC, AKA, field programmable gate array. But to what extent? And is over and under clocking, address line modding, register-level-transfers, and other features able to customize? For example, one would expect a FPGA to enable "changeable", but changeable in the sense that it can be optimized for a specific purpose, speed, and system? Like, if I want an FPGA to be customized to replicate an old video game system I would expect it to have a slower clock, less bit width, and to access slower DRAM. Can FPGAs really be customized for a wide variety of uses, either under clocking and lowering performance, to over clocking and extending to maximum processing power and I/O lines, etc.? <Q> To what extent can an FPGA be “configured for desired use”? <S> An FPGA contains certain resources, like flip-flops, programmable look-up tables (which can be configured to replicate the function of logic gates), block memory, and high-speed <S> i/o transceivers. <S> These resources are connected by a mesh of interconnect wires, which can be programmatically connected to the other resources. <S> You can configure the FPGA for your use exactly to the extent that you are clever enough to figure out how those resources can be used to produce the function required for your use. <S> This is somewhat simplified by the ability of synthesis tools to figure out how to allocate those resources when given a higher-level description of the function in a hardware description language (HDL). <S> However even with the help of synthesis tools, a good FPGA designer will structure their code with the underlying resources in mind in order to maximize the functionality they can obtain from a given FPGA. <S> For example, one would expect a FPGA to enable "changeable", but changeable in the sense that it can be optimized for a specific purpose, speed, and system? <S> As others have said, there is generally a maximum clock frequency that a given FPGA can achieve. <S> And the FPGA can generally operate from 0 Hz up to that maximum frequency. <S> What hasn't been mentioned yet is that the maximum frequency is only achieved when the combinatorial logic between one flip-flop and the next has a certain limited complexity, and when the design overall leaves enough resources free to give the design tool freedom to optimize the interconnects with a reasonable amount of computational effort. <S> If too-complex logic is used between flip-flops, or if the resources are highly utilized (say, more than 70% utilization) you'll likely find that the maximum frequency for your design is substantially less than the ideal maximum frequency for that FPGA. <A> Because it pretty can much reproduce the original logic circuit (if you want it to) it can run at whatever clock speed the original would run at. <S> I would not say... <S> That if you want a custom CPU you can "customize" it with a field <S> programmable IC, AKA, field programmable gate array. <S> That would be going too far. <S> Do not confuse CPUs with FPGAs - they serve different applications but with some overlap. <S> This is a simplisitic answer. <A> The answers here are fine but they make it seem like it is a lame pile of logic. <S> You can replicate games with a FPGA. <S> Just get a board that has VGA and some buttons, switches, and I <S> /O. <S> I am currently working on a Pong game and am working out the collision detection at the moment. <S> Since a FPGA can be super parallel you can drive the VGA while grabbing the input and changing the positions of the characters and do all the game logic. <S> I have barely used the RAM on my board but modules are easily enough created to read and write from it. <S> One thing that can be annoying is that you can't hook up the RAM to multiple things like you would want. <S> You need to add a arbiter (FIFO, round robin, etc) which lets each module read/write one at a time. <S> To answer a specific question. <S> With a FPGA you can underclock with prescalers which is written in the code. <S> Just to show you how easy it is to slow things down, here is some VHDL code to demonstrate a underclock. <S> Just say that the FPGA clock runs at 100hz. <S> underclock: process(clk) <S> variable prescaler_count: natural := 0; variable prescaler: <S> natural := 10; -- 100 hz / prescaler = desired speedbegin if rising_edge(clk) <S> then if count >= <S> prescaler <S> then -- Do what you want at 10hz here... -- main clk runs at 100hz. <S> 100hz/10 = 10hz count := 0 <S> ; end if; count : <S> = count + 1; end if;end process; <S> Sometimes there are clock multipliers but I could consider that to be a part of the maximum. <S> There is usually jumpers to change speeds. <S> Update: <S> After thinking about your words "configured for desired use" I realized I should talk about the constraints file. <S> You do not have to use everything or all pins on your board for every application. <S> You define what you want to use in the constraints file. <A> With an FPGA you can make (almost) ANY digital circuit without having lots of ICs with gates, latches, register, counters, etc. <S> And you have the freedom of changing the functionality of that "programmed hardware" by just changing the FPGA configuration. <S> These are the great points about FPGAs: freedom to design and freedom to reconfigure. <S> Now when talking about CPUs, as they are a collection of logic elements, can be replicated into a given FPGA, they are called soft processors or embedded processors. <S> Xilinx offers one called microblaze, Altera does the same with Nios. <S> Some people start from scratch and design their own processors/ microcontrollers, while others try to make clones of their favourites. <S> I would say the main reason for having an embedded processor is when the rest of logic is already in an FPGA, <S> so why having it external? <S> Some time ago I read about a guy replicating one of those first computers (Cray-1 or Cray-2 or similar) into an FPGA.
| Simplistic answer - an FPGA is a type of programmable logic device that (within certain constraints) can be used to replace a bunch of hard-wired TTL/CMOS logic. The maximum clock is basically what you get and nothing can be done about that.
|
Arduino unsigned int to int with nRF24L01+ library I am trying to send an integer through an Rf24 node to another. Unfortunately, the radio.write() functions sends an unsigned int only. How can I send a phrase or an integer through it ? EDIT: this is the link to the library https://github.com/maniacbug/RF24 This is the code of the transmitter & receiver: /* Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. *//** * Example RF Radio Ping Pair * * This is an example of how to use the RF24 class. Write this sketch to two different nodes, * connect the role_pin to ground on one. The ping node sends the current time to the pong node, * which responds by sending the value back. The ping node can then see how long the whole cycle * took. */#include <SPI.h>#include "nRF24L01.h"#include "RF24.h"#include "printf.h"//// Hardware configuration//// Set up nRF24L01 radio on SPI bus plus pins 9 & 10RF24 radio(8,7);// sets the role of this unit in hardware. Connect to GND to be the 'pong' receiver// Leave open to be the 'ping' transmitterconst int role_pin = 3;//// Topology//// Radio pipe addresses for the 2 nodes to communicate.const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };//// Role management//// Set up role. This sketch uses the same software for all the nodes// in this system. Doing so greatly simplifies testing. The hardware itself specifies// which node it is.//// This is done through the role_pin//// The various roles supported by this sketchtypedef enum { role_ping_out = 1, role_pong_back } role_e;// The debug-friendly names of those rolesconst char* role_friendly_name[] = { "invalid", "Ping out", "Pong back"};// The role of the current running sketchrole_e role;void setup(void){ // // Role // // set up the role pin pinMode(role_pin, INPUT); digitalWrite(role_pin,HIGH); delay(20); // Just to get a solid reading on the role pin // read the address pin, establish our role if ( ! digitalRead(role_pin) ) role = role_ping_out; else role = role_pong_back; // // Print preamble // Serial.begin(57600); printf_begin(); printf("\n\rRF24/examples/pingpair/\n\r"); printf("ROLE: %s\n\r",role_friendly_name[role]); // // Setup and configure rf radio // radio.begin(); // optionally, increase the delay between retries & # of retries radio.setRetries(15,15); // optionally, reduce the payload size. seems to // improve reliability radio.setPayloadSize(8); // // Open pipes to other nodes for communication // // This simple sketch opens two pipes for these two nodes to communicate // back and forth. // Open 'our' pipe for writing // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading) if ( role == role_ping_out ) { radio.openWritingPipe(pipes[0]); radio.openReadingPipe(1,pipes[1]); } else { radio.openWritingPipe(pipes[1]); radio.openReadingPipe(1,pipes[0]); } // // Start listening // radio.startListening(); // // Dump the configuration of the rf unit for debugging // radio.printDetails();}void loop(void){ // // Ping out role. Repeatedly send the current time // if (role == role_ping_out) { // First, stop listening so we can talk. radio.stopListening(); // Take the time, and send it. This will block until complete unsigned long time = millis(); printf("Now sending %lu...",time); bool ok = radio.write( &time, sizeof(unsigned long) ); if (ok) printf("ok..."); else printf("failed.\n\r"); // Now, continue listening radio.startListening(); // Wait here until we get a response, or timeout (250ms) unsigned long started_waiting_at = millis(); bool timeout = false; while ( ! radio.available() && ! timeout ) if (millis() - started_waiting_at > 200 ) timeout = true; // Describe the results if ( timeout ) { printf("Failed, response timed out.\n\r"); } else { // Grab the response, compare, and send to debugging spew unsigned long got_time; radio.read( &got_time, sizeof(unsigned long) ); // Spew it printf("Got response %lu, round-trip delay: %lu\n\r",got_time,millis()-got_time); } // Try again 1s later delay(1000); } // // Pong back role. Receive each packet, dump it out, and send it back // if ( role == role_pong_back ) { // if there is data ready if ( radio.available() ) { // Dump the payloads until we've gotten everything unsigned int got_time_unsigned; int got_time = (int) got_time_unsigned; bool done = false; while (!done) { // Fetch the payload, and see if this was the last one. done = radio.read( &got_time_unsigned, sizeof(unsigned long) ); // Spew it printf("Got payload %lu...",(got_time)); // Delay just a little bit to let the other unit // make the transition to receiver delay(20); } // First, stop listening so we can talk radio.stopListening(); // Send the final one back. radio.write( &got_time, sizeof(unsigned long) ); printf("Sent response.\n\r"); // Now, resume listening so we catch the next packets. radio.startListening(); } }}// vim:cin:ai:sts=2 sw=2 ft=cpp This is where magic happens: unsigned long time = millis(); printf("Now sending %lu...",time); bool ok = radio.write( &time, sizeof(unsigned long) ); This is where information gets received and displayed : unsigned long got_time; radio.read( &got_time, sizeof(unsigned long) ); // Spew it printf("Got response %lu, round-trip delay: %lu\n\r",got_time,millis()-got_time); <Q> Now you've included the library <S> the read and write functions are declared as follows: bool read( void* buf, uint8_t len );bool write( const void* buf, uint8_t len ); So <S> the first parameter is a pointer to any data type followed by the length to be transferred. <S> In your case you could just use something like: int16_t <S> my_var;bool <S> ok = radio.write( &my_var, sizeof(my_var) );radio.read( & my_var, sizeof(my_var) ); <S> I normally prefer to include the variable name in the call to sizeof rather than the data type so that if you change it in the future you don't have to remember to change it in two or more places. <S> For a string exactly the same code would work as long as it's declared as a fixed length, for example: char my_var[10] = <S> "Test"; Just be careful when using strings that you allow the extra character required for null terminating it, so the example above could hold a maximum of nine characters. <A> When you switch between signed and unsigned, all that changes is the interpretation when mathematical operations are applied. <S> For example in unsigned you roll around from zero to the highest positive number instead of going negative, and with something like 2's complement the underlying bits won't even change. <S> However for your application there could be another pitfall, if the integer you want to send is wider than the function can take, for example if your integer is 16 bits wide but your function only expects a uint8_t, the high and low bytes need to be sent separately, <S> ie by shifting down by 8 bits for one call to the write() function, and truncating the top 8 bits for another. <S> The width of an integer is platform-dependent, but I suspect its 16 bits for your Arduino based on the language reference . <S> If you give a link to the radio library you're using you may get better answers as well. <A> I've made my own library. <S> I think you'll find it appealing and easy to use. <S> Check the example video. <S> https://www.youtube.com/watch?v=YpasceYkimI <S> You'll be able to send an int, unsigned int, long, unsigned long, byte; basically the most common types used when programming with Arduino language. <S> And also arrays and String. <S> The library will be finished by Monday or Tuesday.
| To expand on what efox29 and vicatcu said, in principle there's nothing stopping you casting your data to an unsigned int (I suspect the function uses a uint8_t) and then casting back on the other end, provided both ends can agree on what the original type was (for example if you send an integer but cast back to a char it won't make sense).
|
How to draw current from a telephone line? My landline phone comes with a lcd display caller id and clock. Even if I remove the 2 AA 1.5V batteries, the lcd still shows time even if I'm not busy on a call. The lcd has no other source of power as is turns off when I disconnect the line. I'd like to power up a 1.5V quartz analog clock using the phone line. Is that possible? Any circuit suggestions welcome. Thanks. Edit: The phone line has had no failures, at least since 2005, since they switched to fibre optic from copper wires. And it's not illegal in India to connect low voltage devices like caller ID, tape recorders aka call recorders, answering machines and external ringers to the phone line, or so says the govt. owned company. I'm crazy, officially:-P But has anyone got circuit diagrams? <Q> See Max current draw from a UK Phone Line? <S> , Using a telephone cable to power up a light blub <S> You get up to 40ma at 50 volts, varying quite a lot when it rings. <S> With a suitable buck converter you could probably power the clock, but it's not reccomended (and in some regions with state run telecoms may be illegal to connect unapproved equipment) <A> I'd like to power up a 1.5V quartz analog clock using the phone line. <S> Is that possible? <S> Any circuit suggestions welcome. <S> It is possible and it's very likely to work. <S> In the UK, BS6305:1992 was the standard that had to be met. <S> It allowed (now obsolete) <S> a small current to be drawn when the line is inactive and from memory <S> it was about (or less than 50uA). <S> This is perfectly usable for a low power clock. <S> Things have changes since I designed analogue phones but drawing a small current is still feasible. <S> However, given that a small coin battery would probably keep a clock going for at least a year (if not 5 years) why on earth would anyone go to all the trouble of interfacing it to a telephone line? <S> Don't get me wrong, it's not a difficult circuit to do but why bother? <S> Every now <S> and then it's bound to get disconnected (and reset to 12:00). <S> OK, maybe to overcome this you can use a battery to keep the clock ticking over. <S> But that defeats the whole object of having it powered from the telephone line. <S> Right? <S> Time would be better spent designing a clock that would last ten years from said battery. <S> Maybe I'm missing the point? <A> I made a circuit that only draws 5 mA from the phone line regulated for charging a miniature .5F <S> capacitor (super Cap). <S> I only want to save the memory of the phone but in my case the display is always on. <S> I hope this helps you. <S> Good luck.
| I made an experiment drawing power off the phone line and I discovered that when I draw more than 8-10 mA the phone goes ready to dial.
|
how to manually solder exposed-pad QFP package (Altera 144 pins) I need to manually solder an exposed-pad QFP Altera FPGA. This is crucial, since the pad is used for electrical purpose (not for thermal purpose) I have tried the following but failed. I just put solder paste on the pad, then place the FPGA and solder the pins. After that, I use Weller hot station ( http://www.rapidonline.com/catalogueimages/module/M300670P01WL.jpg ) to head up the bottom, hope that it can melt the solder paste. But it can only burn and damage my PCB without doing the job. I have conducive epoxy (that needs to mix a/b with 1:1 ratio). If I use that to stick the FPGA to the pad, will it work? <Q> Why do you heat it up from the bottom? <S> You should use the hot air station from the top. <S> Place the board over a solid surface and raised a bit on something. <S> I use two metal L brackets from the hardware store. <S> Then, using the hot air gun, slowly bring the board up to temperature. <S> Ideally you should follow the profile of the solder paste (example below), but that's a bit hard to do with a hot air gun. <S> I like to take my time, and work around the edges of the chip package. <S> You can start with your iron set at a fairly low air speed and temperature (240C), and get everything nice and toasty. <S> After a few minutes increase the temperature of your iron (I got to about 350C) and get all the solder flowing. <S> You'll still likely burn the board some, but with this method it's minimized. <A> I put a large via in the central pad and feed solder in while applying the soldering tip to the via. <S> This is only suitable for prototypes, of course. <A> If possible place a pad like 0,8 or 1,0 mm diameter then simply hand solder. <A> thanks so much for all of your feedbacks. <S> Next time, I will carefully put a via there before printing the PCB.
| I tried all of them, and the best method turned out to be drill a large whole behind, and put a lot of solder paste (Well, all of the JTAG issues resolved immediately!).
|
Do I need SS for SPI single-slave communication? I'm using Atmega328 as a master in SPI communication with a single slave. Is there a way to avoid using the SS (slave select) pin for SPI? That pin can also be used for PWM output, which I would like to use. <Q> Whether or not you can tie a SPI slave's "select" input permanently active depends on both the specific slave and the overall system design. <S> Some slaves rely on edges on their select inputs for things like flow control and/or byte alignment. <S> In some systems, in which the master and slave are always reset together (e.g., via power cycling) and never experience clock glitches, you can get away with it, but it is safer (more reliable) to plan to include an active slave select in your design. <A> ATmega is a master here, as you yourself said. <S> Let's take a look at what the datasheet says about slave select pin: SS: <S> Slave Select input. <S> When the SPI is enabled as a Slave, this pin is configured as an input regardless of the set-ting of DDB2. <S> As a Slave, the SPI is activated when this pin is driven low. <S> When the SPI is enabled as a Master, thedata direction of this pin is controlled by DDB2. <S> When the pin is forced by the SPI to be an input, the pull-up can stillbe controlled by the PORTB2 bit. <S> As you can see, it's only used when ATmega is a slave. <S> When it's a master, you use normal GPIO pins to select a slave. <S> There's even a paragraph about that in the datasheet too: When configured as a Master, the SPI interface has no automatic control of the SS line. <S> This must be handled byuser software before communication can start. <S> In general, active slave select line should be used. <S> Slave select line should activate slave before starting transmission and deactivate it after finishing communication. <S> Any free pin on the ATmega can be used for this purpose. <A> The term "SPI" is used to describe a wide variety of protocols where a master device communicates with one or more slave devices. <S> A common scheme is for a slave device to have a "select" line which is asserted at the start of each transaction and released at the end of it. <S> When using such an approach, the select line serves the dual purpose of synchronizing byte boundaries and also indicating where "commands" start and end. <S> When communicating with such a slave, it will be necessary to have one of the master's output pins connected to the slave-select wire, but any pin may be used for that purpose. <S> Some other SPI slaves use different approaches for synchronization. <S> There's no conceptual reason why slaves should need to use a select wire, but many of them do. <S> Unless you are designing the slave, the need for the select wire will be determined by the slave itself. <A> In my experience on a current project without Slave select pin, you should build ways to verify synchronization/desynchronization between master and slave. <S> Such as: CRC in hardware, Checksum in software, fixed size packets, and add delay between packets so the slave can process the last packet before having data available to the master device. <S> Every time a desynchronization happens slave must reset the SPI machine and waits at least the time between packets to accept data. <S> After these considerations, I would recommend that you don't use SPI without slve select because you are going end up adding too much complexity on something very simple: assigning a GPIO pin on the master as Chip Select.
| In your case, since you only have one slave, you can hard-wire the peripheral's slave select pin to be always selected and not worry any more about it.
|
How is saltwater able to conduct electric charge between two wires? Say I put some wires in a container filled with saltwater, but the wires do not touch, and I connect these wires to a battery: simulate this circuit – Schematic created using CircuitLab I know that the saltwater will complete the circuit, and some current will flow. But how can this happen? Do the electrons fly off one wire and jump through the saltwater to the other wire? Aren't the electrons stuck in the wire? Why would they be able to do this when there is saltwater between the wires, but not when there is air between the wires? If the electrons can't leave one wire, travel through the saltwater, and get to the other wire (can they?), then how is there a complete circuit? <Q> The conductivity of the salt water is due to the presence of both positively and negatively charged ions . <S> These ions in solution are free to accelerate in the presence of an electric field and thus, like the free electrons in a metal conductor, are able to participate in an electric current (not to be confused with an electron current). <S> When there is an electric current through the salt water, there are actually two contributions: (1) <S> the positive sodium ions drifting in the direction of the electric current and (2) <S> the negative chlorine ions drifting the opposite direction. <S> While it may seem that the oppositely directed ion currents should cancel they, in fact, add . <S> The flow of negative ions contributes to an electric current in the opposite direction due to the negative sign of their charge . <S> At the interface between the metal conductor and salt water, there are reactions that either remove electrons or add electrons to the conductors thus completing the path for charge to flow around the circuit. <S> From the online GenChem Textbook section on Electrolysis : Figure 1 An electrolytic cell. <S> The battery pumps electrons away from the anode (making it positive) and into the cathode (making it negative). <S> The positive anode attracts anions toward it, while the negative cathode attracts cations toward it. <S> Since the anode can accept electrons, oxidation occurs at that electrode. <S> The cathode is an electron donor and can cause reduction to occur. <S> It is important to note that electric current is simply defined as the flow of electric charge and this definition does not depend on the species of charge carrier . <S> There is, in fact, just one electric current in the circuit while there are three (or more) different species of charge carriers along the circuit's path: (1) electrons in the metal conductors, (2) positive sodium ions in the salt water, (3) negative chlorine ions in the salt water, and (4+) if the voltage source is a battery, ions in the battery's electrolyte. <A> Most materials do not change when a current flows through the material. <S> Metals are very good at this because some of the electrons in a metal are very loosely bound to the atoms. <S> Pure water consist mostly of H20 molecules. <S> They offer very little option for electrons to pass through the fluid. <S> Salt water consists (mostly) of H20 molecules, Na+ ions and Cl- ions. <S> When two electrodes are put in such a fluid with some potential difference the Na+ ions will be attracted by the negative electrode and will move (somewhat more) to that electrode. <S> Likewise for the Cl- ions and the positive electrode. <S> When the voltage (potential difference) is large enough the Cl- ions at the positive electrode will give an electron to the electrode, and recombine to Cl2 molecules (or react with the electrode). <S> You will be able to see and/or smell this. <S> The situation at the negative side is more complex, but at that side the net result will be that the Na+ will help the H20 to get converted to H2 and OH-. <S> You will see bubbles of H2 gas here. <S> The net effect is that NaCl and water become Cl2 gas and H2 gas. <S> This is a chemical reaction. <S> It is quite different from normal electron conduction: <S> it will last only while the is NaCl (or rather: <S> Cl- ions) left <S> it requires some minimum voltage <S> Without the NaCl a comparable process can take place, using the small amount of H2O molecules that are dissolved into H+ and OH- ions. <S> Because this amount is very very small pure water will conduct much much less than salt water. <S> In some sense these electrochemical conduction is more like charging a battery than pushing current through a wire. <S> In a wire (or other resistive material) all energy from the electrical current*voltage is converted to heat. <S> With electrochemical conduction some energy goes into the endothermic (= energy consuming) chemical reaction. <S> With a lot of extra work (in this case, oa. <S> capturing the gasses and keeping the close to the electrodes) what you get is a charged battery: it can supply current when you connect its two leads. <S> So a very brief answer to your question could be: because salt water behaves like a (badly engineered) accu. <A> Just to add, since none of the other answers have pointed it out, but electricity CAN jump through air . <S> Or even rubber or other insulators, with the right voltage and current. <S> Ever see a spark? <S> A air gap between two wires can be bridged, and it happens accidentally (spark when you plug something into an outlet, when you connect jumper cables to a car, static electricity) or intentionally (car spark plugs, electric lighters, Jacob's Ladders). <S> At a certain voltage/current, normally insulating material like rubber and glass can conduct electricity, at a break down voltage. <S> This is the Dielectric strength of the material. <S> Most things can be made to conduct if you juice them enough. <S> Salt Water is just relatively easier to do.
| Electrical current is carried by electrons in the wire and electrodes, but it is carried by anions and cations moving in opposite directions in the cell itself. The salt (NaCL) water solution is an electrolyte solution which is, essentially, a conductive solution. The material somehow allows charge (in most cases electrons) to pass through the material without affecting the material.
|
Small Battery able to withstand 400°F [204°C]? Is there a small (watch or car alarm size) battery on the market that can withstand 400 deg F for 1-3 hours?If not, what would a higher temp battery specifications be? <Q> Lithium Thionyl Chloride cells (3.67 Volt primary chemistry battery) in conventional AA form factor are available in retail packaging for low delivery rate applications (20-30 mA typical). <S> Your preferred industrial supply vendor should be able to supply these as per regulations in your geography. <S> These are sealed stainless steel and glass packages, designed for oil industry (downhole) sensors, among other things. <S> Typical temperature ratings are 50 o C to 200 o C. A somewhat lower cost substitute from Steatite in the UK is the Electrochem 4320 , with the constraint that at temperatures lower than about 100 o C <S> the battery capacity is very low , so as to be practically unusable at 10 mA load. <S> If the temperature is guaranteed to be between 100 and 200 o C, this should work for you. <S> [Edit: I notice that the datasheet for these batteries rates them for operation from 70 o C, so it is possible that my recollection of minimum operating temperature is incorrect. ] <S> Other options to consider include metal-junction thermoelectric power harvesting, if the power demand is very low. <S> This would however require a cold junction somewhere close by, so it may not be a solution for your particular application. <A> From what I found from researching, there are batteries provided by Excell battery company that's able to withstand temperatures of up to 200 degrees Celsius (almost 204 in your case). <S> However, these huge batteries are only available for industrial applications (Oil Industry, Medical Equipment, etc.). <S> ( Website link ) <S> Luckily, these types of batteries could be purchased through distributors like Digikey and Newark for appx. <S> $2 apiece. <S> ( Website link ) <S> Hope this helps :) <A> Thirty years or so ago, there was talk of sodium-sulphur batteries which not only tolerated, but actually required, temperatures in that sort of range. <S> I don't know their more recent history <S> but it's a possible line of inquiry.
| Although these batteries aren't able to withstand the temperatures you require, there are coin cell batteries from Panasonic that are able to withstand temperatures of up to 125 degrees Celsius.
|
Using an Op-amp as comparator I have a dual op-amp that I want to use as a comparator: Vin should be compared to Vref (1/2 VCC). This is the circuit that I am using (as I have a dual op-amp, I am using a voltage follower on the divider). schematic http://iridia.ulb.ac.be/~abrutschy/images/opamp.png I would expect that if Vin>1.65V, Vout=3.3V (VCC). Otherwise, Vout=0V. Unfortunately, Vout is around 2.2V if Vin>1.65V, which is not sufficient for my µC to detect a clean logic high. I suspect that I am experiencing an "ideal vs. real-world" op-amp problem, but I am not sure how to resolve it best. <Q> You'll need an opamp that can swing up to vcc. <S> Old things like the 358 cannot. <S> It's an inherent limitation of the design. <A> Op-amp's can have unexpected behavior when used this way: <S> ringing, latching. <S> Here's a detailed application note about using op-amps as comparators: <S> http://www.analog.com/static/imported-files/application_notes/AN-849.pdf <S> In short, it's best not to do it. <A> Is your opamp rail-to-rail, like the MCP601? <S> If not, you're not going to get "high" pulling up to AVCC. <S> You can re-buffer this with a separate transistor pair as a quick fix to an existing circuit (and swap the +/- <S> of the inputs,) <S> but that's probably not what you want from a "design" point of view. <S> Also, make sure your opamp has a gain/bandwidth product sufficient to support the data rate you're transmitting, and set an explicit feedback multiplier, to avoid delay, ringing, and other signal quality issues. <S> When it comes to "use a comparator instead," I've found the differential gain of comparators to be rather poor.
| Look for rail to rail op amps, or better yet, use a proper comparator! However, a digital buffer, such as a Schmitt trigger, is sometimes a better solution than an analog-domain component such as an opamp.
|
Decrease in stored energy after connection of another capacitor A 3-µF capacitor charged to 100V is connected across an uncharged 6-µF capacitor. So the initial stored energy is: 15mJ and the final: 5mJ. What happen to the 10-mJ of energy? <Q> You can calculate that the dissipation does not depend on the actual resistance, so reducing it does not help. <S> related: energy in capacitors <S> (there must be more but I can't find them) <A> As Wounter van Ooijen has already said, it is a matter of parasitic resistance, which is always present. <S> The proof: EDIT:Even though the answers provided must satisfy any engineer on this planet (joke), it looks like the case of zero resistance wires is still being considered as a scenario of possible violation of conservation of energy (joke). <S> In fact, a complete answer to this question must address the case of zero resistivity because everyone heard of superconductors. <S> Well, turns out that the same questions have already been asked at Physics forum. <S> One of the best answers may be found here . <A> This problem is a classic and it provides a wonderful example of the limitations of ideal circuit theory. <S> There are three assumptions underlying ideal circuit theory and one of those assumptions is, essentially, to ignore the self-inductance of the circuit. <S> But any circuit (closed path) has inductance. <S> So, even if we keep the idealization of zero resistance wire and ideal capacitors, we cannot escape the fundamental inductance of the circuit (unless we shrink the circuit to zero size). <S> A careful analysis will show that, even if the resistance is zero (or effectively so) so that there is no effective resistive loss, there is energy "lost" to the electromagnetic field; the "lost" energy is radiated away as electromagnetic radiation. <S> A detailed derivation can be found in A Capacitor Paradox . <A> Intuition would tell us that if we could somehow connect the capacitors with a zero resistance, than the energy would be conserved. <S> But this is wrong. <S> Our intuition comes from the fact that usually power decreases as resistance approaches zero. <S> For example: simulate this circuit – Schematic created using CircuitLab $$P = 1A\cdot <S> V\\V = 1A\cdot <S> R$$ <S> Therefore <S> , as \$R\to 0\Omega\$, then \$V\to0V\$. Clearly, \$1A\cdot 0V = 0W\$ <S> , so we can say: $$\lim_{R \to 0} (1A)^2R = <S> 0W$$ <S> This is the usual case because although the circuits we make aren't just current sources, they have some resistance somewhere that limits the current. <S> Thus, we are in the habit of thinking minimize unintentional resistance to minimize loss . <S> Another example: simulate this circuit <S> $$ P = <S> 1V <S> \cdot I\\I = 1V/R $$ <S> Therefore, as \$R\to 0\Omega\$, then \$I\$ gets bigger, and then you hit a division by zero. <S> Therefore, we can't evaluate the limit : $$\lim_{R \to 0} <S> \frac{(1V)^2}{R}$$ <S> Now, consider that in the instant that you connect the capacitors, they look like voltage sources, and you can see that it's not possible to connect even ideal capacitors with ideal conductors. <S> Even if you connect them with very small resistances, current goes up, \$I^2R\$ losses go through the roof, and you are no better off <S> than had you connected them with a large resistance. <S> There must necessarily be some sort of impedance between the capacitors for this circuit to be mathematically consistent: if it's not a resistance, then perhaps an inductance. <A> This answer is more or less a further exploration of the energy transfer. <S> Shorting one capacitor to another is of course nonsense if you want to conserve energy. <S> This has been proven in the answers already so I won't dwell on it other than to say "you wouldn't expect a buck voltage converter to work without an inductor". <S> Well, in all seriousness you wouldn't so why could anyone (including me) be dumb enough LOL. <S> The energy from C1 can be transferred to C2 with zero resistance and this of course relies on the inductance of the wires. <S> If a non-lossy inductor connected C1 to C2, the energy would be conserved and remain oscillating forever between the two capacitors and the inductor. <S> But I thought wouldn't it be cool if it could reach a steady-state. <S> So, I thought what if there were cable resistance - the oscillations would die out <S> BUT the 10mJ energy is still lost in resistor heat dissipation. <S> Then I thought about this: - It turns out that with a perfect diode and no losses you can successfully take all the energy from the left cap and put it in the right cap. <S> 15mJ is successfully transferred from a 3uF cap to another 3uF cap and the voltages stabilize out. <S> The diode losses will lose about 2mJ if these are taken into account. <S> More to follow. <A> probably I'm not skillful enough to say something interesting <S> (I'm not an electronic engineer, only an electronic enthusiast) <S> but I had to overcome the energy transfer problem through capacitors in the past <S> and I've "partially" found a solution (tested inside my little lab). <S> The idea is similar to the one schematized by Andy Aka <S> but, instead of a simple inductor, I used a complementary one and, instead of a simple diode, I used a Schottky one (to exploit the avalanche effect): <S> I discovered that with these two components put in series I was able to transfer the 65-70% of the energy from the charged capacitor to the empty one. <S> I think that the amount/percentage of the transferred energy could depend on the resonance frequency <S> : I had no time nor resources to test all the possible harmonics of that resonance, so further investigation is needed. <S> If anyone found appreciable solutions about this problem, please come in contact with me: <S> fabrizioricciarelli@gmail.com <S> Cheers <S> Devesh
| It is dissipated in the non-zero resistance of the connecting wires.
|
What is good device for generating vibrations, offset weight motor or solenoid or some other? I am building a vibrating device for that I am thinking to use a solenoid for vibration. The solenoid will be used such that device will be mounted in the floor and when a stick is put over solenoid, it will start vibration. That vibration needs to be felt by the person holding the stick so so that say she can count those and recognize patterns of vibration. I come to know through responses to my another question that solenoid may be not a good choice as it is not a vibrating device. Rather an offset weight motor may serve the purpose better. I did not know about it. I search for offset weight motor but did not find any link to that. My question is which equipment should I choose for generating vibrations for my device? Can someone put a link of offset weight motor so that I may read about it. I also learned that offset weight motor acts like a mobile phone vibrator. That is good for my project as I may extend the output to be read by a mobile later so it will help. <Q> If the intent were to generate a single shock intermittently, then sure, a solenoid would be a good choice. <S> For mechanical vibrations (presumably for sensing by human touch), two options are popular: <S> Offset Weight motors , aka pager motors, vibration motors: <S> These are available down to very small sizes, and very low current and voltage ratings, such as 1.5 Volts, 10 mA in 3mm x 3mm x 5 mm, surface mounted. <S> Operating them from your circuit is simple, even trivial. <S> Downside: <S> Very precise start and stop timing is not feasible, and vibration frequency is not simple to modify. <S> ( Source: <S> eBay.com , Vibrating Micro Motor - 1 to 4.5 V - 13 mm x 7 mm ) <S> Piezoelectric benders aka coin-type speakers: <S> These exist in very small heights, down to under 0.5 mm, but diameter is usually 5 to 10 mm for effective output. <S> Actuated by a haptic driver or haptic controller IC, or even an oscillator at desired vibration frequency, these are a little more complex to drive. <S> Some such haptic piezo actuators require tens or even hundreds of volts, although at minuscule current. <S> The haptic drivers typically generate the required voltages internally. <S> Both vibration frequency and start/stop time can be controlled with great precision. <S> Mobile phone haptic feedback, i.e. the mild buzzing sensation some mobiles offer to indicate the press of a key on a touch screen, for instance, typically use this mechanism. <S> ( Source: eBay.com , 12mm Piezo Disc ) <A> Info: http://www.precisionmicrodrives.com/application-notes-technical-guides/application-bulletins/ab-004-understanding-erm-characteristics-for-vibration-applications <S> Item: https://www.sparkfun.com/products/8449 <S> Hope this helps. <A> I'd use a cam on a regular motor to move the stick. <S> This turns into a mechanical problem
| A solenoid is sub-optimal for generating ongoing vibration. For an example of a piezo haptic driver with an integrated voltage boost converter, see the Texas Instruments DRV8662 . Mobile phones (and of course pagers in ancient times) typically use such motors for vibrating ring notification:
|
what is the difference between PHY and MAC chip I want to know what is the difference between PHY and MAC chip <Q> It has no particular clue as to what any of the bits "mean", nor how they should be interpreted or assembled. <S> The MAC chip or layer receives bits from the PHY, detects packet boundaries, assembles bits into packets, and validates them. <S> It also takes packets of data that are loaded into it and converts them to streams of bits which are fed to the PHY. <S> Typically, a MAC will include some logic to delay transmissions until the line is clear, and retry transmissions which are interrupted by collisions, but it will not include logic to listen for acknowledgments nor retry packets which are not garbled by collisions but aren't acknowledged either. <A> PHY chips handle the physical layer (Layer 1 of the OSI model), while MAC chips handle the data link layer (Layer 2 of the OSI model). <A> PHY is Physical layer transceiver which connects to the copper interface of the Ethernet like <S> BCM5461 and MAC is Media Access Control which will control the transfer of data from PHY, <S> mostly MAC cores are inbuilt in Processors or Controllers as SoC. Other options with built-in MAC and PHY is <S> CP2200 <S> which will directly connect to the address and data interface MCU or Processor.
| A PHY chip or layer converts data between a "clean" clocked digital form which is only suitable for very-short-distance (i.e. inches) communication, and an analogue form which is suitable for longer range transmission.
|
If there are different packages for the same component, which one you should consider? I am designing a small PCB for mass production, and I am trying to keep costs low. One of the components is available in several different packages: 24QFN, 32QFN and LP (TSSOP 24 Pin). There is a significant difference in price and size. So, what should I consider for this? I guess that some are harder to mount than others. What I found is that most of PCB assemblers will tell you "Yes, we can do it!", but later, we will see if the board comes with the component well connected or not. I am also concerned about temperature, it is a stepper driver (the Allegro Micro A4984), and it can get really hot. I am sure that bigger ones are better for dissipation, but also more expensive. Ideas? <Q> Cost. <S> Some packages cost more. <S> Needs. <S> Packages with higher pins probably have more features. <S> Higher pin count packages mean more physical space and routing. <S> Smaller packages with less pins means they are easier to place and route. <S> This means smaller PCBs, which often mean smaller costs. <S> Different packages have different heating dissipation ratings. <S> It's not always the bigger one. <S> But bigger ones can be easier to add heat sinking to. <S> Leadless packages tend to cause more issues in manufacturing, and can require extra testing. <S> BGA for example, needs xraying to see if the pins (balls) have properly reflowed. <S> High pin count packages could require extra layers and vias, raising manufacturer costs, and even need test points added, taking up pcb space and requiring expensive testing. <S> Availability. <S> Some packages are easier to get, and in bulk, than others. <S> Unless this is a one off production where it's easy to get either package once, you should always consider future runs. <S> Pin-for-Pin replacement parts from other manufacturers. <S> Again, for future runs. <S> In your specific case, the smaller the package (24 QFN), the worse the thermal dissipation. <S> But the smaller, the cheaper. <S> But not by much. <S> Considering that at Digikey's pricing, at 500 unit pricing, you are talking about under a hundred dollars in difference. <S> Significant difference in pricing, is a very subjective idea, given the tradeoffs. <S> TSSOP is hard to mess up for even most assemblers, it is a lead package. <S> Size difference is also small, 4mm x 4mm, 5mm <S> x 5mm, or 7mmx6 <S> mm. <S> You have slightly higher costs with the TSSOP (part cost and pcb space), but routing is easier due to the pin spacing, and better thermal performance. <S> It's a toss up really. <S> You could get two prototypes made, one with the cheaper 24qfn and one with the TSSOP, and then make your final decision based on which one performs better. <A> Regardless of which specific part number is under consideration, here are some generic rules of thumb I've found useful: <S> Things to check with the assembler <S> : Do they charge differently for different pin pitches <S> One set-up <S> I deal with charges per solder point, and almost thrice as much per point for 0.5mm as for 0.8mm pitch <S> Do they require additional turn-around time for smaller pitch work <S> The one I use does, because they share time on an automated setup for boards with smaller parts <S> Does the assembler provide a board test guarantee? <S> Do they charge a premium for through-hole parts in an otherwise SMD board <S> I've found prices being doubled simply due to addition of a through-hole terminal strip on an SMD board - independent of BOM cost <S> When contracting work to manual assembly setups <S> Avoid leadless packages / BGA like the plague <S> The assembler finds ways of messing it up. <S> Avoid packages with lead pitch <S> lower than 0.5 mm Manual assembly might short some pads, it is a pain to debug <S> For parts which may need to dissipate some heat : <S> A package with a big thermal pad is preferable. <S> This may mean a larger package than you would like. <S> Check the datasheet: <S> In some cases, a DIP might be best for greater thermal capacity and better heat dissipation <S> Others might actually have better dissipation or lower heat generation in the smaller package , because the smaller package is sometimes an updated internal design <S> For parts with different pin-count packages, the larger pin-count option may expose additional pins/functions Evaluate whether those functions are useful, else go with the lower lead count <S> While staying within the lead pitch and pin count recommendations above, smaller is better <S> The smaller the package, the lower the PCB area and thus cost of PCB manufacture <S> Don't forget to check if any of the packages are on life-buy / to-be-discontinued status <S> This is often the case with DIP parts and sometimes SOIC as well. <S> Avoid those packages. <A> The A4984 has a thermal relief pad underneath the part to help alleviate heat issues. <S> If you use the recommended land pattern and follow the datasheet's layout instructions you should be fine. <A> For example: All pins from same port together Vcc and GND pin together for decoupling. <S> Digital pins and analog pins in different sides <S> All these points will help you with the layout. <S> And in my opinion you can consider them when you choose a package. <S> Obviously, it not the main point.
| From PCB layout view, some package has a better pin distribution than others. When hand-soldering by yourself , use the biggest leaded package available Avoid through-hole packages, though, if you would need to drill the PCB by hand
|
More than one button in the same pin I'm doing some project and I'm using Arduino to prototype, I have to use 10 pushbuttons (along with more things) and I don't have enough pins. One solution I could think of is to use the analog pins and use each of them for two push buttons, something like this: simulate this circuit – Schematic created using CircuitLab That way I can read the pin A0 and know which of them is being pushed by looking if the voltage is 5V or half of that. Is this a good idea? The different push buttons are NEVER supposed to be pushed at the same time, which is the only problem I can think off. Are there better ways? <Q> Why waste multiple analog pins for two switches each, when you could do any number of buttons on a single analog pin? <S> Two ways of doing it. <S> One is in series, the other is parallel. <S> This is how some car steering wheel audio controls are. <S> And how some of the older ipod inline controllers work. <S> Depending on the resistors you use, if you need multiple buttons pressed at the same time, and how sensitive your analog in is, you could have all 10 buttons on a single pin. <A> That would work, but a better way is with a matrix . <S> This is the same concept as multiplexing LEDs with a matrix, but with switches. <S> This is a 2x2 matrix. <S> A useful matrix is bigger, because at this size, you aren't saving any pins over connecting the switches individually. <S> With a 3x3 matrix you can get 9 switches. <S> The advantage here is that you can use digital IO, which is cheaper and usually more plentiful than analog IO. <S> A shift register is a cheap way to add more digital IO, if you run out. <S> If you want even fewer pins, you can, for some increase in complexity, use charlieplexing . <S> You will have to add diodes in addition to your switches, and these diodes probably cost as much as a shift register. <S> However, if cost isn't your main concern then it may have some advantage. <S> With this method, you could read all your switches (up to 12, actually) with four pins. <A> Yes, that seems like a good idea, but anyways I'm going to propose an alternative that just came to my mind. <S> If you have access to logic gates you could map many n buttons to ceil(log2(n + 1)) <S> pins through boolean logic. <S> As an example, if you have 4 buttons, but only 2 pins you can create a configuration like this: <S> Buttons | Pins---- <S> | --0123 <S> | 01 <S> ---- | --0001 | 000010 <S> | 010100 <S> | 101000 | 11 <S> That is, <S> button0 <S> pressed should have pin0 <S> and pin1 <S> low; button1 , pin0 <S> low and pin1 <S> high; button2 , pin0 <S> high an pin1 low; and <S> button3 , <S> pin0 and pin1 high. <S> From this the following boolean expressions would arise pin0 = <S> button2 <S> OR button3pin1 = <S> button1 <S> OR button3 <S> A mapping of 4 buttons to 2 pins could thus be realized with only 2 OR gates. <S> Of course, there will still be problems if several buttons are pressed simultaneously. <S> Also, if you will still be going with the resistor approach, consider using larger values on the resistors other that 100 ohms since 5 V through resistors on the order of 100s of ohms would yield a current on the order of 10s of mA which is kind of unnecessarily high. <S> I guess more reasonable values would be 10k Ohm or 47k Ohm. <A> The analog input is a valid approach, you should be able to have several buttons on it. <S> I would also like to suggest using an IO Expander chip like the MCP23017 . <S> It has 16 pins that can be inputs are outputs and its controlled with I2C using two pins. <S> Adafruit has an Arduino library for it. <A> The following page may be useful: http://txapuzas.blogspot.co.uk/2010/07/papertecladoanalogico-varios-pulsadores.html <S> It's written in Spanish, but the esentials are diagramed, I think that it's a very good idea for you. <S> On this video you can see the final result, the sketch is on the page also, encapsulated function to make easy the implementation on your projects <S> Youtube video: 10 keys keyboard on a single pin <S> Here is a schematic from the above site:
| You would need an additional pin and some additional logic, though, for indicating whether any button is being pressed at all. You need 10, so you can either add one more row or one more column and support 12 switches, or just put the 10th switch on its own pin.
|
Replace 78L05 with 7805 I have a car cigarette extension cord with a USB out on it as well. The USB out though will not charge my phone, which is a bit annoying. I had a look at the circuit inside in the device and it looked something like this: I'm guessing the reason the phone won't charge is the 78L05 chip is only rated for 100mA. Therefore I was thinking of changing it to a 7805 chip, which is rated for 1A. Would this idea stand up to my reasoning? Or am I likely to damage any equipment I connect if I go down this root? Also, if I go about this, will I also need to do something with the capacitor and the resistor on the board? Edit: Thanks for all the answers. I didn't think of the heating problems I might have in my scenario above. Its looking like the best solution for the device is the one Nick Alexeev gave below if I'm going to stick with the device I have. I have also changed the diagram above as the resistor is actually 360 ohm. Also, I am including a image of the device itself below as requested to show exactly what I was talking about. <Q> Two things. <S> One, the 7805 and 78L05 are identical in operation and pinning, the only significant difference being the current they can operate at. <S> There is heat concerns with higher current, but the TO-220 case that the 7805 comes in handles more heat. <S> Essentially, they are drop in replacements for each other. <S> BUT the more important part is that most newer phones hate dumb chargers. <S> Older chargers tend to simply have the power pins connected. <S> It's not the 100mA limit that prevents charging, but lack of signaling on the data pins. <S> Newer chargers tend to have switching regulators instead of linear regulators, which are more efficient and have little to no heat issues, but also signal to the phone what kind of charger it is. <S> then it would trying to replace the 78l05 with a 7805. <S> Or spare 5 bucks for the same charger at a retail store (Walgreens, CVS, etc). <A> The basic concept is sound, although a bit profligate. <S> You want to worry a little bit about heat-sinking the 7805, since for every 5 mW out, you're burning 7 mW in the regulator heat sink (because current out essentially = current in, and you're dropping 7V across the regulator). <S> The capacitor is there to smooth out ripple and noise on the input to the regulator. <S> I would add a 1 uf TANTALUM (!) <S> across the 7805 output, to suppress spurious oscillation of the regulator IC. <S> I've seen that happen on a friend's homemade linear supply; adding the capacitor fixed it. <S> (Supposedly, current-gen 78xx regulators don't need it, but it is CHEAP insurance.) <S> What color LED is it, and how much current does it require? <S> That's what sizes the resistor. <A> Suppose, that the 7805 is outputting 1A <S> ** at 5V, which is 5W. <S> It draws 1A at 14.5 <S> *** <S> from the supply, which is 14.5W. <S> Where does the remaining 9.5W go? <S> It's lost as heat. <S> To keep 7805 cool, the heat needs to be dissipated. <S> That's why you need to do the thermal analysis (think the heatsinking through). <S> ** <S> 1A is the max current, which your 7805 is rated for. <S> Worst-case current in this scenario. <S> * <S> ** 12V supply in a car can be as high as 14.5V sometimes. <S> They are more complex than linear, but they have 85% to 95% efficiency. <S> Which means that in case of 1A at 5V, you would need to dissipate only 0.5W or so. <S> Such as this one . <S> (There are many more modules with suitable specs, so don't get bent of that particular one.) <A> A better alternative is by using SMR88xx ( eBay link ), it's has higher power, less dissipation heat.
| For the most part, it would be cheaper, faster, and safer to buy a 1 dollar usb car charger on ebay A linear regulator such as 7805 would work, if you heatsink it adequately. There are self-contained buck modules, which were designed for drop-in replacement of 7805. You'd do a lot better with a 12V-to-5V stepdown switcher. Commercial cigaret plug chargers, which I've seen had buck converters (switch-mode).
|
how to make a W potentiometer from a log or linear pot? My circuit needs a s-curve type of pot, that is a W pot but i cant find it in a store. How can i make a W pot Either using a log or a linear pot? w pot graph W pot=G pot Does anyone have a G pot graph? <Q> What are you going to do with the result? <S> Things are mostly controlled digitally nowadays, which is why there is little point to non-linear pots anymore. <S> Set up the pot to drive the A/D input of a microcontroller, then perform whatever non-linearities you want on the resulting linear reading. <S> Even in the unusual case where you really do want a non-linear analog voltage from the user setting, you can still use a cheap micro (under $.50) to read the pot, perform the non-linear function, produce PWM from than, then a R-C filter to make the average voltage level. <S> The linear pot plus micro is often cheaper than the fancy low-volume non-linear pot. <A> An s-curve pot is not simply achieved by adding resistors unfortunately. <S> An inverse s-curve pot is easy to do. <S> See this article right at the end for an example - it mistakingly calls it an "s-curve" <S> but it means an "inverse-s curve". <S> Just so you are sure, please check if you need an s-curve or an inverse-s curve <S> This is the curve you get when you have a 100k pot with fixed resistors (100k and 50k) from both ends meeting at the wiper: <S> The vertical axis is \$ <S> V_{out} <S> / V_{in} <S> \$ <S> where \$ V_{in <S> } \$ is applied across the pot and \$ <S> V_{out} <S> \$ is wiper to common connection of input <S> No matter what value of fixed resistors you choose the curve will be inverse <S> S. Using a log pot won't help either - it'll still be an inverse S but biased towards the top of the graph. <A> Connect its ground point to midpoint of a pot, and output to a wiper. <S> If Rnic = -Rpot/2, then curve is nearly perfect. <S> (Rf is -2*Rnic in this schema)
| It is possible using negative impedance convertor ( http://en.wikipedia.org/wiki/Negative_impedance_converter ).
|
5V Arduino interrupt from a 3.3V device I m trying to trigger an Arduino Mega interrupt pin from a 3.3V sensor. This voltage doesn't seem to be enough, since Arduino recognizes the interrupt only when I move the wire (probably since it causes the voltage to spike). Can I use a transistor or any other solution to send 5V to the interrupt from a 3.3V source? <Q> Can be done with a simple transistor and two resistors. <S> When the 3.3v pin is pulled high, the arduino's interupt pin is pulled low. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> In addition to the discrete circuits the other answers have shown, you can use a integrated inverter or gate. <S> (more useful if you have spare gates in your circuit already, or for a higher speed circuit). <S> You'll need to use one of the 74 series that has TTL level inputs, but is CMOS based, so that it has CMOS level outputs. <S> These types generally have a 'T' in the type number, eg. <S> 74HCTxx, 74ACTxx. <S> When running on a 5V supply, they will accept anything over 2V as a high input, and output a near 5V signal... <S> Making them quite handy for interfacing 3V logic to 5V logic. <S> For an inverter, something like 74HCT14 is nice, as it has a Schmitt trigger input and will tolerate more noise (especially nice when your interrupt is something mechanical, or in high noise environment with long cable). <S> Most any gate will work if it doesn't need to be cleaned up, though. <S> A non inverting type (buffer, AND or OR gate with inputs tied together, etc) works fine too, and won't invert your signal if you prefer this. <S> There are also single gates available now, but only in SMT it seems. <S> 74HCT1G14 is a single gate variant of 74HCT14, for example. <S> These are handy for translating a single line between logic types, or debouncing a single mechanical input, if you have no spare gates in the circuit. <A>
| It can be done with a 2N7000 and a few resistors .
|
Why do dead batteries appear to recharge on their own after awhile? The other night, I found myself crashing at a friend's house without a MicroUSB charger handy. As such, my phone (Nokia Lumia 920) died before I went to bed - attempting to boot would simply yield a "low battery" screen. When I awoke about 6 hours later, I decided (in a moment surely befitting the definition of insanity) to try turning the phone on again. The phone booted this time, showing about 12% battery remaining. Aside from the expected "low battery" warning messages, I was allowed to use the phone normally for awhile before I finally got back into my car and was able to charge it there. I'm pretty sure I've seen this phenomenon in other small electronics (usually phones). A device will have drained its battery to the point of being un-bootable but, after a few hours or so, I'll later try again and find it coming to life as if nothing was wrong. What causes this? <Q> Batteries work by way of a redox reaction . <S> The reaction can only occur so fast, thus limiting the current the battery can provide. <S> As more current is drawn from the battery, the voltage decreases. <S> As the battery becomes depleted, there are less of these reactants available to drive electric current. <S> However, if the battery is left to sit for a while, the reaction can proceed a bit, building up an excess of electrons at one terminal, and a lack at the other. <S> As soon as the battery terminals are connected with a conductor, a current results as the electric charge imbalance attempts to reach balance. <S> However, pretty soon all that imbalance that was developed as the battery sat on the shelf has been used, and the chemical reaction must continue to create more imbalance to continue driving the current from the battery. <S> So, the battery on the shelf isn't "recharging", because it's not gaining any more energy. <S> You are simply giving the chemicals inside the battery more time to react, converting more of the chemical energy that was already there into electrical energy. <A> In a battery (rechargeable or not) ions must migrate to the two poles to exchange electrons with the poles, which makes the electric current flow between the poles (= the battery delivers power). <S> This ion migration does not happen instantly: ions can take some time to migrate to their respective poles <S> an do their work. <S> When the region around a pole is depleted of ions the battery will appear empty, but after a while the ions will spread out again, there will be ions near the pole, and the battery will appear charged again. <S> A similar effect can be caused by the remains of the charged ions: once discharged they can block the intended process near the poles. <S> They take time do diffuse away from the poles. <A> A battery may be loosely modeled as a bunch of capacitors interconnected by resistors of various values. <S> For simplicity, assume two capacitors--#1 is attached directly to the load, and #2 is connected to #1 via high-value resistor. <S> When the load isn't drawing any current, a small amount of current will flow from whichever cap has the higher voltage into the one which has the lower voltage. <S> This will cause the two caps to approach an equilibrium where there voltages are equal. <S> When the load does draw current, however, charge may flow from #1 to the load faster than it can flow from #2 to #1. <S> If this happens, the voltage on #1 will fall below that of #2. <S> The greater the difference in voltage, the more current will flow from #2 to #1, but the voltage on #1 may fall below the minimum operating voltage of the phone even while the voltage on #2 is substantially higher. <S> Once the phone shuts down and stops drawing power, the flow out of #1 will no longer be faster than the flow into it from #2, and consequently it will start to be recharged from #2 until the batteries again reach equilibrium. <S> Note that in practice batteries are a lot more complicated to model than capacitors; among other things, the resistances that connect the various capacitances are not fixed but vary as the battery is charged and discharged. <S> Nonetheless, the interconnected-capacitors model provides a simple intuitive picture of what's going on. <S> PS--Both batteries and caps may be thought of as containing some charge-storing material and some material to connect it together. <S> The more interconnecting material a battery or capacitor contains, the lower the effective resistances that connect everything together. <S> The interconnecting material doesn't hold any useful amount of charge, however, so low-ESR batteries and caps have to be physically larger than higher-ESR batteries and caps with the same capacity.
| If the battery is nearly dead, this reaction can't happen very fast, as nearly all of the reactants in the battery have already reacted.
|
Designing a MOSFET circuit for low pass filtered PWM operation and with saftey considerations I am designing a circuit at the moment and, as part of that, I need to be able to run 4 12VDC fans (which i will run in parallel) with an operating current of 150mA and a starting voltage of 4.5V. My problem is that my supply rail is 24V. At the moment I am thinking of using a 5V PWM signal from my microcontroller to control the gate voltage of a MOSFET. With a 50% duty cycle, I should achieve an average votage of 12V. However, PWM is noisy and it would be nice to be able to smooth the output voltage with a Low pass filter. It would be nice to put the filter between the micro and the MOSFET gate, I just have to make sure that the gate voltage is above the threshold voltage. Here's my question: is something like this suitable? Also, how do I protect against anything that might go wrong? For example, if the fans short etc, I don't want to start a fire if the MOSFET is dissipating high amounts power. Here's my thought process for choosing the MOSFET \$V_{GS(th)}\$ = \$0.67 V\$ which is greater than the expected 'off' voltage from my PWM pin \$V_{GS(max)}\$ is \$8V\$ which is less than my \$5V\$ max PWM output Max continuous drain current is \$6.3A\$ which is greater than my 4 fans ( \$4 \cdot 0.15 = 0.6A\$) With \$V_{GS}\$ at 2.5V (5V at 50% duty) I can supply over 20A. I don't understand this bit because the datasheet says a max Drain current of 20A pulsed. I guess that I can only do this for a very short amount of time?) Max \$V_{DS}\$ is 30V, greater than my 24V \$R_{DS(on)}\$ is typically 0.038Ohms at 4.5V gate voltage. At (\$4\cdot 150mA =\$) 600mA power dissipation is 22.8mW which I guess is low enough. Here's my Schematic. What can I do to improve it and/or protect against anything that might go wrong? <Q> As Andy correctly points out (+1) you are driving the MOSFET into a power dissipating region by adding the filter and its getting warm. <S> The Capacitor C1 is holding the voltage long after the pulse has turned off and will discharge (slowly) through R1 and R12. <S> To make the MOSFET switch OFF quickly you need to discharge the gate-source capacitor. <S> A much lower resistance for R12 is required. <S> Also the 10k input resistance (R1) will charge the gate capacitor more slowly - as the gate is essentially a small capacitive load you need a small resistor. <S> 24V supply, 12V fans: <S> This will also reduce the maximum amount of current the MOSFET needs to handle. <S> Now you can run your PWM speed control up to 100% without worrying about exceeding the voltage/current on the fans (or if you just want to run at full speed/turn off just use a digital I/O line) <S> Overcurrent protection: <S> Simplest way is to put a fuse in series. <A> I would find another solution because your system is not fail safe. <S> Never rely on software for the integrity of your hardware. <S> If your MCU crashes, or stops for whatever reason, your system may stop with the MOSFET always on. <S> That could destroy your fans. <A> Use a push pull stage with a PMOS and an NMOS. <S> In theory you can connect both gates together and drive them with the same pwm signal. <S> In practice you probably want to use an MCU with complementary pwm support so you can control the timing.
| If the fans are all the same type you could drive them in series/parallel so that they only see 12V each. I would add an over-voltage protection at the output of your system that switch off the MOSFET in case of over-voltage or triggers a crowbar & fuse or whatever.
|
Why do some RGB LEDs have six legs? Others have four legs, which makes sense to me, as ground can be shared. One of many examples of a six legged RGB LED is the Kingbright KAF-5060PBESEEVGC . <Q> For some applications that may not be acceptable. <S> For example, it wouldn't be possible to control two RGB LEDs with common cathodes or anodes in series, or to arrange them for charlieplexing . <S> Further, a part like this is at least more flexible. <S> It can be made common anode, or common cathode. <S> Or, a pair of the LEDs may be arranged in anti-parallel. <S> It may make more sense in some situations to stock just one part than to stock several different parts to cover different cases. <A> These RGB LEDs have six pins because all the connections are brought out individually. <S> You didn't ask, but others may wonder why manufacturers do this. <S> The advantages of bringing out all connections individually over tying some together in the package include: One part works in both common anode and common cathode configurations. <S> If the package needs to be big enough for thermal or other reasons anway, then there is little advantage in economizing on pins. <S> There are other topologies beyond common cathode or common anode that such 4-pin packages don't suite at all. <S> For example, it might be useful to drive a string of each color to get higher voltage, which may allow for more efficiency in the power supply. <S> Or, you might want a different power supply voltage per color or at least one for blue and another for red and green. <S> That can be done with common anode or cathode, but is simpler with individual connections. <S> The fixed power voltage could go on the anode, then a low side switch on the cathode. <A> Before you linked the datasheet and explained that it wasn't common anode, I commented that it might be mechanical or thermal relief. <S> For both of those purposes, you want larger pins or more pins. <S> Large pins take longer to solder, so if more pins fit easily within a rectangle surrounding the device you might as well choose more pins. <S> This device claims a total power of 350mW, which is starting to get hot to the touch, so thermal design is definitely a consideration. <S> Single-colour LEDs often have a "pad" underneath, but in this case with three disjoint LEDs there would be the question of which signal to connect it to. <S> An actual reason for the non-common anode, according to the datasheet's "Description": the three sub-LEDs are manufactured on different substrates with different processes (may not be true for all RGB LEDs). <S> Therefore there are three small dies in the package each of which has two bond wires. <S> It's probably easier to bond them out to different pins. <S> Final note: the orange LED is much brighter than the other two in this package, for the same current. <A> For the specific led you mentioned, it is a standard 5050 PLCC-6 smd led package (It says 5060, but <S> 5mm x 5mm is nominal sizing, 5.5 x 5.5mm typical). <S> It's a pretty standard 6 pin leaded package. <S> The same package is used to allow multiple colored diodes (RGB, or RGB+White or RGB+Warm White+Cold White), or even entire micro-controllers like the WS2812 RGB led controller: <A> The answer is so that you can have multiple LEDs in series. <S> You can't do that if they have a common anode/cathode unless you don't mind all colours having the same intensity which defeats the object of RGB.
| There can be bigger savings in only having to produce a single part for different applications than in reducing pin count. According to the datasheet, it has six legs because it contains 3 LEDs, with nothing common: Many RGB LEDs have a common cathode or common anode, so need only 4 leads.
|
meaning of MOSFET "linear region" in the context of switching losses In the context of MOSFET switching circuits (PWM, motor control, etc) I've read the "linear region" of operation is where you don't want to be for long, because here is where there is large power in the MOSFET. For example, this answer : you are driving the MOSFET into its linear (power dissipating) region Or this application note from International Rectifier : If the device is operated as a switch, a large transient current capability of the drive circuit reduces the time spent in the linear region, thereby reducing the switching losses. Yet, Wikipedia offers these definitions : linear region: \$V_{GS} > V_{th}\$ and \$V_{DS} < ( V_{GS} – V_{th} )\$ active mode: \$V_{GS} > V_{th}\$ and \$V_{DS} ≥ ( V_{GS} – V_{th} )\$ That is, \$V_{DS}\$, and thus the power in the MOSFET, is less in the linear region than in active mode. Therefore, I would think it's time in active mode that one would want to avoid. As one switches from off to on , one starts in cutoff, moves through active mode as quickly as possible to minimize losses, then ends in the linear region. But, I can't reconcile this with the examples above, which discuss minimizing time in the linear region. Where is the inconsistency? <Q> "Linear region" in the answers you quote is used somewhat loosely. <S> Often we say "linear region" or "linear operation" in electronics when we mean in-between operation where a voltage is kept somehere between the power supply rails (as apposed to clamped to near one of them) or a device like a transistor is kept in the middle region where it is not fully on or fully off. <S> Often devices aren't all that linear in this "linear region", but it's a name that stuck from long ago where linear region was as apposed to in switching operation or the clipped region. <S> If the device is a ideal switch, then it can't dissipate power when open since the current is zero, or when closed since the voltage is zero. <S> This is different from "linear region" when talking about the device physics or details characteristics of a MOSFET. <S> There "linear" can mean "roughly linear current with applied voltage", which also means the MOSFET is acting like a resistor as apposed to more like a current source. <S> That's different from "linear region" from the overall circuit perspective. <S> Yes, it's context-dependent and can be confusing. <S> If you need to be precise, use real numbers. <A> "Linear region" is unfortunately the most inconsistently used term when it comes to MOSFETs. <S> It can mean exactly the opposite depending on the author. <S> Compare: <S> Image from this appnote . <S> From this textbook , which calls the left region "linear region". <S> Also note that JEDEC has chosen "ohmic region" and respectively "saturation region" as their choice of standard terminology for MOSFETs (as in the 1st figure above). <S> This is given in JESD77b on page "4-31". <S> They avoided calling any region "linear". <A> Linear region in this context means thee region where you don't want to operate in because the product Id·Vds is big <S> therefore you have a lot of losses. <S> You want to minimize the losses in transistor by having the transistor either fully on or off. <S> Switching between the two states should be as fast as possible because being there generates losses. <S> The area under the blue curve is the energy dissipated in the device. <S> Switching slower makes the area bigger. <S> If you take a look at typical hard switching turn-on or turn-off <S> You can see that for some time there is high voltage and high current present on the device at the same time. <S> Switching faster minimizes the time spent in that area. <S> There are ways to minimize the switching losses by using a zero-voltage or zero-current switching. <S> You have to design your converter in such a way that it will switch only when either voltage or current on the transistor is close to zero. <S> This way the power product of Id·Vds is also close to zero. <A> The graph which shows energy appears to have time as its axis. <S> It may be helpful to graph power versus voltage drop, assuming a resistive load (e.g. figure 10 volt supply and a one-ohm load). <S> When the device is fully off, zero current hence zero power. <S> When fully on, very low voltage drop (e.g. 0.2 volts) and thus low power (9.8 amps, so 1.96 watts). <S> When "half" on, significant voltage drop (5 volts) and significant current (5 amps), so big power (25 watts). <A> There is a bit of confusion as to which side of the graph is labeled as the "linear" region. <S> If you are using a MOSFET for PWM switching, you should always try to stay within the left region of the graph. <S> Remember that a MOSFET is a voltage controlled, current limiting device. <S> When enough voltage exists between the gate and source pins (\$V_{GS} > V_{th}\$), the MOSFET will allow current to flow, up to a limit. <S> The current limit is determined by \$V_{GS}\$ and can vary depending on the specific part (see the graph in your datasheet). <S> If you attempt to draw more current that this limit, you are entering the right region of the graph. <S> This is where the MOSFET will act as the amount of resistance necessary to maintain that limited current. <S> Like any resistance with high current, it gets very hot. <S> Because it is acting like a resistor, there is now a significant voltage across the drain and source pins (\$V_{DS} ≥ (V_{GS}–V_{th}\$)). <S> When using the MOSFET for PWM switching, make sure you are applying enough \$V_{GS}\$ so that the MOSFET's current limit is higher than the amount of current your fan/motor/etc. is going to draw. <S> With Power MOSFETs, I recommend using the same voltage for \$V_{GS}\$ that you are using to power the fan/motor/etc. <S> itself; this will ensure the fastest switching times, reducing the time you spend in the right region caused by charging/discharging the small capacitance of the MOSFET. <S> Here is an example using an Op Amp to boost the PWM voltage: <S> UPDATE : <S> Here is another example using a totem pole to drive the MOSFET gate. <S> This has an advantage of driving the gate with a high current. <S> Note: due to the second N-ch MOSFET, the PWM signal gets inverted, I changed the schmitt trigger to the inverting type to rectify this.
| It is this middle "linear" region where the device will dissipate significant power.
|
What is the utility of the reference clock in PCI express? I understand that PCI express is a serial connection with clock embedded with the signals. So, what is the utility of the reference clock signal? What is it used for? Does the reference clock have to be matched and routed with the data lanes? Is there a possibility of reference clock being skewed? <Q> The reference clock is multiplied up through a PLL to the line rate (2/5Gb/sec, 5Gb/sec, 8Gb/sec for versions 1.x, 2.x and 3.x respectively); this determines the data rate from a transmitter. <S> The clock is effectively embedded in the data stream by using line coding which for the 2.5Gb/sec <S> and 5Gb/sec is 8 bit / 10 bit and 128bit/130bit (see third paragraph) for gen.3 (8Gb/sec). <S> Note that this coding is derived from the reference clock (as multiplied up). <S> This allows the receiver to use standard clock recovery techniques. <S> It is not necessary to have a common reference clock (for all versions); this is the reason the SKP (skip) ordered set exists. <S> This allows a difference between reference clocks at each different link partner (the specification permits the reference clock to be +/- <S> 300ppm so a relatively inexpensive device may be used) and receivers implement elastic buffers to cross the timing domains. <S> This clock domain crossing mechanism eliminates skew issues between clocks. <S> Note that a common reference clock which is almost guaranteed to have a phase difference at link partners will still need a 1 bit FIFO (as was used in Hypertransport <S> which did require a common reference clock). <S> In one design, I had 8 potential PCIe link partners; here is where a shared reference clock makes sense. <S> I used one master reference clock ($20) and a single 8 channel clock buffer ($20), a lot cheaper than 8 reference clocks. <S> For designs where the links traverse cables and/or multiple connectors in multi-PCB designs, shared references are not really suitable as the reference clock at each link partner needs to be nice and clean. <A> The clock is not embedded with the data signal, it can be recovered from the data. <S> The recovery can be done in a number of ways, mostly based around phase-locked-loops, but the design is simpler if you have a reference clock to work from. <S> The skew for a particular card is fixed once it's plugged in, so all that's required is an adjustable phase offset between the reference clock and the data lines. <S> Using the same refclk avoids problems if one of the endpoints has poor temperature compensation and drifts away from the correct speed. <S> The clock can be multiplied up by a PLL and used for other purposes on the card, saving you a crystal on the card. <S> http://comments.gmane.org/gmane.technology.electronics.signal-integrity/19400 <A> The shared reference clock is required so that all of the transmitters are frequency locked and no frequency offset compensation is required in the receivers. <S> Obviously they will have to recover the clock and compensate for the phase, but the phase will be fixed (well, more or less). <S> Protocols like 10G Ethernet have interframe gaps between packets that can be extended or contracted to compensate for up to 200 ppm of frequency offset between link partners. <S> PCIe does not support this, and so requires a shared reference clock.
| Without it, idle codewords would need to be inserted or removed periodically to compensate for drift in reference clock frequency between the transmitter and receiver.
|
Is it dangerous if I do not connect the ATX shield to ground? I'm living in an Asian country and there isn't a ground connection provided on sockets here. There is only L (live) and N (neutral) so I need to use a 3-to-2 converter. It means that the ATX case does not connect to ground like in other countries and when I touch the case I feel hurt by electricity. When using a volt meter to measure, it tells me that the computer case reaches ~80v AC between me and the computer (Ground ---> Me ---> Computer). I found an ATX power supply circuit and I found that the ATX shield is connected to the ATX AC input circuit between the L and N lines and there are two capacitors in the middle. I'm very new to electronics and I don't know why they connect the shield like that and I think it may be dangerous in my case? As I see the shield is connected directly to the L line so it's very dangerous if I don't connect the case to ground? See the circuit here : <Q> EMI shielding Look at C2/C3. <S> This is a capacitive voltage divider that indeed will make your computer's case carry a voltage of approximately half the line voltage when not connected to ground. <S> When your computer is not grounded and you touch the case you may feel the tingling <S> and it should not reach a dangerous level. <S> The two capacitors are there to improve the casing's performance for high frequency shielding (which a power supply like this as a lot of), so you mustn't remove them. <S> Safety ground <S> The other reason for the casing to be connected to ground is the fact that the entire case is made of metal and is easy to touch. <S> Whenever some components fail or a wire comes loose, the entire case may carry line voltage and that can be leathal. <S> When connected to ground, either the internal fuse will blow or an GCFI (Ground Fault Circuit Interruptor) in your home will trip. <A> The main issue here are the capacitors, as other have mentioned. <S> Main problem with capacitors, except form the already mentioned voltage divider, are their failure modes. <S> If the power supply is actually safe and contains properly rated components, then you should be safe from capacitor failure. <S> The capacitors C2 and C3 should be Y class capacitors which should be self-healing (meaning that a continuous short through the capacitor cannot happen) and be flame-retardant (which means that they should not catch on fire and continue burning). <S> There is a limited leakage current which can go through those capacitors from the live and neutral into the ground. <S> If my calculations are correct, the highest RMS current you can get through those capacitors is around 0.5 mA. <S> IT should be X class capacitor which should be capable of surviving high voltage spikes that can be found on power lines and be flame-retardant. <S> Its failure should not be capable of causing an electric shock, but it can cause a short-circuit. <S> Both of those capacitor types should be tested by safety agencies and be appropriately marked. <S> Now a little bit about how it's done in the "real world":From my experience, cheaper computer power supplies often do not have filtering capacitors installed and often do not use appropriate capacitors. <S> For example instead of a real Y class capacitor, a 2000 V rated disk ceramic capacitor may be found. <S> They are much more dangerous and could fail shorted causing equipment chassis to be at line potential in the worst case. <S> In general, I wouldn't trust any computer power supply to be safe if it's not grounded and I wouldn't rely on the manufacturer to use safe components. <A> It is dangerous. <S> The capacitors are to shunt RF hash from the SMPS to earth.. reducing noise. <S> The common mode choke and caps across the line attenuate noise reflected into the mains. <S> Very common circuit on power input to SMPS. <S> The only way to be safe without ground is to have the circuit double insulated, is not the case here. <S> (This is how plastic power supplies with no ground work, like for a laptop). <A> Connect a wire from the case of your computer to a cold water pipe or an 8 foot rod (made of copper or conductive metal) driven into the ground. <S> If you are feeling a tingle when you touch the case, that is a Bad Thing, and very unsafe.
| If the line shorts to the case, the fuse will not blow, and the computer will be at line voltage, posing a hazard to anyone that touches it (or cables, headphones, etc, attached to it). Next, we have C4 capacitor which is connected between neutral and live.
|
How do I know the maximum voltage that a capacitor releases? From what I understand, a capacitor is used to store electric charge and when it is fully charged it can release electricity. When I looked at a capacitor, I found two pieces of information on it: Capacitance (4n7) Voltage Rating (1kV) As I understand, the voltage rating on a capacitor is the maximum amount of voltage that a capacitor can safely be exposed to and can store. But what about when it is fully charged and released, how much voltage can it release? Does it equal the voltage rating? <Q> But what about when it charged full and release, how much voltage it can release ? <S> Does it equal to the voltage rating ? <S> Whatever that may mean to you, "releasing voltage" is not a proper way to think of what a capacitor does. <S> Electric power is delivered to a capacitor when charging and electric power is supplied by a capacitor when discharging. <S> Thus, capacitors store electric energy. <S> The more energy stored by a given capacitor, the more voltage there must be across the capacitor. <S> In fact, the energy stored by a capacitor is proportional to the square of the voltage across: \$W_C = \dfrac{CV^2}{2}\$ <S> where C is the capacitance. <S> The greater the capacitance, the more energy stored for a given voltage. <S> But, real capacitors can be damaged or have their working life shortened by too much voltage. <S> Thus, the voltage rating of a capacitor. <S> To summarize, a capacitor does not release voltage , a capacitor stores and releases energy . <A> But what about when it charged full and release, how much voltage it can release ? <S> Does it equal to the voltage rating ? <S> No, it depends on the voltage that it has been charged with. <S> When disconnected from the circuit, the capacitors voltage is equal or lower to the previously applied voltage. <S> A capacitor can store electric energy. <S> It depends on the load how fast a capacitor discharges when connected to that load. <S> (T = R * C) <S> The voltage rating just specifies the maximum voltage that should be applied to the capacitor. <A> Capacitors store energy. <S> (Q = CV, Energy stored = 0.5CV^2). <S> If you connect a resistor across the terminals of a charged capacitor an initial current (= V/R) will flow but this will rapidly fall towards zero as the capacitor is discharged. <S> How quickly the voltage falls is determined by the time constant of the circuit (= CR) where C is measured in Farads (a very large capacitance) and R is measured in ohms. <A> Simplistic answer (in parts): <S> - The capacitor releases charge at a rate determined by the load it is applied to i.e. the current taken from it. <S> At any time (charging or discharging) the charge remaining in the capacitor = C (capacitance) <S> x V (voltage on its terminals). <S> It's a bit like a rechargeable battery if you would like to think of it this way except it can be discharged all the way to 0V on it's terminals or charged up all the way up to it's maximum voltage rating.
| The voltage depends upon the amount of charge and the size of the capacitor.
|
How bad can an unconnected ground be? My collegue here has two seperate boards linked by an SPI link. He just asked me: "So... you need to connect the grounds?" After I picked myself off the floor and answered very much in the affirmative, I wondered - ok, so how bad can this get? It's a much worse case than this question which had a common PSU. In this case, the SPI bus slave had an open-drain MISO line (with a pull up to the PIC's Vcc). The other lines were SS, MOSI, CLK. No ground. The resulting communication state was odd to say the least. Mostly as MOSI alternatively connected and disconnected the grounds together, through the open-drain, at up to 500KHz! Not to mention different things happening when probes were connected. Or fingers for that matter. I'd never seen the SPI transceiver on a PIC go gaga before, but this seemed to do it. The CLK is, well, odd now. It looks drunk. The PIC was on a demo board connected via USB to a PC. If I asked myself though "What caused the damage" or "What was going on", I'd be stuck to give a proper answer. I guess the ground potentials can diverge wildly, even if the end device is sitting on a desk... Is it worse or better when a probe is connected? Who knows? It begs the question, are other comms links better protected? RS-232 for instance. I've never seen a fried RS-232 transceiver and I've seen a few links where the ground got broken. Anyone shed more light? <Q> Even in RS485/RS232, people should connect ground. <S> The reason is that if both devices are not grounded, then common mode voltage (Vcm) can damage the port. <S> For example, RS485 receivers runs on relatively small differential signal (+/-200mV). <S> However, Vcm can exists...due to noise, bad local grounds, etc. <S> If one device is correctly grounded but the other is not, then instead of seeing +/-200mV <S> , they might see +/- <S> 20.2V. <S> This is assuming the devices are not close to each other. <A> How bad can an unconnected ground be? <S> Pretty bad. <S> Like, it can kill you: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This probably isn't the case you had in mind, but it demonstrates the point: if ground isn't connected, then maybe there are other current paths you didn't consider, and these paths could lead to damage. <S> Thankfully, RS-232 doesn't have the current or voltage to deliver a lethal shock, which is why it's not subject to the same safety regulations that mains powered devices are. <S> A device like this, with no mains isolation, is probably illegal in most jurisdictions. <S> But, replace "you" with "some other device which is easier to kill", and you have the same situation. <A> Thanks all. <S> Instead of putting a comment I'll put an answer as I want to type more text. <S> I hope that isn't poor form. <S> I had assumed that RS-232 was bombproof. <S> From what NothinRandom is saying it isn't, so I'll be more careful in future! <S> So the way I figure it is if you fail to connect ground between two boards you have these possiblities: <S> connect a data line to two isolated boards, you're ok. <S> No current running. <S> connect these boards to a ground point, where the ground points can possibly differ (say via scopes, or even via a long ground line), you could get virtually any voltage on the data line. <S> This can result in a damaged tranceiver. <S> Moral of the story seems to be: when you have external connected lines, use protection circuitry: <S> Optoisolate Protection diodes Common mode chokes <S> I also see some input circuits which have a small resistor in the data line followed by two back to back zener diodes. <S> A little googling shows protection circuits on USB are normal. <S> I assume there's protection circuits on TV inputs, RS-232, etc.
| You should connect ground to be used as a reference point.
|
What makes a pull-up/down resistor strong or weak? A "strong" pull (up/down) resistor would be one of a relatively low value, while a "weak" one would be of a relatively high value. For example, a pull-down resistor would be used to keep an I/O pin low, but a button connected from that pin to V CC would bring it high when pressed, because more current flows from V CC to the pin than from the pin to GND. In that situation, it seems any value of resistor could be used to keep the pin low, and a button press would always "override" it. What, then, would determine if the pull-down resistor is strong or weak? Does "strong" vs "weak" only apply when one such resistor is being compared to other resistances in the circuit, such as an internal pull-down resistor? <Q> Strong means low resistance . <S> Weak means high resistance . <S> Of course low and high are relative terms, and so are strong and weak . <S> The reference for this relationship must be inferred from context. <S> A <S> strong or low resistance pull-up/down resistor is good because the time constant formed the load capacitance (often, the input gate capacitance, and the PCB trace capacitance) is small, so rise/fall times will be short. <S> A strong pull-up/down resistor is good because noise currents from unintended coupling and EMI will result in smaller noise voltages. <S> (Think about Ohm's law) A weak or high resistance pull-up/ <S> down resistor is good because it will not require much current from the driving circuitry to work against the resistor. <S> Batteries will thus last longer, parts can be smaller and don't get as hot. <S> Of course, you usually want all of these things, but a resistor can't be both. <S> A discussion about strong vs. weak is usually clarifying which of these concerns (or perhaps others) are more important for a particular application. <A> A "strong" pull resistor is usually a low value resistor, allows more current through, takes longer to be overwritten, but can quickly reassert a line. <S> They are completely relative to your needs, not just other pull resistors like internal ones. <S> In your button scenario, the time it takes to switch from one state to the other isn't important, so weak vs strong doesn't apply there. <S> But weak vs strong does apply in the practical matter of Current Consumption . <S> A strong pull resistor would, when the button is pressed, cause a large drain of current from vcc through the resistor to ground. <S> A weak pull resistor would cause a small drain of current. <S> Theoretically any resistor would work, but for practical purposes , a weak resistor is used because unnecessary high current drains can cause issues and can easily be avoided by sizing the resistor correctly. <A> Does "strong" vs "weak" only apply when one such resistor is being compared to other resistances in the circuit, such as an internal pull-down resistor? <S> Yes, this is exactly it. <S> Strong and weak simply refer to the relative drive strength of the component. <S> A pull up/down resistor's value has no association to whether it is strong or weak. <S> Only in knowing the context of the other connections to the net can you determine if a pull-up is strong or weak. <A> There are other things to consider when selecting the value of a pull-up or pull-down. <S> For example, depending on the capacitance of the circuit, too week of a pull-up/down will limit how quickly the voltage change occurs. <S> On the other hand, too strong of a pull-up/down will draw excessive current through whatever is trying to pull the other way. <S> These are often considerations in selecting the pull-ups for an I2C (open drain) bus, for example. <S> However, the place I see "weak pull-ups" typically used is inside microcontroller chips, typically on I/ <S> O pins. <S> These are mainly used to guarantee that an input won't float if not connected. <S> The pull-ups are weak both to limit their effect on the external circuitry and to limit the power dissipated inside the chip. <A> When you put a large resistance for ground coupling, the voltage developed across it would prevent the node from getting to ground potential. <S> On the other hand, if you put small resistance to the ground, the node potential would be more close to V(gnd). <S> If R(gnd) is high, it would not be able to pull down your node to zero potential. <S> So, you can consider this as "weak" pull down, and vice-versa. <S> Of course, this is just for comparison purpose only (with other components in your circuit)
| A "weak" pull resistor is usually a high value resistor that only allows a small amount of current through, and can quickly be overwritten, but takes longer to reassert itself.
|
understanding transmission line signal integrity through simulations I need to simulate how signals are reflected based on the source, load and line impedances and how the signal integrity is effected by the spacing between different traces on a board, traces on the same level as well as different layers, traces of single ended and differential nature. I want to see how the signal waveform is effect by the factors mentioned above through simulations. Which software can be used to do this? I am sure that all PCB designers have to do this all the time. I want to do this as an exercise to understand this phenomenon and have a better understanding of it. <Q> I am sure that all PCB designers have to do this all the time. <S> In fact, if you are designing a digital circuit with clock frequencies below about 50 MHz, you almost never will have to do signal integrity analysis to get a working design. <S> And if you know what you are doing it is possible to design up to 1 or 2 GHz by using "best practices" rather than complex simulations. <S> I worked in an organization doing 1, 2, and 3 Gb/s designs and never saw a signal integrity tool in use until 2005 or so. <S> (Although full-blown 3-d EM simulation was very occasionally used for very sticky problems) <S> However as the number of high-speed nets in your design increases, it's not always possible to stick to best practices everywhere, and then a simulation is valuable to indicate how much you can get away with. <S> Which software can be used to do this? <S> In contrast to what another answer said, SPICE and its derivatives are not well suited to this type of simulation. <S> SPICE is designed for lumped-element analysis at the transistor level. <S> In the situation you described you need to simulate a distributed element (a transmission line) <S> and you're unlikely to have a transistor-level model of your source or load. <S> Some SPICE-derived tools might have a signal-integrity tool bolted on, but it isn't typically what they're good at. <S> Signal itegrity tools generally use higher level models to reduce simulation time when simulating dozens or hundreds of distributed elements. <S> And they can take inputs from IBIS models of the source and load ICs. <S> These are standardized high-level macromodels that don't reveal details of the IC internals that the vendor might not want to share with all its customers. <S> Although I use Altium regularly I haven't used its signal integrity modelling tools. <S> But from the description, they do seem to be IBIS-based rather than SPICE-like, so would probably work in many cases. <S> Another well-known tool is HyperLynx from Mentor Graphics. <S> Cadence offers a tool set called Sigrity which I believe is similar <S> but I have never seen or used. <A> ( Video ) <A> like Orcad, pads, altium,Hspice etc. <S> most of the spice programs can do them. <S> But most of the efficient softwares are costly. <S> if want to just evaluate and learn try spice simulators.one of good free software is Micro-Cap10 http://www.spectrum-soft.com/index.shtm
| Altium Designer has signal integrity analysis that can help simulate and discover reflection and crosstalk problems. Most of the softwares have simulation capabilities.
|
Light detector for row of LEDs Today I created this circuit and it works fine: Now I want to replace the single LED with this row of LEDs: But after this all the LEDs have a low brightness. How can I get back the brightness of the LEDs to a similar level to that of a single LED? <Q> Without validating the circuit provided in the question, here is a minor addition that should address the brightness issue partly ( see note at end ). <S> A MOSFET is switched by the same operating point in the original schematic, as was switching the single LED on or off. <S> This removes the dependency of LED brightness on the emitter current of the BJT Q2. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The gain and thus switching sharpness of the pair of BJTs has not been compromised from the original, partly because I was lazy. <S> BJT Q2 could very well be replaced by the MOSFET directly , if so desired. <S> Note: <S> What this does not solve, is the issue around the current drive capability of the power source. <S> If the 6 Volt supply in the design is not able to supply the current demands of the multitude of LEDs, that will simply require the supply source to be changed. <A> You would do it by replacing R2 and D1, with an array. <S> While the way you want it has 8 leds in parallel, without resistors, a more efficient way would be this (I'm assuming a ~2v led, and based on that 8~9mA per led [(6v Source - 2v LED Forward Voltage) <S> / 470Ω = 8mA]. <S> 4 parallel strings of 2 Leds in series with a 220Ω resistor. <S> 32mA of current. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Otherwise you would have 8 parallel strings of 1 led + 470Ω resistor. <S> The BC547 you use is more than enough to handle the 8mA * 8 strings of current (64mA, it can handle 100mA) <S> simulate this circuit <A> There will however be an overall limit on how much current you can put through the transistor limiting how many LEDs you can connect to it.
| You should duplicate both R2 and D1: one current limiting resistor per LED.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.